'; foreach (Core::Cast($this->System)->LocaleManager->Available as $Locale) { $Remaining = substr($_SERVER["REQUEST_URI"], strlen(Core::Cast($this->System)->BaseURL)); if (substr($Remaining, 1, strlen($Locale['Code'].'/')) == Core::Cast($this->System)->LocaleManager->LangCode.'/') $Remaining = substr($Remaining, strlen('/'.$Locale['Code'])); if ($Locale['Code'] == Core::Cast($this->System)->LocaleManager->CurrentLocale->Texts->Code) $Selected = ' selected="selected"'; else $Selected = ''; $Remaining = Core::Cast($this->System)->TranslateReverseURL($Remaining, Core::Cast($this->System)->LocaleManager->LangCode); $URL = Core::Cast($this->System)->LinkLocale($Remaining, $Locale['Code']); $Output .= ''; } $Output .= ''; return $Output; } function ShowTopBar() { $User = ModuleUser::Cast($this->System->GetModule('User'))->User; $Output = ''; return $Output; } function ShowMainMenu() { $User = ModuleUser::Cast($this->System->GetModule('User'))->User; $Output = ''.T('Menu').':'. '
'; return $Output; } function ShowHeader() { $Output = ''. ''. ''. ''. ''. ''. ''. ''. ''. ''. ''. ''; // Show page headers $Bar = ''; foreach (Core::Cast($this->System)->PageHeaders as $Item) { $Output .= call_user_func($Item); } $Title = Core::Cast($this->System)->Config['Web']['Title']; if ($this->Title != '') $Title = $this->Title.' - '.$Title; $Output .= ''.$Title.''. ''. ''; $Output .= $this->ShowTopBar(); $Output .= ''; $Output .= ''; $Output .= ''. ''; if (Core::Cast($this->System)->Config['Web']['ShowRuntimeInfo'] == true) $Output .= ''; $Output .= '
'; return $Output; } function ShowFooter() { global $ScriptStartTime, $Revision, $ReleaseDate, $Version; $ScriptGenerateDuration = round(GetMicrotime() - $ScriptStartTime, 2); $Output = '
'.T('Version').': '.$Version.' '.T('Revision').': '.$Revision.' ('.Core::Cast($this->System)->HumanDate($ReleaseDate).')'. '   '.T('Source code').'   '. ''.T('Changelog').'   '. Core::Cast($this->System)->Config['Web']['WebCounter']; $Output .= '
'.T('Generating duration').': '. $ScriptGenerateDuration.' s / '.ini_get('max_execution_time').' s    '.T('Used memory').': '. HumanSize(memory_get_peak_usage(FALSE)).' / '.ini_get('memory_limit').'B    HTML validator
'. ''. ''; return $Output; } function ShowPage($Content) { $Output = $this->ShowHeader().$Content.$this->ShowFooter(); if (Core::Cast($this->System)->Config['Web']['FormatOutput']) $Output = $this->FormatOutput($Output); return $Output; } 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 ($nn < 0) $nn = 0; if ($line != '') $out .= (str_repeat(' ', $nn).$line."\n"); $s = substr($s, $end + 1, strlen($s)); $nn = $n; } return $out; } }