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


PHP Zend_Auth_Storage_Session::read方法代码示例

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


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

示例1: indexAction

 public function indexAction()
 {
     $this->view->form = $searchform = new Individual_Form_Search();
     $villagelist = $this->view->adm->viewRecord('ourbank_master_villagelist', 'id', 'asc');
     // get village list
     // Zend_Debug::dump($villagelist);
     foreach ($villagelist as $villages) {
         $searchform->village->addMultiOption($villages['id'], $villages['name']);
     }
     if ($this->_request->isPost() && $this->_request->getPost('Search')) {
         $result = $this->view->db->searchDetails($this->_request->getPost());
         // get search criteria values
         $page = $this->_getParam('page', 1);
         $paginator = Zend_Paginator::factory($result);
         // assign searched values for pagination
         $paginator->setItemCountPerPage($this->view->adm->paginator());
         $paginator->setCurrentPageNumber($page);
         $this->view->paginator = $paginator;
         $this->view->search = true;
     } else {
         $this->view->title = "Individual member";
         $storage = new Zend_Auth_Storage_Session();
         $data = $storage->read();
         if (!$data) {
             $this->_redirect('index/login');
         }
         $page = $this->_getParam('page', 1);
         $paginator = Zend_Paginator::factory($this->view->db->getMemberdetails());
         // assign default values for pagination
         $this->view->paginator = $paginator;
     }
     $paginator->setItemCountPerPage($this->view->adm->paginator());
     $paginator->setCurrentPageNumber($page);
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:34,代码来源:IndexController.php

示例2: read

 public function read()
 {
     if (empty(self::$_data)) {
         self::$_data = Doctrine_Core::getTable('User_Model_User')->find(parent::read());
     }
     return self::$_data;
 }
开发者ID:KasaiDot,项目名称:FansubCMS,代码行数:7,代码来源:DoctrineSession.php

示例3: init

 public function init()
 {
     $this->_flashMessenger = $this->_helper->getHelper('FlashMessenger');
     /*********** To check for publisher session data *********************/
     $storage_publisher = new Zend_Auth_Storage_Session('publisher_type');
     $publisher_data = $storage_publisher->read();
     $storage_company = new Zend_Auth_Storage_Session('company_type');
     $company_data = $storage_company->read();
     if ($publisher_data && $publisher_data != null) {
         $this->modelPublisher = new Model_DbTable_Users();
         $this->sessPublisherInfo = $this->modelPublisher->getInfoByUserId($publisher_data->id);
         $this->view->sessPublisherInfo = $this->sessPublisherInfo;
     } elseif ($company_data && $company_data != null) {
         $this->modelCompany = new Model_DbTable_Companies();
         $this->sessCompanyInfo = $this->modelCompany->getInfoByUserId($company_data->id);
         $this->view->sessCompanyInfo = $this->sessCompanyInfo;
     }
     $this->modelPage = new Model_DbTable_Page();
     $this->modelEnquiry = new Admin_Model_DbTable_Enquirys();
     /************* To Set The active section and links *******************/
     $controller = $this->_getParam('controller');
     $action = $this->_getParam('action');
     $title = $this->_getParam('title');
     $this->view->currentController = $controller;
     $this->view->currentAction = $action;
     $this->view->currentTitle = $title;
     $this->view->class_active = 'class="active"';
     /************* To Set The active section and links *******************/
     if ($title == 'contact-us') {
         $captcha = new Zend_Captcha_Image();
         $captcha->setImgDir('public/css/captcha/images/');
         $captcha->setImgUrl($this->view->serverUrl . $this->view->baseUrl() . '/public/css/captcha/images/');
         $captcha->setFont('public/css/captcha/fonts/times_new_yorker.ttf');
         $captcha->setWordlen(5);
         $captcha->setFontSize(28);
         $captcha->setLineNoiseLevel(3);
         $captcha->setWidth(161);
         $captcha->setHeight(75);
         $captcha->generate();
         /*$captcha= new Zend_Form_Element_Captcha('captcha', array(
                             'label' => "Please verify you're a human",
         
                             'captcha' => array(
                                 'captcha' => 'image',
         
                                 'font'=>'public/css/captcha/fonts/times_new_yorker.ttf',
                                 'imgDir'=>'public/css/captcha/images/',
                                 'imgUrl'=>$this->view->serverUrl.$this->view->baseUrl().'/public/css/captcha/images/',
                                 'wordLen' => 4,
                                 'fsize'=>20,
                                 'height'=>60,
                                 'width'=>250,
                                 'gcFreq'=>50,
                                 'expiration' => 300
                             )
                         ));
         				*/
         $this->view->captcha = $captcha;
     }
 }
开发者ID:vmangla,项目名称:evendor,代码行数:60,代码来源:PageController_16052013.php

示例4: indexAction

 function indexAction()
 {
     $personalsavings = new Personalsavings_Model_personalsavings();
     $savingsSelect = $personalsavings->accountDetails();
     $this->view->savingslist = $savingsSelect;
     $globalsession = new App_Model_Users();
     $this->view->globalvalue = $globalsession->getSession();
     // get session values
     $this->view->createdby = $this->view->globalvalue[0]['id'];
     $this->view->username = $this->view->globalvalue[0]['username'];
     $storage = new Zend_Auth_Storage_Session();
     $data = $storage->read();
     if (!$data) {
         $this->_redirect('index/login');
     }
     // 	$paginator = Zend_Paginator::factory($savingsSelect);
     //         $paginator->setCurrentPageNumber($this->_getParam("page"));
     //         $paginator->setItemCountPerPage(35);
     //         $paginator->setPageRange(36);
     //         $this->view->page=$this->_request->getParam('page');
     //         $this->view->paginator = $paginator;
     //         $this->view->depositeAmount = 0;
     //         $this->view->withdrawlAmount = 0;
     //         $this->view->totalAmount = 0;
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:25,代码来源:IndexController.php

示例5: init

 public function init()
 {
     $this->view->pageTitle = $this->view->translate("Funder");
     $storage = new Zend_Auth_Storage_Session();
     $data = $storage->read();
     if (!$data) {
         $this->_redirect('index/login');
         // once session get expired it will redirect to Login page
     }
     $sessionName = new Zend_Session_Namespace('ourbank');
     $userid = $this->view->createdby = $sessionName->primaryuserid;
     // get the stored session id
     $login = new App_Model_Users();
     $loginname = $login->username($userid);
     foreach ($loginname as $loginname) {
         $this->view->username = $loginname['username'];
         // get the user name
     }
     $this->view->adm = new App_Model_Adm();
     $this->view->funder = new Fundercommonview_Model_fundercommon();
     $module = $this->view->funder->getmodule('Funder');
     foreach ($module as $module_id) {
     }
     $this->view->mod_id = $module_id['parent'];
     $this->view->sub_id = $module_id['module_id'];
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:26,代码来源:IndexController.php

示例6: init

 public function init()
 {
     $this->view->pageTitle = $this->view->translate("New Office");
     $storage = new Zend_Auth_Storage_Session();
     $data = $storage->read();
     if (!$data) {
         $this->_redirect('index/login');
     }
     $sessionName = new Zend_Session_Namespace('ourbank');
     // get the module name and it used to change the side bar dynamically
     $this->view->createdby = $sessionName->primaryuserid;
     $this->view->subId = $subId = $this->_getParam('subId');
     $this->view->modId = $modId = $this->_getParam('modId');
     $addressmodel = new Address_Model_addressInformation();
     $module_name = $addressmodel->getmodule($subId);
     foreach ($module_name as $module_view) {
         $address = $module_view['module_description'];
     }
     $this->view->pageTitle = $address . ' address details';
     //         $globalsession = new App_Model_Users();
     //         $this->view->globalvalue = $globalsession->getSession();
     //         $this->view->createdby = $this->view->globalvalue[0]['id'];
     //         $this->view->username = $this->view->globalvalue[0]['username'];
     //         if (($this->view->globalvalue[0]['id'] == 0)) {
     //                 $this->_redirect('index/logout');
     //         }
     $this->view->adm = new App_Model_Adm();
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:28,代码来源:IndexController.php

示例7: init

 public function init()
 {
     $storage = new Zend_Auth_Storage_Session('user_type');
     $data = $storage->read();
     if ($data && $data != null) {
         $this->sessUser = $data;
         $this->view->id = $this->sessUser->id;
         $this->view->sessUser = $this->sessUser;
         if ($this->sessUser->usertype == 1) {
             $this->view->contact_person = $this->sessUser->first_name;
         }
         if ($this->sessUser->usertype == 2) {
             $this->view->contact_person = $this->sessUser->contact_person;
         }
     }
     $storeSession = new Zend_Session_Namespace('storeInfo');
     if (!empty($storeSession->sid) && !empty($storeSession->sid) && !empty($storeSession->sname) && !empty($storeSession->sid) && !empty($storeSession->cid) && !empty($storeSession->cname)) {
         $this->view->storeId = $storeSession->sid;
         $this->view->storeName = $storeSession->sname;
     }
     $this->modelBooks = new Publisher_Model_DbTable_Books();
     $this->view->modelBooks = $this->modelBooks;
     $allStored = $this->modelBooks->getAllStores();
     $this->view->allStored = $allStored;
 }
开发者ID:vmangla,项目名称:evendor,代码行数:25,代码来源:ErrorController.php

示例8: init

 public function init()
 {
     /* creating flashMessanger object to display message */
     $this->_flashMessenger = $this->_helper->getHelper('FlashMessenger');
     /* check for admin login */
     $storage = new Zend_Auth_Storage_Session('admin_type');
     $data = $storage->read();
     if ($data) {
         $this->modelAdmiUsers = new Admin_Model_DbTable_AdminUsers();
         $this->sessAdminInfo = $this->modelAdmiUsers->fetchRow("id=" . $data->id);
     }
     if (!$this->sessAdminInfo) {
         $this->_redirect('admin/auth/');
     }
     $this->sessAdminInfo->modules = explode(",", $this->sessAdminInfo->modules);
     $this->view->sessAdminInfo = $this->sessAdminInfo;
     /* creating model object */
     $this->modelUsers = new Admin_Model_DbTable_Users();
     $this->modelModuleMenus = new Admin_Model_DbTable_ModulesMenus();
     $this->view->modelModuleMenus = $this->modelModuleMenus->getModuleMenusList();
     /************* To Set The active section and links *******************/
     $controller = $this->_getParam('controller');
     $action = $this->_getParam('action');
     $this->view->currentController = $controller;
     $this->view->currentAction = $action;
     /************* To Set The active section and links *******************/
     $moduleAccessRow = $this->modelModuleMenus->fetchRow("controller='{$controller}' AND action LIKE '%" . $action . "%'");
     $currentModuleId = $moduleAccessRow['id'];
     if (!in_array($currentModuleId, $this->sessAdminInfo->modules)) {
         $this->_flashMessenger->addMessage('<div class="div-error">"' . $moduleAccessRow['menu_name'] . '"   module not accessable to you</div>');
         $this->_redirect('admin/');
     }
 }
开发者ID:vmangla,项目名称:evendor,代码行数:33,代码来源:UsersController.php

示例9: init

 public function init()
 {
     $this->_flashMessenger = $this->_helper->getHelper('FlashMessenger');
     /**********************************************************/
     $storage = new Zend_Auth_Storage_Session('publisher_type');
     $data = $storage->read();
     //$this->modelPublishers = new Publisher_Model_DbTable_Publishers();
     $storage1 = new Zend_Auth_Storage_Session('company_type');
     $data1 = $storage1->read();
     //$this->modelCompanies = new Company_Model_DbTable_Companies();
     if (!empty($data) || !empty($data1)) {
         $this->_redirect('/');
     }
     /******************************************************************/
     //$storeId=$this->getRequest()->getCookie('sid');
     //$storeName=$this->getRequest()->getCookie('sname');
     $storeSession = new Zend_Session_Namespace('storeInfo');
     if (!empty($storeSession->sid) && !empty($storeSession->sid) && !empty($storeSession->sname) && !empty($storeSession->sid) && !empty($storeSession->cid) && !empty($storeSession->cname)) {
         $this->view->storeId = $storeSession->sid;
         $this->view->storeName = $storeSession->sname;
     } else {
         //$modelCountry = new Admin_Model_DbTable_Countries();
         //$country_info = $modelCountry->fetchRow('country="Nigeria"');
         //$this->_redirect('/auth/storechange/storeid/'.$country_info->id);
         $this->_redirect('/auth/storechange/');
     }
     $modelBooks = new Publisher_Model_DbTable_Books();
     $allStored = $modelBooks->getAllStores();
     $this->view->allStored = $allStored;
     /******************************************************************/
 }
开发者ID:vmangla,项目名称:evendor,代码行数:31,代码来源:LoginController.php

示例10: init

 public function init()
 {
     $this->view->pageTitle = 'Fee';
     $storage = new Zend_Auth_Storage_Session();
     $data = $storage->read();
     if (!$data) {
         $this->_redirect('index/login');
         // once session get expired it will redirect to Login page
     }
     $sessionName = new Zend_Session_Namespace('ourbank');
     $userid = $this->view->createdby = $sessionName->primaryuserid;
     // get the stored session id
     $login = new App_Model_Users();
     $loginname = $login->username($userid);
     foreach ($loginname as $loginname) {
         $this->view->username = $loginname['username'];
         // get the user name
     }
     //         if (($this->view->globalvalue[0]['id'] == 0)) {
     //              $this->_redirect('index/logout');
     //         }
     $this->view->adm = new App_Model_Adm();
     $ledger = new Ledger_Model_Ledger();
     $ledger1 = $ledger->fetchAllLedger1();
     $flag = 0;
     $date = date("y/m/d H:i:s");
     foreach ($ledger1 as $ledger2) {
         if ($ledger2->header == 'Fee') {
             $flag = 1;
         }
     }
     if ($flag == 0) {
         $glInsert = $ledger->insertGlcode(array('id' => '', 'glcode' => 'I01000', 'ledgertype_id' => 1, 'header' => 'Fee', 'description' => 'Fee in income', 'created_date' => $date, 'created_by' => 1));
     }
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:35,代码来源:IndexController.php

示例11: init

 public function init()
 {
     $this->view->pageTitle = "Group";
     $test = new DH_ClassInfo(APPLICATION_PATH . '/modules/groupm/controllers/');
     // create instance to get controller name
     $storage = new Zend_Auth_Storage_Session();
     $data = $storage->read();
     if (!$data) {
         $this->_redirect('index/login');
         // once session get expired it will redirect to Login page
     }
     $sessionName = new Zend_Session_Namespace('ourbank');
     $userid = $this->view->createdby = $sessionName->primaryuserid;
     // get the stored session id
     $login = new App_Model_Users();
     $loginname = $login->username($userid);
     foreach ($loginname as $loginname) {
         $this->view->username = $loginname['username'];
         // get the user name
     }
     $this->view->adm = new App_Model_Adm();
     // create instance for common adm model page
     $module = $test->getControllerClassNames();
     $modulename = explode("_", $module[0]);
     $this->view->modulename = strtolower($modulename[0]);
     $this->view->dbobj = new Groupmdefault_Model_Groupdefault();
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:27,代码来源:IndexController.php

示例12: init

 public function init()
 {
     $this->view->pageTitle = $this->view->translate('Family information');
     $globalsession = new App_Model_Users();
     $this->view->globalvalue = $globalsession->getSession();
     // get session values
     $this->view->createdby = $this->view->globalvalue[0]['id'];
     $this->view->username = $this->view->globalvalue[0]['username'];
     $storage = new Zend_Auth_Storage_Session();
     $data = $storage->read();
     if (!$data) {
         $this->_redirect('index/login');
     }
     //getting module name and change the side bar dynamically
     $this->view->id = $subId = $this->_getParam('id');
     //         $this->view->subId=$subId=$this->_getParam('subId');
     //         $this->view->modId=$modId=$this->_getParam('modId');
     $addressmodel = $this->view->familycommon = new Familycommonview_Model_familycommonview();
     //         $module_name=$addressmodel->getmodule($subId);
     //         foreach($module_name as $module_view)
     //         {
     //             $address=$module_view['module_description'];
     //         }
     $this->view->pageTitle = 'Family Member Details';
     $this->view->adm = new App_Model_Adm();
     $this->view->dateconvertor = new App_Model_dateConvertor();
     $this->view->baseurl = $this->view->baseUrl();
     $this->view->modelfamily = new Familymembers_Model_Familymembers();
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:29,代码来源:IndexController.php

示例13: indexAction

 public function indexAction()
 {
     $searchForm = new Groupm_Form_Search();
     $group = new Groupm_Model_Group();
     $this->view->form = $searchForm;
     if ($this->_request->isPost() && $this->_request->getPost('Search')) {
         $result = $group->searchDetails($this->_request->getPost());
         // get search criteria values
         $page = $this->_getParam('page', 1);
         $paginator = Zend_Paginator::factory($result);
         // assign searched values for pagination
         $paginator->setItemCountPerPage($this->view->adm->paginator());
         $paginator->setCurrentPageNumber($page);
         $this->view->paginator = $paginator;
         $this->view->search = true;
     } else {
         $this->view->title = "Group member";
         $storage = new Zend_Auth_Storage_Session();
         $data = $storage->read();
         if (!$data) {
             $this->_redirect('index/login');
         }
         $page = $this->_getParam('page', 1);
         $paginator = Zend_Paginator::factory($group->getGroupDetails());
         // assign default values for pagination
         $this->view->paginator = $paginator;
     }
     $paginator->setItemCountPerPage($this->view->adm->paginator());
     $paginator->setCurrentPageNumber($page);
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:30,代码来源:IndexController.php

示例14: init

 public function init()
 {
     $this->view->title = "Savings";
     $this->view->pageTitle = "Savings withdrawal";
     $this->view->type = 'savings';
     $this->view->savingsModel = new Savingswithdrawal_Model_Withdrawal();
     $this->view->cl = new App_Model_Users();
     $this->view->adm = new App_Model_Adm();
     $this->view->dc = new App_Model_dateConvertor();
     $this->view->ms = new Msdetails_Model_msdetails();
     $storage = new Zend_Auth_Storage_Session();
     $data = $storage->read();
     if (!$data) {
         $this->_redirect('index/login');
         // once session get expired it will redirect to Login page
     }
     $sessionName = new Zend_Session_Namespace('ourbank');
     $userid = $this->view->createdby = $sessionName->primaryuserid;
     // get the stored session id
     $loginname = $this->view->cl->username($userid);
     foreach ($loginname as $loginname) {
         $this->view->username = $loginname['username'];
         // get the user name
     }
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:25,代码来源:IndexController.php

示例15: indexAction

 public function indexAction()
 {
     $storage = new Zend_Auth_Storage_Session('admin_type');
     $data = $storage->read();
     if ($data && $data != null) {
         $this->_redirect('admin/');
     }
     $this->view->messages = $this->_flashMessenger->getMessages();
     //$this->_helper->layout()->disableLayout();
     $this->_helper->layout()->setLayout('adminlogin');
     $users = new Admin_Model_DbTable_AdminUsers();
     if ($this->getRequest()->isPost()) {
         $formdata = $this->getRequest()->getPost();
         $enc_pwd = md5($formdata['user_password']);
         //print_r($formdata);exit;
         $auth = Zend_Auth::getInstance();
         $authAdapter = new Zend_Auth_Adapter_DbTable($users->getAdapter(), TBL_ADMIN);
         $authAdapter->setIdentityColumn('user_name')->setCredentialColumn('user_password');
         $authAdapter->setIdentity($formdata['user_name'])->setCredential($enc_pwd);
         $result = $auth->authenticate($authAdapter);
         if ($result->isValid()) {
             $storage = new Zend_Auth_Storage_Session('admin_type');
             $storage->write($authAdapter->getResultRowObject());
             $this->_redirect('admin/');
         } else {
             $this->view->errorMessage = '<div class="div-error">Invalid username or password</div>';
         }
     }
 }
开发者ID:vmangla,项目名称:evendor,代码行数:29,代码来源:AuthController.php


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