Changeset 55 for trunk/www/common/page.php
- Timestamp:
- Aug 3, 2009, 11:39:13 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/common/page.php
r54 r55 4 4 { 5 5 var $TimeStart; 6 7 function SystemMessage($Title, $Text)8 {9 return('<table align="center"><tr><td><div class="SystemMessage"><h3>'.$Title.'</h3><div>'.$Text.'</div></div</td></tr></table>');10 //ShowFooter();11 //die();12 }13 6 14 7 function ShowHeader($Title, $Path) … … 20 13 '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'. 21 14 '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs">'. 22 '<head><link rel="stylesheet" href="'.$this->System->Config['Web']['RootFolder'].'/style .css" type="text/css" media="all" />'.23 24 '<script type="text/javascript" src="'.$this->System->Config['Web']['RootFolder'].'/ global.js"></script>'.15 '<head><link rel="stylesheet" href="'.$this->System->Config['Web']['RootFolder'].'/style/style.css" type="text/css" media="all" />'. 16 '<meta http-equiv="content-type" content="application/xhtml+xml; charset='.$this->System->Config['Web']['Charset'].'" />'. 17 '<script type="text/javascript" src="'.$this->System->Config['Web']['RootFolder'].'/style/global.js"></script>'. 25 18 '<title>'.$this->System->Config['Web']['Title'].' - '.$Path.'</title> 26 19 </head><body'.$BodyParam.'>'. … … 33 26 $Output .= '</span><div class="MenuItem2">'; 34 27 if($this->System->Modules['User']->User['Id'] == $this->System->Modules['User']->AnonymousUserId) 35 $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=LoginForm">Přihlášení</a> <a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=UserRegister">Registrace</a>'; 36 else $Output .= $this->System->Modules['User']->User['Name'].' <a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=Logout">Odhlásit</a>'. 28 { 29 $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=LoginForm">Přihlášení</a>'; 30 if($this->System->Config['Web']['UserRegistrationEnabled']) $Output .= ' <a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=UserRegister">Registrace</a>'; 31 } else $Output .= $this->System->Modules['User']->User['Name'].' <a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=Logout">Odhlásit</a>'. 37 32 ' <a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=UserOptions">Nastavení</a>'; 38 33 $Output .= '</div></div>'; … … 42 37 function ShowFooter() 43 38 { 44 39 global $ScriptTimeStart; 45 40 46 41 $Time = round(GetMicrotime() - $ScriptTimeStart, 2); … … 52 47 ' | E-mail: '.$this->System->Config['Web']['AdminEmail']; 53 48 if($this->System->Config['Web']['ShowRuntimeInfo'] == true) $Output .= ' Doba generování: '.$Time.' s / '.ini_get('max_execution_time').' s | Použitá paměť: '.HumanSize(memory_get_peak_usage(FALSE)).' / '.ini_get('memory_limit').'B |'; 54 49 $Output .= '</i></div></body></html>'; 55 50 return($Output); 56 51 } … … 78 73 { 79 74 $Start = strpos($Text, '<'); 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 75 $End = strpos($Text, '>'); 76 if($Start != 0) 77 { 78 $End = $Start - 1; 79 $Start = 0; 80 } 81 $Line = trim(substr($Text, $Start, $End + 1)); 82 if(strlen($Line) > 0) 83 if($Line[0] == '<') 84 { 85 if($Text[$Start + 1] == '/') 86 { 87 $IndentNew = $IndentNew - $Indentation; 88 $Indent = $IndentNew; 89 } else 90 { 91 if(strpos($Line, ' ')) $Command = substr($Line, 1, strpos($Line, ' ') - 1); 92 else $Command = substr($Line, 1, strlen($Line) - $Indentation); 93 if(strpos($Text, '</'.$Command.'>')) $IndentNew = $IndentNew + $Indentation; 94 } 95 } 96 if($Line != '') $Output .= (str_repeat(' ', $Indent).$Line."\n"); 97 $Text = substr($Text, $End + 1, strlen($Text)); 98 $Indent = $IndentNew; 104 99 } 105 100 return($Output);
Note:
See TracChangeset
for help on using the changeset viewer.