error()) { exit; } # Création de l'objet de type weblog avec uniquement les billets # publiés $blog = new xblog($con,DB_PREFIX,1,dc_encoding); $blog->rs_blogpost = 'xblogpost'; $blog->rs_blogcomment = 'xblogcomment'; $blog->setURL('post',util::getHost().dc_blog_url.dc_format_post_url); # Si type = co on fait un fil des commentaires if ($type == 'co') { if (!empty($_GET['post'])) { $comments = $blog->getComments($_GET['post'],'DESC'); } else { $comments = $blog->getComments('','DESC',20); } $title = dc_blog_name.' - Commentaires'; $ts = time(); $items = $seq = ''; } else { # Dernières nouvelles $news = $blog->getLastNews(10,$cat,'post_dt DESC',false,$lang); $ts = strtotime($blog->getEarlierDate()); $title = dc_blog_name; } header('Content-Type: application/atom+xml; charset='.dc_encoding); echo ''."\n"; /* echo ''."\n"; //*/ ?> <?php echo $blog->toXML($title); ?> getAtomID(dc_blog_url); ?> DotClear daily 1 EOF()) { echo $comments->getAtomEntry(dc_short_feeds); $comments->moveNext(); } } else { while(!$news->EOF()) { echo $news->getAtomEntry(dc_short_feeds); $news->moveNext(); } } $con->close(); ?>