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


PHP Zend_Session_Namespace::unlock方法代码示例

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


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

示例1: indexAction

 public function indexAction()
 {
     // action body
     //create sesesion
     $session_search_user = new Zend_Session_Namespace('search_user');
     if (empty($session_search_user->limit)) {
         $session_search_user->limit = Application_Form_FrmNavigation::getLimit();
         $session_search_user->active = -1;
         $session_search_user->user_type = -1;
         $session_search_user->txtsearch = '';
         $session_search_user->lock();
     }
     //start page nevigation
     $limit = $session_search_user->limit;
     $start = $this->getRequest()->getParam('limit_satrt', 0);
     $db_user = new Application_Model_DbTable_DbUsers();
     $this->view->activelist = $this->activelist;
     $this->view->active = $session_search_user->active;
     $this->view->user_typelist = $this->user_typelist;
     $this->view->user_type = $session_search_user->user_type;
     if ($this->getRequest()->isPost()) {
         $user_seach_data = $this->getRequest()->getPost();
         //set session when submit
         $session_search_user->unlock();
         $session_search_user->limit = $user_seach_data['rows_per_page'];
         $session_search_user->active = $user_seach_data['active'];
         $session_search_user->user_type = $user_seach_data['user_type'];
         $session_search_user->txtsearch = $user_seach_data['txtsearch'];
         $session_search_user->lock();
         //set value for display
         $this->view->txtsearch = $user_seach_data['txtsearch'];
         $this->view->active = $user_seach_data['active'];
         $this->view->user_type = $user_seach_data['user_type'];
         $limit = $user_seach_data['rows_per_page'];
         $users = $db_user->getUserListBy($user_seach_data, $start, $limit);
         $record_count = $db_user->getUserListTotal($user_seach_data);
     } else {
         if ($session_search_user->active > -1 || $session_search_user->user_type > -1 || !empty($session_search_user->txtsearch)) {
             $user_seach_data = array('active' => $session_search_user->active, 'user_type' => $session_search_user->user_type, 'txtsearch' => $session_search_user->txtsearch);
             $users = $db_user->getUserListBy($user_seach_data, $start, $limit);
             $record_count = $db_user->getUserListTotal($user_seach_data);
         } else {
             $users = $db_user->getUserList($start, $limit);
             $record_count = $db_user->getUserListTotal();
         }
     }
     $result = array();
     $row_num = $start;
     foreach ($users as $i => $user) {
         $result[$i] = array('num' => ++$row_num, 'name' => $user['name'], 'id' => $user['id'], 'user_name' => $user['user_name'], 'active' => $this->activelist[$user['active']], 'user_type' => $this->user_typelist[$user['user_type']]);
     }
     $this->view->userlist = Zend_Json::encode($result);
     $page = new Application_Form_FrmNavigation(self::REDIRECT_URL, $start, $limit, $record_count);
     $page->init(self::REDIRECT_URL, $start, $limit, $record_count);
     $this->view->nevigation = $page->navigationPage();
     $this->view->rows_per_page = $page->getRowsPerPage($limit, 'frmlist_users');
     $this->view->result_row = $page->getResultRows();
 }
开发者ID:samlanh,项目名称:currencyms,代码行数:58,代码来源:IndexController.php

示例2: indexAction

 public function indexAction()
 {
     // action body
     //create sesesion
     $session_search_agent = new Zend_Session_Namespace('search_agent');
     if (empty($session_search_agent->limit)) {
         $session_search_agent->limit = Application_Form_FrmNavigation::getLimit();
         $session_search_agent->active = -1;
         $session_search_agent->province = -1;
         $session_search_agent->txtsearch = '';
         $session_search_agent->lock();
     }
     //start page nevigation
     $limit = $session_search_agent->limit;
     $start = $this->getRequest()->getParam('limit_satrt', 0);
     $pro = new Application_Model_DbTable_DbProvinces();
     $this->view->provincelist = $pro->getProvinceList();
     $this->view->province = $session_search_agent->province;
     $db_agent = new Application_Model_DbTable_DbAgents();
     $this->view->activelist = $this->activelist;
     $this->view->active = $session_search_agent->active;
     if ($this->getRequest()->isPost()) {
         $agent_seach_data = $this->getRequest()->getPost();
         //set session when submit
         $session_search_agent->unlock();
         $session_search_agent->limit = $agent_seach_data['rows_per_page'];
         $session_search_agent->active = $agent_seach_data['active'];
         $session_search_agent->province = $agent_seach_data['province'];
         $session_search_agent->txtsearch = $agent_seach_data['txtsearch'];
         $session_search_agent->lock();
         $this->view->province = $agent_seach_data['province'];
         $this->view->txtsearch = $agent_seach_data['txtsearch'];
         $this->view->active = $agent_seach_data['active'];
         $limit = $session_search_agent->limit;
         $agents = $db_agent->getAgentListBy($agent_seach_data, $start, $limit);
         $record_count = $db_agent->getAgentListTotal($agent_seach_data);
     } else {
         if (!empty($session_search_agent->txtsearch) || $session_search_agent->active > -1 || $session_search_agent->province > -1) {
             $agent_seach_data = array('active' => $session_search_agent->active, 'province' => $session_search_agent->province, 'txtsearch' => $session_search_agent->txtsearch);
             $agents = $db_agent->getAgentListBy($agent_seach_data, $start, $limit);
             $record_count = $db_agent->getAgentListTotal($agent_seach_data);
         } else {
             $agents = $db_agent->getAgentList($start, $limit);
             $record_count = $db_agent->getAgentListTotal();
         }
     }
     $result = array();
     $row_num = $start;
     foreach ($agents as $i => $agent) {
         $result[$i] = array('num' => ++$row_num, 'id' => $agent['id'], 'tel' => $agent['tel'], 'name' => $agent['name'], 'proname' => $agent['proname'], 'khan' => $agent['khan'], 'sangkat' => $agent['sangkat'], 'block' => $agent['block']);
     }
     $this->view->agentlist = Zend_Json::encode($result);
     $page = new Application_Form_FrmNavigation(self::REDIRECT_URL, $start, $limit, $record_count);
     $page->init(self::REDIRECT_URL, $start, $limit, $record_count);
     $this->view->nevigation = $page->navigationPage();
     $this->view->rows_per_page = $page->getRowsPerPage($limit, 'frmlist_agent');
     $this->view->result_row = $page->getResultRows();
 }
开发者ID:samlanh,项目名称:currencyms,代码行数:58,代码来源:FundController.php

示例3: indexAction

 public function indexAction()
 {
     $this->_helper->layout()->disableLayout();
     ///sopharat disablelayout to display login
     $tr = Application_Form_FrmLanguages::getCurrentlanguage();
     if ($this->getRequest()->isPost()) {
         $formdata = $this->getRequest()->getPost();
         $db_user = new Application_Model_DbTable_DbUsers();
         $email = $formdata['txt_email'];
         $password = $formdata['txt_password'];
         if ($db_user->checkEmail($email)) {
             if ($db_user->userAuthenticate($email, $password)) {
                 $user_id = $db_user->getUserID($email);
                 $user_info = $db_user->getUserInfo($user_id);
                 $arr_acl = $db_user->getArrAcl($user_info['user_type_id']);
                 //in case user have no right to access any module of the system
                 if (!$arr_acl) {
                     $this->view->msg = $tr->translate('LOGIN_FAIL_NO_MODULE');
                 } else {
                     $session_user = new Zend_Session_Namespace('auth');
                     $session_user->unlock();
                     $session_user->user_id = $user_id;
                     $session_user->fullname = $user_info['fullname'];
                     $session_user->user_name = $user_info['username'];
                     $session_user->level = $user_info['user_type_id'];
                     $session_user->user_type = $user_info['user_type'];
                     $session_user->location_id = $user_info['LocationId'];
                     $session_user->email = $email;
                     for ($i = 0; $i < count($arr_acl); $i++) {
                         $arr_module[$i] = $arr_acl[$i]['module'];
                     }
                     $arr_module = array_unique($arr_module);
                     $session_user->arr_acl = $arr_acl;
                     $session_user->arr_module = $arr_module;
                     $session_user->lock();
                     //echo $session_user->user_name;sales/sales-order
                     //echo $session_user->user_id=$user_id;exit();
                     //$_url=($arr_acl[0]!=='')? '/'.$arr_acl[0]['module']:'/default/index/home' ;//before
                     //$_url=($arr_acl[0]!=='')? '/default/index/dashboad':'/default/index/home' ;//after
                     //print_r($arr_acl[0]);
                     //exit();
                     //$this->_redirect("/sales/sales-order");
                     $_url = $arr_acl[0] !== '' ? '/default/index/dashboad' : '/sales/sales-order';
                     //after
                     $this->_redirect($_url);
                 }
             } elseif (!$db_user->checkStatusByEmail($email)) {
                 $this->view->msg = $tr->translate('LOGIN_FAIL_COMFIRM');
             } else {
                 $this->view->msg = $tr->translate('LOGIN_FAIL');
             }
         } else {
             $this->view->msg = $tr->translate('EMAIL_NOT');
         }
     }
 }
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:56,代码来源:IndexController.php

示例4: indexAction

 public function indexAction()
 {
     // action body
     $session_language = new Zend_Session_Namespace('language');
     $lang = $this->getRequest()->getParam('ln');
     $session_language->unlock();
     $session_language->language = $lang;
     $session_language->lock();
     $this->_redirect($_SERVER['HTTP_REFERER']);
     //$this->_response->setRedirect( $_SERVER['HTTP_REFERER'])->sendResponse();
     //exit();
 }
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:12,代码来源:IndexController.php

示例5: authAction

 public function authAction()
 {
     $request = $this->getRequest();
     $registry = Zend_Registry::getInstance();
     $auth = Zend_Auth::getInstance();
     $DB = $registry['DB'];
     $authAdapter = new Zend_Auth_Adapter_DbTable($DB);
     $authAdapter->setTableName('fitness_user_general')->setIdentityColumn('user_username')->setCredentialColumn('user_password');
     if ($request->getParam('user_username') != "" && $request->getParam('user_password') != "") {
         // Set the input credential values
         $uname = $request->getParam('user_username');
         $paswd = md5($request->getParam('user_password'));
         $authAdapter->setIdentity($uname);
         $authAdapter->setCredential($paswd);
         $select = $authAdapter->getDbSelect();
         $select->where('user_status = 1');
         // Perform the authentication query, saving the result
         $result = $auth->authenticate($authAdapter);
         if ($result->isValid()) {
             //print_r($result);
             $data = $authAdapter->getResultRowObject(null, 'password');
             $auth->getStorage()->write($data);
             $sess = new Zend_Session_Namespace('UserSession');
             if ($sess->isLocked()) {
                 $sess->unlock();
             }
             $sess->username = $uname;
             //record login status
             $fitnessUser = new FitnessUserGeneral();
             $fitnessUser->userLogin($uname);
             $loginDetails = $fitnessUser->getLastLogin($uname);
             $fitnessUser->userLogin($uname);
             if ($loginDetails['user_login'] == 1) {
                 $this->_redirect('/user/settings');
             } else {
                 $this->_redirect('/user/listworkouts');
             }
         } else {
             $this->_redirect('/user/loginform');
         }
     } else {
         $this->_redirect('/user/loginform');
     }
 }
开发者ID:keyanmca,项目名称:yoga,代码行数:44,代码来源:UserController.php

示例6: editAction

 public function editAction()
 {
     $id = $this->getRequest()->getParam("id");
     $db = new saleorder_Model_DbTable_DbSaleOrder();
     $saleorder = $db->getSaleOrderById($id);
     $datas = $db->getAllProduct();
     if ($this->getRequest()->isPost()) {
         $data = $this->getRequest()->getPost();
         //print_r($data);exit();
         if (isset($data['save'])) {
         }
         if (isset($data['save_add'])) {
         }
         if (isset($data['save_close'])) {
         } elseif (isset($data["km"]) == 2) {
             $dbs = new Application_Model_DbTable_DbSiteLanguages();
             $ids = 2;
             $lang = $dbs->getbyid($ids);
             $session_lang = new Zend_Session_Namespace('lang');
             $session_lang->unlock();
             $session_lang->lang_id = $lang['id'];
             $session_lang->lang = $lang['language'];
             //print_r($lang);exit();
         } elseif (isset($data["en"]) == 1) {
             $dbs = new Application_Model_DbTable_DbSiteLanguages();
             $ids = 1;
             $lang = $dbs->getbyid($ids);
             $session_lang = new Zend_Session_Namespace('lang');
             $session_lang->unlock();
             $session_lang->lang_id = $lang['id'];
             $session_lang->lang = $lang['language'];
         }
     }
     $form = new saleorder_Form_FrmSaleOrder();
     $this->view->frm = $form->FrmSaleOrder($saleorder);
     $this->view->getdata = $datas;
     $this->view->saleorder = $saleorder;
 }
开发者ID:sarankh80,项目名称:opsstock,代码行数:38,代码来源:IndexController.php

示例7: addAction

 public function addAction()
 {
     $form = new phurchase_Form_FrmVendor();
     $this->view->frmcate = $form->FrmProCate();
     if ($this->getRequest()->isPost()) {
         $data = $this->getRequest()->getPost();
         //print_r($data);exit();
         $db = new phurchase_Model_DbTable_DbVendor();
         if (isset($data['save'])) {
             $db->addProCate($data);
             Application_Form_FrmMessage::message("ការបញ្ចូលបានជោគជ័យ");
             Application_Form_FrmMessage::redirectUrl('/phurchase/vendor/add');
         } elseif (isset($data['save_close'])) {
             $db->addProCate($data);
             Application_Form_FrmMessage::message("ការបញ្ចូលបានជោគជ័យ");
             Application_Form_FrmMessage::redirectUrl('/phurchase/vendor');
         } elseif (isset($data["km"]) == 2) {
             $dbs = new Application_Model_DbTable_DbSiteLanguages();
             $ids = 2;
             $lang = $dbs->getbyid($ids);
             $session_lang = new Zend_Session_Namespace('lang');
             $session_lang->unlock();
             $session_lang->lang_id = $lang['id'];
             $session_lang->lang = $lang['language'];
             //print_r($lang);exit();
         } elseif (isset($data["en"]) == 1) {
             $dbs = new Application_Model_DbTable_DbSiteLanguages();
             $ids = 1;
             $lang = $dbs->getbyid($ids);
             $session_lang = new Zend_Session_Namespace('lang');
             $session_lang->unlock();
             $session_lang->lang_id = $lang['id'];
             $session_lang->lang = $lang['language'];
             //$this->_redirect('/login');
             //exit();
         }
     }
 }
开发者ID:sarankh80,项目名称:opsstock,代码行数:38,代码来源:VendorController.php

示例8: indexAction

 public function indexAction()
 {
     // action body
     try {
         $db_tran = new Application_Model_DbTable_DbGlobal();
         //create sesesion
         $session_transfer = new Zend_Session_Namespace('search_acl');
         if (empty($session_transfer->limit)) {
             $session_transfer->limit = Application_Form_FrmNavigation::getLimit();
             $session_transfer->lock();
         }
         $sql = "SELECT `acl_id`,`module`,`controller`,`action`,`status` FROM rsv_acl_acl";
         if ($this->getRequest()->isPost()) {
             $formdata = $this->getRequest()->getPost();
             $session_transfer->unlock();
             $session_transfer->limit = $formdata['rows_per_page'];
             $session_transfer->lock();
         }
         //start page nevigation
         $limit = $session_transfer->limit;
         $start = $this->getRequest()->getParam('limit_satrt', 0);
         $result = $db_tran->getGlobalDbListBy($sql, $start, $limit);
         $record_count = $db_tran->getGlobalDbListTotal($sql);
         $row_num = $start;
         if (empty($result)) {
             $result = array('err' => 1, 'msg' => 'មិន​ទាន់​មាន​ទន្និន័យ​នូវ​ឡើយ​ទេ!');
         }
         //print_r($result); exit;
         $this->view->list = Zend_Json::encode($result);
         $page = new Application_Form_FrmNavigation(self::REDIRECT_URL, $start, $limit, $record_count);
         $page->init(self::REDIRECT_URL, $start, $limit, $record_count);
         $this->view->nevigation = $page->navigationPage();
         $this->view->rows_per_page = $page->getRowsPerPage($limit, 'frmlist');
         $this->view->result_row = $page->getResultRows();
     } catch (Exception $e) {
     }
 }
开发者ID:samlanh,项目名称:currencyms,代码行数:37,代码来源:AclController.php

示例9: changepasswordAction

 public function changepasswordAction()
 {
     // action body
     if ($this->getRequest()->isPost()) {
         $session_user = new Zend_Session_Namespace('auth');
         $pass_data = $this->getRequest()->getPost();
         if ($pass_data['password'] == $session_user->pwd) {
             $db_user = new Application_Model_DbTable_DbUsers();
             try {
                 $db_user->changePassword($pass_data['new_password'], $session_user->user_id);
                 $session_user->unlock();
                 $session_user->pwd = $pass_data['new_password'];
                 $session_user->lock();
                 Application_Form_FrmMessage::Sucessfull('ការផ្លាស់ប្�ូរដោយជោគជ�យ', self::REDIRECT_URL);
             } catch (Exception $e) {
                 Application_Form_FrmMessage::message('ការផ្លាស់ប្�ូរ�្រូវបរាជ�យ');
             }
         } else {
             Application_Form_FrmMessage::message('ការផ្លាស់ប្�ូរ�្រូវបរាជ�យ');
         }
     }
 }
开发者ID:samlanh,项目名称:lynacr,代码行数:22,代码来源:LoginController.php

示例10: indexAction

 public function indexAction()
 {
     try {
         $db_tran = new Application_Model_DbTable_Dbpsc();
         //create sesesion
         $session_capital = new Zend_Session_Namespace('search_capital');
         if (empty($session_capital->limit)) {
             $session_capital->limit = Application_Form_FrmNavigation::getLimit();
             $session_capital->type_money = -1;
             $session_capital->staff_name = -1;
             $session_capital->from_date = date('Y-m-d');
             $session_capital->to_date = date('Y-m-d');
             $session_capital->lock();
         }
         //start page nevigation
         $limit = $session_capital->limit;
         $start = $this->getRequest()->getParam('limit_satrt', 0);
         $this->view->from_date = $session_capital->from_date;
         $this->view->to_date = $session_capital->to_date;
         $this->view->staff = $session_capital->staff;
         $cur = new Application_Model_DbTable_DbCurrencies();
         $this->view->currencylist = $cur->getCurrencyList();
         $this->view->type_money = $session_capital->type_money;
         if ($this->getRequest()->isPost()) {
             $formdata = $this->getRequest()->getPost();
             $session_capital->unlock();
             $session_capital->limit = $formdata['rows_per_page'];
             $session_capital->type_money = $formdata['type_money'];
             $session_capital->staff_name = $formdata['staff_name'];
             $session_capital->from_date = $formdata['from_date'];
             $session_capital->to_date = $formdata['to_date'];
             $session_capital->lock();
             $this->view->type_money = $formdata['type_money'];
             $this->view->staff_name = $formdata['staff_name'];
             $this->view->from_date = $session_capital->from_date;
             $this->view->to_date = $session_capital->to_date;
             $limit = $session_capital->limit;
         } else {
             $formdata = array('from_date' => $session_capital->from_date, 'to_date' => $session_capital->to_date, 'type_money' => $session_capital->type_money, 'staff_name' => $session_capital->staff_name);
         }
         $trans = $db_tran->getPscAmountListBy($formdata, $start, $limit);
         $record_count = $db_tran->getAllPscList($formdata);
         $result = array();
         $row_num = $start;
         if (!empty($trans)) {
             foreach ($trans as $i => $tran) {
                 $expired = '';
                 $is_expired = 0;
                 $volum = Application_Model_DbTable_DbGlobal::CurrencyOption($tran['currency_type'], $tran['volum']);
                 $result[$i] = array('num' => ++$row_num, 'id' => $tran['id'], 'staff_name' => $tran['staff_name'], 'currency_type' => $this->curr_type[$tran['currency_type']], 'volum' => number_format($volum) . ' ' . $this->curr_type[$tran['currency_type']], 'psc_amount' => $tran['psc_amount'] . " សន្លឹក", 'total_amount' => number_format($volum * $tran['psc_amount']) . ' ' . $this->curr_type[$tran['currency_type']], 'note' => $tran['note'], 'date' => date_format(date_create($tran['date']), "d/m/Y"), 'img' => $tran['id']);
             }
         } else {
             $result = array('err' => 1, 'msg' => 'មិន​ទាន់​មាន​ទន្និន័យ​នូវ​ឡើយ​ទេ!');
         }
         $this->view->tranlist = Zend_Json::encode($result);
         $page = new Application_Form_FrmNavigation(self::REDIRECT_URL, $start, $limit, $record_count);
         $page->init(self::REDIRECT_URL, $start, $limit, $record_count);
         $this->view->nevigation = $page->navigationPage();
         $this->view->rows_per_page = $page->getRowsPerPage($limit, 'frmlist_mt');
         $this->view->result_row = $page->getResultRows();
         $usr_mod = new Application_Model_DbTable_DbUsers();
         $user_list = $usr_mod->getUserListSelect();
         array_unshift($user_list, array('id' => '-1', "name" => "ជ្រើសរើសឈ្មោះបុគ្គលិក"));
         $this->view->users = $user_list;
         $session_user = new Zend_Session_Namespace('auth');
         $this->view->user_name = $session_user->last_name . ' ' . $session_user->first_name;
         $db_keycode = new Application_Model_DbTable_DbKeycode();
         $this->view->keycode = $db_keycode->getKeyCodeMiniInv();
         $this->view->rpt_list = $db_tran->countAllStaffpcsAmount($formdata);
         $this->view->curr_type = $this->curr_typesimble;
     } catch (Exception $e) {
     }
 }
开发者ID:samlanh,项目名称:currencyms,代码行数:73,代码来源:TransferController.php

示例11: indexAction

 public function indexAction()
 {
     try {
         $db_tran = new Application_Model_DbTable_DbKbank();
         //create sesesion
         $search_kbank = new Zend_Session_Namespace('search_kbank');
         if (empty($search_kbank->limit)) {
             $search_kbank->limit = Application_Form_FrmNavigation::getLimit();
             $search_kbank->type_money = -1;
             $search_kbank->txtsearch = "";
             $search_kbank->from_date = date('Y-m-d');
             $search_kbank->to_date = date('Y-m-d');
             $search_kbank->sender = -1;
             $search_kbank->lock();
         }
         //start page nevigation
         $limit = $search_kbank->limit;
         $start = $this->getRequest()->getParam('limit_satrt', 0);
         $this->view->from_date = $search_kbank->from_date;
         $this->view->to_date = $search_kbank->to_date;
         $this->view->sender_id = $search_kbank->sender;
         $cur = new Application_Model_DbTable_DbCurrencies();
         $this->view->currencylist = $cur->getCurrencyList();
         $this->view->type_money = $search_kbank->type_money;
         $this->view->statuslist = $this->statuslist;
         $this->view->txtsearch = $search_kbank->txtsearch;
         if ($this->getRequest()->isPost()) {
             $formdata = $this->getRequest()->getPost();
             // 				print_r($formdata);
             $search_kbank->unlock();
             $search_kbank->txtsearch = $formdata['txt_search'];
             $search_kbank->limit = $formdata['rows_per_page'];
             $search_kbank->type_money = $formdata['type_money'];
             $search_kbank->from_date = $formdata['from_date'];
             $search_kbank->to_date = $formdata['to_date'];
             $search_kbank->sender = $formdata['sender'];
             $search_kbank->lock();
             $this->view->txtsearch = $formdata['txt_search'];
             $this->view->type_money = $formdata['type_money'];
             $this->view->sender_id = $formdata['sender'];
             $this->view->from_date = $search_kbank->from_date;
             $this->view->to_date = $search_kbank->to_date;
             $limit = $search_kbank->limit;
             $trans = $db_tran->getTransactionListBy($formdata, $start, $limit);
             $record_count = $db_tran->getTransactionListTotal($formdata);
         } else {
             $formdata = array('txt_search' => $search_kbank->txtsearch, 'tran_type' => $search_kbank->tran_type, 'from_date' => $search_kbank->from_date, 'to_date' => $search_kbank->to_date, 'type_money' => $search_kbank->type_money, 'sender' => $search_kbank->sender);
             $trans = $db_tran->getTransactionListBy($formdata, $start, $limit);
             $record_count = $db_tran->getTransactionListTotal($formdata);
         }
         $result = array();
         $row_num = $start;
         if (!empty($trans)) {
             foreach ($trans as $i => $tran) {
                 $expired = '';
                 $is_expired = 0;
                 $amount = $tran['symbol'] . ' ' . number_format($tran['money_inaccount']);
                 $sub_agent = empty($tran['subname']) ? "" : "(" . $tran['subname'] . ")";
                 $inc_no = sprintf("%'010s", $tran['invoice']);
                 $current_date = $search_kbank->to_date;
                 $current_date = date_format(date_create($current_date), "d/m/Y");
                 if ($current_date >= date_format(date_create($tran['end_date']), "d/m/Y")) {
                     $expired = $current_date - date_format(date_create($tran['end_date']), "d/m/Y");
                     if ($expired == 0) {
                         $expired = 'ថ្ងៃនេះ';
                     } else {
                         $expired .= ' ថ្ងៃ';
                     }
                     $is_expired = 1;
                 }
                 $result[$i] = array('num' => ++$row_num, 'id' => $tran['id'], 'sender_name' => $tran['sender_name'], 'tel' => $tran['tel'], 'account_no' => $tran['acc_no'], 'invoice' => $tran['invoice'], 'amount' => $amount, 'start_date' => date_format(date_create($tran['start_date']), "d/m/Y"), 'expired_date' => date_format(date_create($tran['end_date']), "d/m/Y"), 'amount_month' => $tran['amount_month'] . ' ' . $this->pay_term[$tran['pay_term']], 'amount_expired' => $expired, 'is_expired' => $is_expired, 'is_extend' => $tran["is_extend"] == 1 ? "ពន្យា" : "ផ្ញើរ");
             }
         } else {
             $result = array('err' => 1, 'msg' => 'មិន​ទាន់​មាន​ទន្និន័យ​នូវ​ឡើយ​ទេ!');
         }
         $this->view->tranlist = Zend_Json::encode($result);
         $page = new Application_Form_FrmNavigation(self::REDIRECT_URL, $start, $limit, $record_count);
         $page->init(self::REDIRECT_URL, $start, $limit, $record_count);
         $this->view->nevigation = $page->navigationPage();
         $this->view->rows_per_page = $page->getRowsPerPage($limit, 'frmlist_mt');
         $this->view->result_row = $page->getResultRows();
         $sender = new Application_Model_DbTable_DbSender();
         $_sender = $sender->getAllSenderKbank();
         array_unshift($_sender, array('id' => '-1', "name" => "ជ្រើសរើសឈ្មោះអ្នកផ្ញើរ"));
         $this->view->sender = $_sender;
     } catch (Exception $e) {
     }
 }
开发者ID:samlanh,项目名称:currencyms,代码行数:88,代码来源:IndexController.php

示例12: unlock

 /**
  * 名前空間のロックを解除する
  *
  * @access public
  */
 public function unlock()
 {
     parent::unlock();
 }
开发者ID:noriotakei,项目名称:suraimu,代码行数:9,代码来源:ComSessionNamespace.php

示例13: poseditAction

 public function poseditAction()
 {
     $id = $this->getRequest()->getParam('id');
     $db = new saleorder_Model_DbTable_DbSaleOrder();
     $db_global = new Application_Model_DbTable_DbGlobal();
     $session = $session_user = new Zend_Session_Namespace('auth');
     $user_id = $session_user->fullname;
     $this->view->user = $user_id;
     $qty_warning = $db_global->getSettingByCode(6);
     $this->view->qty_warning = $qty_warning;
     $row_sale_order = $db_global->getSaleOrderById($id);
     $row_sale_order_detail = $db_global->getSaleOrderDetail($id);
     $this->view->data_sale_order = $row_sale_order_detail;
     $form = new saleorder_Form_FrmSaleOrder();
     $this->view->frm = $form->FrmSaleOrder($row_sale_order);
     $currency_setting = $db_global->getSettingByCode(1);
     $company_name = $db_global->getSettingByCode(4);
     $slogan = $db_global->getSettingByCode(5);
     $address = $db_global->getSettingByCode(2);
     $tel = $db_global->getSettingByCode(3);
     $this->view->currency_setting = $currency_setting;
     $this->view->company_name = $company_name;
     $this->view->slogan = $slogan;
     $this->view->address = $address;
     $this->view->tel = $tel;
     $itemRows = $db->getProductOption();
     $this->view->itemsOption = $itemRows;
     if ($this->getRequest()->isPost()) {
         $data = $this->getRequest()->getPost();
         if (isset($data["save"])) {
             // 				print_r($data);exit();
             $db->editOrder($data, $id);
             Application_Form_FrmMessage::redirectUrl('/index/pos');
         } elseif (isset($data["km"]) == 2) {
             $dbs = new Application_Model_DbTable_DbSiteLanguages();
             $ids = 2;
             $lang = $dbs->getbyid($ids);
             $session_lang = new Zend_Session_Namespace('lang');
             $session_lang->unlock();
             $session_lang->lang_id = $lang['id'];
             $session_lang->lang = $lang['language'];
             //print_r($lang);exit();
         } elseif (isset($data["en"]) == 1) {
             $dbs = new Application_Model_DbTable_DbSiteLanguages();
             $ids = 1;
             $lang = $dbs->getbyid($ids);
             $session_lang = new Zend_Session_Namespace('lang');
             $session_lang->unlock();
             $session_lang->lang_id = $lang['id'];
             $session_lang->lang = $lang['language'];
             //$this->_redirect('/login');
             //exit();
         }
     }
 }
开发者ID:sarankh80,项目名称:opsstock,代码行数:55,代码来源:IndexController.php

示例14: indexAction

 public function indexAction()
 {
     try {
         $db_tran = new Application_Model_DbTable_DbKbank();
         //create sesesion
         $session_withdraw = new Zend_Session_Namespace('search_withdraw');
         if (empty($session_withdraw->limit)) {
             $session_withdraw->limit = Application_Form_FrmNavigation::getLimit();
             $session_withdraw->type_money = -1;
             $session_withdraw->sender = -1;
             $session_withdraw->txtsearch = "";
             $session_withdraw->from_date = date('Y-m-d');
             $session_withdraw->to_date = date('Y-m-d');
             $session_withdraw->lock();
         }
         //start page nevigation
         $limit = $session_withdraw->limit;
         $start = $this->getRequest()->getParam('limit_satrt', 0);
         $this->view->from_date = $session_withdraw->from_date;
         $this->view->to_date = $session_withdraw->to_date;
         $this->view->sender_id = $session_withdraw->sender;
         $cur = new Application_Model_DbTable_DbCurrencies();
         $this->view->currencylist = $cur->getCurrencyList();
         $this->view->type_money = $session_withdraw->type_money;
         $this->view->txtsearch = $session_withdraw->txtsearch;
         if ($this->getRequest()->isPost()) {
             $formdata = $this->getRequest()->getPost();
             // 				print_r($formdata);
             $session_withdraw->unlock();
             $session_withdraw->txtsearch = $formdata['txt_search'];
             $session_withdraw->limit = $formdata['rows_per_page'];
             $session_withdraw->type_money = $formdata['type_money'];
             $session_withdraw->sender = $formdata['sender'];
             $session_withdraw->from_date = $formdata['from_date'];
             $session_withdraw->to_date = $formdata['to_date'];
             $session_withdraw->lock();
             $this->view->txtsearch = $formdata['txt_search'];
             $this->view->type_money = $formdata['type_money'];
             $this->view->sender_id = $formdata['sender'];
             $this->view->from_date = $session_withdraw->from_date;
             $this->view->to_date = $session_withdraw->to_date;
             $limit = $session_withdraw->limit;
             $trans = $db_tran->getTranWithDrawListBy($formdata, $start, $limit);
             $record_count = $db_tran->getTranWithDrawListTotal($formdata);
         } else {
             $formdata = array('txt_search' => $session_withdraw->txtsearch, 'tran_type' => $session_withdraw->tran_type, 'from_date' => $session_withdraw->from_date, 'to_date' => $session_withdraw->to_date, 'type_money' => $session_withdraw->type_money, 'sender' => $session_withdraw->sender);
             $trans = $db_tran->getTranWithDrawListBy($formdata, $start, $limit);
             $record_count = $db_tran->getTranWithDrawListTotal($formdata);
         }
         $result = array();
         $row_num = $start;
         if (!empty($trans)) {
             foreach ($trans as $i => $tran) {
                 $expired = '';
                 $is_expired = 0;
                 $result[$i] = array('num' => ++$row_num, 'id' => $tran['id'], 'sender_name' => $tran['sender_name'], 'tel' => $tran['tel'], 'account_no' => $tran['acc_no'], 'invoice' => $tran['invoice'], 'amount_dollar' => $tran['wd_amountdollar'] . " \$", 'amount_bath' => $tran['wd_amountbath'] . " B", 'amount_riel' => $tran['wd_amountriel'] . " R", 'create_date' => date_format(date_create($tran['create_date']), "d/m/Y"));
             }
         } else {
             $result = array('err' => 1, 'msg' => 'មិន​ទាន់​មាន​ទន្និន័យ​នូវ​ឡើយ​ទេ!');
         }
         $this->view->tranlist = Zend_Json::encode($result);
         $page = new Application_Form_FrmNavigation(self::REDIRECT_URL, $start, $limit, $record_count);
         $page->init(self::REDIRECT_URL, $start, $limit, $record_count);
         $this->view->nevigation = $page->navigationPage();
         $this->view->rows_per_page = $page->getRowsPerPage($limit, 'frmlist_mt');
         $this->view->result_row = $page->getResultRows();
         $sender = new Application_Model_DbTable_DbSender();
         $_sender = $sender->getAllSenderKbank();
         array_unshift($_sender, array('id' => '-1', "name" => "បន្ថែមឈ្មោះអ្នកផ្ញើរ"));
         $this->view->sender = $_sender;
         $cur = new Application_Model_DbTable_DbCurrencies();
     } catch (Exception $e) {
     }
 }
开发者ID:samlanh,项目名称:currencyms,代码行数:74,代码来源:WithdrawController.php

示例15: adjustAction

 public function adjustAction()
 {
     $db = new product_Model_DbTable_DbProduct();
     $db_global = new saleorder_Model_DbTable_DbSaleOrder();
     $itemRows = $db_global->getProductOption();
     $this->view->itemsOption = $itemRows;
     if ($this->getRequest()->isPost()) {
         $data = $this->getRequest()->getPost();
         //print_r($data);exit();
         if (isset($data['search'])) {
             $search = array('advance_search' => $data['txt_search'], 'pro_id' => $data['add_item'], 'cate_id' => $data['cat_id'], 'brand' => $data['brand']);
         } elseif (isset($data['update'])) {
             $db->adjust($data);
             $this->_redirect("/product/index/adjust");
         } elseif (isset($data["km"]) == 2) {
             $dbs = new Application_Model_DbTable_DbSiteLanguages();
             $ids = 2;
             $lang = $dbs->getbyid($ids);
             $session_lang = new Zend_Session_Namespace('lang');
             $session_lang->unlock();
             $session_lang->lang_id = $lang['id'];
             $session_lang->lang = $lang['language'];
             //print_r($lang);exit();
         } elseif (isset($data["en"]) == 1) {
             $dbs = new Application_Model_DbTable_DbSiteLanguages();
             $ids = 1;
             $lang = $dbs->getbyid($ids);
             $session_lang = new Zend_Session_Namespace('lang');
             $session_lang->unlock();
             $session_lang->lang_id = $lang['id'];
             $session_lang->lang = $lang['language'];
             //$this->_redirect('/login');
             //exit();
         }
     } else {
         $search = array('advance_search' => '', 'pro_id' => -1, 'cate_id' => -1, 'brand' => -1);
     }
     $datas = $db->getProductAdjust($search);
     $this->view->getdata = $datas;
     $frm = new product_Form_Frmproduct();
     $this->view->frmSearch = $frm->frmSearch();
 }
开发者ID:sarankh80,项目名称:opsstock,代码行数:42,代码来源:IndexController.php


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