source: branches/old/administrace/rss.php

Last change on this file was 192, checked in by george, 17 years ago

Přidáno: IRC bot pro sledování IRC chatu v PHP
Upraveno: Informace o rychlosti internetové linky na 8 Mbit/s
Opraveno: Zobrazování jmén autorů v GM RSS kanálu

File size: 982 bytes
Line 
1<?php
2header("Content-Type: text/xml");
3
4include_once('../global.php');
5include_once('rss_generator.php');
6
7$NewsCount = 15;
8
9// Get news from database by selected categories
10$Items = array();
11$DbResult = $Database->query('SELECT wow.gm_news.*, UNIX_TIMESTAMP(wow.gm_news.time) as unit_time, realmd.account.username as username FROM wow.gm_news JOIN realmd.account ON wow.gm_news.author = realmd.account.Id ORDER BY time DESC LIMIT 0,'.$NewsCount);
12while($Row = $DbResult->fetch_array())
13{
14 $Items[] = array(
15 'Title' => $Row['username'].': '.substr($Row['text'], 0, 50).'...',
16 'Link' => 'http://wow.zdechov.net/',
17 'Description' => $Row['text']." (".$Row['username'].")",
18 'Time' => $Row['unit_time'],
19 );
20}
21
22echo(GenerateRSS(array(
23 'Title' => 'WoW GM aktuality',
24 'Link' => 'http://wow.zdechov.net/',
25 'Description' => 'GM aktuality WoW serveru Heroes of Fantasy',
26 'WebmasterEmail' => 'wow@zdechov.net',
27 'Items' => $Items)));
28?>
Note: See TracBrowser for help on using the repository browser.