Changeset 12
Legend:
- Unmodified
- Added
- Removed
-
trunk/RSS.php
r10 r12 18 18 function Generate() 19 19 { 20 Header('Content-Type: text/xml; charset=utf-8'); 20 21 $Result = '<?xml version="1.0" encoding="'.$this->Charset.'" ?>'."\n". //<? 21 '<rss version="2.0">'."\n".22 " <channel>\n".23 " <title>".$this->Title."</title>\n".24 " <link>".$this->Link."</link>\n".25 " <description>".$this->Description."</description>\n".26 " <language>cs</language>\n".27 " <webMaster>".$this->WebmasterEmail."</webMaster>\n".28 " <pubDate>".date('r')."</pubDate>\n".29 " <ttl>20</ttl>\n";22 '<rss version="2.0">'."\n". 23 " <channel>\n". 24 " <title>".$this->Title."</title>\n". 25 " <link>".$this->Link."</link>\n". 26 " <description>".$this->Description."</description>\n". 27 " <language>cs</language>\n". 28 " <webMaster>".$this->WebmasterEmail."</webMaster>\n". 29 " <pubDate>".date('r')."</pubDate>\n". 30 " <ttl>20</ttl>\n"; 30 31 foreach($this->Items as $Item) 31 32 { … … 33 34 ' <title>'.htmlspecialchars($Item['Title'])."</title>\n". 34 35 ' <description>'.htmlspecialchars($Item['Description'])."</description>\n". 35 ' <pubDate>'.date('r',$Item['Time'])."</pubDate>\n".36 ' <link>'.$Item['Link']."</link>\n".36 ' <pubDate>'.date('r',$Item['Time'])."</pubDate>\n". 37 ' <link>'.$Item['Link']."</link>\n". 37 38 " </item>\n"; 38 39 } -
trunk/index.php
r11 r12 16 16 { 17 17 return($this->Config['BaseURL'].$URL); 18 } 19 20 function AbsoluteLink($URL) 21 { 22 return($this->Config['HostName'].$this->Config['BaseURL'].$URL); 18 23 } 19 24 … … 94 99 $Output = '<h4 style="text-align: center;">Taneční školy:</h4>'; 95 100 $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>'; 97 102 $Output .= '</tr>'; 98 103 $DbResult = $this->Database->select('School', '*', '1 ORDER BY `Name`'); 99 104 while($School = $DbResult->fetch_assoc()) 100 105 { 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>'; 102 107 $Output .= '</tr>'; 103 108 } … … 281 286 $RSS->Title = 'Taneční seznamka'; 282 287 $RSS->Description = ''; 283 $RSS->Link = $this-> Link('/seznamka/');288 $RSS->Link = $this->AbsoluteLink('/seznamka/'); 284 289 285 290 $DbResult = $this->Database->select('MeetItem', '*, (SELECT MeetSource.Name FROM MeetSource WHERE MeetSource.Id = MeetItem.Source) AS SourceName, '. … … 297 302 if ($MeetItem['Height'] != '') $Description .= '<br/>Výška: '.$MeetItem['Height'].' cm'; 298 303 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>'; 300 305 $RSS->Items[] = array( 301 306 'Title' => $Title, 302 307 'Description' => $Description, 303 308 'Time' => $MeetItem['UnixTime'], 304 'Link' => $this-> Link('/seznamka/'),309 'Link' => $this->AbsoluteLink('/seznamka/'), 305 310 ); 306 311 $Output .= '</tr>';
Note:
See TracChangeset
for help on using the changeset viewer.