/** * @AjaxCallable=TRUE * @AjaxMethod=POST * @AjaxAsync=TRUE */ function get_add_poi_dialog() { $this->load->model('POITypeModel'); $sLatLng = filter_input(INPUT_POST, 'latLng', FILTER_VALIDATE_FLOAT, FILTER_REQUIRE_ARRAY); $cat = filter_input(INPUT_POST, 'cat', FILTER_SANITIZE_STRING); $sub = filter_input(INPUT_POST, 'sub', FILTER_SANITIZE_STRING); $latLng = LatLng::deserialize($sLatLng); $cats = POITypeModel::loadCats(); $subs = POITypeModel::loadSubs($cat); $countries = POIModel::find_countries($latLng); $nearbys = POIModel::find_nearby($latLng); $this->assign('id', NULL); $this->assign('latLng', $latLng); $this->assign('boundary', NULL); $this->assign('cat', $cat); $this->assign('sub', $sub); $this->assign('countryId', 0); $this->assign('nearbyId', 0); $this->assign('name', ''); $this->assign('label', ''); $this->assign('ft', NULL); $this->assign('cats', $cats); $this->assign('subs', $subs); $this->assign('countries', $countries); $this->assign('nearbys', $nearbys); return $this->load->view('/admin/add_poi_dialog', false); }