示例#1
0
function output_userfullname()
{
    echo ses_get("fullname");
    if (ses_get("admin")) {
        echo " (admin)";
    }
}
function action_checklogin()
{
    if (ses_get("userID")) {
        return true;
    } else {
        return false;
    }
}
示例#3
0
header("Pragma: no-cache");
ses_start();
sql_connect();
if (!action_checklogin()) {
    if (!action_login()) {
        action_redirect("login.php");
    }
}
$mod = $_GET['m'];
if ($mod) {
    ses_set("module", $mod);
} else {
    $mod = ses_get("module");
}
switch ($_GET['a']) {
    case 1:
        unset($mod);
        break;
    case 3:
        action_redirect($_GET['page']);
        break;
    case 9:
        action_logout();
        break;
}
if (mod_getadmin($mod)) {
    if (!ses_get("admin")) {
        unset($mod);
    }
}
mod_execute($mod);