当前位置: 首页>>代码示例>>PHP>>正文


PHP CSession::Clear方法代码示例

本文整理汇总了PHP中CSession::Clear方法的典型用法代码示例。如果您正苦于以下问题:PHP CSession::Clear方法的具体用法?PHP CSession::Clear怎么用?PHP CSession::Clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CSession的用法示例。


在下文中一共展示了CSession::Clear方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: TemplateValues

 public function TemplateValues()
 {
     $sFootError = '';
     if (CSession::Has('wm_install_pass_error')) {
         $sFootError = CSession::Get('wm_install_pass_error', '');
         CSession::Clear('wm_install_pass_error');
     }
     return array('Login' => $this->oSettings->GetConf('Common/AdminLogin'), 'Password1' => '', 'Password2' => '', 'FootError' => $sFootError);
 }
开发者ID:hallnewman,项目名称:webmail-lite,代码行数:9,代码来源:admin-panel.php

示例2: UpdateDomain

 /**
  * @param CDomain $oDomain
  * @return bool
  */
 public function UpdateDomain(CDomain $oDomain)
 {
     if (!$this->oDomainsApi->UpdateDomain($oDomain)) {
         $this->lastErrorCode = $this->oDomainsApi->GetLastErrorCode();
         $this->lastErrorMessage = $this->oDomainsApi->GetLastErrorMessage();
         return false;
     }
     if (CSession::Has(AP_SESS_DOMAIN_NEXT_EDIT_ID) && $oDomain->IdDomain === CSession::Get(AP_SESS_DOMAIN_NEXT_EDIT_ID, null)) {
         CSession::Clear(AP_SESS_DOMAIN_NEXT_EDIT_ID);
     }
     return true;
 }
开发者ID:hallnewman,项目名称:webmail-lite,代码行数:16,代码来源:index.php

示例3: initAdminPanel

 /**
  * @return void
  */
 protected function initAdminPanel()
 {
     $this->RType = (bool) CApi::GetConf('tenant', false);
     $this->AType = !!CApi::Manager('collaboration');
     $this->aTabsSort = array(AP_TAB_COMMON, AP_TAB_DOMAINS, AP_TAB_USERS, AP_TAB_TENANTS, AP_TAB_CHANNELS, AP_TAB_SYSTEM);
     $GLOBALS[AP_START_TIME] = ap_Utils::Microtime();
     $GLOBALS[AP_DB_COUNT] = 0;
     if (isset($_GET['logout'])) {
         CSession::ClearAll();
         CApi::Location(AP_INDEX_FILE . '?login');
     }
     if (isset($_GET['tab']) && strlen($_GET['tab']) > 0) {
         CSession::Set(AP_SESS_TAB, $_GET['tab']);
     } else {
         CSession::Set(AP_SESS_TAB, CSession::Get(AP_SESS_TAB, AP_TAB_DEFAULT));
     }
     $this->sTab = CSession::Get(AP_SESS_TAB, AP_TAB_DEFAULT);
     try {
         $this->CssAddFile('static/styles/style.css');
         $this->JsAddFile('static/js/common.js');
         $this->JsAddFile('static/js/jquery.js');
         if (!CApi::IsValid()) {
             return false;
         }
         $this->initModules();
         $this->initType();
         $this->initAuth();
         $this->sHelpUrl = '';
         $sUrl = $this->IsTenantAuthType() ? (string) CApi::GetConf('labs.custom-tenant-help-url', '') : (string) CApi::GetConf('labs.custom-admin-help-url', '');
         if (0 < strlen($sUrl)) {
             $this->sHelpUrl = $sUrl;
         } else {
             if ($this->AType) {
                 $this->sHelpUrl = 'http://www.afterlogic.com/wiki/Aurora_documentation';
             } else {
                 if ($this->PType) {
                     $this->sHelpUrl = 'http://www.afterlogic.com/wiki/WebMail_Pro_documentation';
                 } else {
                     $this->sHelpUrl = 'http://www.afterlogic.com/wiki/WebMail_Lite_documentation';
                 }
             }
         }
         if (isset($_GET['help'])) {
             if (0 < strlen($this->sHelpUrl)) {
                 CApi::Location($this->sHelpUrl);
             } else {
                 CApi::Location('?root');
             }
         }
         $bResetToDefault = true;
         foreach ($this->aTabs as $aTab) {
             if (isset($aTab[1]) && (string) $aTab[1] === (string) $this->sTab) {
                 $bResetToDefault = false;
                 break;
             }
         }
         if ($bResetToDefault) {
             $this->sTab = $this->IsTenantAuthType() ? AP_TAB_TENANT_DEFAULT : AP_TAB_DEFAULT;
             CSession::Set(AP_SESS_TAB, $this->sTab);
         }
         if (isset($_GET['submit']) && isset($_POST) && 0 < count($_POST)) {
             $this->bShowScreen = false;
             $sReturnRef = $this->initPostActionModules($this->sTab);
             CApi::Location(AP_INDEX_FILE . $sReturnRef);
         } else {
             if (isset($_GET['pop'])) {
                 $this->bShowScreen = false;
                 $this->initPopActionModules($this->sTab);
             } else {
                 if (isset($_GET['blank'])) {
                     $this->bShowScreen = false;
                     $this->initBlankActionModules($this->sTab);
                 } else {
                     if (isset($_GET['ajax'])) {
                         $this->bShowScreen = false;
                         $this->initAjaxActionModules($this->sTab);
                     } else {
                         $this->oCurrentScreen = $this->initScreen($this->sTab);
                         if ($this->oCurrentScreen) {
                             $this->oCurrentScreen->PreModuleInit();
                             $this->initCurrentScreenByModules('first', $this->sTab, $this->oCurrentScreen);
                             $this->oCurrentScreen->MiddleModuleInit();
                             $this->initCurrentScreenByModules('second', $this->sTab, $this->oCurrentScreen);
                             $this->oCurrentScreen->EndModuleInit();
                             $this->initCurrentScreenByModules('third', $this->sTab, $this->oCurrentScreen);
                         }
                         if (CSession::Has(AP_SESS_ERROR)) {
                             $this->JsAddInitText('OnlineMsgError("' . ap_Utils::ReBuildStringToJavaScript(nl2br(CSession::Get(AP_SESS_ERROR, '')), '"') . '");');
                             CSession::Clear(AP_SESS_ERROR);
                         } else {
                             if (CSession::Has(AP_SESS_MESSAGE)) {
                                 $this->JsAddInitText('OnlineMsgInfo("' . ap_Utils::ReBuildStringToJavaScript(nl2br(CSession::Get(AP_SESS_MESSAGE, '')), '"') . '");');
                                 CSession::Clear(AP_SESS_MESSAGE);
                             }
                         }
                     }
                 }
//.........这里部分代码省略.........
开发者ID:hallnewman,项目名称:webmail-lite,代码行数:101,代码来源:cadminpanel.php

示例4: PreModuleInit

 /**
  * @return void
  */
 public function PreModuleInit()
 {
     parent::PreModuleInit();
     $this->AddHeader('Null', 100);
     $sScreenName = $this->GetScreenName();
     if (isset($_GET['search']) && Cpost::Has('searchdesc')) {
         $sSearchDesc = Cpost::Get('searchdesc', '');
         if (empty($sSearchDesc)) {
             CSession::Clear($sScreenName . self::SESS_SEARCH);
         } else {
             CSession::Set($sScreenName . self::SESS_SEARCH, $sSearchDesc);
         }
         CSession::Set($sScreenName . self::SESS_PAGE, 1);
     } else {
         if (isset($_GET['reset_search'])) {
             CSession::Clear($sScreenName . self::SESS_SEARCH);
             CSession::Set($sScreenName . self::SESS_PAGE, 1);
         } else {
             if (isset($_GET['filter']) && (string) $_GET['filter'] !== (string) CSession::Get($sScreenName . self::SESS_FILTER)) {
                 CSession::Clear($sScreenName . self::SESS_SEARCH);
                 CSession::Set($sScreenName . self::SESS_PAGE, 1);
             }
         }
     }
     if (isset($_GET['page']) && is_numeric($_GET['page'])) {
         CSession::Set($sScreenName . self::SESS_PAGE, (int) $_GET['page']);
     }
     if (CSession::Has($sScreenName . self::SESS_PAGE)) {
         $this->iPage = (int) CSession::Get($sScreenName . self::SESS_PAGE, 1);
     }
     if (CSession::Has($sScreenName . self::SESS_SEARCH)) {
         $this->sSearchDesc = CSession::Get($sScreenName . self::SESS_SEARCH, '');
     }
     if (isset($_GET['page']) && is_numeric($_GET['page'])) {
         CSession::Set($sScreenName . self::SESS_PAGE, (int) $_GET['page']);
     }
     if (isset($_GET['scolumn']) && 0 < strlen($_GET['scolumn'])) {
         CSession::Set($sScreenName . self::SESS_ORDERBY, $_GET['scolumn']);
     }
     if (isset($_GET['sorder']) && is_numeric($_GET['sorder'])) {
         CSession::Set($sScreenName . self::SESS_ORDERTYPE, (int) $_GET['sorder']);
     }
     if (CSession::Has($sScreenName . self::SESS_ORDERBY)) {
         $this->sOrderField = CSession::Get($sScreenName . self::SESS_ORDERBY, '');
     }
     if (CSession::Has($sScreenName . self::SESS_ORDERTYPE)) {
         $this->bOrderType = CSession::Get($sScreenName . self::SESS_ORDERTYPE, 0);
     }
 }
开发者ID:hallnewman,项目名称:webmail-lite,代码行数:52,代码来源:table.php

示例5: AjaxHelpdeskLogout

 public function AjaxHelpdeskLogout()
 {
     \CSession::Clear('aft-cache-ctrl');
     if ($this->oApiCapability->IsHelpdeskSupported()) {
         $this->oApiIntegrator->LogoutHelpdeskUser();
     }
     return $this->TrueResponse(null, __FUNCTION__);
 }
开发者ID:BertLasker,项目名称:Catch-design,代码行数:8,代码来源:Actions.php

示例6: UpdateDomain

 /**
  * @param CDomain $oDomain
  * @return bool
  */
 public function UpdateDomain(CDomain $oDomain)
 {
     $aTabs = $this->GetTabList($oDomain);
     if (is_array($aTabs) && count($aTabs) > 0) {
         $aTabKeys = array_keys($aTabs);
         if (!in_array($oDomain->DefaultTab, $aTabKeys)) {
             $oDomain->DefaultTab = $aTabKeys[0];
         }
     }
     if (!$this->oDomainsApi->UpdateDomain($oDomain)) {
         $this->lastErrorCode = $this->oDomainsApi->GetLastErrorCode();
         $this->lastErrorMessage = $this->oDomainsApi->GetLastErrorMessage();
         return false;
     }
     if (CSession::Has(AP_SESS_DOMAIN_NEXT_EDIT_ID) && $oDomain->IdDomain === CSession::Get(AP_SESS_DOMAIN_NEXT_EDIT_ID, null)) {
         CSession::Clear(AP_SESS_DOMAIN_NEXT_EDIT_ID);
     }
     return true;
 }
开发者ID:BertLasker,项目名称:Catch-design,代码行数:23,代码来源:index.php


注:本文中的CSession::Clear方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。