<?php 
session_start();
if ($_SESSION['login']) {header("Location: menu-matriz.php");}
require_once('utilesphp/sql_oop.php'); //conexion a base de datos
include('utilesphp/utiles.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="css/estilos.css">
<title><?php echo $titulopagina; ?></title>
</head>
<script language="javascript">
function runScript(e) {
    if (e.keyCode == 13) {
        document.forms.form.submit();
    }
}

</script>
<body>
<div class="div_caja_titulo">Ingreso al sistema de gesti&oacute;n</div>
<div style="position:fixed; left: 40px; top:10px"><img src="grafica/logo.png" /></div>

<div style="margin-left:40%;margin-top:30px;">
	<form method="post" action="validausuario.php" name="form">
	<div class="floatLeft" style="width:150px; margin-right:10px; text-align:right" >Nombre de usuario</div>
    <div class="floatLeft"><input name='usr' value="" type="text" onkeypress="runScript2(event)"/></div>
    <div class="clear"></div>
	<div class="floatLeft" style="width:150px; margin-top:10px; margin-right:10px; text-align:right">Contrase&ntilde;a</div>
    <div class="floatLeft" style="margin-top:10px"><input name='psw' value="" type="password" onkeypress="runScript(event)"/></div>
    <div class="clear"></div>
    <div style="margin-left:70px; color:red; margin-top:10px"><?php echo $_SESSION['mensaje']; ?></div>
    <div style="margin-left:100px;width:60px; margin-top:10px"><a href="javascript:form.submit();" class="n_link_basico bold">Ingresar</a></div>
    </form>
</div>
</body>
</html>