Name = 'Movie'; $this->Version = '1.0'; $this->Creator = 'Chronos'; $this->License = 'GNU/GPL'; $this->Description = 'List of dance movies'; $this->Dependencies = array(); $this->RSSChannels = array(); } function Start(): void { $this->System->RegisterPage(['filmy'], 'PageMovieList'); Core::Cast($this->System)->RegisterMenuItem('/filmy', 'Filmy'); } } class PageMovieList extends Page { function __construct($System) { parent::__construct($System); $this->Title = 'Filmy'; $this->Description = 'Taneční filmy'; } function Show(): string { $Output = ''; if (array_key_exists('lvm', $_GET) and ($_GET['lvm'] == 'seznam')) $this->RawPage = true; else $Output .= '
Filmy
'; $Filter = new Filter(); $Filter->Items = array( array('Name' => 'year', 'Type' => 'Integer', 'DbName' => 'Year', 'Title' => 'Rok'), array('Name' => 'namecz', 'Type' => 'String', 'DbName' => 'NameCz', 'Title' => 'Český název'), array('Name' => 'nameen', 'Type' => 'String', 'DbName' => 'NameEn', 'Title' => 'Anglický název'), ); $Output .= $Filter->GetOutput($this->System->Link('/filmy/')); $Where = $Filter->GetWhere($this->Database); $DbResult = $this->Database->query('SELECT COUNT(*) FROM Movie WHERE '.$Where); $DbRow = $DbResult->fetch_row(); $PageList = GetPageList($DbRow[0]); $Output .= $PageList['Output']; $TableColumns = array( array('Name' => 'Year', 'Title' => 'Rok'), array('Name' => 'NameCz', 'Title' => 'Český název'), array('Name' => 'NameEn', 'Title' => 'Anglický název'), array('Name' => 'Imdb', 'Title' => 'IMDB'), array('Name' => 'Csfd', 'Title' => 'ČSFD'), ); $Order = GetOrderTableHeader($TableColumns, 'Year', 1); $Output .= '
'; $Output .= ''; $Output .= $Order['Output']; $Output .= ''; $DbResult = $this->Database->select('Movie', '*', $Where.$Order['SQL'].$PageList['SQLLimit']); while ($Movie = $DbResult->fetch_assoc()) { $Output .= ''. ''. ''. ''. ''. ''. ''; } $Output .= '
'.$Movie['Year'].''.$Movie['NameCz'].''.$Movie['NameEn'].'OtevřítOtevřít
'; $Output .= '
'; $Output .= $PageList['Output']; return $Output; } }