Changeset 738 for trunk/Common/Page.php
- Timestamp:
- Apr 14, 2015, 10:20:16 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Page.php
r729 r738 15 15 var $Encoding; 16 16 var $Style; 17 17 18 18 function __construct($System) 19 19 { 20 20 parent::__construct($System); 21 21 22 22 $this->FormatHTML = false; 23 23 $this->ShowRuntimeInfo = false; 24 24 $this->Encoding = 'utf-8'; 25 25 $this->Style = 'new'; 26 26 27 27 // TODO: Move to external code 28 28 if(isset($this->System->Config['Web']['FormatHTML'])) … … 35 35 $this->Style = $this->System->Config['Web']['Style']; 36 36 } 37 37 38 38 function Show() 39 39 { 40 40 return(''); 41 41 } 42 42 43 43 function SystemMessage($Title, $Text) 44 { 44 { 45 45 return('<table align="center"><tr><td><div class="SystemMessage"><h3>'.$Title.'</h3><div>'.$Text.'</div></div></td></tr></table>'); 46 46 //ShowFooter(); … … 50 50 function ShowHeader($Title, $Path) 51 51 { 52 52 if(array_key_exists('REQUEST_URI', $_SERVER)) 53 53 $ScriptName = $_SERVER['REQUEST_URI']; 54 54 else $ScriptName = ''; 55 55 while(strpos($ScriptName, '//') !== false) 56 56 $ScriptName = str_replace('//', '/', $ScriptName); … … 62 62 $Navigation = ''; 63 63 while($Page) 64 { 64 { 65 65 $Navigation = ' > <a href="'.$this->System->Link($ScriptName).'/">'.$Page->ShortTitle.'</a>'.$Navigation; 66 66 67 67 if(class_exists($Page->ParentClass)) 68 68 { … … 71 71 $ScriptName = substr($ScriptName, 0, strrpos($ScriptName, '/')); 72 72 } else $Page = null; 73 } 73 } 74 74 $Navigation = substr($Navigation, 6); 75 75 … … 89 89 //$Output .= '<div class="MainTitle">'.$Title.'</div>'; 90 90 $Output .= '<div class="MainTitle"><span class="MenuItem"><strong>Navigace :: </strong> '.$Navigation.'</span><div class="MenuItem2">'; 91 92 91 foreach($this->System->Bars['Top'] as $BarItem) 92 $Output .= call_user_func($BarItem); 93 93 $Output .= '</div></div>'; 94 94 } … … 99 99 { 100 100 global $ScriptTimeStart, $Revision, $ReleaseTime; 101 101 102 102 $Time = round(GetMicrotime() - $ScriptTimeStart, 2); 103 103 $Output = ''; … … 112 112 } 113 113 $Output .= '</body></html>'; 114 return($Output); 114 return($Output); 115 115 } 116 116 … … 122 122 // $Output = 'Chyba: '.$E->getMessage(); 123 123 //} 124 if($this->ClearPage == false) 124 if($this->ClearPage == false) 125 125 { 126 126 $Output = $this->ShowHeader($this->FullTitle, $this->ShortTitle).$Output; … … 130 130 echo($Output); 131 131 } 132 132 133 133 function NewPage($ClassName) 134 134 { … … 156 156 } 157 157 $line = trim(substr($s, $start, $end + 1)); 158 if(strlen($line) > 0) 158 if(strlen($line) > 0) 159 159 if($line[0] == '<') 160 160 { 161 if($s[$start + 1] == '/') 161 if($s[$start + 1] == '/') 162 162 { 163 163 $n = $n - 2; 164 164 $nn = $n; 165 } else 165 } else 166 166 { 167 167 if(strpos($line, ' ')) $cmd = substr($line, 1, strpos($line, ' ') - 1); … … 169 169 //echo('['.$cmd.']'); 170 170 if(strpos($s, '</'.$cmd.'>')) $n = $n + 2; 171 } 171 } 172 172 }// else $line = '['.$line.']'; 173 173 //if($line != '') echo(htmlspecialchars(str_repeat(' ',$nn).$line."\n"));
Note:
See TracChangeset
for help on using the changeset viewer.