Exemplo n.º 1
0
 public function editAction()
 {
     $db = new Other_Model_DbTable_DbVillage();
     if ($this->getRequest()->isPost()) {
         $_data = $this->getRequest()->getPost();
         try {
             $db->addVillage($_data);
             Application_Form_FrmMessage::Sucessfull("ការ​បញ្ចូល​ជោគ​ជ័យ !", '/other/Village');
         } catch (Exception $e) {
             Application_Form_FrmMessage::message("ការ​បញ្ចូល​មិន​ជោគ​ជ័យ");
             $err = $e->getMessage();
             Application_Model_DbTable_DbUserLog::writeMessageError($err);
         }
     }
     $id = $this->getRequest()->getParam("id");
     $row = $db->getVillageById($id);
     $this->view->row = $row;
     if (empty($row)) {
         $this->_redirect('other/Village');
     }
     $fm = new Other_Form_FrmVillage();
     $frm = $fm->FrmAddVillage($row);
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm_village = $frm;
     $db = new Application_Model_DbTable_DbGlobal();
     $this->view->district = $db->getAllDistricts();
     $this->view->commune_name = $db->getCommune();
 }
Exemplo n.º 2
0
 public function editAction()
 {
     $_dbmodel = new Accounting_Model_DbTable_DbGeneraljurnal();
     if ($this->getRequest()->isPost()) {
         $_data = $this->getRequest()->getPost();
         try {
             $_db = new Accounting_Model_DbTable_DbJournal();
             $_db->upDateJournal($_data);
             Application_Form_FrmMessage::Sucessfull("INSERT_SUCCESS", "/accounting/generaljurnal");
         } catch (Exception $e) {
             Application_Form_FrmMessage::message("INSERT_FAIL");
             Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
         }
     }
     $id = $this->getRequest()->getParam('id');
     $row = $_dbmodel->getjurnalEntryById($id);
     $this->view->jdetail = $_dbmodel->getjurnalEntryDetail($id);
     $fm = new Accounting_Form_FrmGeneraljurnal();
     $frm = $fm->FrmGeneraljurnal($row);
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm_fixedasset = $frm;
     $db = new Accounting_Model_DbTable_DbJournal();
     $this->view->row_parents = $db->getAllParrentAccount(1);
     $this->view->row_accountname = $db->getAllParrentAccount(1, 1);
 }
Exemplo n.º 3
0
 function editAction()
 {
     if ($this->getRequest()->isPost()) {
         $data = $this->getRequest()->getPost();
         $db_wihtdraw = new Partner_Model_DbTable_DbWithdraw();
         try {
             if ($this->getRequest()->getPost("btn_save_close")) {
                 $db_wihtdraw->updatewithdraw($data);
                 Application_Form_FrmMessage::Sucessfull('ការ​បញ្ចូល​​ជោគ​ជ័យ', self::REDIRECT_URL);
             }
         } catch (Exception $e) {
             $this->view->msg = 'ការ​បញ្ចូល​មិន​ជោគ​ជ័យ';
         }
     }
     $db_wihtdraw = new Partner_Model_DbTable_DbWithdraw();
     $id = $this->getRequest()->getParam("id");
     $row = $db_wihtdraw->getpartnerById($id);
     if (empty($row)) {
     }
     $this->view->id = $row['id'];
     $withdraw = new Partner_Form_FrmWithdraw();
     $frm = $withdraw->dakMoney($row);
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm = $frm;
 }
 public function editUserTypeAction()
 {
     $user_type_id = $this->getRequest()->getParam('id');
     if (!$user_type_id) {
         $user_type_id = 0;
     }
     $form = new RsvAcl_Form_FrmUserType();
     $db = new RsvAcl_Model_DbTable_DbUserType();
     $rs = $db->getUserTypeInfo('SELECT * FROM rsv_acl_user_type where user_type_id=' . $user_type_id);
     Application_Model_Decorator::setForm($form, $rs);
     $this->view->form = $form;
     $this->view->user_id = $user_type_id;
     $tr = Application_Form_FrmLanguages::getCurrentlanguage();
     if ($this->getRequest()->isPost()) {
         $post = $this->getRequest()->getPost();
         if ($rs[0]['user_type'] == $post['user_type']) {
             Application_Form_FrmMessage::message($tr->translate('ROW_AFFECTED'));
             $db->updateUserType($post, $rs[0]['user_type_id']);
             Application_Form_FrmMessage::redirector('/rsvAcl/user-type/index');
         } else {
             if (!$db->isUserTypeExist($post['user_type'])) {
                 $db->updateUserType($post, $rs[0]['user_type_id']);
                 Application_Form_FrmMessage::message($tr->translate('ROW_AFFECTED'));
                 Application_Form_FrmMessage::redirector('/rsvAcl/user-type/index');
             } else {
                 Application_Form_FrmMessage::message('User had existed already');
             }
         }
     }
 }
 public function editAclAction()
 {
     $acl_id = $this->getRequest()->getParam('id');
     if (!$acl_id) {
         $acl_id = 0;
     }
     $form = new RsvAcl_Form_FrmAcl();
     $db = new RsvAcl_Model_DbTable_DbAcl();
     $rs = $db->getUserInfo('SELECT * FROM rsv_acl_acl where acl_id=' . $acl_id);
     Application_Model_Decorator::setForm($form, $rs);
     $this->view->form = $form;
     $this->view->acl_id = $acl_id;
     if ($this->getRequest()->isPost()) {
         $post = $this->getRequest()->getPost();
         if ($rs[0]['action'] == $post['action']) {
             $db->updateAcl($post, $rs[0]['acl_id']);
             $tr = Application_Form_FrmLanguages::getCurrentlanguage();
             Application_Form_FrmMessage::message($tr->translate('ROW_AFFECTED'));
             Application_Form_FrmMessage::redirector('/rsvAcl/acl/index');
         } else {
             if (!$db->isActionExist($post['action'])) {
                 $db->updateAcl($post, $rs[0]['acl_id']);
                 $tr = Application_Form_FrmLanguages::getCurrentlanguage();
                 Application_Form_FrmMessage::message($tr->translate('ROW_AFFECTED'));
                 Application_Form_FrmMessage::redirector('/rsvAcl/acl/index');
             } else {
                 Application_Form_FrmMessage::message('Action had existed already');
             }
         }
     }
 }
Exemplo n.º 6
0
 public function editAction()
 {
     if ($this->getRequest()->isPost()) {
         try {
             $_data = $this->getRequest()->getPost();
             $_dbmodel = new Application_Model_DbTable_DbDept();
             $_dbmodel->UpdateDepartment($_data);
             Application_Form_FrmMessage::Sucessfull("ការកៃប្រែដោយជោគជ័យ !", "/global/faculty/index");
             //$this->_redirect("");
         } catch (Exception $e) {
             $err = $e->getMessage();
             Application_Form_FrmMessage::message("Application Error!");
             Application_Model_DbTable_DbUserLog::writeMessageError($err);
             echo $e->getMessage();
             exit;
         }
     }
     $id = $this->getRequest()->getParam("id");
     $_db = new Application_Model_DbTable_DbGlobal();
     $_row = $_db->getDeptById($id);
     $frm = new Application_Form_FrmOther();
     $frm->FrmAddDept($_row);
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm_dept = $frm;
 }
Exemplo n.º 7
0
 public function editAction()
 {
     if ($this->getRequest()->isPost()) {
         $data = $this->getRequest()->getPost();
         $db = new Callecterall_Model_DbTable_DbCallecterall();
         try {
             if (isset($data['btn_save'])) {
                 $db->updatcallecterall($data);
                 Application_Form_FrmMessage::message('ការ​បញ្ចូល​​ជោគ​ជ័យ');
             }
             if (isset($data['btn_save_close'])) {
                 $db->updatcallecterall($data);
                 Application_Form_FrmMessage::message('ការ​បញ្ចូល​​ជោគ​ជ័យ');
                 Application_Form_FrmMessage::redirectUrl('/callecterall/Callecterall');
             }
         } catch (Exception $e) {
             Application_Form_FrmMessage::message("INSERT_FAIL");
             $err = $e->getMessage();
             Application_Model_DbTable_DbUserLog::writeMessageError($err);
         }
     }
     $id = $this->getRequest()->getParam('id');
     $db = new Callecterall_Model_DbTable_DbCallecterall();
     $row = $db->getcallecterallbyid($id);
     $fm = new Callecterall_Form_Frmcallecterall();
     $frm = $fm->Frmcallecterall($row);
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->Form_Frmcallecterall = $frm;
 }
Exemplo n.º 8
0
 public function indexAction()
 {
     try {
         $db = new Tellerandexchange_Model_DbTable_DbSpread();
         if ($this->getRequest()->isPost()) {
             $search = $this->getRequest()->getPost();
         } else {
             $search = array('client_id' => -1, 'status' => -1, 'from_date' => date('Y-m-d'), 'to_date' => date('Y-m-d'));
         }
         $rs_rows = $db->getAllSpreadList($search);
         $glClass = new Application_Model_GlobalClass();
         $rs_rows = $glClass->getImgActive($rs_rows, BASE_URL, true);
         $list = new Application_Form_Frmtable();
         $collumns = array("ពីប្រាក់", "ទៅប្រាក់", "ទិញចូល", "លក់ចេញ", "អត្រាកណ្តាល", "កាលបរិច្ឆេទ", "STATUS");
         $link = array('module' => 'tellerandexchange', 'controller' => 'Spread', 'action' => 'edit');
         $this->view->list = $list->getCheckList(0, $collumns, $rs_rows, array('buy_type' => $link, 'sell_type' => $link, 'rate_in' => $link, 'rate_out' => $link));
     } catch (Exception $e) {
         Application_Form_FrmMessage::message("Application Error");
         echo $e->getMessage();
         Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
     }
     $frm = new Application_Form_FrmAdvanceSearch();
     $frm = $frm->AdvanceSearch();
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm_search = $frm;
 }
Exemplo n.º 9
0
 function editAction()
 {
     $db = new Other_Model_DbTable_DbHoliday();
     //$db->deleteHoliday();
     $db = new Other_Model_DbTable_DbHoliday();
     if ($this->getRequest()->isPost()) {
         $_data = $this->getRequest()->getPost();
         try {
             $_major_id = $db->addHoliday($_data);
             Application_Form_FrmMessage::Sucessfull($this->tr->translate("EDIT_SUCCESS"), self::REDIRECT_URL . '/holiday/index');
         } catch (Exception $e) {
             Application_Form_FrmMessage::message($this->tr->translate("EDIT_FAIL"));
             $err = $e->getMessage();
             Application_Model_DbTable_DbUserLog::writeMessageError($err);
         }
     }
     $id = $this->getRequest()->getParam('id');
     $row = $db->getHolidayById($id);
     if (empty($row)) {
         $this->_redirect('/other/holiday');
     }
     $frm = new Other_Form_FrmHoliday();
     $frm_holiday = $frm->FrmAddHoliday($row);
     Application_Model_Decorator::removeAllDecorator($frm_holiday);
     $this->view->frm_holiday = $frm_holiday;
 }
Exemplo n.º 10
0
 function addAction()
 {
     $_model = new Foundation_Model_DbTable_DbNewStudent();
     if ($this->getRequest()->isPost()) {
         try {
             $_data = $this->getRequest()->getPost();
             $_model->addNewStudent($_data);
             if (!empty($_data['save_close'])) {
                 Application_Form_FrmMessage::Sucessfull("INSERT_SUCCESS", "/foundation/index");
             }
             Application_Form_FrmMessage::message("INSERT_SUCCESS");
         } catch (Exception $e) {
             Application_Form_FrmMessage::message("INSERT_FAIL");
             $err = $e->getMessage();
             Application_Model_DbTable_DbUserLog::writeMessageError($err);
         }
     }
     $_frm = new Foundation_Form_FrmStudent();
     $_frmstudent = $_frm->FrmStudent();
     Application_Model_Decorator::removeAllDecorator($_frmstudent);
     $this->view->frm_student = $_frmstudent;
     // 		$_db = new Application_Model_DbTable_DbGlobal();
     // 		$comp = $_db->getallComposition();
     // 		array_unshift($comp, array ( 'id' => -1, 'name' => 'បន្�ែម​អ្នក​ទទួល​�្មី') );
     // 		$this->view->compo=$comp;
     // 		$situation = $_db->getallSituation();
     // 		array_unshift($situation, array ( 'id' => -1, 'name' => 'បន្�ែម​អ្នក​ទទួល​�្មី') );
     // 		$this->view->situation=$situation;
     // 		$school = $_db->getAllHighSchool();
     // 		array_unshift($school, array ( 'id' => -1, 'name' => 'បន្�ែម​អ្នក​ទទួល​�្មី','province_id'=>-1) );
     // 		$this->view->highschool=$school;
     // 		$scholarship = $_db->getallScholarship();
     // 		array_unshift($scholarship, array ( 'id' => -1, 'name' => 'បន្�ែម​អ្នក​ទទួល​�្មី','province_id'=>-1) );
     // 		$this->view->scholarship=$scholarship;
 }
Exemplo n.º 11
0
 public function addAction()
 {
     if ($this->getRequest()->isPost()) {
         $_data = $this->getRequest()->getPost();
         $db = new Menu_Model_DbTable_DbItem();
         try {
             if (isset($_data['btnsave'])) {
                 $db->addItem($_data);
                 Application_Form_FrmMessage::Sucessfull('ការ​បញ្ចូល​​ជោគ​ជ័យ', self::REDIRECT_URL . '/item/add');
             } elseif (isset($_data['btnsaveclose'])) {
                 $db->addItem($_data);
                 Application_Form_FrmMessage::Sucessfull('ការ​បញ្ចូល​​ជោគ​ជ័យ', self::REDIRECT_URL . '/item/index');
             }
             // 				$db->addItem($_data);
             // 				if(!empty($_data['btnsave'])){
             // 					Application_Form_FrmMessage::message('ការ​បញ្ចូល​​ជោគ​ជ័យ');
             // 				}else{
             // 					Application_Form_FrmMessage::Sucessfull('ការ​បញ្ចូល​​ជោគ​ជ័យ', self::REDIRECT_URL . '/item/add');
             // 				}
         } catch (Exception $e) {
             Application_Form_FrmMessage::message("ការ​បញ្ចូល​មិន​ជោគ​ជ័យ");
             $err = $e->getMessage();
             Application_Model_DbTable_DbUserLog::writeMessageError($err);
         }
     }
     $frm = new Menu_Form_FrmMenuItem();
     $frm_menuitem = $frm->FrmMenu();
     Application_Model_Decorator::removeAllDecorator($frm_menuitem);
     $this->view->form = $frm_menuitem;
 }
Exemplo n.º 12
0
 public function editAction()
 {
     $db = new Group_Model_DbTable_DbClient();
     if ($this->getRequest()->isPost()) {
         try {
             $data = $this->getRequest()->getPost();
             $db->addClient($data);
             Application_Form_FrmMessage::Sucessfull($this->tr->translate('EDIT_SUCCESS'), "/group/client");
         } catch (Exception $e) {
             echo $e->getMessage();
             exit;
             Application_Form_FrmMessage::message("Application Error");
             echo $e->getMessage();
             Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
         }
     }
     $id = $this->getRequest()->getParam("id");
     $row = $db->getClientById($id);
     if (empty($row)) {
         $this->_redirect("/group/client");
     }
     $fm = new Group_Form_FrmClient();
     $frm = $fm->FrmAddClient($row);
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm_client = $frm;
 }
Exemplo n.º 13
0
 public function indexAction()
 {
     try {
         $db_dept = new Global_Model_DbTable_DbScholarship();
         if ($this->getRequest()->isPost()) {
             $_data = $this->getRequest()->getPost();
             $search = array('title' => $_data['title'], 'note' => $_data['note'], 'type' => $_data['type'], 'status' => $_data['status_search']);
         } else {
             $search = array('title' => '', 'note' => '', 'type' => '', 'status' => -1);
         }
         $db = new Global_Model_DbTable_DbScholarship();
         $rs_rows = $db->getAllScholarship();
         $glClass = new Application_Model_GlobalClass();
         $rs_rows = $glClass->getImgActive($rs_rows, BASE_URL, true);
         $list = new Application_Form_Frmtable();
         $collumns = array("TITLE", "NOTE", "TYPE", "CREATE_DATE", "STATUS", "BY_USER");
         $link = array('module' => 'global', 'controller' => 'scholarship', 'action' => 'edit');
         $this->view->list = $list->getCheckList(0, $collumns, $rs_rows, array('title' => $link));
     } catch (Exception $e) {
         Application_Form_FrmMessage::message("Application Error");
         Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
     }
     $frm = new Global_Form_FrmSearchMajor();
     $frms = $frm->FrmsearchScholarship();
     Application_Model_Decorator::removeAllDecorator($frms);
     $this->view->frm_search = $frms;
 }
Exemplo n.º 14
0
 public function basicAction()
 {
     $pructis = new Salary_Form_FrmSalary();
     $frm = $pructis->addSalary();
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm = $frm;
 }
Exemplo n.º 15
0
 function addProgramTypeAction()
 {
     $item = new Accounting_Form_Frmitem();
     $frm_item = $item->FrmProgramType();
     Application_Model_Decorator::removeAllDecorator($frm_item);
     $this->view->frm_item = $frm_item;
 }
Exemplo n.º 16
0
 public function putAction()
 {
     $pructis = new Keeping_Form_FrmMoney();
     $frm = $pructis->addMoney();
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm = $frm;
 }
Exemplo n.º 17
0
 public function editAction()
 {
     $id = $this->getRequest()->getParam('id');
     $db = new Other_Model_DbTable_DbCommune();
     if ($this->getRequest()->isPost()) {
         $_data = $this->getRequest()->getPost();
         //print_r($_data);exit();
         try {
             $db->addCommune($_data, $id);
             Application_Form_FrmMessage::Sucessfull($this->tr->translate("EDIT_SUCCESS"), self::REDIRECT_URL . '/commune/');
         } catch (Exception $e) {
             Application_Form_FrmMessage::message($this->tr->translate("EDIT_FAIL"));
             $err = $e->getMessage();
             Application_Model_DbTable_DbUserLog::writeMessageError($err);
         }
     }
     $row = $db->getCommuneById($id);
     $this->view->row = $row;
     $fm = new Other_Form_FrmCommune();
     $frm = $fm->FrmAddCommune($row);
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm_commune = $frm;
     $db = new Application_Model_DbTable_DbGlobal();
     $this->view->district = $db->getAllDistricts();
 }
Exemplo n.º 18
0
 public function editAction()
 {
     $id = $this->getRequest()->getParam("id");
     if ($this->getRequest()->isPost()) {
         try {
             $data = $this->getRequest()->getPost();
             $data["id"] = $id;
             $db = new Global_Model_DbTable_DbTeacher();
             $db->updateTeacher($data);
             Application_Form_FrmMessage::Sucessfull("EDIT_SUCCESS", "/global/lecturer");
         } catch (Exception $e) {
             Application_Form_FrmMessage::message("EDIT_FAIL");
             $err = $e->getMessage();
             Application_Model_DbTable_DbUserLog::writeMessageError($err);
         }
     }
     $db = new Global_Model_DbTable_DbTeacher();
     $row = $db->getTeacherById($id);
     $tsub = new Global_Form_FrmTeacher();
     $frm_techer = $tsub->FrmTecher($row);
     Application_Model_Decorator::removeAllDecorator($frm_techer);
     $this->view->frm_techer = $frm_techer;
     $dbs = new Application_Model_GlobalClass();
     $this->view->subject_opt = $dbs->getsunjectOption();
     $this->view->teacher_subject = $db->getallSubjectTeacherById($id);
 }
Exemplo n.º 19
0
 public function put1Action()
 {
     $pructis = new Money_Form_NewPut();
     $frm = $pructis->dakMoney();
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm = $frm;
 }
Exemplo n.º 20
0
 public function addAction()
 {
     $fm = new Accounting_Form_FrmGeneraljurnal();
     $frm = $fm->FrmGeneraljurnal();
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm_fixedasset = $frm;
 }
Exemplo n.º 21
0
 public function addAction()
 {
     if ($this->getRequest()->isPost()) {
         $data = $this->getRequest()->getPost();
         $db = new Menu_Model_DbTable_DbMenuGroup();
         try {
             if (isset($data['btnsave'])) {
                 $db->addMuneGroup($data);
                 Application_Form_FrmMessage::Sucessfull('ការ​បញ្ចូល​​ជោគ​ជ័យ', self::REDIRECT_URL . '/add');
             } else {
                 if (isset($data['btnsaveclose'])) {
                     $db->addMuneGroup($data);
                     Application_Form_FrmMessage::Sucessfull('ការ​បញ្ចូល​​ជោគ​ជ័យ', self::REDIRECT_URL . '/index');
                 }
             }
         } catch (Exception $e) {
             Application_Form_FrmMessage::message("ការ​បញ្ចូល​មិន​ជោគ​ជ័យ");
             $err = $e->getMessage();
             Application_Model_DbTable_DbUserLog::writeMessageError($err);
         }
     }
     $frm = new Menu_Form_FrmMenuGroup();
     $FrmMenu = $frm->FrmMenu();
     Application_Model_Decorator::removeAllDecorator($FrmMenu);
     $this->view->form = $FrmMenu;
 }
Exemplo n.º 22
0
 public function addAction()
 {
     $fm = new Callecterall_Form_Frmrefundcallecterall();
     $frm = $fm->Frmrefundcallecterall();
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->Form_Frmcallecterall = $frm;
 }
Exemplo n.º 23
0
 function indexAction()
 {
     $dbbooking = new Application_Model_DbTable_Dbstuffrental();
     $db_globle = new Application_Model_DbTable_DbGlobal();
     if ($this->getRequest()->isPost()) {
         $post = $this->getRequest()->getPost();
         if (isset($post["term_condiction"])) {
             $dbbooking->createSessionStuffBooking($post, 3);
             //print_r("test");exit();
             $this->_redirect("stuffbooking/index");
         } elseif (isset($post["confirm_book"])) {
             $dbbooking->createSessionStuffBooking($post, 4);
             $this->_redirect("stuffbooking/index");
         }
     }
     $customer_session = new Zend_Session_Namespace('customer');
     $user_session = $customer_session->customer_session;
     if (!empty($user_session)) {
         $customer_user_session = $user_session;
         $customer_user = $customer_session->customer_id;
         $this->view->user_name = $customer_session->customer_name;
         $this->view->user_info = $customer_session->user_info;
     } else {
         $customer_user_session = 0;
     }
     $db = new Application_Model_DbTable_Dbbookingtaxi();
     $session = new Zend_Session_Namespace('stuffbooking');
     $this->view->bookinginfo = $session;
     $this->view->producttermcomdiction = $db_globle->getAllParameter('producttermcomdiction');
     $frmbooks = new Application_Form_FrmBooking();
     $frmbooking = $frmbooks->FromBooking();
     Application_Model_Decorator::removeAllDecorator($frmbooking);
     $this->view->frmbooking = $frmbooking;
     $this->view->user_session = $customer_user_session;
 }
Exemplo n.º 24
0
 function addAction()
 {
     if ($this->getRequest()->isPost()) {
         $_data = $this->getRequest()->getPost();
         try {
             print_r($_data);
             exit;
             // 				$_dbmodel = new Global_Model_DbTable_DbProvince();
             // 				$_dbmodel->addNewProvince($_data);
             // 				Application_Form_FrmMessage::Sucessfull("EDIT_SUCCESS","/global/index/subject-list");
         } catch (Exception $e) {
             // 				Application_Form_FrmMessage::message("INSERT_FAIL");
             // 				$err =$e->getMessage();
             // 				Application_Model_DbTable_DbUserLog::writeMessageError($err);
         }
     }
     // 		$frm = new Loan_Form_FrmLoan();
     // 		$frm_loan=$frm->FrmAddLoan();
     // 		Application_Model_Decorator::removeAllDecorator($frm_loan);
     // 		$this->view->frm_loan = $frm_loan;
     $frm = new Tellerandexchange_Form_Frmteller();
     $frm_teller = $frm->FrmTeller();
     Application_Model_Decorator::removeAllDecorator($frm_teller);
     $this->view->frmteller = $frm_teller;
     $list = new Application_Form_Frmtable();
     $collumns = array("ឈ្មោះមន្ត្រីឥណទាន", "ថ្ងៃបង់ប្រាក់", "ប្រាក់ត្រូវបង់", "ប្រាក់ដើមត្រូវបង់", "អាត្រាការប្រាក់", "ប្រាក់ផាកពិន័យ", "ប្រាក់បានបង់សរុប", "សមតុល្យ", "កំណត់សម្គាល់");
     $link = array('module' => 'group', 'controller' => 'Client', 'action' => 'edit');
     $this->view->list = $list->getCheckList(0, $collumns, array(), array('client_number' => $link, 'name_kh' => $link, 'name_en' => $link));
 }
 public function addAction()
 {
     //$this->_helper->layout()->disableLayout();
     $frm = new inventory_Form_FrmWhereHouse();
     $frm = $frm->FrmWhereHouse();
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->form = $frm;
 }
Exemplo n.º 26
0
 public function addAction()
 {
     $frm = new Registrar_Form_FrmRegister();
     $frm_request = $frm->FrmStudentRequest();
     Application_Model_Decorator::removeAllDecorator($frm_request);
     $this->view->frm_request = $frm_request;
     $key = new Application_Model_DbTable_DbKeycode();
     $this->view->keycode = $key->getKeyCodeMiniInv(TRUE);
 }
Exemplo n.º 27
0
 public function wuReceiptAction()
 {
     $frm = new Registrar_Form_FrmRecept();
     $frm_recept = $frm->FrmRecept();
     Application_Model_Decorator::removeAllDecorator($frm_recept);
     $this->view->frm_recept = $frm_recept;
     //$key = new Application_Model_DbTable_DbKeycode();
     //$this->view->keycode=$key->getKeyCodeMiniInv(TRUE);
 }
Exemplo n.º 28
0
 function addAddAction()
 {
     if ($this->getRequest()->isPost()) {
     }
     $frm = new Loan_Form_FrmLoan();
     $frm_loan = $frm->FrmAddLoan();
     Application_Model_Decorator::removeAllDecorator($frm_loan);
     $this->view->frm_loan = $frm_loan;
 }
Exemplo n.º 29
0
 public function init()
 {
     //user name
     $user_type = new Zend_Form_Element_Text('user_type');
     $user_type->setAttribs(array('id' => 'user_type'));
     $this->addElement($user_type);
     //Main parent of user type
     $db = new Application_Model_DbTable_DbGlobal();
     $rs = $db->getGlobalDb("SELECT ut.user_type_id,ut.user_type FROM rsv_acl_user_type AS ut");
     $options = array();
     foreach ($rs as $read) {
         $options[$read['user_type_id']] = $read['user_type'];
     }
     $user_type_id = new Zend_Form_Element_Select('user_type_id');
     $user_type_id->setMultiOptions($options);
     $this->addElement($user_type_id);
     $rs = $db->getGlobalDb("SELECT acl.acl_id, CONCAT(acl.module,'/', acl.controller,'/', acl.action) AS user_access FROM rsv_acl_acl AS acl");
     $options = array();
     foreach ($rs as $read) {
         $options[$read['acl_id']] = $read['user_access'];
     }
     $user_access_id = new Zend_Form_Element_Select('acl_id');
     $user_access_id->setMultiOptions($options);
     $this->addElement($user_access_id);
     //Project assignment
     //Sophen add here to assign project
     $user_session_id = new Zend_Session_Namespace('auth');
     $id = $user_session_id->user_type_id;
     //echo $user_id;exit;
     $db_user = new Application_Model_DbTable_DbGlobal();
     if ($id == 1) {
         $sql = "select acl.acl_id,CONCAT(acl.module,'/', acl.controller,'/', acl.action) AS user_access from rsv_acl_acl as acl";
     } else {
         $sql = "SELECT acl.acl_id, CONCAT(acl.module,'/', acl.controller,'/', acl.action) AS user_access, acl.status FROM rsv_acl_user_access AS ua \r\n\t\t      INNER JOIN rsv_acl_user_type AS ut ON (ua.user_type_id = ut.parent_id)\r\n\t\t\t  INNER JOIN rsv_acl_acl AS acl ON (acl.acl_id = ua.acl_id) WHERE ut.user_type_id =" . $id;
     }
     //print_r($sql); exit;
     $project = $db_user->getGlobalDb($sql);
     if ($project) {
         $i = 0;
         foreach ($project as $read) {
             //print_r($read);exit;
             $i++;
             $check_fund = new Zend_Form_Element_Checkbox('acl_id_' . $i, array('label' => $read['user_access']));
             $check_fund->setUncheckedValue('')->setCheckedValue($read['acl_id']);
             $this->addElement($check_fund);
         }
         $this->plus = $i;
     }
     //remove decorator
     Application_Model_Decorator::removeAllDecorator($this);
 }
 public function indexAction()
 {
     $formFilter = new Application_Form_Frmsearch();
     $this->view->formFilter = $formFilter;
     Application_Model_Decorator::removeAllDecorator($formFilter);
     $list = new Application_Form_Frmlist();
     $db = new Application_Model_DbTable_DbGlobal();
     // 		$vendor_sql = "SELECT p.order_id, p.order, p.date_order, p.status, v.v_name, p.all_total,u.username
     // 						FROM tb_purchase_order AS p ,
     // 						tb_vendor AS v,rsv_acl_user u
     // 		                WHERE v.vendor_id=p.vendor_id AND u.user_id = p.user_mod ";
     $vendor_sql = "SELECT \n\t\t\t\t\t\t\trecieve_id\n\t\t\t\t\t\t\t,ro.recieve_no\n\t\t\t\t\t\t\t,ro.date_recieve\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t,(SELECT v.v_name FROM tb_vendor AS v WHERE v.vendor_id = ro.vendor_id) AS VendorName\n\t\t\t\t\t\t\t,ro.all_total\n\t\t\t\t\t\t\t,(SELECT u.username FROM rsv_acl_user AS u WHERE u.user_id = ro.user_recieve) AS userName\n\t\t\t\t\t\t\n\t\t\t\t\t\tFROM tb_recieve_order AS ro WHERE is_active=1";
     $user = $this->GetuserInfoAction();
     $str_condition = " AND p.LocationId";
     $vendor_sql .= $db->getAccessPermission($user["level"], $str_condition, $user["location_id"]);
     $this->view->level = $user["level"];
     if ($this->getRequest()->isPost()) {
         $post = $this->getRequest()->getPost();
         //echo $post["order"];
         if ($post['order'] != '') {
             $vendor_sql .= " AND ro.recieve_no LIKE '%" . $post['order'] . "%'";
         }
         if ($post['vendor_name'] != '' and $post['vendor_name'] != 0) {
             $vendor_sql .= " AND ro.user_recieve =" . $post['vendor_name'];
         }
         // 				if($post['phone'] !=''){
         // 					$vendor_sql .= " AND v.phone LIKE '%".$post['phone']."%'";
         // 				}
         // 					if($post['status'] !=''){
         // 						$vendor_sql .= " AND ro.status =".$post['status'];
         // 					}
         $start_date = $post['search_start_date'];
         $end_date = $post['search_end_date'];
         if ($start_date != "" && $end_date != "" && strtotime($end_date) >= strtotime($start_date)) {
             $vendor_sql .= " AND ro.date_recieve BETWEEN '{$start_date}' AND '{$end_date}'";
         }
     }
     //echo $vendor_sql;exit();
     $vendor_sql .= " ORDER BY ro.recieve_no DESC";
     //**************************************
     $rows = $db->getGlobalDb($vendor_sql);
     //print_r($rows);exit();
     $glClass = new Application_Model_GlobalClass();
     //$rows = $glClass->getStatusType($rows, BASE_URL, true);
     $columns = array("PURCHASE_ORDER_CAP", "ORDER_DATE_CAP", "VENDOR_NAME_CAP", "TOTAL_CAP_DOLLAR", strtoupper("BY_USER_CAP"));
     $link = array('module' => 'purchase', 'controller' => 'receive', 'action' => 'detail-purchase-order');
     // url link to update purchase order
     $urlEdit = BASE_URL . "/purchase/index/update-purchase-order-test";
     $this->view->list = $list->getCheckList(1, $columns, $rows, array('order' => $link), $urlEdit);
 }