function form_acceso($validar) { if ($validar == "correcto") { $row = datos_usuario($_SESSION['user_cuenta'], $_SESSION['pasword_cuenta']); echo '<br><br><span style="font-size:22px;">BIENVENIDO</span><br><br><span style="font-size:18px;">' . $row["adm_nombre"] . ' ' . $row["adm_apellido"] . '</span>'; } else { echo '<span style="font-size:20px; color:#FFF; margin:10px 0px 10px 0px;">INGRESAR AL ÁREA ADMINISTRATIVA</span>'; if ($validar == "incorrecto") { echo '<span style="font-size:14px; color:#ebff00;"><br />Nombre de usuario o contraseña no válidos.</span>'; } echo '<br /> <form id="form1" name="form1" method="post" action="" style="margin-top:30px;"> Usuario:<br /> <input type="text" name="adm_usuario" required id="text1" autofocus="autofocus" style="text-align:center;" /> <br /><br /> Contraseña:<br /> <input type="password" name="adm_password" required id="password1" style="text-align:center;" /> <br /><br /> <input type="submit" name="button" id="button" value="Ingresar" /> </form>'; if ($validar == "incorrecto") { echo '<span style="font-size:12px">¿No puedes iniciar seción? <a href="rac.php" style="color:##2626FF;">Recuperar contraseña</a></span>'; } } }
// No mostrar los errores de PHP error_reporting(0); // Motrar todos los errores de PHP error_reporting(E_ALL); // Motrar todos los errores de PHP ini_set('error_reporting', E_ALL); /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ session_start(); if (isset($_SESSION['nombre'])) { $nombre = $_SESSION['nombre']; $oid = $_SESSION['id']; list($cedula, $nombre, $unidad, $puesto) = datos_usuario($oid); } else { header("Location: /proyecto-git-php/proyecto-php/index.php"); $nombre = "No has iniciado sesion"; } ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <link rel="stylesheet" type="text/css" href="css/estilo.css" media="screen" /> <link type="text/css" rel="stylesheet" href="css/jquery-ui.css"/> <link rel="stylesheet" type="text/css" href="css/default.css"/> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script type="text/javascript" src="js/jquery-ui.js"></script> <script type="text/javascript" src="js/jquery-ui.min.js"></script>
} } // Mostramos el cuerpo if ($_GET[ticker]) { grafica_ticker($_GET[ticker]); } else { if ($_GET[log]) { if ($_GET[log] != 1) { listado_log($_SESSION[usuario]); } else { fisgon(); } } else { if ($_GET["usuario"] and $_GET["usuario"] != "anonimo") { //echo "usuario"; datos_usuario($_GET["usuario"]); } else { if ($_GET["ordenes"]) { ordenes_en_cola(); } else { listado_quotes(); } } } } echo "<br /><br /><br />"; echo "</div>"; // end div central // Mostramos el menú izquierda echo '<div id="menu-izquierda">'; if ($_SESSION["usuario_id"] != 0) {
<?php require "utilitarios/class.php"; session_start(); if (isset($_POST['submitButton'])) { if (isset($_POST['usuario']) and isset($_POST['password'])) { $existe = login($_POST['usuario'], $_POST['password']); if ($existe != 0 || $existe != null) { $nombre = datos_usuario($existe); $_SESSION['id'] = $existe; $_SESSION['nombre'] = $nombre; header("Location: /proyecto-git-php/proyecto-php/formulario.php"); } else { $error = "Usuario no registrado"; } } else { $error = "No ha ingresado datos"; } } //print("<form id=\"loginForm\" method=\"post\" action=\"login.php\"> \n"); //print("Usuario: <input type=\"text\" name=\"usuario\" id=\"usuario\"><br /><br /> \n"); //print("Password: <input type=\"password\" name=\"password\" id=\"password\"><br /><br /> \n"); //print("<button type=\"submit\" name=\"submitButton\" id=\"submitButton\">Login</button>\n"); //print("</form>\n"); //prueba comentario ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Login</title>