Ejemplo n.º 1
0
/**
 * Display 'spamlog' page.
 */
function pageSpamlog()
{
    global $PIVOTX;
    // check if the user has the required userlevel to view this page.
    $PIVOTX['session']->minLevel(PIVOTX_UL_NORMAL);
    $PIVOTX['template']->assign('title', __('Spam Log'));
    $PIVOTX['template']->assign('heading', __('View and Reset the Spam Log.'));
    $form = getResetSpamLogForm();
    $result = $form->validate();
    if ($result != FORM_NOTPOSTED) {
        set_spamlog();
        $PIVOTX['messages']->addMessage(__("Spam log reset."));
    }
    $spamlog = get_spamlog();
    $PIVOTX['template']->assign('html', $spamlog);
    $PIVOTX['template']->assign('form', $form->fetch());
    renderTemplate('generic.tpl');
}
Ejemplo n.º 2
0
/**
 * Display the spam log.
 */
function view_spamlog()
{
    PageHeader(lang('adminbar', 'viewspamlog_title'), 1);
    PageAnkeiler(lang('userbar', 'admin') . ' » ' . lang('adminbar', 'viewspamlog_title'));
    $log = get_spamlog();
    if (empty($log)) {
        echo "<p>" . lang('spam', 'empty_log') . "<p>\n";
    } else {
        echo $log;
        StartForm('reset_spamlog', 1);
        StartTable();
        GenSetting('heading', lang('spam', 'reset_log'), '', 8, '', '2', 'yes');
        GenSetting('reset_spamlog', '', '', 7, '');
        EndForm(lang('go'), 1);
    }
    PageFooter();
}