<tr>
	<th>ADMIN PERMISSIONS</th>
	</tr>


    <tr>
    <td valign="middle" style="padding:6px 4px;">

        <div style="width:130px; float:left;">Allowed Sections:</div>
        <div style="float:left;">
        <?php 
$admin_sections = get_admin_sections();
$admin_user_perms = array();
if ($au_id > 0) {
    $admin_user_perms = cb89(get_admin_user_perms($au_id), 'admin_section_id');
    //var_dump("<pre>", $admin_user_perms);
}
foreach ($admin_sections as $admin_sec) {
    #/ Prevent self-lockout, and Prevent Super-Admin locout
    $disabled = '';
    if (($au_id == $my_user_id || @$empt['is_super_admin'] == '1') && $admin_sec['id'] == 1) {
        $disabled = "disabled=''";
        echo "<input type='hidden' name='permissions[]' value='{$admin_sec['id']}' />";
    }
    echo '<input type="checkbox" name="permissions[]" ' . $disabled . ' value="' . $admin_sec['id'] . '"';
    if (isset($admin_user_perms[$admin_sec['id']])) {
        echo "checked=\"checked\"";
    }
    echo '>';
    echo $admin_sec['label'] . '</br>';
Esempio n. 2
0
        update_attempt_counts();
        redirect_me("{$consts['DOC_ROOT_ADMIN']}login", true);
    } else {
        if ($chk_email_add["is_active"] != '1') {
            $_SESSION["CUSA_ADMIN_MSG_GLOBAL"] = array(false, '<strong>Your Account is BLOCKED.</strong> &nbsp;Please contact Administrator.');
            update_attempt_counts();
            redirect_me("{$consts['DOC_ROOT_ADMIN']}login", true);
        } else {
            #/ Process Login
            $user_prof = format_str($chk_email_add);
            $_SESSION["cusa_admin_usr_id"] = $chk_email_add["id"];
            $_SESSION["adm_usr_info"] = $user_prof;
            $_SESSION['LAST_CUSA_Admin_ACTIVITY'] = time();
            #/ Set Permissions
            include_once "../../includes/admin/permission_manager.php";
            $adm_perm = array_keys(@cb89(@get_admin_user_perms($chk_email_add["id"], 'admin_section_id'), 'admin_section_id'));
            $_SESSION['cusa_adm_perm'] = $adm_perm;
            //var_dump("<pre>", $_SESSION); die();
            $_SESSION["CUSA_ADMIN_MSG_GLOBAL"] = array(true, 'Welcome to the CUSA Administration Section.');
            reset_attempt_counts();
            redirect_me("{$consts['DOC_ROOT_ADMIN']}home", true);
            exit;
        }
        //end else......
    }
    //end if email add exists....
}
//end if post......
////////////////////////////////////////////////////////////////////////
$pg_title = "Admin Login";
include_once "includes/header.php";