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; } }
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; } }
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(); } }