<?php header("Content-type: text/xml");
echo '<'.'?xml version="1.0" encoding="ISO-8859-1"?'.'>'; ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<?php require_once('framework/session.php'); ?>
<channel>
<title><?php echo $title; ?></title>
<language>de</language>
<link><?php echo $url; ?></link>
<description><?php echo $rsslimit; ?> <?php echo $lang['latest_topics_rss']; ?></description>
<copyright>Copyright <?php echo $url; ?></copyright>
<webMaster><?php echo $webmaster; ?></webMaster>
<atom:link href="<?php echo $forum; ?>topic_rss.php" rel="self" type="application/rss+xml" />
<?php
$query = "SELECT
topics.topic_id,
topics.topic_subject,
topics.topic_date,
topics.topic_cat,
topics.topic_by,
categories.cat_id,
categories.cat_name
FROM
topics
LEFT JOIN
categories
ON
topics.topic_cat = categories.cat_id
ORDER BY
topic_id DESC
LIMIT
" . $rsslimit;
$result = mysql_query($query, $connect) OR die(mysql_error());
while($row = mysql_fetch_array($result)) {
$id = $row['topic_id'];
$author = $row['topic_by'];
$title = $row['cat_name'];
$content = $row['topic_subject'];
$pubdate = strtotime($row['topic_date']);
$pubdate = date(r, $pubdate);
?>
<item>
<title><?php echo $title; ?></title>
<link><?php echo $catto; ?>?id=<?php echo $id; ?></link>
<guid isPermaLink="false"><?php echo $catto; ?>?id=<?php echo $id; ?></guid>
<author><?php echo $author; ?></author>
<pubDate><?php echo $pubdate; ?></pubDate>
<description><![CDATA[ <?php echo nl2br($content); ?> ]]></description>
</item>
<?php } ?>
</channel>
</rss>