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