<?php
ob_start();
ini_set('session.gc_maxlifetime', 14400);
session_set_cookie_params(14400);
session_start();

if (!isset($_SESSION["nombre"]))
{
  header("Location: ../login/login.php");
}
else
{
    require '../header.php';

if($_SESSION['pabellon']==1){

?>

            <div class="content-wrapper">
                <!-- Breadcrumb Section -->
                <section class="content-header">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-sm-12">
                                <nav aria-label="breadcrumb">
                                    <ol class="breadcrumb">
                                        <li class="breadcrumb-item">
                                            <a href="#"><i class="fas fa-home"></i> Panel</a>
                                        </li>
                                        <li class="breadcrumb-item active" aria-current="page">
                                            <a href="list.php">
                                                <i class="module-icon"></i> Grafico
                                            </a>
                                        </li>
                                    </ol>
                                </nav>
                            </div>
                          
                            <div class="col-sm-12" style="margin-top: 20px;">
                                <div class="card ">
                                    <div class="card-header bg-primary">
                                        <h3 class="card-title">
                                            <i class="fas fa-search"></i>
                                            Grafico de Pabellones
                                        </h3>
                                    </div>

                                    <div class="card-body" style="display: block;">
                                          <div class="row">
                                                 <div class="col-12 col-sm-12 col-md-3">
                                                </div>
                                                    <div class="col-12 col-sm-12 col-md-3">
                                                        <div class="form-group">
                                                            <br>
                                                            <select name="idpabellon" id="idpabellon" class="form-control"></select>
                                                        </div>
                                                    </div>
                                                    <div class="col-12 col-sm-12 col-md-5">
                                                        <br>
                                                        <button class="btn btn-danger btn-flat" style="margin-bottom:-10px" onclick="mostrarDetallePabellon($('#idpabellon').val())"><i class="fa-solid fa-magnifying-glass"></i> Consultar Pabellon</button>
                                                    </div>
                                                </div>
                                               <div class="container-fluid p-3">
                                                <h2 id="nombrePabellon" class="text-center text-uppercase mb-4" style="font-weight: bold;"></h2>
                                                <!-- SCROLL WRAPPER -->
                                                <div style="overflow-x: auto; width: 100%;">
                                                    <div id="contenedorNicho" class="w-100" style="min-width: 600px;"></div>
                                                </div>
                                                </div>
                                            </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </section>                
            </div>
<?php
}
require '../footer.php';
?>
<script type="text/javascript" src="../../scripts/pabellon.js"></script>
<?php 
}
ob_end_flush();
?>