Exemple #1
0
    }
    echo '</form>';
    # Filters
    echo '<form action="' . $p_url . '" method="post" id="filters-list-form">';
    if (!empty($_GET['upd'])) {
        dcPage::success(__('Filters configuration has been successfully saved.'));
    }
    echo '<div class="table-outer">' . '<table class="dragable">' . '<caption class="as_h3">' . __('Available spam filters') . '</caption>' . '<thead><tr>' . '<th>' . __('Order') . '</th>' . '<th>' . __('Active') . '</th>' . '<th>' . __('Auto Del.') . '</th>' . '<th class="nowrap">' . __('Filter name') . '</th>' . '<th colspan="2">' . __('Description') . '</th>' . '</tr></thead>' . '<tbody id="filters-list" >';
    $i = 0;
    foreach ($filters as $fid => $f) {
        $gui_link = '&nbsp;';
        if ($f->hasGUI()) {
            $gui_link = '<a href="' . html::escapeHTML($f->guiURL()) . '">' . '<img src="images/edit-mini.png" alt="' . __('Filter configuration') . '" ' . 'title="' . __('Filter configuration') . '" /></a>';
        }
        echo '<tr class="line' . ($f->active ? '' : ' offline') . '" id="f_' . $fid . '">' . '<td class="handle">' . form::field(array('f_order[' . $fid . ']'), 2, 5, (string) $i, 'position', '', false, 'title="' . __('position') . '"') . '</td>' . '<td class="nowrap">' . form::checkbox(array('filters_active[]'), $fid, $f->active, '', '', false, 'title="' . __('Active') . '"') . '</td>' . '<td class="nowrap">' . form::checkbox(array('filters_auto_del[]'), $fid, $f->auto_delete, '', '', false, 'title="' . __('Auto Del.') . '"') . '</td>' . '<td class="nowrap" scope="row">' . $f->name . '</td>' . '<td class="maximal">' . $f->description . '</td>' . '<td class="status">' . $gui_link . '</td>' . '</tr>';
        $i++;
    }
    echo '</tbody></table></div>' . '<p>' . form::hidden('filters_order', '') . $core->formNonce() . '<input type="submit" name="filters_upd" value="' . __('Save') . '" /></p>' . '</form>';
    # Syndication
    if (DC_ADMIN_URL) {
        $ham_feed = $core->blog->url . $core->url->getURLFor('hamfeed', $code = dcAntispam::getUserCode($core));
        $spam_feed = $core->blog->url . $core->url->getURLFor('spamfeed', $code = dcAntispam::getUserCode($core));
        echo '<h3>' . __('Syndication') . '</h3>' . '<ul class="spaminfo">' . '<li class="feed"><a href="' . $spam_feed . '">' . __('Junk comments RSS feed') . '</a></li>' . '<li class="feed"><a href="' . $ham_feed . '">' . __('Published comments RSS feed') . '</a></li>' . '</ul>';
    }
    dcPage::helpBlock('antispam', 'antispam-filters');
}
?>

</body>
</html>
Exemple #2
0
    if ($moderationTTL != null && $moderationTTL >= 0) {
        echo '<p>' . sprintf(__('All spam comments older than %s day(s) will be automatically deleted.'), $moderationTTL) . '</p>';
    }
    echo '</fieldset></form>';
    # Filters
    echo '<form action="' . $p_url . '" method="post">' . '<fieldset><legend>' . __('Available spam filters') . '</legend>';
    if (!empty($_GET['upd'])) {
        echo '<p class="message">' . __('Filters configuration has been successfully saved.') . '</p>';
    }
    echo '<table class="dragable">' . '<thead><tr>' . '<th>' . __('Order') . '</th>' . '<th>' . __('Active') . '</th>' . '<th>' . __('Auto Del.') . '</th>' . '<th class="nowrap">' . __('Filter name') . '</th>' . '<th colspan="2">' . __('Description') . '</th>' . '</tr></thead>' . '<tbody id="filters-list" >';
    $i = 0;
    foreach ($filters as $fid => $f) {
        $gui_link = '&nbsp;';
        if ($f->hasGUI()) {
            $gui_link = '<a href="' . html::escapeHTML($f->guiURL()) . '">' . '<img src="images/edit-mini.png" alt="' . __('Filter configuration') . '" ' . 'title="' . __('Filter configuration') . '" /></a>';
        }
        echo '<tr class="line' . ($f->active ? '' : ' offline') . '" id="f_' . $fid . '">' . '<td class="handle">' . form::field(array('f_order[' . $fid . ']'), 2, 5, (string) $i) . '</td>' . '<td class="nowrap">' . form::checkbox(array('filters_active[]'), $fid, $f->active) . '</td>' . '<td class="nowrap">' . form::checkbox(array('filters_auto_del[]'), $fid, $f->auto_delete) . '</td>' . '<td class="nowrap">' . $f->name . '</td>' . '<td class="maximal">' . $f->description . '</td>' . '<td class="status">' . $gui_link . '</td>' . '</tr>';
        $i++;
    }
    echo '</tbody></table>' . '<p>' . form::hidden('filters_order', '') . $core->formNonce() . '<input type="submit" name="filters_upd" value="' . __('Save') . '" /></p>' . '</fieldset></form>';
    # Syndication
    if (DC_ADMIN_URL) {
        $ham_feed = $core->blog->url . $core->url->getBase('hamfeed') . '/' . ($code = dcAntispam::getUserCode($core));
        $spam_feed = $core->blog->url . $core->url->getBase('spamfeed') . '/' . ($code = dcAntispam::getUserCode($core));
        echo '<fieldset><legend>' . __('Syndication') . '</legend>' . '<ul class="spaminfo">' . '<li class="feed"><a href="' . $spam_feed . '">' . __('Junk comments RSS feed') . '</a></li>' . '<li class="feed"><a href="' . $ham_feed . '">' . __('Published comments RSS feed') . '</a></li>' . '</ul>' . '</fieldset>';
    }
}
?>

</body>
</html>