Ejemplo n.º 1
0
function sp_AdminBarGetWaiting()
{
    global $spThisUser;
    # set up new posts
    if ($spThisUser->admin || $spThisUser->moderator) {
        global $spNewPosts, $spVars;
        include_once SPABLIBDIR . 'sp-admin-bar-components.php';
        $spNewPosts = sp_GetAdminsQueuedPosts();
        # check if the queue is up to 200 posts whi is dangerous - output message
        if (isset($spVars['queue']) && $spVars['queue'] > 199) {
            $out = '<div class="spMessage">';
            $out .= '<p>' . sprintf(__('WARNING: The admin postbag contains %s posts which require removal', 'spab'), $spVars['queue']) . '</p>';
            $out .= '</div>';
            $out = apply_filters('sph_AdminQueueWarning', $out);
            echo $out;
        }
    }
}
<?php

/*
Simple:Press
Admin Bar plugin ahah routine for new post list
$LastChangedDate: 2013-02-17 11:59:36 -0800 (Sun, 17 Feb 2013) $
$Rev: 9855 $
*/
if (preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) {
    die('Access denied - you cannot directly call this file');
}
sp_forum_api_support();
global $spThisUser;
if ($spThisUser->admin || $spThisUser->moderator) {
    include_once SPABLIBDIR . 'sp-admin-bar-components.php';
    # must be loading up the new post list
    $newposts = sp_GetAdminsQueuedPosts();
    sp_NewPostListAdmin($newposts);
} else {
    if (!is_user_logged_in()) {
        _e('Access denied - are you logged in?', 'spab');
    } else {
        _e('Access denied - you do not have permission', 'spab');
    }
}
die;