<?php
header
("content-type: application/rss+xml");
/*
 Based on the original slightly wonky RSS Feed script by            
 http://nukecops.com
 Copyright (c) 2003  cor & Paul Laudanski (Zhen-Xjell)

 This program is free software. You can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by 
 the Free Software Foundation; version 2 of the License.
 
 A copy of the GPL is here: https://corz.org/public/docs/gpl.txt
 */
 
if (file_exists('mainfile.php')) { // added for "display" purposes only
    
include "mainfile.php";
} else {
    die(
'mainfile.php missing');
}
$result sql_query("SELECT t.topic_id, t.topic_title FROM ".$prefix."_bbtopics t, ".$prefix."_bbforums f where t.forum_id=f.forum_id and f.auth_view=0  ORDER BY t.topic_last_post_id DESC LIMIT 10"$dbi);

if (!
result) {
echo 
"an error occured";
    } else {
    
    echo 
"<?xml version=\"1.0\" encoding=\"utf-8\"";
    echo 
"<!DOCTYPE rss PUBLIC \"-//Netscape Communications//DTD RSS 0.91//EN\"";
    echo 
" \"http://my.netscape.com/publish/formats/rss-0.91.dtd\">\n";
    echo 
"<rss version=\"0.91\">\n\n";
    echo 
"<channel>\n";
    echo 
"<title>".htmlspecialchars($sitename)." Forums</title>\n";
    echo 
"<link>$nukeurl/</link>\n";
    echo 
"<description>".htmlspecialchars($sitename)." Forum Feed</description>\n";
    echo 
"<language>$backend_language</language>\n";
    echo 
"<copyright>Copyright "date ("Y") .htmlspecialchars($sitename)."</copyright>\n";
    echo 
"<managingEditor>corz@how.to</managingEditor>\n";
    echo 
"<webMaster>admin@webexpo.org</webMaster>\n\n";
        echo 
"<image>\n";
        echo 
"<title>".htmlspecialchars($sitename)."</title>\n";
        echo 
"<url>$nukeurl/images/logo.gif</url>\n";
        echo 
"<link>$nukeurl/</link>\n";
        echo 
"</image>\n\n";
    
        for (
$m=0$m sql_num_rows($result$dbi); $m++) {
    list(
$topic_id$topic_title) = sql_fetch_row($result$dbi);
        
            echo 
"<item>\n";
            echo 
"<title>".htmlspecialchars($topic_title)."</title>\n";
            echo 
"<description>$nukeurl/modules.php?name=Forums&amp;file=viewtopic&amp;t=$topic_id</description>\n";
            echo 
"<link>$nukeurl/modules.php?name=Forums&amp;file=viewtopic&amp;t=$topic_id</link>\n";
            echo 
"</item>\n\n";
    }
    
    echo 
"</channel>\n";
    echo 
"</rss>";
}
?>
back to the source menu
downloadtest

Welcome to corz.org!

I'm always messing around with the back-end.. See a bug? Wait a minute and try again. Still see a bug? Mail Me!