<?php 
header('Content-Type: application/rss+xml; charset=UTF-8');
include_once($_SERVER['DOCUMENT_ROOT'].'/includes/Config.php');
include_once(_ROOT_INCLUDES.'functions.php');
include_once(_ROOT_INCLUDES.'class_rss.php');
include_once(_ROOT_INCLUDES.'class_blog.php');
$Blog = new Blog;
$Blog->Init();
$tab = $Blog->Blog_list_rss(20);
$LastDate = $Blog->Blog_LastDate();

$rss = new Rss;
echo $rss->Init();
echo $rss->Construct('Dinky blog','http://www.thedinkyrock.com/site/blog.php','Le blog du dinky rock','fr-fr', $rss->Date_Rss($LastDate), $rss->Date_Rss($LastDate), 'http://www.thedinkyrock.com/rss/blog.xml' ); 

for($ligne=0;$ligne<count($tab);$ligne++){
 list($id, $titre, $billet, $date, $img , $video, $dos, $Ncom) = $tab[$ligne];
 if(strlen($img) > 7){ $img = '<img src="http://www.thedinkyrock.com/imgtous/blog/'.$img.'"><br /><br />';}else{$img = '';}
echo $rss->Items($titre, 'http://www.thedinkyrock.com/fr/'.$id.'/'.formatForUrl($titre).'.html', '<![CDATA['.$img.$billet.']]>', $rss->Date_Rss($date), 'http://www.thedinkyrock.com/fr/'.$id.'/'.formatForUrl($titre).'.html'); 

}
echo $rss->Fermeture(); 
mysql_close($dbc);
?>
