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


PHP Operator::clearTableForLogout方法代碼示例

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


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

示例1: execute

 public function execute()
 {
     global $gvPath;
     $code = $_POST['code'];
     $password = $_POST['password'];
     session_destroy();
     unset($_SESSION);
     session_start();
     if ($this->isValidSysAdminLogin($code, $password)) {
         global $gvEditableConfs;
         $_SESSION['userLevel'] = Page::SYSADMIN_USER;
         if ($code == $gvEditableConfs[0]->getDefault() && $password == $gvEditableConfs[1]->getDefault()) {
             // Access with default credentials. Redirect to settings.
             $redirect = new RedirectOutput($gvPath . "/application/adminSettings");
         } else {
             $redirect = new RedirectOutput($gvPath . "/application/adminPage");
         }
         return $redirect;
     }
     if (Operator::isValidLogin($code, $password)) {
         Operator::clearTableForLogout($code);
         try {
             Session::loginOperator($code);
         } catch (UnknownDeskException $e) {
             global $gvPath;
             $errorPage = new ErrorPageOutput("Sportello non riconosciuto", "Il presente computer non è stato registrato come sportello.<br />" . "Indirizzo IP da registrare: " . $_SERVER['REMOTE_ADDR'], "<a href=\"{$gvPath}/application/loginPage\">Torna indietro</a>");
             return $errorPage;
         }
         $redirect = new RedirectOutput($gvPath . "/application/opPage");
         return $redirect;
     }
     // Login failed
     $this->errorMessage = "Codice o password non validi!";
     return true;
 }
開發者ID:adntec,項目名稱:queueManage,代碼行數:35,代碼來源:LoginPage.php

示例2: logoutOperator

 public static function logoutOperator()
 {
     $_SESSION['userLevel'] = Page::NORMAL_USER;
     Operator::clearTableForLogout($_SESSION['op_code']);
     unset($_SESSION['op_code']);
     unset($_SESSION['desk_number']);
     unset($_SESSION['td_served']);
 }
開發者ID:adntec,項目名稱:queueManage,代碼行數:8,代碼來源:Session.php

示例3: isOpen

 public function isOpen()
 {
     global $gvSessionTimeout;
     if (!$this->desk_last_activity_time || !$this->desk_op_code) {
         // Closed
         return false;
     }
     $last = $this->desk_last_activity_time;
     if (time() - $last >= $gvSessionTimeout) {
         // Session timed out, update tables
         Operator::clearTableForLogout($this->desk_op_code, $this, null);
         return false;
     }
     return true;
 }
開發者ID:adntec,項目名稱:queueManage,代碼行數:15,代碼來源:Desk.php


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