<?php

header("Content-Type: text/html; charset=utf-");
session_start();
 
$ahora = time();
if($ahora > $_SESSION['expiracion']){
    session_destroy();
    header("Location: /inventario/index.php");
}

if(isset($_POST['select_empresas'])){
   $_SESSION['empresa'] = $_POST['select_empresas'];
}
if(isset($_SESSION['empresa'])){
  $empresa = $_SESSION['empresa'];
}
else{
    header("Location: /inventario/index.php");
    exit("Hubo un error");
}


?>

<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Panel</title>
    <link rel="icon" href="/inventario/dist/img/favicon-32x32.png" sizes="32x32">
    <link rel="icon" href="/inventario/dist/img/favicon-96x96.png" sizes="96x96">
    <link rel="preconnect" href="https://fonts.gstatic.com">
    <link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@400;600&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="/inventario/dist/css/all.min.css">
    <link rel="stylesheet" href="/inventario/dist/css/normalize.css">
    <link rel="stylesheet" href="/inventario/dist/css/styles.css">

    <!-- Bootstrapp -->
     <link rel="stylesheet" href="/inventario/dist/css/bootstrap.min.css"> 
   
    <!-- Sweet Alert -->
    <script src="/inventario/dist/js/sweetalert2.min.js"></script>
     <link rel="stylesheet" href="/inventario/dist/css/sweetalert2.min.css">
     <!--Datatables -->
     <link rel="stylesheet" href="/inventario/dist/css/datatable.css">

    <!-- Jquery -->
    <script src="/inventario/dist/js/jquery.js"></script>

    <!-- JQuery UI -->
    <link rel="stylesheet" href="/inventario/dist/css/jquery_ui.css">
    <script src="/inventario/dist/js/jquery_ui.js"></script>

    
</head>
<body>    
      <input type="checkbox" id="check">   
    <header class="header-panel">  
        <label for="check">
           <i class="fas fa-bars" id="sidebar_btn"></i>
        </label>  
        <div class="barra-panel">  
            <h1><?php echo $empresa; ?></h1>     
            <a href="/inventario/index.php" class="btn-cerrar">Cerrar</a>   
       </div>
    </header>
      
        <div class="sidebar"> 
                <h3>Información</h3>
                <ul>
                 
                    <li><a href="/inventario/include/templates/inventarios"><i class="fas fa-boxes"></i> Inventario</a> </li>
                </ul>
        </div>
        <br>
        <!-- <br>
        <br>   
        <br>    -->
       