本文整理汇总了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();
}
示例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('');
}
}
}
示例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();
}
示例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();
}
示例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();
}
示例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));
}
}
}
示例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'));
}
}
示例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));
}
}