<?php

class BaseView extends View
{
  function ShowPage(string $Content): string
  {
    global $ReleaseTime, $Revision;

    $Output = '<?xml version="1.0" encoding="'.$this->System->Config['Web']['Charset'].'"?>'."\n".
    '<!DOCTYPE html>'.
    '<html>'.
    '<head>'.
    '<meta http-equiv="Content-Language" content="cs"/>'.
    '<meta http-equiv="content-type" content="text/html; charset='.$this->System->Config['Web']['Charset'].'" />'.
    '<meta name="robots" content="all" />'.
    '<meta name="viewport" content="width=device-width, initial-scale=1">'.
    '<title>'.$this->System->Config['Web']['Title'].'</title>'.
    '<link rel="StyleSheet" href="'.$this->System->Link('/style/style.css').'" type="text/css" media="all"/>'.
    '</head><body>';
    $Output .= $Content;
    $Output .= '<br/><div style="text-align: center; font-size: small;">Verze: '.$Revision.' ('.HumanDate($ReleaseTime).')'.
      ' &nbsp; <a href="https://app.zdechov.net/estetistic/">Zdrojový kód</a></div>';
    $Output .= '</body></html>';
    return $Output;
  }

  function GetOutput(Page $Page): string
  {
    $Output = $this->ShowPage($Page->Show());
    return $Output;
  }
}

