Beispiel #1
0
*/
require_once '../lib-common.php';
/**
* Security check to ensure user even belongs on this page
*/
require_once 'auth.inc.php';
// MAIN
if (isset($_GET['mode']) && $_GET['mode'] == 'logout') {
    print COM_refresh($_CONF['site_url'] . '/users.php?mode=logout');
}
/**
* Display a reminder to execute the security check script
*
* @return   string      HTML for security reminder (or empty string)
*/
function security_check_reminder()
{
    global $_CONF, $_TABLES, $_IMAGE_TYPE, $MESSAGE;
    $retval = '';
    if (!SEC_inGroup('Root')) {
        return $retval;
    }
    $done = DB_getItem($_TABLES['vars'], 'value', "name = 'security_check'");
    if ($done != 1) {
        $retval .= COM_showMessage(92);
    }
    return $retval;
}
$display = COM_showMessageFromParameter() . security_check_reminder() . COM_commandControl();
$display = COM_createHTMLDocument($display, array('pagetitle' => $LANG29[34]));
COM_output($display);
Beispiel #2
0
/**
* Prints administration menu
*
* This will return the administration menu items that the user has
* sufficient rights to -- Admin Block on the left side.
*
* @param        string      $help       Help file to show
* @param        string      $title      Menu Title
* @param        string      $position   Side being shown on 'left', 'right' or blank.
* @see function COM_userMenu
*
*/
function COM_adminMenu($help = '', $title = '', $position = '')
{
    $retval = '';
    // This is quick so do first
    if (COM_isAnonUser()) {
        return $retval;
    }
    $plugin_options = PLG_getAdminOptions();
    $num_plugins = count($plugin_options);
    if (SEC_isModerator() or SEC_hasRights('story.edit,block.edit,topic.edit,user.edit,plugin.edit,user.mail,syndication.edit', 'OR') or $num_plugins > 0 or SEC_hasConfigAccess()) {
        $retval = COM_commandControl(true, $help, $title, $position);
    }
    return $retval;
}