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(); }
public function init() { $this->view->pageTitle = 'Roles'; $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'); } // $login=new App_Model_Users(); // $loginname=$login->username($userid); // foreach($loginname as $loginname) { // $this->view->primaryid=$loginname['user_id']; // $this->view->id=$loginname['id']; // $this->view->username=$loginname['username']; // $this->view->primaryrole=$loginname['grantname']; // } // $dynamic = new App_Model_Dynamic (); // $dynamic->dynamicaction(); // create common object for adm model page $this->view->adm = new App_Model_Adm(); }
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; }
public function init() { $this->view->pageTitle = 'Settings'; $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'); } }
function init() { $this->view->pageTitle = "Summary of MFI"; $this->view->type = "generalFields"; $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'); } $this->view->adm = new App_Model_Adm(); }
public function init() { //it is create session and implement ACL concept... $this->view->pageTitle = $this->view->translate('Health'); $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']; $storage = new Zend_Auth_Storage_Session(); $data = $storage->read(); if (!$data) { $this->_redirect('index/login'); } $this->view->adm = new App_Model_Adm(); $this->view->familycommon = new Familycommonview_Model_familycommonview(); }
function init() { $this->view->pageTitle = "Individual / Group Savings ledger"; $this->view->tilte = "Reports"; $this->view->type = "generalFields"; $this->view->dateconvert = new App_Model_dateConvertor(); $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'); } }
public function init() { $this->view->pageTitle = 'Month end'; $this->view->adm = new App_Model_Adm(); $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(); $this->view->dateconvector = new App_Model_dateConvertor(); $data = $storage->read(); if (!$data) { $this->_redirect('index/login'); } $this->view->monthmodle = new Monthend_Model_Transaction(); }
public function init() { $this->view->title = "Reports"; $this->view->pageTitle = "Loans ledger"; $this->view->type = "generalFields"; $this->view->loanModel = new Loanledger_Model_loandetails(); $this->view->cl = new App_Model_Users(); $this->view->adm = new App_Model_Adm(); $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'); } }
public function init() { //to change language $this->view->pageTitle = $this->view->translate("Funder"); $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'); } // if (($this->view->globalvalue[0]['id'] == 0)) { // $this->_redirect('index/logout'); // } $this->view->adm = new App_Model_Adm(); }
public function init() { $this->view->pageTitle = $this->view->translate('Contact 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'); // } //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 = new Address_Model_addressInformation(); $module_name = $addressmodel->getmodule($subId); foreach ($module_name as $module_view) { $address = $module_view['module_description']; } $this->view->pageTitle = $address . ' contact details'; $this->view->adm = new App_Model_Adm(); }
public function init() { $this->view->pageTitle = 'Ledger'; $this->view->mainModule = 'Management'; $this->view->adm = new App_Model_Adm(); $globalsession = new App_Model_Users(); $this->view->globalvalue = $globalsession->getSession(); $this->view->username = $this->view->globalvalue[0]['username']; $this->view->created_by = $this->view->globalvalue[0]['id']; $date = date("y/m/d H:i:s"); $ledger = new Ledger_Model_Ledger(); $ledger1 = $ledger->fetchAllLedger1(); $flag = 0; foreach ($ledger1 as $ledger2) { if ($ledger2->id == 1 or $ledger2->id == 2) { $flag = 1; } } if ($flag == 0) { $glInsert = $ledger->insertGlcode(array('id' => '', 'glcode' => 'A01000', 'ledgertype_id' => 3, 'header' => 'Bank', 'description' => 'Bank in assets', 'created_date' => $date, 'created_by' => 1)); $glInsert = $ledger->insertGlcode(array('id' => '', 'glcode' => 'A02000', 'ledgertype_id' => 3, 'header' => 'Cash', 'description' => 'Cash in assets', 'created_date' => $date, 'created_by' => 1)); } }
function loginAction() { $this->_helper->layout->disableLayout(); Zend_Date_Cities::getCityList(); $form = new App_Form_Login(); $this->view->form = $form; $this->view->message = ''; if ($this->_request->isPost()) { Zend_Loader::loadClass('Zend_Filter_StripTags'); $filter = new Zend_Filter_StripTags(); $username = $filter->filter($this->_request->getPost('username')); $password = $filter->filter($this->_request->getPost('password')); if (empty($username)) { $this->view->message = 'Please provide a username.'; } else { // setup Zend_Auth adapter for a database table Zend_Loader::loadClass('Zend_Auth_Adapter_DbTable'); $db = Zend_Db_Table::getDefaultAdapter(); $authAdapter = new Zend_Auth_Adapter_DbTable($db); $authAdapter->setTableName('ourbank_user'); $authAdapter->setIdentityColumn('username'); $authAdapter->setCredentialColumn('password'); $authAdapter->setIdentity($username); $authAdapter->setCredential($password); $auth = Zend_Auth::getInstance(); $result = $auth->authenticate($authAdapter); if ($result->isValid()) { $data = $authAdapter->getResultRowObject(null, 'password'); $auth->getStorage()->write($data); $userinfo = new App_Model_Users(); $getresult = $userinfo->userinfo($username); foreach ($getresult as $getdata) { $user_id = $getdata["id"]; $username = $getdata["name"]; } $sessionName = new Zend_Session_Namespace('ourbank'); $sessionName->__set('primaryuserid', $user_id); $sessionName->primaryuserid; $sessionName->__set('username', $username); $sessionName->username; $globalsession = new App_Model_Users(); $this->view->globalvalue = $globalsession->getSession(); $sessionName->__set('language', $this->view->globalvalue[1]); $this->_redirect('/index/index'); } else { $this->view->message = 'Login failed.'; } } } $this->view->title = "Log in"; $this->render(); }