コード例 #1
0
ファイル: _comment.funcs.php プロジェクト: ldanielz/uesp.blog
/**
 * Dispay a form to mass delete the comments
 *
 * @param object Comment List
 */
function display_comment_mass_delete($CommentList)
{
    $action = param_action();
    if ($action != 'mass_delete') {
        // Display this form only for action "mass_delete"
        return;
    }
    if (!check_comment_mass_delete($CommentList)) {
        // Form is not available
        return;
    }
    require dirname(__FILE__) . '/../views/_comment_mass.form.php';
}
コード例 #2
0
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var Blog
 */
global $Blog;
/**
 * @var CommentList
 */
global $CommentList;
/*
 * Display comments:
 */
$CommentList->query();
// Dispay a form to mass delete the comments:
display_comment_mass_delete($CommentList);
// Display title depending on selection params:
echo $CommentList->get_filter_title('<h2>', '</h2>', '<br />', NULL, 'htmlbody');
$CommentList->title = T_('Comment List');
if (check_comment_mass_delete($CommentList)) {
    // A form for mass deleting is availabl, Display link
    $CommentList->global_icon(T_('Delete all comments!'), 'delete', regenerate_url('action', 'action=mass_delete'), T_('Mass delete...'), 3, 3);
}
if ($CommentList->is_filtered()) {
    // List is filtered, offer option to reset filters:
    $CommentList->global_icon(T_('Reset all filters!'), 'reset_filters', '?ctrl=comments&amp;blog=' . $Blog->ID . '&amp;tab3=listview&amp;filter=reset', T_('Reset filters'), 3, 3);
}
// Initialize Results object
comments_results($CommentList);
$CommentList->display();