<?php
session_start();
if (!isset($_SESSION["user_id"]) || $_SESSION["user_id"]==null):
    print "<script>alert(\"Acceso Invalido!\");
    window.location='login.php';</script>";
endif;
if ($_SESSION["user_at"] < 4):
    print "<script>alert(\"Sin Acceso a Transaccion!\");
    window.location='vt000.php';</script>";
endif;
include_once ("lib/fpdf/funci.php");
$conex = conectar();
date_default_timezone_set('America/La_Paz');
$xusua = strtoupper($_SESSION["user_id"]);
?>
<html>
<head>
<div class="main-wrapper">
<link href="css/tabla.css" rel="stylesheet" type="text/css" />
<link href="bootstrap/css/bootstrap.css" rel="stylesheet" />
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.9.1.js"></script>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
   <script>
   $(function() {
      $("#fenac").datepicker({
         dateFormat: 'dd-mm-yy'});
      $("#fereg").datepicker({
         dateFormat: 'dd-mm-yy'});
      $("#febaj").datepicker({
         dateFormat: 'dd-mm-yy'});
   });
   </script>
   <script>
   function validanum(e) {
      tecla = (document.all) ? e.keyCode : e.which;
      //Tecla de retroceso para borrar, siempre la permite
      if (tecla==8){
         return true;
      }
      // Patron de entrada, en este caso solo acepta numeros
      patron =/[0-9.]/;
      tecla_final = String.fromCharCode(tecla);
      return patron.test(tecla_final);
   }
   </script>
   <script>
   function validalet(e) {
      tecla = (document.all) ? e.keyCode : e.which;
      //Tecla de retroceso para borrar, siempre la permite
      if (tecla==8){
         return true;
      }
      // Patron de entrada, en este caso solo acepta letras
      patron =/[A-Za-z/ ]/;
      tecla_final = String.fromCharCode(tecla);
      return patron.test(tecla_final);
   }
   </script>
<style type="text/css">   
   .campos{
      border-radius: 5px;
      border: 1px solid #39c;
      text-align: left;
      font-family: Arial;
      font-size: 9pt;
      background-color: #E9E9E9;
   }

   .redondo{
      border-radius: 5px;
      border: 1px solid #39c;
   }

   .select{
      border-radius: 5px;
      border: 1px solid #39c;
   }
</style>
</head>
<body>
   <center><h1>Nuevo Usuario</h1></center>
<form role="form" name="registro" action="php/registro.php" method="post" autocomplete="off">
   <center><table bgcolor= "#E0FFFF" border="1" width="62%" cellpadding="1" cellspacing="1" class="redondo">
   <tr height="50">
      <td>&nbsp;&nbsp;&nbsp;
      <FONT FACE="times new roman"><strong>Usuario</strong></FONT>
      &nbsp;
      <input name="username" autofocus type="text" style="text-align: left" class="campos" size="15" maxlength="15">
      &nbsp;&nbsp;
      <FONT FACE="times new roman"><strong>Nombre Completo</strong></FONT>
      &nbsp;
      <input name="fullname" type="text" style="text-align: left" class="campos" size="40" maxlength="40">
      &nbsp;&nbsp;
      <FONT FACE="times new roman"><strong>Correo</strong></FONT>
      &nbsp;
      <input name="email" type="email" class="campos" size="30" maxlength="30">
      </td>
   </tr>
   <tr height="50">
      <td>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
      <FONT FACE="times new roman"><strong>Contrase&ntilde;a</strong></FONT>
      &nbsp;
      <input name="password" type="password" class="campos" size="25" maxlength="25">
      &nbsp;&nbsp;&nbsp;
      <FONT FACE="times new roman"><strong>Confirmar Contrase&ntilde;a</strong></FONT>
      &nbsp;
      <input name="confirm_password" type="password" class="campos" size="20" maxlength="20">
      </td>
   </tr>
   <tr height="50">
      <td>
      <center><button type="submit" class="btn btn-success">Grabar el Formulario</button>
      &emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
      <a href="vt511.php" class="btn btn-danger">Salir del Formulario</a></center>
      </td>
   </tr>
   </center></table>
</form>
<script src="js/valida_registro.js"></script>
</body>
</html>
