|
Last change
on this file was 448, checked in by george, 17 years ago |
- Přesunuto: Obsah kořenové složky byl přesunut do složky trunk a beta web přesunut do branches/beta.
|
|
File size:
897 bytes
|
| Line | |
|---|
| 1 | <?php
|
|---|
| 2 |
|
|---|
| 3 | header("Content-Type: text/xml");
|
|---|
| 4 |
|
|---|
| 5 | include_once('global.php');
|
|---|
| 6 | include_once('rss_generator.php');
|
|---|
| 7 |
|
|---|
| 8 | $NewsCount = 10;
|
|---|
| 9 | $Items = array();
|
|---|
| 10 |
|
|---|
| 11 | $DbResult = $Database->query('SELECT UNIX_TIMESTAMP(news.time), news.title, news.short_text, user.User FROM news JOIN user ON user.ID=news.user ORDER BY time DESC LIMIT '.$NewsCount);
|
|---|
| 12 | while($Row = $DbResult->fetch_array())
|
|---|
| 13 | {
|
|---|
| 14 | $Items[] = array(
|
|---|
| 15 | 'Title' => $Row['title'],
|
|---|
| 16 | 'Link' => 'http://'.$_SERVER['SERVER_NAME'].$Config['Web']['BaseURL'],
|
|---|
| 17 | 'Description' => $Row['short_text']." (".$Row['User'].")",
|
|---|
| 18 | 'Time' => $Row['UNIX_TIMESTAMP(news.time)'],
|
|---|
| 19 | );
|
|---|
| 20 | }
|
|---|
| 21 |
|
|---|
| 22 | echo(GenerateRSS(array(
|
|---|
| 23 | 'Title' => $Config['Web']['Title'],
|
|---|
| 24 | 'Link' => $Config['Web']['BaseURL'],
|
|---|
| 25 | 'Description' => $Config['Web']['Description'],
|
|---|
| 26 | 'WebmasterEmail' => $Config['Web']['AdminEmail'],
|
|---|
| 27 | 'Items' => $Items), $Config['Web']['Charset']));
|
|---|
| 28 | ?>
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.