示例#1
0
    case 'comment':
        $query = "SELECT t1.*, t2.* FROM `{$db_prefix}replies` t1 LEFT JOIN `{$db_prefix}blogs` t2 ON t1.blogid=t2.blogid WHERE t1.reproperty='0' ORDER BY t1.reptime DESC LIMIT 0, {$mbcon['maxrssitem']}";
        break;
    default:
        $query = "SELECT * FROM `{$db_prefix}blogs` WHERE `property`<'2' AND `permitgp`='' ORDER BY `pubtime` DESC LIMIT 0, {$mbcon['maxrssitem']}";
        break;
}
include "inc/rsstemplate.php";
$m_b = new getblogs();
$records = $m_b->getgroupbyquery($query);
if (!is_array($records)) {
    exit;
}
if ($job == 'category' || $job == 'main') {
    foreach ($records as $entry) {
        $rssbody .= $m_b->rss_entry($entry);
    }
} elseif ($job == 'entry') {
    $rssbody .= $m_b->rss_entry($records[0]);
    foreach ($records as $entry) {
        $rssbody .= $m_b->rss_replies($entry);
        $seed += 1;
    }
} elseif ($job == 'comment') {
    foreach ($records as $entry) {
        $rssbody .= $m_b->rss_replies($entry);
        $seed += 1;
    }
}
$rss_xml = $m_b->rss_xml($rssbody);
@header("Content-type:application/xml");