auth->checkUser($user_id, null, null); header('Content-Type: application/xml; charset=UTF-8'); $title = $core->blog->name . ' - ' . __('Spam moderation') . ' - '; $params = array(); $end_url = ''; if ($type == 'spam') { $title .= __('Spam'); $params['comment_status'] = -2; $end_url = '?status=-2'; } else { $title .= __('Ham'); $params['sql'] = ' AND comment_status IN (1,-1) '; } echo '' . "\n" . '' . "\n" . '' . "\n" . '' . html::escapeHTML($title) . '' . "\n" . '' . (DC_ADMIN_URL ? DC_ADMIN_URL . 'comments.php' . $end_url : 'about:blank') . '' . "\n" . '' . "\n"; $rs = $core->blog->getComments($params); $maxitems = 20; $nbitems = 0; while ($rs->fetch() && ($nbitems < $maxitems)) { $nbitems++; $uri = DC_ADMIN_URL ? DC_ADMIN_URL . 'comment.php?id=' . $rs->comment_id : 'about:blank'; $author = $rs->comment_author; $title = $rs->post_title . ' - ' . $author; if ($type == 'spam') { $title .= '(' . $rs->comment_spam_filter . ')'; } $id = $rs->getFeedID(); $content = '

IP: ' . $rs->comment_ip; if (trim($rs->comment_site)) { $content .= '
URL: ' . $rs->comment_site . ''; } $content .= "


\n"; $content .= $rs->comment_content; echo '' . "\n" . ' ' . html::escapeHTML($title) . '' . "\n" . ' ' . $uri . '' . "\n" . ' ' . $id . '' . "\n" . ' ' . $rs->getRFC822Date() . '' . "\n" . ' ' . html::escapeHTML($author) . '' . "\n" . ' ' . html::escapeHTML($content) . '' . "\n" . ''; } echo "
\n
"; } }