<?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"; $permissao = new Seguranca(); $json = array('url' => '', 'status' => false); if (!empty($_POST['usuario'])) { $obj = new stdClass(); $obj->login = addslashes($_POST['usuario']); $obj->senha = addslashes($_POST['senha']); $login = $permissao->login($obj); if ($login != false) { $json['url'] = 'index.php'; $json['status'] = true; echo json_encode($json); } } else { if ($permissao->login() != true) { header("Location: login.php"); } }
<?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"; $banco = new Conexao(); $permissao = new Seguranca(); if ($permissao->login() != true) { echo "Acesso negado"; exit; } else { $resultado = array(); $resultado['img_atual'] = ""; if (!empty($_POST)) { $poste = $_POST; if (!empty($poste["tabela"])) { $tabela = base64_decode($poste['tabela']); unset($poste["tabela"]); if (isset($poste["img_atual"])) { unset($poste["img_atual"]); } if (!empty($_FILES["foto"]["type"])) { $ext_valida = array("jpeg", "jpg", "png"); $temp = explode(".", $_FILES["foto"]["name"]); $extencao_arquivo = strtolower(end($temp)); if (($_FILES["foto"]["type"] == "image/png" || $_FILES["foto"]["type"] == "image/jpg" || $_FILES["foto"]["type"] == "image/jpeg") && $_FILES["foto"]["size"] < 100000000 && in_array($extencao_arquivo, $ext_valida)) { if ($_FILES["foto"]["error"] > 0) { $resultado['msg'] = "Codigo do erro:" . $_FILES["foto"]["error"];
<?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)) {