Permalink
Browse files

Changes from DjPhil

  • Loading branch information...
1 parent c91376d commit 551eb16e5a7a0ae399c9c9e1c7217290d2d118e2 @keverw keverw committed Apr 25, 2013
Showing with 58 additions and 0 deletions.
  1. BIN www/images/icons/rss.gif
  2. +15 −0 www/sites/modules/specialinfo.php
  3. +43 −0 www/sites/news/feeds.php
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,15 @@
+<?php
+$DbLink = new DB;
+
+$DbLink->query("SELECT gridstatus,active,color,title,message FROM ".C_INFOWINDOW_TBL." ");
+list($GRIDSTATUS,$INFOBOX,$BOXCOLOR,$BOX_TITLE,$BOX_INFOTEXT) = $DbLink->next_record();
+
+$found = array();
+$found[0] = json_encode(array('Method' => 'OnlineStatus', 'WebPassword' => md5(WEBUI_PASSWORD)));
+$do_post_request = do_post_request($found);
+$recieved = json_decode($do_post_request);
+?>
+
+<div id="speciallight">
+ <p><?php echo $BOX_INFOTEXT?></p>
+</div>
View
@@ -0,0 +1,43 @@
+<?php
+ include("../../settings/config.php");
+ include("../../settings/databaseinfo.php");
+ include("../../settings/json.php");
+ include("../../settings/mysql.php");
+ include("../../check.php");
+
+ header("Content-Type: application/rss+xml; charset=UTF-8");
+
+ echo '<?xml version="1.0" encoding="UTF-8"?>';
+ echo '<rss version="2.0">';
+ echo '<channel>';
+ echo '<title>'.SYSNAME.' WebUI RSS News Feed Reader</title>';
+ echo '<link>'.SYSURL.'</link>';
+ echo '<description>This is '.SYSNAME.' WebUI RSS News Feed Reader</description>';
+ echo '<language>en-us</language>';
+ echo '<copyright>Copyright (C) 2013 '.SYSURL.'</copyright>';
+
+ $DbLink = new DB;
+ $query = "";
+ $querypage = $querypage * 5;
+ $result = $DbLink->query("SELECT id, title, message, time, user FROM " .C_NEWS_TBL .$query. " ORDER BY time DESC LIMIT $querypage," .($querypage + 5));
+ $count = 0;
+
+ if (!$result) {die('Requête invalide : ' . mysql_error());}
+
+ else
+ {
+ while (list($id, $title, $message, $time, $user) = $DbLink->next_record())
+ {
+ echo '<item>';
+ echo '<title>' .htmlspecialchars($title). '</title>';
+ echo '<description>' .htmlspecialchars($message). '</description>';
+ echo '<link>' .$link. '</link>';
+ echo '<author>' .$user. '</author>';
+ echo '<pubDate>' .date("l M d Y", $time). '</pubDate>';
+ echo '</item>';
+ $count++;
+ }
+ }
+ echo '</channel>';
+ echo '</rss>';
+?>

0 comments on commit 551eb16

Please sign in to comment.