Пример #1
0
 public function index($params)
 {
     $this->assign("rules", explode(",", $_COOKIE['rogmgr_rules']));
     $rules_kv = \module\mauthorization::get_rules_kv();
     $this->assign("rules_kv", $rules_kv);
     if (in_array($rules_kv['操作日志-查看'], explode(",", $_COOKIE['rogmgr_rules']))) {
         $this->render("mcp/log");
     }
 }
Пример #2
0
 public function showServer()
 {
     $this->assign("rules", explode(",", $_COOKIE['rogmgr_rules']));
     $rules_kv = \module\mauthorization::get_rules_kv();
     $this->assign("rules_kv", $rules_kv);
     if (in_array($rules_kv['Server-查看'], explode(",", $_COOKIE['rogmgr_rules']))) {
         $this->render("mcp/defaultserver");
     }
 }
Пример #3
0
 public function index()
 {
     $this->assign("rules", explode(",", $_COOKIE['rogmgr_rules']));
     $rules_kv = \module\mauthorization::get_rules_kv();
     $this->assign("rules_kv", $rules_kv);
     if (in_array($rules_kv['邮件服务器-查看'], explode(",", $_COOKIE['rogmgr_rules']))) {
         $this->render("mcp/emailserver");
     }
 }
Пример #4
0
 public function index($params)
 {
     if ($_COOKIE['rogmgr_user']) {
         $this->assign("agent", $_COOKIE['rogmgr_user']);
         $this->assign("rules", explode(",", $_COOKIE['rogmgr_rules']));
         $rules_kv = \module\mauthorization::get_rules_kv();
         $this->assign("rules_kv", $rules_kv);
         $this->render("mcp/main");
     } else {
         header('location: ../login');
     }
 }
Пример #5
0
 public function get_kv()
 {
     \module\mauthorization::get_rules_kv();
 }
 public static function rules_update($params)
 {
     $ids = array("id" => $params['pid']);
     \module\mauthorization::rules_delete($ids);
     $stats = \module\mauthorization::rules_add($params);
     return $stats;
 }
 public function rules_update($params)
 {
     $res_add_rules = \module\mauthorization::rules_update($params);
     echo json_encode($res_add_rules);
 }