diff options
Diffstat (limited to 'apis/news.inc.php')
-rw-r--r-- | apis/news.inc.php | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/apis/news.inc.php b/apis/news.inc.php deleted file mode 100644 index 610db289..00000000 --- a/apis/news.inc.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -header('Content-Type: application/xml; charset=utf-8'); - -// Fetch news from DB -$row = Database::queryFirst('SELECT title, content, dateline FROM news ORDER BY dateline DESC LIMIT 1'); -if ($row !== false ) { - - echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n"; - echo "<news>" . "\n"; - echo "\t" . '<headline>' . "\n"; - echo "\t\t" . htmlspecialchars($row['title']) . "\n"; - echo "\t" . '</headline>' . "\n"; - echo "\t" . "<info>" . "\n"; - echo "\t\t" . htmlspecialchars(nl2br($row['content'])) . "\n"; - echo "\t" . '</info>' . "\n"; - echo "\t" . "<date>" . "\n"; - echo "\t\t" . $row['dateline'] . "\n"; - echo "\t" . "</date>" . "\n"; - echo "</news>"; - -} else { - // no news in DB, output a 'null' news xml - echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n"; - echo "<news>null</news>"; -} |