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


PHP sapp_Global::_readSession方法代碼示例

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


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

示例1: _logout

 public static function _logout()
 {
     $sessionData = sapp_Global::_readSession();
     Zend_Session::namespaceUnset('recentlyViewed');
     Zend_Session::namespaceUnset('organizationinfo');
     $auth = Zend_Auth::getInstance();
     $auth->clearIdentity();
     $redirector = Zend_Controller_Action_HelperBroker::getStaticHelper('redirector');
     $redirector->gotoUrl('/default')->redirectAndExit();
 }
開發者ID:rajbrt,項目名稱:sentrifugo,代碼行數:10,代碼來源:Global.php

示例2: preDispatch

 public function preDispatch()
 {
     $session = sapp_Global::_readSession();
     if (!isset($session)) {
         if ($this->getRequest()->isXmlHttpRequest()) {
             echo Zend_Json::encode(array('login' => 'failed'));
             die;
         } else {
             $this->_redirect('');
         }
     }
 }
開發者ID:sura2k,項目名稱:sentrifugo,代碼行數:12,代碼來源:RejectedrequisitionsController.php

示例3: preDispatch

 public function preDispatch()
 {
     $session = sapp_Global::_readSession();
     if (!isset($session)) {
         if ($this->getRequest()->isXmlHttpRequest()) {
             echo Zend_Json::encode(array('login' => 'failed'));
             die;
         } else {
             $this->_redirect('');
         }
     }
     $ajaxContext = $this->_helper->getHelper('AjaxContext');
     $ajaxContext->addActionContext('getdatafromajaxcall', 'json')->initContext();
 }
開發者ID:uskumar33,項目名稱:DeltaONE,代碼行數:14,代碼來源:CreatetasksController.php

示例4: preDispatch

 public function preDispatch()
 {
     $auth = Zend_Auth::getInstance();
     $session = sapp_Global::_readSession();
     if (!isset($session)) {
         if ($this->getRequest()->isXmlHttpRequest()) {
             echo Zend_Json::encode(array('login' => 'failed'));
             die;
         } else {
             $this->_redirect('');
         }
     }
     $ajaxContext = $this->_helper->getHelper('AjaxContext');
     $ajaxContext->addActionContext('activitylogreport', 'html')->initContext();
 }
開發者ID:uskumar33,項目名稱:DeltaONE,代碼行數:15,代碼來源:LogmanagerController.php

示例5: preDispatch

 public function preDispatch()
 {
     $session = sapp_Global::_readSession();
     if (!isset($session)) {
         if ($this->getRequest()->isXmlHttpRequest()) {
             echo Zend_Json::encode(array('login' => 'failed'));
             die;
         } else {
             $this->_redirect('');
         }
     }
     $ajaxContext = $this->_helper->getHelper('AjaxContext');
     $ajaxContext->addActionContext('getdepartments', 'json')->initContext();
     $ajaxContext->addActionContext('getpositions', 'json')->initContext();
     $ajaxContext->addActionContext('getapprreqdata', 'json')->initContext();
     $ajaxContext->addActionContext('chkreqforclose', 'json')->initContext();
     $ajaxContext->addActionContext('getemailcount', 'json')->initContext();
     $ajaxContext->addActionContext('getapprovers', 'json')->initContext();
 }
開發者ID:lukkyrich,項目名稱:sentrifugo,代碼行數:19,代碼來源:RequisitionController.php

示例6: uploadsaveAction

 public function uploadsaveAction()
 {
     $user_id = sapp_Global::_readSession('id');
     $filedata = array();
     // Validate file with size greater than default(Upload Max Filesize)limit
     $default_max_upload_filesize = 2 * pow(10, 6);
     if ($_FILES["myfile"]["size"] == 0 || $_FILES["myfile"]["size"] > $default_max_upload_filesize) {
         $this->_helper->json(array('error' => 'filesize'));
     } else {
         if (isset($_FILES["myfile"])) {
             $fileName = $_FILES["myfile"]["name"];
             $fileName = preg_replace('/[^a-zA-Z0-9.\']/', '_', $fileName);
             $newName = time() . '_' . $user_id . '_' . str_replace(' ', '_', $fileName);
             $filedata['original_name'] = $fileName;
             $filedata['new_name'] = $newName;
             if (isset($_POST["doc_id"]) && $_POST["doc_id"] != '') {
                 move_uploaded_file($_FILES["myfile"]["tmp_name"], EMP_DOC_UPLOAD_PATH . $newName);
             } else {
                 move_uploaded_file($_FILES["myfile"]["tmp_name"], EMP_DOC_TEMP_UPLOAD_PATH . $newName);
             }
             $this->_helper->json(array('filedata' => $filedata));
         }
     }
 }
開發者ID:lukkyrich,項目名稱:sentrifugo,代碼行數:24,代碼來源:EmployeedocsController.php

示例7: updatethemeAction

 public function updatethemeAction()
 {
     $this->_helper->layout->disableLayout();
     if ($this->getRequest()->isPost()) {
         $theme_name = $this->getRequest()->getParam('theme_name');
         $usersModel = new Default_Model_Users();
         $user_id = sapp_Global::_readSession('id');
         $where = array('id = ?' => $user_id);
         $data = array('themes' => $theme_name, 'createddate' => gmdate("Y-m-d H:i:s"), 'modifieddate' => gmdate("Y-m-d H:i:s"));
         $usersModel->addOrUpdateUserModel($data, $where);
         sapp_Global::_writeSession('themes', $theme_name);
         $this->_helper->json(array('result' => 'success'));
     }
 }
開發者ID:sura2k,項目名稱:sentrifugo,代碼行數:14,代碼來源:IndexController.php

示例8: uploadsaveAction

 /**
  * 
  */
 public function uploadsaveAction()
 {
     $user_id = sapp_Global::_readSession('id');
     $filedata = array();
     if (isset($_FILES["myfile"])) {
         $fileName = $_FILES["myfile"]["name"];
         $newName = time() . '_' . $user_id . '_' . str_replace(' ', '_', $_FILES["myfile"]["name"]);
         move_uploaded_file($_FILES["myfile"]["tmp_name"], SD_TEMP_UPLOAD_PATH . $newName);
         $filedata['original_name'] = $fileName;
         $filedata['new_name'] = $newName;
         $this->_helper->json(array('filedata' => $filedata));
     }
 }
開發者ID:uskumar33,項目名稱:DeltaONE,代碼行數:16,代碼來源:ServicerequestsController.php


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