<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0">
<channel>
<title>Where Are We?</title>
<description>Katrin and Roel's Travel Blog</description>
<link>http://www.where-are-we.com</link>
<copyright>Copyright 2007 - katusi &amp; gaz::mazk</copyright>

<?
  $this->conn = mysql_pconnect('localhost','yves','antwerp3');
 mysql_select_db ('where');
 
  $q="SELECT a.id, author, title AS title, a.diary_comment AS body, UNIX_TIMESTAMP( a.date ) AS pubDate
FROM tbl_diaries a
WHERE a.chapter_ID in (
    Select b.ID
    from tbl_chapters b, tbl_hotspots c
    where b.hotSpot_ID = c.ID
    and c.status in (1,3,4)
)
ORDER BY a.date DESC
LIMIT 0 , 15";
$doGet=mysql_query($q);

while($result = mysql_fetch_array($doGet)){
?>
     <item>
        <title><?=htmlentities(strip_tags($result['title'])); ?></title>
        <description><?=htmlentities(strip_tags($result['body'],'ENT_QUOTES'));?></description>
        <link>http://www.where-are-we.com</link>
	<author><?=htmlentities(strip_tags($result['author'])); ?></author>
        <pubDate><?=strftime( "%a, %d %b %Y %T %Z" , $result['pubDate']); ?></pubDate>
	<source url="http://www.where-are-we.com">For pictures and more, please check the site!</source>
     </item>
<? } ?>

</channel>
</rss>