<rss version='2.0' xmlns:atom='http://www.w3.org/2005/Atom'>
--^
<?php
/*--------------------------------------------+
| PHPFusion 7 - Content Management System |
|---------------------------------------------|
| RSS - Âĺá ńńűëęč
| author: Nick Jones (Digitanium) © 2002-2008 |
| web: http://www.php-fusion.co.uk |
| email: nick@php-fusion.co.uk |
|---------------------------------------------|
| Released under the terms and conditions of |
| the GNU General Public License (Version 3) |
+--------------------------------------------*/
require_once "../maincore.php";
header("Content-Type: text/xml");
echo "<?xml version='1.0' encoding='utf-8'?>\n";
if (file_exists(BASEDIR."rss/locale/".$settings['locale'].".php")) {
include BASEDIR."rss/locale/".$settings['locale'].".php";
} else {
include BASEDIR."rss/locale/English.php";
}
global $settings, $db_prefix;
$result = dbquery("SELECT * FROM ".$db_prefix."news ORDER BY news_datestamp DESC LIMIT 0, 10");
$numrows = dbrows($result);
echo "<rss version='2.0' xmlns:atom='http://www.w3.org/2005/Atom'>\n\n";
echo "<channel>\n";
echo "<title>".htmlspecialchars($settings['sitename']).". ".$locale['r103']."</title>\n";
echo "<link>".$settings['siteurl']."</link>\n";
echo "<description>".$settings['description']."</description>\n";
echo "<image>
<title>".htmlspecialchars($settings['sitename'])."</title>
<url>".$settings['sitebanner']."</url>
<link>".$settings['siteurl']."</link>
</image>";
echo "<language>".$locale['xml_lang']."-".$locale['xml_lang']."</language>\n\n";
for ($i=0;$i < $numrows;$i++) {
$data = dbarray($result);
if ($data['news_breaks'] == "y") { $data['news_news'] = nl2br($data['news_news']); }
echo "<item>\n";
echo "<title>".$data['news_subject']."</title>\n";
echo "<link>".stripslashes(htmlspecialchars($settings['siteurl']."news.php?readmore=".$data['news_id']))."</link>\n";
echo "<description>".stripslashes(htmlspecialchars($data['news_news']))."</description>\n";
echo "<pubDate>".date("r",$data['news_datestamp'])."</pubDate>\n";
echo "<guid>".stripslashes(htmlspecialchars($settings['siteurl']."news.php?readmore=".$data['news_id']))."</guid>\n";
echo "</item>\n\n";
}
echo "</channel>\n";
echo "</rss>";
?>
Category Forum
Post Your SiteLabels
None yet
Statistics
1 participant
Notifications
You are not receiving notifications from this thread.
Related Questions