Exemple #1
0
<?php

include "../config.php";
include "../s_lib/conexao.class.php";
include "../s_lib/aes.class.php";
include "../s_lib/aesctr.class.php";
include "../s_lib/seguranca.class.php";
include "../s_lib/funcoes_basicas.php";
include "../s_lib/wgform.class.php";
$permissao = new Seguranca();
$ac = $permissao->login();
if ($ac != true) {
    header("Location: login.php");
    exit;
} else {
    $dados = $permissao->decodifica($ac);
    $u = json_decode($dados);
    define('NOME_USUARIO', $u->n);
    define('NIVEL_USUARIO', $u->a);
}
$dir_pag = 'paginas/';
$p = addslashes(isset($_GET["pagina"])) ? $_GET["pagina"] : "erro";
$sidebar = true;
if ($p == 'cotacao') {
    $sidebar = false;
}
$nomes_menu = array();
$filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'paginas/';
chdir($filename);
foreach (glob("*.php", GLOB_BRACE) as $arquivo) {
    if (is_readable($arquivo)) {