示例#1
0
                        $res .= "\$MENU[" . ($num[$i] - 1) . "][\"ulevel\"]=\"" . $ulevel[$i] . "\";\r\n";
                        $res .= "\$MENU[" . ($num[$i] - 1) . "][\"group\"]=\"" . $group[$i] . "\";\r\n";
                        $res .= "\$MENU[" . ($num[$i] - 1) . "][\"parent\"]=\"" . $parent[$i] . "\";\r\n";
                    }
                }
                $res .= "?>";
                OUT($res);
                $fp = fopen($DIRS["menu_list"], "w+");
                if (!$fp) {
                    $ERR->Error("error while opening menu list file!!!");
                    exit;
                }
                fwrite($fp, $res);
                fclose($fp);
                OUT("saved!");
                setpage("?act=root&id=menu");
            } else {
                //показываем форму изменения элементов меню
                ?>
    <div align=center><b>Редактор меню</b></div>
    
    <form action="<?php 
                OUT("?act={$act}&id={$id}");
                ?>
" method=post>
    <input type=hidden name=act value=root>
    <input type=hidden name=a value=save>
   <?php 
                $MDL->LoadAdminPage('menu');
                $mdlist = $MDL->GetInstalledModules();
                include $DIRS["menu_list"];
示例#2
0
        case "root":
            if (isset($id) && $id == "logout") {
                _logoutroot();
                resetpage($fwdto);
                break;
            }
            $p = "user_page";
            break;
        case "smadbisrept":
            if ($MDL->IsModuleExists('smadbis')) {
                $MDL->LoadModule('smadbis', 0);
            }
            exit;
            break;
        default:
            setpage("?p=" . $GV["default_page"]);
    }
}
//Authenticate current user
$CURRENT_USER = NULL;
authenticate();
//Deny blocked accounts
if ($CURRENT_USER["level"] < 0) {
    $ERR->Forbidden("your account is blocked");
}
//Set current skin
if (!defined("SK_DIR")) {
    $GV["skin_dir"] = $GV["skins_dir"] . "/" . $GV["skin"];
    define("SK_DIR", $GV["skin_dir"]);
}
ob_start();
示例#3
0
        ?>
">назад</a></div>       
       <?php 
        return;
    }
}
if ($action == "kill") {
    if ($sure == "true") {
        $prg = $GV["kill_program"] . " " . $klport . " &";
        $res = shell_exec("{$prg}");
        $BILL->KillUser($klport);
        $klmessage = "youarekilled";
        $prg = $GV["send_program"] . " " . $klip . " '" . $klmessage . "'" . " &";
        $res = shell_exec("{$prg}");
        $BILL->AddEventKillUser($kluser);
        setpage("?p={$p}&act={$act}");
    } else {
        ?>
     <div align=center><b>Вы уверены, что хотите сбросить следующих пользователей?</b></div>
     <table width=100% align=center class=tbl2><td> 
     <form action="<?php 
        OUT("?p={$p}&act={$act}&action=kill&klip={$klip}&kluser={$kluser}&klserver={$klserver}&klport={$klport}&sure=true");
        ?>
" method=post>    
     <?php 
        for ($i = 0; $i < count($list); ++$i) {
            $uid = $BILL->GetUidByLogin($list[$i]["user"]);
            if (is_user_exists($uid)) {
                $data = $BILL->GetUserData($uid);
            } else {
                $data = array();