source: trunk/Application/BaseView.php

Last change on this file was 95, checked in by chronos, 3 years ago
  • Modified: Updated Common package.
  • Added: Explicit types for better type checking.
  • Fixed: Support for php 8.0.
File size: 1.1 KB
Line 
1<?php
2
3class BaseView extends View
4{
5 function ShowPage(string $Content): string
6 {
7 global $ReleaseTime, $Revision;
8
9 $Output = '<?xml version="1.0" encoding="'.$this->System->Config['Web']['Charset'].'"?>'."\n".
10 '<!DOCTYPE html>'.
11 '<html>'.
12 '<head>'.
13 '<meta http-equiv="Content-Language" content="cs"/>'.
14 '<meta http-equiv="content-type" content="text/html; charset='.$this->System->Config['Web']['Charset'].'" />'.
15 '<meta name="robots" content="all" />'.
16 '<meta name="viewport" content="width=device-width, initial-scale=1">'.
17 '<title>'.$this->System->Config['Web']['Title'].'</title>'.
18 '<link rel="StyleSheet" href="'.$this->System->Link('/style/style.css').'" type="text/css" media="all"/>'.
19 '</head><body>';
20 $Output .= $Content;
21 $Output .= '<br/><div style="text-align: center; font-size: small;">Verze: '.$Revision.' ('.HumanDate($ReleaseTime).')'.
22 ' &nbsp; <a href="https://app.zdechov.net/estetistic/">Zdrojový kód</a></div>';
23 $Output .= '</body></html>';
24 return $Output;
25 }
26
27 function GetOutput(Page $Page): string
28 {
29 $Output = $this->ShowPage($Page->Show());
30 return $Output;
31 }
32}
33
Note: See TracBrowser for help on using the repository browser.