예제 #1
0
 public function addNewcommuneAction()
 {
     if ($this->getRequest()->isPost()) {
         $data = $this->getRequest()->getPost();
         $data['status'] = 1;
         $db_com = new Other_Model_DbTable_DbCommune();
         $id = $db_com->addCommune($data);
         print_r(Zend_Json::encode($id));
         exit;
     }
 }
예제 #2
0
 function insertcommuneAction()
 {
     //At callecteral when click client
     if ($this->getRequest()->isPost()) {
         $data = $this->getRequest()->getPost();
         $db_commune = new Other_Model_DbTable_DbCommune();
         $commune = $db_commune->addCommunebyAJAX($data);
         print_r(Zend_Json::encode($commune));
         exit;
     }
 }
예제 #3
0
      function getCommuneAction(){
		if($this->getRequest()->isPost()){
			$data = $this->getRequest()->getPost();
			$db = new Other_Model_DbTable_DbCommune();
			$rows = $db->getCommuneBydistrict($data['district_id']);
			array_unshift($rows, array ( 'id' => -1, 'name' => 'បន្ថែម​អ្នក​ទទួល​ថ្មី') );
			print_r(Zend_Json::encode($rows));
			exit();
		}
	}