<?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_posts_rss']; ?></description>
<copyright>Copyright <?php echo $url; ?></copyright>
<webMaster><?php echo $webmaster; ?></webMaster>
<atom:link href="<?php echo $forum; ?>rss.php" rel="self" type="application/rss+xml" />
<?php
$query = "SELECT
posts.post_id,
posts.post_content,
posts.post_date,
posts.post_topic,
posts.post_by,
topics.topic_id,
topics.topic_subject
FROM
posts
LEFT JOIN
topics
ON
posts.post_topic = topics.topic_id
ORDER BY
post_id DESC
LIMIT
" . $rsslimit;
$result = mysql_query($query, $connect) OR die(mysql_error());
while($row = mysql_fetch_array($result)) {
$id = (int)$row['topic_id'];
$author = $row['post_by'];
$title = $row['topic_subject'];
$content = $row['post_content'];
$pubdate = strtotime($row['post_date']);
$pubdate = date(r, $pubdate);
?>
<item>
<title><?php echo $title; ?></title>
<link><?php echo $urlto; ?>?id=<?php echo $id; ?></link>
<guid isPermaLink="false"><?php echo $urlto; ?>?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>