<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| RSS News
+----------------------------------------------------+
| PHP-Fusion SF Group
| Copyright © 2007 by SF
| http://www.rus-phpfusion.com/
+----------------------------------------------------*/
require_once "maincore.php";
header("Content-Type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"".$locale['charset']."\"?>\n\n\n\n\n";
global $settings, $db_prefix;
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0, 10");
$numrows = dbrows($result);
echo "<rss version=\"2.0\">\n\n";
echo "<channel>\n";
echo "<title>".htmlspecialchars($settings['sitename']).". Ôàéëû</title>\n";
echo "<link>".$settings['siteurl']."</link>\n";
echo "<description>Ôàéëû</description>\n";
echo "<image>
        <title>".htmlspecialchars($settings['sitename'])."</title>
        <url>".$settings['sitebanner']."</url>
        <link>".$settings['siteurl']."</link>
    </image>";
echo "<language>ru-ru</language>\n\n";
for ($i=0;$i < $numrows;$i++)  {
$data = dbarray($result);
    echo "<item>\n";
    echo "<title>".$data['download_title']."</title>\n";
    echo "<link>".stripslashes(htmlspecialchars($settings['siteurl']."downloads.php?page_id=".$data['download_id']))."</link>\n";
    echo "<description>".stripslashes(htmlspecialchars($data['download_description']))."</description>\n";
    echo "<pubDate>".date("r",$data['download_description_p'])."</pubDate>\n";
   echo "<guid>".stripslashes(htmlspecialchars($settings['siteurl']."downloads.php?page_id=".$data['download_id']))."</guid>\n";
    echo "</item>\n\n";
}
echo "</channel>\n";
echo "</rss>";
?>