Exemplo n.º 1
0
 public function indexAction()
 {
     try {
         $db = new Group_Model_DbTable_DbClient();
         if ($this->getRequest()->isPost()) {
             $search = $this->getRequest()->getPost();
         } else {
             $search = array('adv_search' => '', 'status' => -1);
         }
         $rs_rows = $db->getAllClients($search);
         $glClass = new Application_Model_GlobalClass();
         $rs_rows = $glClass->getImgActive($rs_rows, BASE_URL, true);
         $list = new Application_Form_Frmtable();
         $collumns = array("Client N.", "NAME_EN", "Name Eng", "Sex", "Phone", "House", "Street", "Village", "Spouse Name", "By", "status");
         $link = array('module' => 'group', 'controller' => 'client', 'action' => 'edit');
         $this->view->list = $list->getCheckList(0, $collumns, $rs_rows, array('client_number' => $link, 'name_kh' => $link, 'name_en' => $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.º 2
0
	public function indexAction(){
		try{
			$db = new Group_Model_DbTable_DbClient();
			if($this->getRequest()->isPost()){
				$search=$this->getRequest()->getPost();
			}
			else{
				$search = array(
						'adv_search' => '',
						'status' => -1);
			}
			$rs_rows= $db->getAllClients($search);
			$result = array();
			foreach ($rs_rows as $key =>$rs){
				$result[$key]=array(
						'client_id'=>$rs['client_id'],
						'client_number'=>$rs['client_number'],
						'name_kh'=>$rs['name_kh'],
						'name_en'=>$rs['name_en'],
						'sex'=>$this->sex[$rs['sex']],
						'phone'=>$rs['phone'],
						'house'=>$rs['house'],
						'street'=>$rs['street'],
						'village_name'=>$rs['village_name'],
						'spouse_name'=>$rs['spouse_name'],
						'user_name'=>$rs['user_name'],
						'status'=>$rs['status'],
						);
			}
			$glClass = new Application_Model_GlobalClass();
			$rs_rows = $glClass->getImgActive($result, BASE_URL, true);
			$list = new Application_Form_Frmtable();
			$collumns = array("Client No","Client ID","Client Name(Kh)","Release Amount","Method","Time Collection","Zone","CO Name",
				"By","status");
			$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));
		}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.º 3
0
 public function indexAction()
 {
     try {
         $db = new Group_Model_DbTable_DbClient();
         if ($this->getRequest()->isPost()) {
             $formdata = $this->getRequest()->getPost();
             $search = array('title' => $formdata['title'], 'status_search' => $formdata['status_search']);
         } else {
             $search = array('title' => '', 'status_search' => -1);
         }
         $rs_rows = $db->getAllClients($search);
         $list = new Application_Form_Frmtable();
         $collumns = array("Agent'st ID", "First Name", "Last Name", "Sex", "DOB", "Tel", "POB", "Nationality", "Company Name", "Group No", "Home No", "commune", "District", "Province");
         $link = array('module' => 'group', 'controller' => 'index', 'action' => 'edit');
         $this->view->list = $list->getCheckList(0, $collumns, $rs_rows, array('customer_code' => $link, 'first_name' => $link, 'last_name' => $link, 'sex' => $link, 'dob' => $link));
     } catch (Exception $e) {
         Application_Form_FrmMessage::message("Application Error");
         Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
     }
     $frm = new Location_Form_FrmSearch();
     $frm = $frm->search();
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm_search = $frm;
 }
Exemplo n.º 4
0
	public function indexAction(){
		try{
			$db = new Group_Model_DbTable_DbClient();
			if($this->getRequest()->isPost()){
				$formdata=$this->getRequest()->getPost();
				$search = array(
						'adv_search' => $formdata['adv_search'],
						'province_id'=>$formdata['province'],
						'comm_id'=>$formdata['commune'],
						'district_id'=>$formdata['district'],
						'village'=>$formdata['village'],
						'status'=>$formdata['status'],
						'start_date'=> $formdata['start_date'],
						'end_date'=>$formdata['end_date']
						);
			}
			else{
				$search = array(
						'adv_search' => '',
						'status' => -1,
						'province_id'=>0,
						'district_id'=>'',
						'comm_id'=>'',
						'village'=>'',
						'start_date'=> date('Y-m-d'),
						'end_date'=>date('Y-m-d'));
			}
			
			$rs_rows= $db->getAllClients($search);
			$glClass = new Application_Model_GlobalClass();
			$rs_rows = $glClass->getImgActive($rs_rows, BASE_URL, true);
			$list = new Application_Form_Frmtable();
			$collumns = array("BRANCH_NAME","CUSTOMER_CODE","CLIENTNAME_KH","CLIENTNAME_EN","SEX","PHONE","HOUSE","STREET","VILLAGE","SPOUSE_NAME",
					"DATE","BY_USER","STATUS");
			$link=array(
					'module'=>'group','controller'=>'index','action'=>'edit',
			);
			$link1=array(
					'module'=>'group','controller'=>'index','action'=>'view',
			);
			$this->view->list=$list->getCheckList(0, $collumns, $rs_rows,array('branch_name'=>$link1,'client_number'=>$link,'name_kh'=>$link,'name_en'=>$link));
		}catch (Exception $e){
			Application_Form_FrmMessage::message("Application Error");
			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;
		
		$fm = new Group_Form_FrmClient();
		$frm = $fm->FrmAddClient();
		Application_Model_Decorator::removeAllDecorator($frm);
		$this->view->frm_client = $frm;
		$db= new Application_Model_DbTable_DbGlobal();
		$this->view->district = $db->getAllDistricts();
		$this->view->commune_name = $db->getCommune();
		$this->view->village_name = $db->getVillage();
		
		$this->view->result=$search;	
	}