Changeset 46 for trunk/Modules/Movie
- Timestamp:
- Nov 10, 2019, 1:42:40 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Movie/Movie.php
r38 r46 19 19 $this->System->RegisterPage('filmy', 'PageMovieList'); 20 20 $this->System->RegisterMenuItem('/filmy', 'Filmy'); 21 } 21 } 22 22 } 23 23 … … 30 30 $this->ShortTitle = 'Filmy'; 31 31 } 32 32 33 33 function Show() 34 34 { 35 $Output = ''; 35 36 $this->Title = 'Filmy - '.$this->Title; 36 $Output = '<div class="title">Filmy</div>'; 37 if (array_key_exists('lvm', $_GET) and ($_GET['lvm'] == 'seznam')) 38 $this->ClearPage = true; 39 else $Output .= '<div class="title">Filmy</div>'; 40 41 $Filter = new Filter(); 42 $Filter->Items = array( 43 array('Name' => 'year', 'Type' => 'Integer', 'DbName' => 'Year', 'Title' => 'Rok'), 44 array('Name' => 'namecz', 'Type' => 'String', 'DbName' => 'NameCz', 'Title' => 'Český název'), 45 array('Name' => 'nameen', 'Type' => 'String', 'DbName' => 'NameEn', 'Title' => 'Anglický název'), 46 ); 47 $Output .= $Filter->GetOutput($this->System->Link('/filmy/')); 48 $Where = $Filter->GetWhere($this->Database); 49 50 $DbResult = $this->Database->query('SELECT COUNT(*) FROM Movie WHERE '.$Where); 51 $DbRow = $DbResult->fetch_row(); 52 $PageList = GetPageList($DbRow[0]); 53 $Output .= $PageList['Output']; 54 $TableColumns = array( 55 array('Name' => 'Year', 'Title' => 'Rok'), 56 array('Name' => 'NameCz', 'Title' => 'Český název'), 57 array('Name' => 'NameEn', 'Title' => 'Anglický název'), 58 array('Name' => 'Imdb', 'Title' => 'IMDB'), 59 array('Name' => 'Csfd', 'Title' => 'ČSFD'), 60 ); 61 $Order = GetOrderTableHeader($TableColumns, 'Year', 1); 62 63 $Output .= '<div id="list_content">'; 37 64 $Output .= '<table class="WideTable">'; 38 $Output .= '<tr><th>Rok</th><th>Český název</th><th>Anglický název</th><th>IMDb</th><th>ČSFD</th>';65 $Output .= $Order['Output']; 39 66 $Output .= '</tr>'; 40 $DbResult = $this->Database->select('Movie', '*', '1 ORDER BY `Year` DESC');67 $DbResult = $this->Database->select('Movie', '*', $Where.$Order['SQL'].$PageList['SQLLimit']); 41 68 while($Movie = $DbResult->fetch_assoc()) 42 69 { … … 50 77 } 51 78 $Output .= '</table>'; 79 $Output .= '</div>'; 80 $Output .= $PageList['Output']; 52 81 53 82 return($Output);
Note:
See TracChangeset
for help on using the changeset viewer.