
<?php include_once "encabezado1.php"; ?>

<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Inventario de Almacén 📦</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
    <style>
    body {
            font-family: 'Poppins', sans-serif;
            background: url('desk.jpg') no-repeat center center fixed;
            background-size: cover;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            color: #333;
        }
        .container {
            margin-top: 50px;
        }
        h1 {
            font-size: 2.5rem;
            color: #007bff;
            text-align: center;
            margin-bottom: 20px;
        }
        .table {
            background: rgba(255, 255, 255, 0.9);
            border-radius: 8px;
            overflow: hidden;
        }
        thead {
            background-color: #17a2b8;
            color: white;
            text-align: center;
        }
        tbody tr:hover {
            background-color: rgba(23, 162, 184, 0.1);
            transition: background-color 0.3s ease;
        }
        .table-info {
            background-color: #007bff;
        }
        td, th {
            text-align: center;
            vertical-align: middle;
        }
        .animated-icon {
            font-size: 1.2rem;
            color: #007bff;
            animation: bounce 1.5s infinite;
        }
        @keyframes bounce {
            0%, 100% {
                transform: translateY(0);
            }
            50% {
                transform: translateY(-5px);
            }
        }
    </style>
</head>
<body>
<div class="container">
    <h1><i class="fas fa-boxes animated-icon"></i> Inventario de Almacén</h1>
    <div class="table-responsive">
        <?php
        date_default_timezone_set("America/Lima"); 
        include 'conexion1.php';
        $conectar = mysqli_connect($servidor, $nombre, $clave, $base);
        $sql = "SELECT * from almacen";
        $result = mysqli_query($conectar, $sql);
        ?>
        <table class="table table-striped table-hover">
            <thead class="table-info">
                <tr>
                    <th>ID 🔢</th>
                    <th>Fecha de Registro 📅</th>
                    <th>Hora de Registro 🕒</th>
                    <th>Código 🧾</th>
                    <th>Medida 📏</th>
                    <th>Stock 📦</th>
                    <th>Descripción 📝</th>
                </tr>
            </thead>
            <tbody>
                <?php while($mostrar = mysqli_fetch_array($result)) { ?>
                    <tr>
                        <td><?php echo $mostrar["ID"]; ?></td>
                        <td><?php echo $mostrar["FECHA_REGISTRO"]; ?></td>
                        <td><?php echo $mostrar["HORA_REGISTRO"]; ?></td>
                        <td><?php echo $mostrar["CODIGO"]; ?></td>
                        <td><?php echo $mostrar["MEDIDA"]; ?></td>
                        <td><?php echo $mostrar["STOCK"]; ?></td>
                        <td><?php echo $mostrar["DESCRIPCION"]; ?></td>
                    </tr>
                <?php } ?>
            </tbody>
        </table>
    </div>
</div>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
</body>
</html>


