Beispiel #1
0
?>
</head>
<body>
<?php 
if ($filter_gui !== false) {
    echo dcPage::breadcrumb(array(__('Plugins') => '', $page_name => $p_url, sprintf(__('%s filter configuration'), $filter->name) => '')) . dcPage::notices();
    echo '<p><a href="' . $p_url . '" class="back">' . __('Back to filters list') . '</a></p>';
    echo $filter_gui;
    if ($filter->help) {
        dcPage::helpBlock($filter->help);
    }
} else {
    echo dcPage::breadcrumb(array(__('Plugins') => '', $page_name => '')) . dcPage::notices();
    # Information
    $spam_count = dcAntispam::countSpam($core);
    $published_count = dcAntispam::countPublishedComments($core);
    $moderationTTL = $core->blog->settings->antispam->antispam_moderation_ttl;
    echo '<form action="' . $p_url . '" method="post" class="fieldset">' . '<h3>' . __('Information') . '</h3>';
    echo '<ul class="spaminfo">' . '<li class="spamcount"><a href="' . $core->adminurl->get('admin.comments', array('status' => '-2')) . '">' . __('Junk comments:') . '</a> ' . '<strong>' . $spam_count . '</strong></li>' . '<li class="hamcount"><a href="' . $core->adminurl->get('admin.comments', array('status' => '1')) . '">' . __('Published comments:') . '</a> ' . $published_count . '</li>' . '</ul>';
    if ($spam_count > 0) {
        echo '<p>' . $core->formNonce() . form::hidden('ts', time()) . '<input name="delete_all" class="delete" type="submit" value="' . __('Delete all spams') . '" /></p>';
    }
    if ($moderationTTL != null && $moderationTTL >= 0) {
        echo '<p>' . sprintf(__('All spam comments older than %s day(s) will be automatically deleted.'), $moderationTTL) . ' ' . sprintf(__('You can modify this duration in the %s'), '<a href="' . $core->adminurl->get('admin.blog.pref') . '#antispam_moderation_ttl"> ' . __('Blog settings') . '</a>') . '.</p>';
    }
    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.'));
    }