campo); echo json_encode($datos, JSON_UNESCAPED_UNICODE); } public function ajaxValidarFechas() { $datos = FechasController::ctrValidarFechas($this->id_persona, $this->campoFecha, $this->campoLugar, $this->valorFecha, $this->valorLugar); header('Content-Type: application/json; charset=utf-8'); echo json_encode($datos, JSON_UNESCAPED_UNICODE); } } if (isset($_POST['campo'])) { $resultado = new ajaxFechas(); $resultado->campo = $_POST['campo']; $resultado->ajaxLOV(); } if (isset($_POST['accion']) && $_POST['accion'] == "VALIDAR-CUPO") { $registros = new ajaxFechas(); $registros->id_persona = $_POST['id_persona']; $registros->campoFecha = $_POST['campoFecha']; $registros->campoLugar = $_POST['campoLugar']; $registros->valorFecha = $_POST['valorFecha']; $registros->valorLugar = $_POST['valorLugar']; $registros->ajaxValidarFechas(); }