'', ); function __construct() { $this->TimeStart = GetMicrotime(); // Get script start time } function SystemMessage($Title, $Text) { return('

'.$Title.'

'.$Text.'
'); //ShowFooter(); //die(); } function ShowHeader($Title, $Path, $BodyParam = '') { $ScriptName = $_SERVER['SCRIPT_NAME']; while(strpos($ScriptName, '//') !== false) $ScriptName = str_replace('//', '/', $ScriptName); $PathTreePath = '/'; $PathTreeItem = $this->PathTree; $Navigation = ''.$PathTreeItem[0].' > '; $ScriptName = substr($ScriptName, strlen($this->System->Config['Web']['RootFolder'])); $ScriptNameParts = explode('/', $ScriptName); array_shift($ScriptNameParts); foreach($ScriptNameParts as $ScriptNamePart) { //echo($ScriptNamePart.'
'); if(array_key_exists($ScriptNamePart, $PathTreeItem)) { if(is_array($PathTreeItem[$ScriptNamePart])) { $PathTreeItem = $PathTreeItem[$ScriptNamePart]; $PathTreePath .= $ScriptNamePart.'/'; if($PathTreeItem[0] != '') $Navigation .= ''.$PathTreeItem[0].' > '; } else { if($PathTreeItem[$ScriptNamePart] != '') $Navigation .= ''.$PathTreeItem[$ScriptNamePart].' > '; } } } $Navigation = substr($Navigation, 0, -6); $Output = 'System->Config['Web']['Charset'].'"?>'."\n". ''. ''. ''. ''. ''. ''.$this->System->Config['Web']['Title'].' - '.$Path.' '; return($Output); } function ShowFooter() { global $ScriptStartTime; $ScriptGenerateDuration = round(GetMicrotime() - $ScriptStartTime, 2); $Output = ''; return($Output); } function GetOutput() { $Output = $this->Show(); $Output = $this->ShowHeader($this->FullTitle, $this->ShortTitle).$Output; $Output .= $this->ShowFooter(); //$Output = $this->FormatOutput($Output); echo($Output); } // Funkce formatovani vystupu function FormatOutput($s) { $out = ''; $nn = 0; $n = 0; while($s != '') { $start = strpos($s, '<'); $end = strpos($s, '>'); if($start != 0) { $end = $start - 1; $start = 0; } $line = trim(substr($s, $start, $end + 1)); if(strlen($line) > 0) if($line[0] == '<') { if($s[$start + 1] == '/') { $n = $n - 2; $nn = $n; } else { if(strpos($line, ' ')) $cmd = substr($line, 1, strpos($line, ' ') - 1); else $cmd = substr($line, 1, strlen($line) - 2); //echo('['.$cmd.']'); if(strpos($s, '')) $n = $n + 2; } }// else $line = '['.$line.']'; //if($line != '') echo(htmlspecialchars(str_repeat(' ',$nn).$line."\n")); if($line != '') $out .= (str_repeat(' ', $nn).$line."\n"); $s = substr($s, $end + 1, strlen($s)); $nn = $n; } return($out); } } ?>