<?php
require "./header.php";
require "./xmb.php";
?>
<? header('Content-type: text/xml'); ?>
<rss version="2.0">
<channel>
<title>Forces-of-Nature Windsurf, Kitesurf and Surf Classifieds</title>
<description>Free Classified For Sale and Wanted adverts for windsurfing, surfing, kitesurfing and other sports.</description>
<link>http://www.forces-of-nature.co.uk/dbdriven/classifieds/new_classifieds.php</link>
<copyright>Copyright 2006.</copyright>

<?
$q="SELECT * FROM ads ORDER BY ad_date DESC  LIMIT 0,15";
$doGet=mysql_query($q);

while($result = mysql_fetch_array($doGet)){


$title = stripslashes(htmlentities(strip_tags($result['title'])));
$title = str_replace('&nbsp;', '&#160;', $title);

$description = stripslashes(htmlentities(strip_tags($result['description'],'ENT_QUOTES')));
$description = str_replace('&nbsp;', '&#160;', $description);
$description = str_replace('&pound;', '&#163;', $description);
$description = str_replace('£', '&#163;', $description);

$price =htmlentities(strip_tags(stripslashes($result['price'])));
$price = str_replace('&pound;', '&#163;', $price);
$price = str_replace('£;', '&#163;', $price);
?> 
     <item><guid isPermaLink="true">http://www.forces-of-nature.co.uk/dbdriven/classifieds/new_classifieds.php/view_ad/<?=$result['ad_id'];?></guid>
        <title> <?=$title; ?> - &#163;<?=$price ?></title> 
        <description> <?=$description?>.
</description> 
        <link>http://www.forces-of-nature.co.uk/dbdriven/classifieds/new_classifieds.php/view_ad/<?=$result['ad_id'];?></link> 
        <pubDate> <?=date( "r" , $result['ad_date']); ?></pubDate> 
     </item>    
<? } ?>  

</channel>
</rss>

