Example #1
0
function BILO_block_user()
{
    global $SYS;
    ob_start();
    if (BILO_isLogged()) {
        $u = newObject("user", BILO_uid());
        $u->username = BILO_username();
        $u->clase = "login";
        plantHTML($u, "Public/block_ok_login");
    } else {
        $u = newObject("user");
        debug(BILO_username(), "blue");
        $u->clase = "logoff";
        plantHTML($u, "Public/block_no_login");
    }
    $data = ob_get_contents();
    ob_end_clean();
    return $data;
}
<?php

require_once "JasperReports.php";
$ID = isset($ID) ? $ID : 1;
$ane = newObject("jasperreport", $ID);
formAction("action_save_jasperreport.php", "footer", "editForm");
$ane->boton0 = gfxBotonAction("Guardar", "getElementById('editForm').submit()", True);
plantHTML($ane, "add_jasperreport", array());
formClose();
?>

Example #3
0
<?php

require_once "Biblio.php";
require_once "Lib/lib_tree.php";
$libro = newObject("b_libro", $ID);
//$wRes=new avSelectTree();
/*
$libro->b_categoria_id=$wRes->avSelectPrintTree("b_categoria_id","Biblio","b_categoria","b_cat_padre_id","nombre_cat",$p->b_categoria_padre_id);
*/
//$libro->b_categoria_id=$wRes->avSelectPrintTree("b_categoria_id","Biblio","b_categoria","b_cat_padre_id","nombre_cat",$libro->b_categoria_id);
formAction("action_save_libro.php", "footer", "editForm");
$libro->boton0 = gfxBotonAction("Guardar", "getElementById('editForm').submit()", True);
$c = newObject("b_categoria");
$libro->b_categoria = $libro->get_selected_options("b_categoria");
$d = array("b_categoria" => $c->listAll("nombre_cat"));
plantHTML($libro, "fichalibro", $d);
formClose();
Example #4
0
<?php

require_once "System.php";
plantHTML(array(), "f_menu");
plantHTML(array(), "system_help");
plantHTML(array(), "footer");
?>


<?php

require_once "Articulus.php";
plantHTML($_GET, "menu_cat");
$cat_id = isset($cat_id) ? $cat_id : 1;
setNavVars(array("ID", "cat_id"));
$u = newObject("categoria", $cat_id);
$cat = "Categoria: <b>{$u->nombre}</b><br>";
echo $cat;
$u->searchResults = $u->select("cat_id={$cat_id}", $offset, $sort);
$filas = _affected_rows();
if ($filas > 0) {
    listList($u, array(), "list_cat");
} else {
    echo "No hay subcategorias<br>";
}
$v = newObject("documento");
$v->searchResults = $v->select("cat_id={$cat_id}", $offset, $sort);
$filas = _affected_rows();
if ($filas > 0) {
    listList($v, array(), "list_doc");
} else {
    echo "No hay documentos<br>";
}
if ($u->cat_id > 1) {
    plantHTML($u, "view_cat");
} else {
    plantHTML($u, "menu_todo");
}
<?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";
}
Example #7
0
<?php

require_once "Noticias.php";
$ID = isset($ID) ? $ID : 1;
$n = newObject("notice", $ID);
$n = newObject("notice", $ID);
formAction("action_save_notice.php?ID={$ID}", "footer", "editForm");
$n->boton0 = gfxBotonAction("Guardar", "getElementById('editForm').submit()", True);
$c = newObject("cat_not");
$d = array("id_cat" => $c->listAll("nombre_cat"));
plantHTML($n, 'add', $d);
formClose();
Example #8
0
<?php

require_once "Bilo.php";
$REFERER = empty($REFERER) ? $_SERVER["HTTP_REFERER"] : $REFERER;
plantHTML(array("MSG" => "Identifíquese", "SMSG" => $SYS["MESSAGES"], "REFERER" => $REFERER, "ROOT" => $SYS["ROOT"]), "Public/public_entrada");
Example #9
0
<?php

require_once "Bilo.php";
$p = newObject("user_pref");
$p->getPrefByUser(BILO_uid());
formAction("action_pref_save.php", "footer", "editForm");
$p->boton0 = gfxBotonAction("Guardar", "getElementById('editForm').submit()", True);
$external_data = array();
plantHTML($p, "user_pref", $external_data);
formClose();
Example #10
0
<?php

require_once "Bilo.php";
if (!BILO_isLogged()) {
    plantHTML(array("ROOT" => $SYS["ROOT"], "MSG" => "Entrada al Sistema", "SMSG" => $SYS["MESSAGES"], "REFERER" => $_SERVER["HTTP_REFERER"]), "entrada");
} else {
    PlantHTML(array("location" => $SYS["ROOT"] . "Backend/"), "redirect");
}
Example #11
0
<?php

require_once "GlobalSche/GlobalSche.php";
$ID = isset($ID) ? $ID : 1;
if ($ID > 1) {
    $n = newObject("schedule", $ID);
} else {
    $n = newObject("schedule");
}
$fkeys = array();
formAction("action_save_schedule.php?ID={$ID}", "footer", "editForm");
$n->_boton0 = gfxBotonAction("Guardar", "getElementById('editForm').submit()", True);
plantHTML($n, 'schedule_add', $fkeys);
formClose();
                } else {
                    $q = "CREATE VIEW View_" . strtr($d->nombre, " ", "_") . " AS " . $d->queryb;
                }
                $res = _query($q);
                if ($res) {
                    echo "<div align=\"left\">La consulta {$d->nombre} ha sido promocionada a vista</div><br>";
                } else {
                    echo "<strong>Error</strong>";
                }
                /*
                	$d=newObject("queryb",$ID);
                	if ($d->delete())
                		echo "borrado";
                	else
                		echo "no borrado";*/
                plantHTML(array(), "action_footer");
                frameGo("fbody", "dev.php?command=querybuilder");
                die;
            }
        }
    }
}
echo "<script type=\"text/javascript\" language=\"JavaScript\" src=\"{$SYS["ROOT"]}/Extensions/querybuilder_helper.js\"></script>";
?>
		
<table width="95%" border="0" cellspacing="5" align="center" bgcolor="#eeeeee" style="border : 1px #c6c6c6  outset; -moz-border-radius : 10px;">
<TR><TD align="center" bgcolor="#e6a129">
<h2>Core QUERY BUILDER</h2>
</TD></TR>
<TR><TD>
Example #13
0
    }
}
//-------------------------------------------------------------------------
// Si nos encontramos en 'Informes Jasper -> Informes disponibles' o en 'Informes Jasper -> Gestión' ocultamos el botón desactivar porque no se usará
if ($_SESSION["origin"] == "report" || $_SESSION["origin"] == "jasperreport") {
    $SYS["deactivate_type"] = "hidden";
} else {
    $SYS["deactivate_type"] = "image";
}
// Los botones para borrar y desactivar estarán visibles para los administradores por temas de desarrollo, mientras que para el resto de grupos únicamente el botón para desactivar
if (BILO_checkGroup("Administradores")) {
    // Mostramos el botón para borrar
    $SYS["delete_type"] = "image";
    // Definimos la ruta de los iconos
    $SYS["delete_icon_url"] = $SYS["ROOT"] . "Apps/" . $SYS["PROJECT"] . "/local/Icons/delete.png";
    $SYS["deactivate_icon_url"] = $SYS["ROOT"] . "Apps/" . $SYS["PROJECT"] . "/local/Icons/deactivate.png";
} else {
    // Ocultamos el botón para borrar
    $SYS["delete_type"] = "hidden";
    // Modificamos el icono del botón para desactivar
    $SYS["deactivate_icon_url"] = $SYS["ROOT"] . "Apps/" . $SYS["PROJECT"] . "/local/Icons/delete.png";
}
plantHTML($SYS, "interface");
if (isset($_SESSION["search"])) {
    unset($_SESSION["search"]);
    unset($_SESSION["query"]);
    jsAction("getElementById('search_icon').src='<!-- D:ROOT -->Apps/<!-- D:PROJECT -->/local/Icons/search_enabled.png';");
}
if (isset($_SESSION["master"])) {
    unset($_SESSION["master"]);
}
Example #14
0
<?php

require_once "GlobalSche/GlobalSche.php";
$ID = isset($ID) ? $ID : 1;
if ($ID > 1) {
    $n = newObject("gtask", $ID);
} else {
    $n = newObject("gtask");
}
$fkeys = array("schedule_id" => $n->get_references("schedule_id"));
formAction("action_save_task.php?ID={$ID}", "footer", "editForm");
$n->_boton0 = gfxBotonAction("Guardar", "getElementById('editForm').submit()", True);
plantHTML($n, 'task_add', $fkeys);
formClose();
Example #15
0
$ID = isset($ID) ? $ID : 1;
$max = 4;
$p = newObject("post", $ID);
$origen = $p->traeOrigen();
$url = $p->traeUrl();
echo $SESSION['fecha'];
if ($origen != $url) {
    $p->visitas++;
    $p->save();
}
$f = newObject("foro", $foro_id);
$padre = $ID;
$s = newObject("post", $padre);
$defpost = "Foro: <b><a href=\"index.php\">Foros</a> --> <a href=\"index2.php?foro_id={$foro_id}\">{$f->title}</a> --> {$s->title}</b>";
$p->bread = $defpost;
plantHTML($p, "view");
$u = newObject("post");
setLimitRows($max);
$u->searchResults = $u->select("p_id={$ID}", $offset, $sort);
$filas = _affected_rows();
if ($filas == 0) {
    $offset = 0;
}
setNavVars(array("ID", "foro_id"));
$u->p_id = $ID;
$u->foro_id = $foro_id;
$external_data = array("nuevo3" => 'code#if ($object->fecha >= ' . $_SESSION['fecha'] . ')
		{
		$_SESSION["nuevo"]="verdadero";
		return "N U E V O";}');
listList($u, $external_data, "list_children");
Example #16
0
<?php

require_once "Forus.php";
$ID = isset($ID) ? $ID : 1;
$p = newObject("foro", $ID);
$p->p_id = isset($p_id) ? $p_id : 0;
if ($ID < 2) {
    $p->visitas = 0;
}
formAction("save_foro.php", "footer", "editForm");
$p->boton0 = gfxBotonAction("Guardar", "getElementById('editForm').submit()", True);
plantHTML($p, "foro");
formClose();
Example #17
0
<?php

require_once "GlobalSche/GlobalSche.php";
$ID = isset($ID) ? $ID : 1;
if ($ID > 1) {
    $n = newObject("gstep", $ID);
} else {
    $n = newObject("gstep");
}
$fkeys = array("gtask_id" => $n->get_references("gtask_id"));
//print_r($fkeys);
formAction("action_save_step.php?ID={$ID}", "footer", "editForm");
$n->_boton0 = gfxBotonAction("Guardar", "getElementById('editForm').submit()", True);
plantHTML($n, 'step_add', $fkeys);
formClose();
Example #18
0
<?php

require_once "coreg2.php";
$SYS["PROJECT"] = "Ide";
set_include_dir(dirname(__FILE__) . "/local/Tmpl/-");
set_include_dir(dirname(__FILE__) . "/-");
set_include_dir(dirname(__FILE__) . "/../Framework/Extensions/xajax/-");
plantHTML(array("CODEMIRROR_ROOT" => "{$SYS["ROOT"]}../Framework/Extensions/codemirror/", "ROOT" => "{$SYS["ROOT"]}.."), "Header");
Example #19
0
<?php

require_once "Noticias.php";
$ID = isset($ID) ? $ID : 1;
$n = newObject("notice");
$n->isAdmin = BILO_isAdmin();
if ($ID > 1) {
    $n = newObject("notice", $ID);
    $f = newObject("foto", $n->adjunto);
    $n->id_foto = $f->id_foto;
    $n->id_thumb = $f->id_thumb;
    $n->volver = gfxBotonAction("Volver", "history.go(-1)", True);
    plantHTML($n, 'view_notice');
    $n->visita++;
    $n->fech_ult_consulta = date(time());
    $n->save();
} else {
    echo "<div align=\"center\"><B>ERROR EN LA PÁGINA</B></DIV>";
}
Example #20
0
<?php

require_once "Bilo.php";
plantHTML(array(), "f_menu");
$ID = isset($ID) ? $ID : 1;
$u = newObject("user", $ID);
$u->barcode = sprintf("%4d", $ID + 1000000);
$external_data = array("grupos_nombre" => "fref#user|ID|listGroupsNames");
plantView($u, $external_data, "view_user");
formClose();
require_once "Lib/lib_barcode.php";
HTML("footer");
Example #21
0
<?php

require_once "Reports.php";
$ID = isset($ID) ? $ID : 1;
$u = newObject("report", $ID);
$u->boton1 = gfxBotonAction("<<", "document.location.href=document.location.href+'&ID=" . $u->prevID() . "'", True);
$u->boton2 = gfxBotonAction(">>", "document.location.href=document.location.href+'&ID=" . $u->nextID() . "'", True);
$wRes = new avSelect();
$u->inputQuery = $wRes->avSelectPrint("query_id", "Bilo", "queryb", "nombre", $u->query_id);
formAction("action_save.php", "footer", "editForm");
$u->boton0 = gfxBotonAction("Guardar", "getElementById('editForm').submit()", True);
$external_data = array("tipo" => array("HardCoded" => "HardCoded", "SoftCoded" => "SoftCoded"));
plantHTML($u, "edit", $external_data);
formClose();
//dataDump($_SESSION);
<?php

require_once "JasperReports.php";
$ID = isset($ID) ? $ID : 1;
$ane = newObject("reportparams", $ID);
formAction("action_save_reportparams.php", "footer", "editForm");
$ane->boton0 = gfxBotonAction("Guardar", "getElementById('editForm').submit()", True);
$c = newObject("jasperreport");
$d = array("jasperreport_id" => $c->listAll("reportname"));
plantHTML($ane, "add_reportparams", $d);
formClose();
?>

Example #23
0
			';
                $metadata["menu_entrys_items"] .= '
				<div id="menuEntry' . $v . '_box" class="thook"  style="display : none; position : absolute; z-index : 1;" onclick="flip(\'none\')"><div class="thookreal">';
                foreach ($menu_entry["items"] as $j) {
                    if ($j[3]) {
                        $metadata["menu_entrys_items"] .= '<img src="' . $SYS["ROOT"] . "/Apps/" . $k . "/local/Img/" . $j[3] . ' " align="left" style="margin-top:2px;margin-left:1px;" border="0"/>';
                    } else {
                        $metadata["menu_entrys_items"] .= '<img src="' . $SYS["ROOT"] . '/Backend/local/Img/menu_none.gif" align="left" style="margin-top:2px" border="0"/>';
                    }
                    $metadata["menu_entrys_items"] .= '
				<a href="' . $j[0] . '" target="' . $j[1] . '" class="tlink">&nbsp; ' . _rfixed($j[2]) . '</a><br>';
                }
                $metadata["menu_entrys_items"] .= '</div></div>';
                $TMI++;
            }
        }
        $metadata["total_menu_items"] = $TMI;
        set_include_dir(dirname(__FILE__) . "/local/Tmpl/-");
        plantHTML($metadata, "mainview");
    } else {
        echo "Not found {$petition}";
        header("HTTP/1.0 404 Not Found");
    }
}
/*
echo '<div style="padding:10px;border:1px solid gray">';
dataDump($SYS);
echo "<hr>";
dataDump($_SESSION);
echo '</div>';
*/
<?php

require_once "Noticias.php";
$ID = isset($ID) ? $ID : 1;
if ($ID > 1) {
    $n = newObject("notice", $ID);
} else {
    $n = newObject("notice");
}
formAction("action_save_notice_simple.php?ID={$ID}", "footer", "editForm");
$n->boton0 = gfxBotonAction("Guardar", "getElementById('editForm').submit()", True);
$c = newObject("cat_not");
$d = array("id_cat" => $c->listAll("nombre_cat"));
plantHTML($n, 'add_simple', $d);
formClose();
Example #25
0
$dir->current_inode = $inode;
if (checkReadSecurity($aux)) {
    $dir->searchResults = $dir->select("inode={$inode}", $offset, $sort);
    $safe_list = array();
    do {
        $ele = current($dir->searchResults);
        if (checkReadSecurity($ele)) {
            $safe_list[] = $ele;
        }
    } while (next($dir->searchResults));
    $dir->searchResults = $safe_list;
    if (sizeof($safe_list) < 1 || $safe_list[0] == false) {
        unset($dir->searchResults);
        $dir->searchResults = array();
    }
    formAction("", "", "listForm");
    $SYS["inode"] = $inode;
    plantHTML($SYS, "navigator_top");
    include_once "mime_icons.php";
    listList($dir, array("mime_image" => 'code#return img_icon($object->mime);', "usuario" => 'xref#user|uid|username', "grupo" => 'xref#group|gid|groupname'), "list");
    HTML("navigator_bottom", True);
    formClose();
} else {
    $notification->push(_("Insufficient privileges."), 'horde.error');
    if ($inode != $oldinode) {
        $inode = $oldinode;
    } else {
        $inode = 0;
    }
    require 'list.php';
}
<?php

require_once "Articulus.php";
$cat_id = isset($cat_id) ? $cat_id : 0;
$ID = isset($ID) ? $ID : 1;
if ($ID > 1) {
    $p = newObject("categoria", $ID);
} else {
    $p = newObject("categoria");
}
if ($cat_id > 1) {
    $c = newObject("categoria", $cat_id);
    $cat_pr = $c->cat_pr;
    $p->sub = "Subcategoría para:<b> {$c->nombre} </b>";
}
$p->cat_id = $cat_id;
$p->cat_pr = $cat_pr;
formAction("action_save_categoria.php", "footer", "editForm");
$p->boton0 = gfxBotonAction("Guardar", "getElementById('editForm').submit()", True);
plantHTML($p, "categoria");
formClose();
?>


<?php

require_once "JasperReports.php";
//require_once("modificacion.php");
plantHTML(array(), 'action_header');
$ID = isset($ID) ? $ID : 1;
if ($ID > 1) {
    $mod = newObject("reportparams", $ID);
} else {
    $mod = newObject("reportparams");
}
$mod->setAll($_POST);
$pos = strpos($mod->body, "<br />");
echo $pos;
$mod->resumen = substr($mod->body, 0, $pos);
if ($mod->save()) {
    echo "Informe '{$titulo}' guardado correctamente";
    frameGo("fbody", 'listadoreportparams.php');
} else {
    echo "Error:  {$mod->error}";
}
HTML('action_footer');
Example #28
0
<?php

require_once "Forus.php";
HTML("public-f_menu");
$ID = isset($ID) ? $ID : 1;
$foro_id = isset($foro_id) ? $foro_id : 1;
$p = newObject("post", $ID);
$p->p_id = isset($p_id) ? $p_id : 0;
$p->foro_id = $foro_id;
formAction("action_save.php?ID={$ID}&foro_id={$p->foro_id}", "footer", "editForm");
$p->boton0 = gfxBotonAction("Guardar", "getElementById('editForm').submit()", True);
plantHTML($p, "public-post");
formClose();
?>

Example #29
0
<?php

require_once "Forus.php";
$ID = isset($ID) ? $ID : 1;
$s = newObject("post", $p_id);
$foro_id = isset($foro_id) ? $foro_id : 1;
$p = newObject("post", $ID);
$leido = isset($leido) ? $leido : 1;
$a = newObject("post", $leido);
$p->title = $s->title;
$p->user = BILO_username();
if ($p->title != "") {
    $p->resp = "readonly=\"true\"";
}
$p->p_id = isset($p_id) ? $p_id : 0;
$p->foro_id = $foro_id;
formAction("action_save.php?ID={$ID}&foro_id={$p->foro_id}&leido=", "footer", "editForm");
$p->boton0 = gfxBotonAction("Guardar", "getElementById('editForm').submit()", True);
plantHTML($p, "post");
formClose();
?>

Example #30
0
<?php

require_once "Articulus.php";
$cat_id = isset($cat_id) ? $cat_id : 1;
setNavVars(array("ID", "cat_id"));
if ($cat_id > 1) {
    $u = newObject("categoria", $cat_id);
    $u->MdP(&$u->MDP, $SYS["ROOT"] . "Backend/Articulus/index2.php");
    $u->searchResults = $u->select("cat_id={$cat_id}", $offset, $sort);
    $filas = $u->nRes;
    if ($filas == 0) {
        $u->nohay = "<tr><td align=\"center\"><b>No hay subcategorias</b></td></tr>";
    }
    $u->cat_id = $cat_id;
    plantHTML(array("text" => "Categoria:&nbsp;{$u->nombre}"), "titulo");
    $u->isAdmin = BILO_isAdmin();
    if (BILO_isAdmin()) {
        $u->crea = "<div align=\"center\"><a href=\"nueva_categoria.php?cat_id={$u->cat_id}\" class=\"minibuttonik\">Crear</a></div>";
    }
    listList($u, array(), "list_cat");
}
$v = newObject("documento");
if ($cat_id > 1) {
    $c = newObject("categoria", $cat_id);
    $v->searchResults = $v->select("cat_id={$cat_id}", $offset, $sort);
} else {
    $v->searchResults = $v->selectAll($offset, $sort);
}
$filas = $v->nRes;
if (BILO_isAdmin()) {
    $colspan = 5;