本文整理汇总了PHP中Zend_Auth_Storage_Session类的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Auth_Storage_Session类的具体用法?PHP Zend_Auth_Storage_Session怎么用?PHP Zend_Auth_Storage_Session使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Zend_Auth_Storage_Session类的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);
}
示例2: __construct
public function __construct()
{
$this->auth = Zend_Auth::getInstance();
$storage_session = new Zend_Auth_Storage_Session($this->name);
$storage_session->setExpirationSeconds(300000);
$this->auth->setStorage($storage_session);
}
示例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;
}
}
示例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;
}
示例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'];
}
示例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();
}
示例7: indexAction
public function indexAction()
{
$storage = new Zend_Auth_Storage_Session();
$data = $storage->read();
if (!$data) {
$this->_redirect('index/login');
}
$this->view->title = "Group meeting";
$searchForm = new Meeting_Form_Search();
$this->view->form = $searchForm;
$days = $this->view->adm->viewRecord("ourbank_master_weekdays", "id", "ASC");
foreach ($days as $days) {
$searchForm->search_weekdays->addMultiOption($days['id'], $days['name']);
}
$meeting = new Meeting_Model_Meeting();
$result = $meeting->fetchAllmeetingdetails();
$page = $this->_getParam('page', 1);
$paginator = Zend_Paginator::factory($result);
$paginator->setItemCountPerPage(5);
$paginator->setCurrentPageNumber($page);
$this->view->paginator = $paginator;
if ($this->_request->isPost() && $this->_request->getPost('Search')) {
$formData = $this->_request->getPost();
if ($searchForm->isValid($formData)) {
$meeting = new Meeting_Model_Meeting();
$result = $meeting->SearchMeeting($formData);
$page = $this->_getParam('page', 1);
$paginator = Zend_Paginator::factory($result);
$paginator->setItemCountPerPage(5);
$paginator->setCurrentPageNumber($page);
$this->view->paginator = $paginator;
}
}
}
示例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/');
}
}
示例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;
/******************************************************************/
}
示例10: init
public function init()
{
$this->view->pageTitle = 'Loan request';
$this->view->title = 'Accounting';
$this->view->accounts = new Loanprocess_Model_Loanprocess();
$this->view->cl = new App_Model_Users();
$this->view->adm = new App_Model_Adm();
$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
}
$finduser = $this->view->accounts->finduser($this->view->createdby);
if ($finduser) {
$levelid = $finduser[0]['officetype_id'];
$designation = $finduser[0]['designation'];
$hierarchy = $this->view->accounts->findhierarchy($levelid);
$this->view->levelname = $levelname = $hierarchy[0]['type'];
$this->view->levelid = $levelname = $hierarchy[0]['id'];
}
}
示例11: 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);
}
示例12: init
public function init()
{
$this->view->pageTitle = $this->view->translate('Membership');
$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->id = $subId = $this->_getParam('id');
$this->view->subId = $subId = $this->_getParam('subId');
$this->view->modId = $modId = $this->_getParam('modId');
$addressmodel = new Familycommonview_Model_familycommonview();
$module_name = $addressmodel->getmodule($subId);
foreach ($module_name as $module_view) {
$address = $module_view['module_description'];
}
$this->view->pageTitle = 'Individual crop details';
$this->view->adm = new App_Model_Adm();
}
示例13: 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
}
}
示例14: 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();
}
示例15: init
public function init()
{
$this->_flashMessenger = $this->_helper->getHelper('FlashMessenger');
$storage = new Zend_Auth_Storage_Session('publisher_type');
$data = $storage->read();
if ($data && $data != null) {
$this->modelPublisher = new Publisher_Model_DbTable_Publishers();
$this->modelIssue = new Publisher_Model_DbTable_Issues();
$this->modelBooks = new Publisher_Model_DbTable_Books();
$this->sessPublisherInfo = $this->modelPublisher->getInfoByPublisherId($data->id);
$this->view->sessPublisherInfo = $this->sessPublisherInfo;
$this->parentPublisherId = !empty($this->sessPublisherInfo->parent_id) ? $this->sessPublisherInfo->parent_id : $this->sessPublisherInfo->id;
$this->view->parentPublisherId = $this->parentPublisherId;
$tab_ajax = $this->_request->getParam('tab_ajax', 0);
if (empty($tab_ajax)) {
$this->_redirect('publisher/');
}
if ($data->user_type != 'publisher' && $data->user_type != 'Pmanager' && $data->user_type != 'Amanager') {
$this->_redirect('publisher/access/');
}
$this->modelSiteSetting = new Admin_Model_DbTable_SiteSettings();
} else {
$this->_redirect('publisher/auth/');
}
}