<?
header('Content-type: text/xml; charset=iso-8859-1');
print("<"."?xml version='1.0' encoding='iso-8859-1' ?".">");
?>

<rss version="2.0">
<channel>
<title>Algarve Press - Jornal Regional Independente - Algarve/Andaluzia</title>
<description>Notícias Algarve Press</description>
<link>http://www.algarvepress.net/</link>
<copyright>Todos os direitos reservados</copyright>

<?
require 'includes/con_.php';
$query = "select * from apress_conteudos where activo='1' order by id desc";
$rs = mysql_query ($query);
$c=0;
$limit=10;
while (($row = mysql_fetch_assoc($rs))&&($c<$limit)){
				$c++;
				$tmp_desc=$row['longdesc1'];//.$row['desc1'];
				$pubDate=date('d/m/Y',strtotime($row['data']));
				
				echo "<item>";
			  echo "<title>".$row['title1']."</title>";
			  echo "<description>".$tmp_desc."</description>";
			  echo "<link>http://www.algarvepress.net/conteudo.php?menu=-1&amp;cat=".$row['categoria']."&amp;scat=".$row['subcategoria']."&amp;id=".$row['id']."</link>";
			  echo "<pubDate>".$pubDate."</pubDate>";
			  echo "</item>";
		} 
?>

</channel>
</rss>

