- Timestamp:
- Jan 20, 2012, 7:46:05 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/RSS.php
r373 r375 1 1 <?php 2 2 3 function GenerateRSS($Data) 3 class RSS 4 4 { 5 global $Config; 5 var $Charset; 6 var $Title; 7 var $Link; 8 var $Description; 9 var $WebmasterEmail; 10 var $Items; 6 11 7 $Result = '<?xml version="1.0" encoding="'.$Config['Web']['Charset'].'" ?>'."\n". //<? 12 function __construct() 13 { 14 $this->Charset = 'utf8'; 15 $this->Items = array(); 16 } 17 18 function Generate($Data) 19 { 20 $Result = '<?xml version="1.0" encoding="'.$this->Charset.'" ?>'."\n". //<? 8 21 '<rss version="2.0">'."\n". 9 22 " <channel>\n". 10 " <title>".$ Data['Title']."</title>\n".11 " <link>".$ Data['Link']."</link>\n".12 " <description>".$ Data['Description']."</description>\n".23 " <title>".$this->Title."</title>\n". 24 " <link>".$this->Link."</link>\n". 25 " <description>".$this->Description."</description>\n". 13 26 " <language>cs</language>\n". 14 " <webMaster>".$ Data['WebmasterEmail']."</webMaster>\n".27 " <webMaster>".$this->WebmasterEmail."</webMaster>\n". 15 28 " <pubDate>".date('r')."</pubDate>\n". 16 29 " <ttl>20</ttl>\n"; 17 foreach($Data['Items'] as $Item) 18 { 19 $Result .= " <item>\n". 20 ' <title>'.htmlspecialchars($Item['Title'])."</title>\n". 21 ' <description>'.htmlspecialchars($Item['Description'])."</description>\n". 22 ' <pubDate>'.date('r',$Item['Time'])."</pubDate>\n". 23 ' <link>'.$Item['Link']."</link>\n". 24 " </item>\n"; 30 foreach($this->Items as $Item) 31 { 32 $Result .= " <item>\n". 33 ' <title>'.htmlspecialchars($Item['Title'])."</title>\n". 34 ' <description>'.htmlspecialchars($Item['Description'])."</description>\n". 35 ' <pubDate>'.date('r',$Item['Time'])."</pubDate>\n". 36 ' <link>'.$Item['Link']."</link>\n". 37 " </item>\n"; 38 } 39 $Result .= " </channel>\n". 40 "</rss>"; 41 return($Result); 25 42 } 26 $Result .= " </channel>\n".27 "</rss>";28 return($Result);29 43 } 30 44 -
trunk/Modules/Finance/Manage.php
r370 r375 409 409 { 410 410 $Title = 'Pravidelné vyúčtování služeb'; 411 $PrefixMultiplier = new PrefixMultiplier(); 411 412 $Content = 'Vyúčtovaní subjektu <strong>'.$Subject['Name'].'</strong> zastoupeného uživatelem <strong>'.$User['Name'].'</strong> ke dni <strong>'.$this->System->HumanDate(time()).'</strong>.<br /><br />'."\n". 412 'Váš aktuální tarif: <strong>'.$this->System->Modules['Finance']->Tariffs[$Member['InternetTariffCurrentMonth']]['Name'].' '.$ this->System->AddPrefixMultipliers($this->System->Modules['Finance']->Tariffs[$Member['InternetTariffCurrentMonth']]['SpeedMax'], 'bit/s', 3, 'Binary').'</strong><br />'."\n".413 'Váš aktuální tarif: <strong>'.$this->System->Modules['Finance']->Tariffs[$Member['InternetTariffCurrentMonth']]['Name'].' '.$PrefixMultiplier->AddPrefixMultipliers($this->System->Modules['Finance']->Tariffs[$Member['InternetTariffCurrentMonth']]['SpeedMax'], 'bit/s', 3, 'Binary').'</strong><br />'."\n". 413 414 'Vaše platební období: <strong>'.$this->System->Modules['Finance']->BillingPeriods[$Member['BillingPeriod']]['Name'].'</strong><br />'."\n". 414 415 'Pravidelná platba za období: <strong>'.$MemberPayment['MonthlyTotal'].' Kč</strong><br />'."\n". -
trunk/Modules/Log/Log.php
r373 r375 36 36 ); 37 37 } 38 return(GenerateRSS(array( 39 'Title' => $this->System->Config['Web']['Title'].' - Záznamy operací', 40 'Link' => 'http://'.$this->System->Config['Web']['Host'].'/', 41 'Description' => 'Záznamy operací', 42 'WebmasterEmail' => $this->System->Config['Web']['AdminEmail'], 43 'Items' => $Items))); 38 $RSS = new RSS(); 39 $RSS->Title = $this->System->Config['Web']['Title'].' - Záznamy operací'; 40 $RSS->Link = 'http://'.$this->System->Config['Web']['Host'].'/'; 41 $RSS->Description = 'Záznamy operací'; 42 $RSS->WebmasterEmail = $this->System->Config['Web']['AdminEmail']; 43 $RSS->Items = $Items; 44 return($RSS->Generate()); 44 45 } 45 46 -
trunk/Modules/News/NewsPage.php
r373 r375 340 340 } 341 341 342 return(GenerateRSS(array( 343 'Title' => $this->System->Config['Web']['Title'].' - Aktuality', 344 'Link' => 'http://'.$this->System->Config['Web']['Host'].'/', 345 'Description' => 'Aktuality komunitní počítačové sítě ZděchovNET', 346 'WebmasterEmail' => $this->System->Config['Web']['AdminEmail'], 347 'Items' => $Items))); 342 $RSS = new RSS(); 343 $RSS->Title = $this->System->Config['Web']['Title'].' - Aktuality'; 344 $RSS->Link = 'http://'.$this->System->Config['Web']['Host'].'/'; 345 $RSS->Description = 'Aktuality komunitní počítačové sítě ZděchovNET'; 346 $RSS->WebmasterEmail = $this->System->Config['Web']['AdminEmail']; 347 $RSS->Items = $Items; 348 return($RSS->Generate()); 348 349 } 349 350 }
Note:
See TracChangeset
for help on using the changeset viewer.