<?
include "include/config.php";
include "include/functions.php";
$max_report_info = get_report_info(get_report_max_id());
//print_r($max_report_info);
//echo curPageURL();
echo "<?xml version='1.0'?>
<rss version='2.0' xmlns:atom='http://www.w3.org/2005/Atom'>
<channel>
<title>reports</title>
<link>".curPageURL()."</link>
<description>live reports</description>
<language>en-us</language>
<pubDate>".date('r', $max_report_info['time'])."</pubDate>
<lastBuildDate>".date('r', $max_report_info['time'])."</lastBuildDate>
";
$reports = get_latest_reports('50');
for ($i = 0; $i <= count($reports)-1; $i++) {
$id = $reports[$i]['id'];
$time = date('r', $reports[$i]['time']);
$name = stripslashes($reports[$i]['name']);
$message = stripslashes($reports[$i]['message']);
//echo url();
$link = url()."/index.php?page=history&start=".$id;
echo "
<item>
<title>".$name.": ".$message."</title>
<link>".htmlentities($link)."</link>
<description>".htmlentities($message)."</description>
<pubDate>".$time."</pubDate>
<guid>".htmlentities($link)."</guid>
</item>
";
}
echo "
</channel>
</rss>
";
?>