<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/includes/autoload.php"; if ($_REQUEST["cmd"] == "consulta_info") { $oferta = new Oferta_educativa_info($_REQUEST["id_oferta"]); // $info_sitio->set_debug_mode(); $oferta->get_campos_json_prt("oed_id,oed_nombre,oed_descripcion"); exit; } if ($_REQUEST["cmd"] == "update_oferta_educativa") { $oferta_educativa = new Oferta_educativa(); // $oferta_educativa->set_debug_mode();debug($_REQUEST); if ($oferta_educativa->actualizaOferta($_REQUEST["id_oferta"], $_REQUEST["html"])) { $oferta_educativa->response_json_prt("ok"); } elseif ($oferta_educativa->_error) { $oferta_educativa->response_json_prt($info_sitio->_error); } else { $oferta_educativa->response_json_prt("error"); } exit; }