當前位置: 首頁>>代碼示例>>PHP>>正文


PHP BaseView::_systemid方法代碼示例

本文整理匯總了PHP中BaseView::_systemid方法的典型用法代碼示例。如果您正苦於以下問題:PHP BaseView::_systemid方法的具體用法?PHP BaseView::_systemid怎麽用?PHP BaseView::_systemid使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在BaseView的用法示例。


在下文中一共展示了BaseView::_systemid方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

    public function __construct()
    {
        $mod = trim($_GET['mod']);
        $act = trim($_GET['act']);
        if (C('IS_AUTH_ON') === true) {
            if (!AuthUser::checkLogin($mod, $act)) {
                if (!$_SESSION[C("USER_AUTH_ID")]) {
                    echo '<script language="javascript"> 
					        self.location="index.php?mod=public&act=login";
					   	  </script>';
                } elseif ($_SESSION[C("USER_AUTH_ID")]) {
                    //$data   = array('data'=>array('您尚未有此權限'), 'link'=>$_SERVER['HTTP_REFERER']);
                    //goErrMsgPage($data);exit;
                    echo '您尚未有此權限';
                    exit;
                } else {
                    //$data   = array('data'=>array('還未登陸!'), 'link'=>'index.php?mod=public&act=login');
                    //goErrMsgPage($data);exit;
                    echo '還未登陸!';
                    exit;
                }
                exit;
            }
        }
        self::$_username = isset($_SESSION['userName']) ? $_SESSION['userName'] : "";
        self::$_userid = isset($_SESSION[C("USER_AUTH_ID")]) ? $_SESSION[C("USER_AUTH_ID")] : 0;
        self::$_companyid = isset($_SESSION['companyId']) ? $_SESSION['companyId'] : 0;
        self::$_systemid = C('AUTH_SYSTEM_ID');
        //初始化smarty
        require WEB_PATH . 'lib/template/smarty/Smarty.class.php';
        $this->smarty = new Smarty();
        $this->smarty->template_dir = WEB_PATH . 'html/template/v1/';
        $this->smarty->compile_dir = WEB_PATH . 'smarty/templates_c/';
        $this->smarty->config_dir = WEB_PATH . 'smarty/configs/';
        $this->smarty->cache_dir = WEB_PATH . 'smarty/cache/';
        $this->smarty->debugging = false;
        $this->smarty->caching = false;
        $this->smarty->cache_lifetime = 120;
        //初始化提交過來的變量(post and get)
        if (isset($_GET)) {
            foreach ($_GET as $gk => $gv) {
                $this->smarty->assign('g_' . $gk, $gv);
            }
        }
        if (isset($_POST)) {
            foreach ($_POST as $pk => $pv) {
                $this->smarty->assign('p_' . $pk, $pv);
            }
        }
        $this->smarty->assign('mod', $mod);
        //模塊權限
        $this->smarty->assign('act', $act);
        //操作權限
        $this->smarty->assign('_username', self::$_username);
        $this->smarty->assign('_userid', self::$_userid);
        //初始化當前頁碼
        $this->page = isset($_GET['page']) && intval($_GET['page']) > 0 ? intval($_GET['page']) : 1;
        $this->smarty->assign("page", $this->page);
    }
開發者ID:ohjack,項目名稱:newErp,代碼行數:59,代碼來源:base.view.php

示例2: __construct

 public function __construct()
 {
     $mod = trim($_GET['mod']);
     $act = trim($_GET['act']);
     /*if (C('IS_AUTH_ON')===true){
       	if (!AuthUser::checkLogin($mod, $act)){
       		echo '<script language="javascript"> 
            alert(" 登 陸 "); 
            self.location="index.php?mod=public&act=login";
       </script>';
       		exit;
       	}
       }*/
     self::$_username = isset($_SESSION['userName']) ? $_SESSION['userName'] : "";
     self::$_userid = isset($_SESSION['userId']) ? $_SESSION['userId'] : 0;
     self::$_companyid = isset($_SESSION['companyId']) ? $_SESSION['companyId'] : 0;
     self::$_systemid = '12';
     //初始化smarty
     require WEB_PATH . 'lib/template/smarty/Smarty.class.php';
     $this->smarty = new Smarty();
     $this->smarty->template_dir = WEB_PATH . 'html/template/v1' . DIRECTORY_SEPARATOR;
     $this->smarty->compile_dir = WEB_PATH . 'smarty/templates_c' . DIRECTORY_SEPARATOR;
     $this->smarty->config_dir = WEB_PATH . 'smarty/configs' . DIRECTORY_SEPARATOR;
     $this->smarty->cache_dir = WEB_PATH . 'smarty/cache' . DIRECTORY_SEPARATOR;
     $this->smarty->debugging = false;
     $this->smarty->caching = false;
     $this->smarty->cache_lifetime = 120;
     $this->smarty->assign('curusername', $_SESSION['userName']);
     //設置當前用戶名
     //初始化提交過來的變量(post and get)
     if (isset($_GET)) {
         foreach ($_GET as $gk => $gv) {
             $this->smarty->assign('g_' . $gk, $gv);
         }
     }
     if (isset($_POST)) {
         foreach ($_POST as $pk => $pv) {
             $this->smarty->assign('p_' . $pk, $pv);
         }
     }
     $this->smarty->assign('mod', $mod);
     //模塊權限
     $this->smarty->assign('act', $act);
     //操作權限
     $this->smarty->assign('_username', self::$_username);
     //初始化當前頁碼
     $this->page = isset($_GET['page']) && intval($_GET['page']) > 0 ? intval($_GET['page']) : 1;
     $this->smarty->assign("page", $this->page);
 }
開發者ID:ohjack,項目名稱:newErp,代碼行數:49,代碼來源:base.view.php

示例3: __construct

    public function __construct()
    {
        $mod = trim($_GET['mod']);
        $act = trim($_GET['act']);
        if (C('IS_AUTH_ON') === true) {
            if (!AuthUser::checkLogin($mod, $act)) {
                if (!$_SESSION['userId']) {
                    echo '<script language="javascript"> 
					        self.location="index.php?mod=public&act=login";
					   </script>';
                } elseif ($_SESSION['userId']) {
                    $AccessList = AuthUser::getAccessList();
                    if (empty($AccessList)) {
                        header('Location: index.php?mod=public&act=logout');
                        exit;
                    } else {
                        /*header('Location: index.php?mod=public&act=logout');
                        		exit;*/
                        $slice_AccessList = array_slice($AccessList, 0, 1);
                        foreach ($slice_AccessList as $akey => $aValue) {
                            $relocation = 'index.php?mod=' . $akey . '&act=' . $aValue[0];
                        }
                        //echo $relocation; exit;
                        $relocation = C('USER_GO_URL');
                        echo '<script language="javascript">
					        alert("親,您尚未有此權限!");
					        self.location="' . $relocation . '";
					   </script>';
                    }
                } else {
                    echo '<script language="javascript"> 
					        alert("親,您還沒有登錄哦!"); 
					        self.location="index.php?mod=public&act=login";
					   </script>';
                }
                exit;
            }
        }
        self::$_username = isset($_SESSION['userName']) ? $_SESSION['userName'] : "";
        self::$_userid = isset($_SESSION['userId']) ? $_SESSION['userId'] : 0;
        self::$_companyid = isset($_SESSION['companyId']) ? $_SESSION['companyId'] : 0;
        self::$_systemid = '12';
        //初始化smarty
        require WEB_PATH . 'lib/template/smarty/Smarty.class.php';
        $this->smarty = new Smarty();
        $this->smarty->template_dir = WEB_PATH . 'html/template/v1' . DIRECTORY_SEPARATOR;
        $this->smarty->compile_dir = WEB_PATH . 'smarty/templates_c' . DIRECTORY_SEPARATOR;
        $this->smarty->config_dir = WEB_PATH . 'smarty/configs' . DIRECTORY_SEPARATOR;
        $this->smarty->cache_dir = WEB_PATH . 'smarty/cache' . DIRECTORY_SEPARATOR;
        $this->smarty->debugging = false;
        $this->smarty->caching = false;
        $this->smarty->cache_lifetime = 120;
        $this->smarty->assign('curusername', $_SESSION['userName']);
        //設置當前用戶名
        //初始化提交過來的變量(post and get)
        if (isset($_GET)) {
            foreach ($_GET as $gk => $gv) {
                $this->smarty->assign('g_' . $gk, $gv);
            }
        }
        if (isset($_POST)) {
            foreach ($_POST as $pk => $pv) {
                $this->smarty->assign('p_' . $pk, $pv);
            }
        }
        $this->smarty->assign('mod', $mod);
        //模塊權限
        $this->smarty->assign('act', $act);
        //操作權限
        $this->smarty->assign('_username', self::$_username);
        $this->smarty->assign('_userid', self::$_userid);
        //初始化當前頁碼
        $this->page = isset($_GET['page']) && intval($_GET['page']) > 0 ? intval($_GET['page']) : 1;
        $this->smarty->assign("page", $this->page);
    }
開發者ID:ohjack,項目名稱:newErp,代碼行數:75,代碼來源:base.view.php

示例4: __construct

 public function __construct()
 {
     $mod = trim($_GET['mod']);
     $act = trim($_GET['act']);
     $modObj = ucfirst($mod . "View");
     $actObj = "view_" . $act;
     if (!method_exists($modObj, $actObj)) {
         header("Location: 404.html");
         exit;
     }
     $ref = empty($_SERVER["HTTP_HOST"]) ? "" : rawurlencode('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
     if (C('IS_AUTH_ON') === true) {
         if (!AuthUser::checkLogin($mod, $act)) {
             if (!$_SESSION[C("USER_AUTH_ID")]) {
                 $error = rawurlencode("親,您還沒有登錄哦!");
                 redirect_to("index.php?mod=public&act=login&msg={$error}&ref={$ref}");
             } elseif ($_SESSION[C("USER_AUTH_ID")]) {
                 $res = AuthUser::fetchAuth();
                 $user_mod = "";
                 $user_act = "";
                 foreach ($res as $key => $v) {
                     $user_mod = $key;
                     foreach ($v as $val) {
                         $user_act = $val;
                         if ($user_act == 'index') {
                             break;
                         }
                     }
                     if ($user_act == 'index') {
                         break;
                     }
                 }
                 if (empty($user_mod) || empty($user_act)) {
                     $error = rawurlencode("親,您尚未分配權限!");
                     redirect_to("index.php?mod=public&act=logout&msg={$error}");
                 } else {
                     redirect_to("index.php?mod={$user_mod}&act={$user_act}");
                 }
             } else {
                 $error = rawurlencode("親,您還沒有登錄哦!");
                 redirect_to("index.php?mod=public&act=login&msg={$error}");
             }
         }
     }
     self::$_username = isset($_SESSION['userName']) ? $_SESSION['userName'] : "";
     self::$_userid = isset($_SESSION[C("USER_AUTH_ID")]) ? $_SESSION[C("USER_AUTH_ID")] : 0;
     self::$_companyid = isset($_SESSION['companyId']) ? $_SESSION['companyId'] : 0;
     self::$_systemid = C('AUTH_SYSTEM_ID');
     //初始化smarty
     require WEB_PATH . 'lib/template/smarty/Smarty.class.php';
     $this->smarty = new Smarty();
     $this->smarty->template_dir = WEB_PATH . 'html/template/';
     $this->smarty->compile_dir = WEB_PATH . 'smarty/templates_c/';
     $this->smarty->config_dir = WEB_PATH . 'smarty/configs/';
     $this->smarty->cache_dir = WEB_PATH . 'smarty/cache/';
     $this->smarty->debugging = false;
     $this->smarty->caching = false;
     $this->smarty->cache_lifetime = 120;
     //初始化提交過來的變量(post and get)
     if (isset($_GET)) {
         foreach ($_GET as $gk => $gv) {
             $this->smarty->assign('g_' . $gk, $gv);
         }
     }
     if (isset($_POST)) {
         foreach ($_POST as $pk => $pv) {
             $this->smarty->assign('p_' . $pk, $pv);
         }
     }
     $this->smarty->assign('mod', $mod);
     //模塊權限
     $this->smarty->assign('act', $act);
     //操作權限
     $this->smarty->assign('_username', self::$_username);
     $this->smarty->assign('_userid', self::$_userid);
     //初始化當前頁碼
     $this->page = isset($_GET['page']) && intval($_GET['page']) > 0 ? intval($_GET['page']) : '';
     $this->smarty->assign("page", $this->page);
 }
開發者ID:ohjack,項目名稱:newErp,代碼行數:79,代碼來源:base.view.php

示例5: __construct

    public function __construct()
    {
        $mod = trim($_GET['mod']);
        $act = trim($_GET['act']);
        if (C('IS_AUTH_ON') === true) {
            if (!AuthUser::checkLogin($mod, $act)) {
                if (!$_SESSION[C("USER_AUTH_ID")]) {
                    echo '<script language="javascript">
						  	self.location="index.php?mod=public&act=login";
						  </script>';
                } elseif ($_SESSION[C("USER_AUTH_ID")]) {
                    if (!empty($_GET['callback'])) {
                        $callback = $_GET['callback'];
                        exit($callback . '({"errCode":"176", "errMsg":"親,您尚未有此權限"})');
                        return false;
                    }
                    echo '<script language="javascript">
					        alert("親,您尚未有此權限!");
					        history.back();
					      </script>';
                } else {
                    if (!empty($_GET['callback'])) {
                        $callback = $_GET['callback'];
                        exit($callback . '({"errCode":"043", "errMsg":"親,您還沒有登錄哦!"})');
                        return false;
                    }
                    echo '<script language="javascript">
					        alert("親,您還沒有登錄哦!");
					        self.location="index.php?mod=public&act=login";
					   	  </script>';
                }
                exit;
            }
        }
        self::$_username = isset($_SESSION['userName']) ? $_SESSION['userName'] : "";
        self::$_userid = isset($_SESSION[C("USER_AUTH_ID")]) ? $_SESSION[C("USER_AUTH_ID")] : 0;
        self::$_companyid = isset($_SESSION['companyId']) ? $_SESSION['companyId'] : 0;
        self::$_systemid = C('AUTH_SYSTEM_ID');
        require WEB_PATH . 'lib/template/smarty/Smarty.class.php';
        $this->smarty = new Smarty();
        $this->smarty->template_dir = WEB_PATH . 'html/template/';
        $this->smarty->compile_dir = WEB_PATH . 'smarty/templates_c/';
        $this->smarty->config_dir = WEB_PATH . 'smarty/configs/';
        $this->smarty->cache_dir = WEB_PATH . 'smarty/cache/';
        $this->smarty->debugging = false;
        $this->smarty->caching = false;
        $this->smarty->cache_lifetime = 120;
        //初始化提交過來的變量(post and get)
        if (isset($_GET)) {
            foreach ($_GET as $gk => $gv) {
                $this->smarty->assign('g_' . $gk, $gv);
            }
        }
        if (isset($_POST)) {
            foreach ($_POST as $pk => $pv) {
                $this->smarty->assign('p_' . $pk, $pv);
            }
        }
        $this->smarty->assign('mod', $mod);
        //模塊權限
        $this->smarty->assign('act', $act);
        //操作權限
        $this->smarty->assign('_username', self::$_username);
        $this->smarty->assign('_userid', self::$_userid);
        //初始化當前頁碼
        $this->page = isset($_GET['page']) && intval($_GET['page']) > 0 ? intval($_GET['page']) : 1;
        $this->smarty->assign("page", $this->page);
    }
開發者ID:ohjack,項目名稱:newErp,代碼行數:68,代碼來源:base.view.php

示例6: __construct

    public function __construct()
    {
        $mod = trim($_GET['mod']);
        $act = trim($_GET['act']);
        if (C('IS_AUTH_ON') === true) {
            if (!AuthUser::checkLogin($mod, $act)) {
                if (!$_SESSION['userId']) {
                    echo '<script language="javascript"> 
					        self.location="index.php?mod=public&act=login";
					   </script>';
                } elseif ($_SESSION['userId']) {
                    $AccessList = AuthUser::getAccessList();
                    if (empty($AccessList)) {
                        header('Location: index.php?mod=public&act=logout');
                        exit;
                    } else {
                        $slice_AccessList = array_slice($AccessList, 0, 1);
                        foreach ($slice_AccessList as $akey => $aValue) {
                            $relocation = 'index.php?mod=' . $akey . '&act=' . $aValue[0];
                        }
                        echo '<script language="javascript">
					        alert("親,您尚未有此權限!");
					        history.go(-1);
					   </script>';
                    }
                } else {
                    echo '<script language="javascript"> 
					        alert("親,您還沒有登錄哦!"); 
					        self.location="index.php?mod=public&act=login";
					   </script>';
                }
                exit;
            }
        }
        if (!in_array($act, array('login', 'logout', 'userLogin'))) {
            $now_url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
            //記錄當前頁麵url
            setcookie('now_url', $now_url, time() + 3600);
            //print_r($_COOKIE['now_url']);exit;
        }
        self::$_username = isset($_SESSION['userName']) ? $_SESSION['userName'] : "";
        self::$_userCNname = isset($_SESSION['userCnName']) ? $_SESSION['userCnName'] : "";
        self::$_userid = isset($_SESSION['userId']) ? $_SESSION['userId'] : 0;
        self::$_companyid = isset($_SESSION['companyId']) ? $_SESSION['companyId'] : 0;
        self::$_systemid = '10';
        //初始化smarty
        require WEB_PATH . 'lib/template/smarty/Smarty.class.php';
        $this->smarty = new Smarty();
        $this->smarty->template_dir = WEB_PATH . 'html/template/v1' . DIRECTORY_SEPARATOR;
        $this->smarty->compile_dir = WEB_PATH . 'smarty/templates_c' . DIRECTORY_SEPARATOR;
        $this->smarty->config_dir = WEB_PATH . 'smarty/configs' . DIRECTORY_SEPARATOR;
        $this->smarty->cache_dir = WEB_PATH . 'smarty/cache' . DIRECTORY_SEPARATOR;
        $this->smarty->debugging = false;
        $this->smarty->caching = false;
        $this->smarty->cache_lifetime = 120;
        //初始化提交過來的變量(post and get)
        if (isset($_GET)) {
            foreach ($_GET as $gk => $gv) {
                $this->smarty->assign('g_' . $gk, $gv);
            }
        }
        if (isset($_POST)) {
            foreach ($_POST as $pk => $pv) {
                $this->smarty->assign('p_' . $pk, $pv);
            }
        }
        $this->smarty->assign('mod', $mod);
        //模塊權限
        $this->smarty->assign('act', $act);
        //操作權限
        $this->smarty->assign('_username', self::$_username);
        $this->smarty->assign('_userCNname', self::$_userCNname);
        $this->smarty->assign('_userid', self::$_userid);
        //初始化當前頁碼
        $this->page = isset($_GET['page']) && intval($_GET['page']) > 0 ? intval($_GET['page']) : 1;
        $this->smarty->assign("page", $this->page);
    }
開發者ID:ohjack,項目名稱:newErp,代碼行數:77,代碼來源:base.view.php

示例7: __construct

    public function __construct()
    {
        $mod = trim($_GET['mod']);
        $act = trim($_GET['act']);
        if (C('IS_AUTH_ON') === true) {
            if (!AuthUser::checkLogin($mod, $act)) {
                if (!$_SESSION[C("USER_AUTH_ID")]) {
                    echo '<script language="javascript"> 
					        self.location="index.php?mod=public&act=login";
					   </script>';
                } elseif ($_SESSION[C("USER_AUTH_ID")]) {
                    $res = AuthUser::fetchAuth();
                    $user_mod = "";
                    $user_act = "";
                    //print_r($res);
                    //exit;
                    while (list($key, $val) = each($res)) {
                        $user_mod = $key;
                        $user_act = $val[0];
                        break;
                    }
                    /*
                    					if (empty($user_mod) || empty($user_act)) {
                    							echo '<script language="javascript"> 
                    						        alert("親,您尚未分配權限,請聯係係統管理員分配!"); 
                    						        self.location="index.php?mod=public&act=logout";
                    								</script>';
                    					} else {
                    							echo '<script language="javascript"> 
                    						        alert("親,您尚未有此權限,係統自動跳轉到您有權限的頁麵!"); 
                    						        self.location="index.php?";
                    								</script>';
                    					}
                    */
                } else {
                    echo '<script language="javascript"> 
					        alert("親,您還沒有登錄哦!"); 
					        self.location="index.php?mod=public&act=login";
					   </script>';
                }
            }
        }
        self::$_username = isset($_SESSION['userName']) ? $_SESSION['userName'] : "";
        self::$_userid = isset($_SESSION[C("USER_AUTH_ID")]) ? $_SESSION[C("USER_AUTH_ID")] : 0;
        self::$_companyid = isset($_SESSION['companyId']) ? $_SESSION['companyId'] : 0;
        self::$_systemid = C('AUTH_SYSTEM_ID');
        //初始化smarty
        require WEB_PATH . 'lib/template/smarty/Smarty.class.php';
        $this->smarty = new Smarty();
        $this->smarty->template_dir = WEB_PATH . 'html/template/';
        $this->smarty->compile_dir = WEB_PATH . 'smarty/templates_c/';
        $this->smarty->config_dir = WEB_PATH . 'smarty/configs/';
        $this->smarty->cache_dir = WEB_PATH . 'smarty/cache/';
        $this->smarty->debugging = false;
        $this->smarty->caching = false;
        $this->smarty->cache_lifetime = 120;
        //初始化提交過來的變量(post and get)
        if (isset($_GET)) {
            foreach ($_GET as $gk => $gv) {
                $this->smarty->assign('g_' . $gk, $gv);
            }
        }
        if (isset($_POST)) {
            foreach ($_POST as $pk => $pv) {
                $this->smarty->assign('p_' . $pk, $pv);
            }
        }
        $this->smarty->assign('mod', $mod);
        //模塊權限
        $this->smarty->assign('act', $act);
        //操作權限
        $this->smarty->assign('_username', self::$_username);
        $this->smarty->assign('_userid', self::$_userid);
        if (isset($_SESSION["userCnName"])) {
            $this->smarty->assign('userCnName', $_SESSION["userCnName"]);
        }
        //初始化當前頁碼
        $this->page = isset($_GET['page']) && intval($_GET['page']) > 0 ? intval($_GET['page']) : 1;
        $this->smarty->assign("page", $this->page);
    }
開發者ID:ohjack,項目名稱:newErp,代碼行數:80,代碼來源:base.view.php


注:本文中的BaseView::_systemid方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。