Changeset 12 for trunk/index.php


Ignore:
Timestamp:
Dec 21, 2018, 8:51:54 PM (6 years ago)
Author:
chronos
Message:
  • Modified: Use absolute links for RSS channels.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/index.php

    r11 r12  
    1616  {
    1717    return($this->Config['BaseURL'].$URL);
     18  }
     19
     20  function AbsoluteLink($URL)
     21  {
     22    return($this->Config['HostName'].$this->Config['BaseURL'].$URL);
    1823  }
    1924
     
    9499    $Output = '<h4 style="text-align: center;">Taneční školy:</h4>';
    95100    $Output .= '<table class="WideTable">';
    96     $Output .= '<tr><th>Název</th><th>Adresa</th>';
     101    $Output .= '<tr><th>Název</th><th>Webové stránky</th><th>Adresa</th>';
    97102    $Output .= '</tr>';
    98103    $DbResult = $this->Database->select('School', '*', '1 ORDER BY `Name`');
    99104    while($School = $DbResult->fetch_assoc())
    100105    {
    101       $Output .= '<tr><td><a href="'.$this->Link($School['URL']).'">'.$School['Name'].'</a></th><td>'.$School['Address'].'</td>';
     106      $Output .= '<tr><td>'.$School['Name'].'</td><td><a href="'.$this->Link($School['URL']).'">'.$School['URL'].'</a></th><td>'.$School['Address'].'</td>';
    102107      $Output .= '</tr>';
    103108    }
     
    281286    $RSS->Title = 'Taneční seznamka';
    282287    $RSS->Description = '';
    283     $RSS->Link = $this->Link('/seznamka/');
     288    $RSS->Link = $this->AbsoluteLink('/seznamka/');
    284289
    285290    $DbResult = $this->Database->select('MeetItem', '*, (SELECT MeetSource.Name FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceName, '.
     
    297302      if ($MeetItem['Height'] != '') $Description .= '<br/>Výška: '.$MeetItem['Height'].' cm';
    298303      if ($MeetItem['Weight'] != '') $Description .= '<br/>Váha: '.$MeetItem['Weight'].' kg';
    299       $Description .= '<br/>Škola: <a href="'.$this->Link($MeetItem['SourceURL']).'">'.$MeetItem['SourceName'].'</a>';
     304      $Description .= '<br/>Škola: <a href="'.$this->AbsoluteLink($MeetItem['SourceURL']).'">'.$MeetItem['SourceName'].'</a>';
    300305      $RSS->Items[] = array(
    301306        'Title' => $Title,
    302307        'Description' => $Description,
    303308        'Time' => $MeetItem['UnixTime'],
    304         'Link' => $this->Link('/seznamka/'),
     309        'Link' => $this->AbsoluteLink('/seznamka/'),
    305310      );
    306311      $Output .= '</tr>';
Note: See TracChangeset for help on using the changeset viewer.