<?php
define('INCLUDE_CHECK',1);
define('MYSQL_CHECK',1);
require('../config.php');
require('../mysql.php');
if($language == 'de') {
require_once('../../language/de.php');
}elseif($language == 'en') {
require_once('../../language/en.php');
}
if((isset($_GET['id'])) && (is_numeric($_GET['id']))) {
$id = mysql_real_escape_string($_GET['id']);
$id = intval($_GET['id']);
$direct_id = $id;
}else{
echo '<p class="false">' . $lang['invalid_id'] . '</p>';
exit();
}
?>
<?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">
<channel>
<title><?php echo $title; ?></title>
<language>de</language>
<link><?php echo $url; ?></link>
<description><?php echo '' . $rsslimit . ' ' . $lang['rss_user_pinboard'] . ''; ?></description>
<copyright>Copyright <?php echo $url; ?></copyright>
<webMaster><?php echo $webmaster; ?></webMaster>
<atom:link href="<?php echo $url; ?>framework/feeds/articles.php" rel="self" type="application/rss+xml" />
<?php
$query = "SELECT
pinboard.id AS pinID,
pinboard.id2,
pinboard.post,
pinboard.date,
members.id AS memID,
members.name
FROM
pinboard
LEFT JOIN
members
ON
pinboard.id2 = members.id
WHERE
pinboard.id2 = '" . $id . "'
ORDER BY
pinboard.id DESC
LIMIT
" . $rsslimit;
$result = mysql_query($query, $connect) OR die(mysql_error());
while($row = mysql_fetch_assoc($result)) {
$id = (int)$row['pinID'];
$title = htmlentities($row['name'], ENT_QUOTES);
$author = htmlentities($row['name'], ENT_QUOTES);
$content = htmlentities($row['post'], ENT_QUOTES);
$date = date('d.m.Y - H:i', strtotime($row['date']));
$pubdate = strtotime($row['date']);
$pubdate = date(r, $pubdate);
?>
<item>
<title><?php echo $title; ?> - <?php echo $date; ?></title>
<link><?php echo $url; ?>pinboard.php?id=<?php echo $direct_id; ?></link>
<guid isPermaLink="false"><?php echo $url; ?>pinboard.php?id=<?php echo $direct_id; ?></guid>
<author><?php echo $author; ?></author>
<pubDate><?php echo $pubdate; ?></pubDate>
<description><![CDATA[ <?php echo nl2br($content); ?> ]]></description>
</item>
<?php } ?>
</channel>
</rss>
<?php include_once('../framework/work/end.php'); ?>