Example #1
0
function FORUS_block_forus()
{
    global $SYS;
    $c = newObject("categoria");
    $c->searchResults = $c->select("nombre='faqs'", $offset, $sort);
    if ($c->nRes > 0) {
        $faq = $c->searchResults[0]->ID;
    }
    if (BILO_isLogged()) {
        $clase = "login";
    } else {
        $clase = "logoff";
    }
    return "<table  border=\"0\"  width=\"127\" cellspacing=\"0\" class=\"block\"><tr><th class=\"{$clase}\">Soporte Linux\n\t</td></tr><tr><td class=\"boton\"><a style=\"text-decoration:none;\" href=\"{$SYS["ROOT"]}/Forus/Lista_Foros/\">Foros</a></td></tr><td class=\"boton\"><a style=\"text-decoration:none;\" href=\"{$SYS["ROOT"]}/Articulus/Lista/cat_id={$faq}/\">Faqs</a></td></tr></table>";
}
Example #2
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;
}
Example #3
0
MODULE
APP
ACTION
************************/
require_once "coreg2.php";
set_include_dir(dirname(__FILE__) . "/local/Tmpl/-");
require_once "Bilo/API_exports.php";
set_include_dir(dirname(__FILE__) . "/Bilo/-");
require_once "Lib/lib_session.php";
setLimitRows(20);
$up = newobject("user_pref");
$up->getPrefByUser(BILO_uid());
$up->setPrefs();
if (!$isLoginScreen && !$SYS["GLOBAL"]["void_login"]) {
    if (BILO_isLogged() == false) {
        PlantHTML(array("location" => $SYS["ROOT"] . "/Login/login.php"), "opener");
        die;
    } else {
        if (BILO_isOperator() || BILO_isAdmin()) {
            echo '';
        } else {
            PlantHTML(array("location" => $SYS["ROOT"] . "/Login/login.php"), "opener");
            die;
        }
    }
}
if (!BILO_isAdmin() && !BILo_isOperator()) {
    die(_("Sin privilegios"));
}
$EURI = explode("/", $petition);
<?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 #5
0
function BILO_logout()
{
    if (BILO_isLogged()) {
        $user = newObject("user", BILO_uid());
        $reg = newObject("registro");
        $reg->user_id = $user->ID;
        $reg->dia = dateTodayStamp();
        if ($_POST["mov"] == "entrada") {
            $reg->entrada_m = time();
        } else {
            if ($_POST["mov"] == "salida") {
                $reg->salida_m = time();
            } else {
                $reg->salida_m = time();
            }
        }
        if ($reg->save()) {
            echo _("Salida correcta");
            unset($_SESSION["__auth"]["username"]);
            unset($_SESSION["__auth"]["uid"]);
            session_unset();
            session_destroy();
            return true;
        } else {
            echo _("Error");
            return false;
        }
    }
    echo _("No autentificado");
    return false;
}
Example #6
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");
}