当前位置: 首页>>代码示例>>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;未经允许,请勿转载。