<?php

require_once "Articulus.php";
require_once "Lib/lib_tree.php";
require_once "Memo/Memo.php";
/* Filehelper */
if (BILO_isLogged()) {
    $ID = isset($ID) ? $ID : 1;
    $p = newObject("documento", $ID);
    $p->cat_id = isset($cat_id) ? $cat_id : 1;
    if ($p->cat_id > 1) {
        $cat = newObject("categoria", $cat_id);
        $p->cat_pr = $cat->cat_or;
    }
    formAction("action_save_documento.php", "footer", "editForm");
    $wRes = new avSelectTree();
    $p->categoria = $wRes->avSelectPrintTree("cat_id", "Articulus", "categoria", "cat_id", "nombre", $p->cat_pr);
    $p->filehelper = $SYS["ROOT"] . "Backend/Memo/action_fileselector.php";
    $p->boton0 = gfxBotonAction("Guardar", "getElementById('editForm').submit()", True);
    $p->boton1 = gfxBotonAction("Volver", "history.go(-1)", True);
    $c = newObject("categoria");
    if ($ID < 2) {
        $p->autor = BILO_username();
    }
    plantHTML($p, "documento", array("cat_id" => $c->ListCat()));
    formClose();
} else {
    echo "No esta logueado";
}
Exemple #2
0
<?php

require_once "Biblio.php";
require_once "Lib/lib_tree.php";
$c = newObject("b_categoria", $ID);
formAction("action_save_cat.php", "footer", "editForm");
$c->boton0 = gfxBotonAction("Guardar", "getElementById('editForm').submit()", True);
$e = newObject("b_categoria");
$d = array("b_cat_padre_id" => $e->listAll("nombre_cat"));
// --
$wRes = new avSelectTree();
$c->b_cat_padre_id = $wRes->avSelectPrintTree("b_cat_padre_id", "Biblio", "b_categoria", "b_cat_padre_id", "nombre_cat", $c->b_cat_padre_id);
// --
//plantHTML($c,'add_cat',$d);
plantHTML($c, 'add_cat', array());
formClose();