public function addAction() { $form = new customer_Form_FrmCustomer(); $this->view->frmcate = $form->FrmCustomer(); if ($this->getRequest()->isPost()) { $data = $this->getRequest()->getPost(); // print_r($data);exit(); $db = new customer_Model_DbTable_DbCustomer(); if (isset($data['save'])) { $db->add($data); Application_Form_FrmMessage::message("ការបញ្ចូលបានជោគជ័យ"); Application_Form_FrmMessage::redirectUrl('/customer/index/add'); } elseif (isset($data['save_close'])) { $db->add($data); Application_Form_FrmMessage::message("ការបញ្ចូលបានជោគជ័យ"); Application_Form_FrmMessage::redirectUrl('/customer'); } 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(); } } }