public function indexAction()
 {
     try {
         $db = new Other_Model_DbTable_DbVillage();
         if ($this->getRequest()->isPost()) {
             $search = $this->getRequest()->getPost();
         } else {
             $search = array('adv_search' => '', 'status' => -1);
         }
         $rs_rows = $db->getAllVillage($search);
         $glClass = new Application_Model_GlobalClass();
         $rs_rows = $glClass->getImgActive($rs_rows, BASE_URL, true, null, 1);
         $list = new Application_Form_Frmtable();
         $collumns = array("Villagename Kh", "Village Name", "Display By", "Commenu Name", "Date", "Status", "By");
         $link = array('module' => 'other', 'controller' => 'Village', 'action' => 'edit');
         $this->view->list = $list->getCheckList(0, $collumns, $rs_rows, array('village_name' => $link, 'commune_name' => $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;
 }
Beispiel #2
0
	public function indexAction(){
		try{
			$db = new Other_Model_DbTable_DbVillage();
			if($this->getRequest()->isPost()){
				$search=$this->getRequest()->getPost();
			}
			else{
				$search = array(
						'adv_search' => '',
						'search_status' => -1,
						'province_name'=>0,
						'district_name'=>'',
						'commune_name'=>'');
			}
			$rs_rows= $db->getAllVillage($search);
			$glClass = new Application_Model_GlobalClass();
			$rs_rows = $glClass->getImgActive($rs_rows, BASE_URL, true,null,1);
			$list = new Application_Form_Frmtable();
			$collumns = array("VILLAGENAME_KH","VILLAGE_NAME","DISPLAY_BY","COMMNUE_NAME","DISTRICT_NAME","PROVINCE_NAME","DATE","STATUS","BY");
			$link=array(
					'module'=>'other','controller'=>'Village','action'=>'edit',
			);
			$this->view->list=$list->getCheckList(0, $collumns, $rs_rows,array('village_name'=>$link,'village_namekh'=>$link));
		}catch (Exception $e){
			Application_Form_FrmMessage::message("Application Error");
			echo $e->getMessage();
			Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
		}
		$frm = new Other_Form_FrmVillage();
		$frm = $frm->FrmAddVillage();
		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();
		$this->view->result = $search;
	}