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


PHP Application_Model_Decorator类代码示例

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


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

示例1: editAction

 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();
 }
开发者ID:samlanh,项目名称:currencyms,代码行数:28,代码来源:VillageController.php

示例2: editAction

 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);
 }
开发者ID:samlanh,项目名称:lnms,代码行数:25,代码来源:GeneraljurnalController.php

示例3: editAction

 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;
 }
开发者ID:samlanh,项目名称:currencyms,代码行数:25,代码来源:WithdrawController.php

示例4: editUserTypeAction

 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');
             }
         }
     }
 }
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:30,代码来源:UserTypeController.php

示例5: editAclAction

 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');
             }
         }
     }
 }
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:31,代码来源:AclController.php

示例6: editAction

 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;
 }
开发者ID:Bornpagna,项目名称:guesehouse,代码行数:25,代码来源:FacultyController.php

示例7: editAction

 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;
 }
开发者ID:samlanh,项目名称:lnms,代码行数:29,代码来源:CallecterallController.php

示例8: indexAction

 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;
 }
开发者ID:samlanh,项目名称:currencyms,代码行数:26,代码来源:SpreadController.php

示例9: editAction

 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;
 }
开发者ID:samlanh,项目名称:lynacr,代码行数:26,代码来源:HolidayController.php

示例10: addAction

 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;
 }
开发者ID:Bornpagna,项目名称:guesehouse,代码行数:35,代码来源:indexController.php

示例11: addAction

 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;
 }
开发者ID:sarankh80,项目名称:restaurant168,代码行数:30,代码来源:itemController.php

示例12: editAction

 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;
 }
开发者ID:samlanh,项目名称:lynacr,代码行数:26,代码来源:ClientController.php

示例13: indexAction

 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;
 }
开发者ID:Bornpagna,项目名称:guesehouse,代码行数:27,代码来源:ScholarshipController.php

示例14: basicAction

 public function basicAction()
 {
     $pructis = new Salary_Form_FrmSalary();
     $frm = $pructis->addSalary();
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm = $frm;
 }
开发者ID:samlanh,项目名称:currencyms,代码行数:7,代码来源:SBorrowController.php

示例15: addProgramTypeAction

 function addProgramTypeAction()
 {
     $item = new Accounting_Form_Frmitem();
     $frm_item = $item->FrmProgramType();
     Application_Model_Decorator::removeAllDecorator($frm_item);
     $this->view->frm_item = $frm_item;
 }
开发者ID:Bornpagna,项目名称:guesehouse,代码行数:7,代码来源:ProgramGepController.php


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