Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
- header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Fecha en el pasado
- require("config_claro.php");
- $ip = $_SERVER["REMOTE_ADDR"];
- $int=0;
- $consul="select ipnro,count(*) from ip group by ipnro having ipnro = '$ip'";
- $resul=mysql_query($consul, $con);
- $f=mysql_fetch_array($resul);
- $int=$f[1];
- if($int>2)
- {
- $err=4;
- }
- ?>
- <html>
- <head>
- <meta http-equiv="Content-Language" content="es">
- <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
- <title>SGA-DAC : Inicio de Sesión</title>
- <link rel="stylesheet" href="css/aqua.css" type="text/css" media="screen">
- <script type="text/javascript" src="js/estilo.js"></script>
- <script type="text/javascript">
- function Validar(frm)
- {
- if(frm.codigo.value=="")
- {
- alert("Ingrese su código de usuario");
- frm.codigo.focus();
- return false;
- }
- if(frm.clave.value=="")
- {
- alert("Ingrese su contraseña");
- frm.clave.focus();
- return false;
- }
- return true;
- }
- function Enviar(frm)
- {
- if(Validar(frm))
- {
- frm.submit();
- }
- }
- </script>
- </head>
- <body onload="javascript:frmLogin.codigo.focus();" onmousemove="javascript:BotonEncima();" onmouseout="javascript:BotonFuera();" topmargin='10px' leftmargin='10px'>
- <br>
- <br>
- <?php
- if($err>3)
- {
- $abc="disabled";
- }
- else
- {
- $abc="";
- }
- ?>
- <br>
- <form name="frmLogin" method="POST" action="sys_validar_usuario.php" enctype="multipart/form-data">
- <input type='hidden' name='uid' value=''>
- <input type='hidden' name='sid' value=''>
- <input type='hidden' name='idt' value=''>
- <input type='hidden' name='listo' value='no'>
- <?php
- /*
- <p align='center' style='margin:5px'>
- <img src='images/logo002.jpg' border='0'>
- </p>
- */
- ?>
- <div align="center">
- <table border="0" cellpadding="2" cellspacing="0" width="400" style="border: 1 inset">
- <tr>
- <td colspan="3" align="center" class='tthb' style='font-weight:bold'>
- Inicio de Sesión:
- </td>
- </tr>
- <?php
- if($err>0)
- {
- switch($err)
- {
- case 1:
- $mensaje= "Datos incorrectos: Nombre de usuario ó contraseña no existe.";
- break;
- case 2:
- $mensaje= "No se ha asignado ningún punto de venta al usuario, requiere por lo menos uno.";
- break;
- case 3:
- $mensaje= "Los datos ingresados son correctos pero el usuario se encuentra temporalmente inactivo en el sistema.";
- break;
- case 4:
- $mensaje= "Se ha bloqueado su conexion y se ha enviado un reporte del suceso a info@sistemaclaro.com .Si quiere activar nuevamente su usuario escriba al administrador del sistema.";
- break; }
- echo "<tr>
- <td colspan='3' height='80' bgcolor='#FFFFFF'>
- <h4 align='center'><font color='#CC0000'>Acceso denegado!</font></h4>
- <p align='justify' style='padding:1;margin:1'>
- <img src='images/msg_adv.gif' border='0' align='left' style='margin-right:10px;margin-left:5px'>
- $mensaje<br>
- Para mayor información consulte al administrador del sistema. gracias.
- </p>
- </td>
- </tr>";
- }
- ?>
- <tr>
- <td colspan="3"> </td>
- </tr>
- <tr>
- <td width="40"> </td>
- <td width="156">Código de usuario:</td>
- <td width="188"><input type="text" name="codigo" size="26" style="width: 150px" <?php echo "$abc"?>></td>
- </tr>
- <tr>
- <td width="40"> </td>
- <td width="156">Contraseña:</td>
- <td width="188"><input type="password" name="clave" size="26" style="width: 150px" <?php echo "$abc"?>></td>
- </tr>
- <tr>
- <td colspan="3"> </td>
- </tr>
- </table>
- </div>
- <p align="center">
- <?php
- //<input type="button" class="boton" value="Iniciar Sesión" onclick="javascript:Enviar(frmLogin);">
- ?>
- <input type="submit" class="boton" value="Iniciar Sesión" <?php echo "$abc"?>>
- <input type="reset" class="boton" value="Restablecer" <?php echo "$abc"?>>
- <br>
- <br>
- <br>
- <br>
- <font color='#999999'>NUEVO SISTEMA DAC MELQUI 2013 - VERSION PRUEBA</font>
- <br>
- <font color='#CC0000'><b>Importaciones y Comunicaciones MELQUI EIRL</b></font>
- <br>
- </p>
- </form>
- <form><input type="hidden" name="marca" value="WebSolutionsPeru"></form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement