<?php 
require 'logica/usuario.php';
?>

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
	<title>Registro de datos</title>
	<link rel="stylesheet" type="text/css" href="css/estilos.css">
	<script src="https://kit.fontawesome.com/4598dc70bc.js" crossorigin="anonymous"></script>
</head>
<body>
<br>

<div class="form-gruop" id="centro1">
<h5>Registro de datos</h5>
<form action= "logica/registro.php" method="POST">
Guia: 
<input type="text" class="form-control" id="exampleInputEmail1" placeholder="Numero de guia" name="txtguia" autofocus>
Motivo:
<SELECT class="form-control" name="cmbmotivo">
<option value="Pendiente">Pendiente</option>
<option value="Diferencias">Diferencias</option>
<option value="Devoluciones">Devoluciones</option>
<option value="Retenido">Retenido</option>
</SELECT>
<br>
<button type="submit" value="Registrar" name="btnregistrar" class="btn btn-primary"><i class="fas fa-plus"></i> Registrar</button>

</form>
</div>


<center>
<!–- FORMATO PARA TABLA DE DATOS -–>
<div class="center-block2">
	<table class="table table-bordered">
		<tr>
			<td>ID</td>
			<td>Guia</td>
			<td>Fecha</td>
            <td>Motivo</td>	
			<td>Usuario</td>
		</tr>

		<?php 
		$sql="SELECT * from bitacora";
		$result=mysqli_query($conexion,$sql);

		while($mostrar=mysqli_fetch_array($result)){
		 ?>

		<tr>
			<td><?php echo $mostrar['id'] ?></td>
			<td><?php echo $mostrar['guia'] ?></td>
			<td><?php echo $mostrar['fecha'] ?></td>
            <td><?php echo $mostrar['motivo'] ?></td>
			<td><?php echo $mostrar['usuario'] ?></td>
		</tr>
	<?php 
	}
	 ?>
	</table>
	</div>
	</center>
	
</body>
</html>