Example #1
0
if ($_REQUEST["cmd"] == "guardar") {
    $oferta = new Oferta_educativa();
    //    $oferta->set_debug_mode();debug($_REQUEST);
    if ($oferta->agregaOferta($_REQUEST)) {
        $oferta->response_json_prt($oferta->get_respuesta());
    } else {
        $oferta->response_json_prt("error");
    }
    exit;
}
if ($_REQUEST[$_REQUEST["ids"] . "_!nativeeditor_status"] == "deleted") {
    $oferta = new Oferta_educativa();
    //    $galeria->set_debug_mode();debug($_REQUEST);
    if ($oferta->eliminaOferta($_REQUEST["ids"])) {
        $oferta->response_xml_prt();
    } else {
        $oferta->response_xml("error", "error");
    }
    //    if($galeria->elimina($_REQUEST[""]))
    exit;
}
if ($_REQUEST[$_REQUEST["ids"] . "_!nativeeditor_status"] == "updated") {
    $oferta = new Oferta_educativa();
    //    $oferta->set_debug_mode();debug($_REQUEST);
    if ($oferta->actualiza_titulo($_REQUEST["ids"], $_REQUEST)) {
        $oferta->response_xml_prt();
    } else {
        $oferta->response_xml_prt("error", "error");
    }
    exit;
}