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;
}
Example #2
0
<?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;
}