Changeset 35 for trunk


Ignore:
Timestamp:
Feb 3, 2019, 12:30:05 AM (5 years ago)
Author:
chronos
Message:
  • Added: The list of dance related movies.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/index.php

    r34 r35  
    4545      '<a href="'.$this->Link('/skoly/').'">Školy</a> '.
    4646      '<a href="'.$this->Link('/seznamka/').'">Seznamka</a> '.
     47      '<a href="'.$this->Link('/filmy/').'">Filmy</a> '.
    4748      '</div>';
    4849    return($Output);
     
    6566  function ShowDanceList()
    6667  {
    67     $this->Title .= ' - Tance';
     68    $this->Title = 'Tance - '.$this->Title;
    6869    $Output = '<div class="title">Tance</div>';
    6970    $Output .= '<table class="WideTable">';
     
    99100  function ShowSchoolList()
    100101  {
    101     $this->Title .= ' - Taneční školy';
     102    $this->Title = 'Taneční školy - '.$this->Title;
    102103    $Output = '<div class="title">Taneční školy</div>';
    103104    $Output .= '<table class="WideTable">';
     
    107108    while($School = $DbResult->fetch_assoc())
    108109    {
    109       $Output .= '<tr><td>'.$School['Name'].'</td><td><a href="'.$this->Link($School['URL']).'">'.$School['URL'].'</a></th><td>'.$School['Address'].'</td>';
    110       $Output .= '</tr>';
     110      $Output .= '<tr>'.
     111        '<td>'.$School['Name'].'</td>'.
     112        '<td><a href="'.$this->Link($School['URL']).'">'.$School['URL'].'</a></td>'.
     113        '<td>'.$School['Address'].'</td>'.
     114        '</tr>';
     115    }
     116    $Output .= '</table>';
     117
     118    return($Output);
     119  }
     120
     121  function ShowMovieList()
     122  {
     123    $this->Title = 'Filmy - '.$this->Title;
     124    $Output = '<div class="title">Filmy</div>';
     125    $Output .= '<table class="WideTable">';
     126    $Output .= '<tr><th>Rok</th><th>Český název</th><th>Anglický název</th><th>IMDb</th><th>ČSFD</th>';
     127    $Output .= '</tr>';
     128    $DbResult = $this->Database->select('Movie', '*', '1 ORDER BY `Year` DESC');
     129    while($Movie = $DbResult->fetch_assoc())
     130    {
     131      $Output .= '<tr>'.
     132        '<td>'.$Movie['Year'].'</td>'.
     133        '<td>'.$Movie['NameCz'].'</td>'.
     134        '<td>'.$Movie['NameEn'].'</td>'.
     135        '<td><a href="'.$Movie['Imdb'].'">Otevřít</a></td>'.
     136        '<td><a href="'.$Movie['Csfd'].'">Otevřít</a></td>'.
     137        '</tr>';
    111138    }
    112139    $Output .= '</table>';
     
    125152  function ShowMeetList()
    126153  {
    127     $this->Title .= ' - Seznamka';
     154    $this->Title = 'Seznamka - '.$this->Title;
    128155    $Output = '';
    129156    if (array_key_exists('lvm', $_GET) and ($_GET['lvm'] == 'seznam'))
     
    316343  function ShowMeetItem()
    317344  {
    318     $this->Title .= ' - Seznamka - Inzerát';
     345    $this->Title = 'Inzerát - Seznamka - '.$this->Title;
    319346    $Output = '';
    320347    if(count($this->PathItems) > 2)
     
    430457      '/skoly/',
    431458      '/tance/',
     459      '/filmy/',
    432460    );
    433461    $Result = '<?xml version="1.0" encoding="UTF-8"?>'."\n".
     
    450478        '  <lastmod>'.date('c', $Time).'</lastmod>'."\n".
    451479        '</url>'."\n";
    452       $Result .= '<loc>'.$this->AbsoluteLink($Url).'</loc>'."\n";
    453480    }
    454481
     
    480507      else if($this->PathItems[0] == 'skoly') $Output .= $this->ShowSchoolList();
    481508      else if($this->PathItems[0] == 'tance') $Output .= $this->ShowDanceList();
     509      else if($this->PathItems[0] == 'filmy') $Output .= $this->ShowMovieList();
    482510      else if($this->PathItems[0] == 'seznamka') {
    483511        if(count($this->PathItems) > 1)
Note: See TracChangeset for help on using the changeset viewer.