<?php
ob_start();
session_start();

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

if($_SESSION['consultac']==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="reporte_torres.php">
                                                <i class="module-icon"></i> Reportes
                                            </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>
                                            Listado de Torres por Repetidoras
                                        </h3>
                                    </div>
                                    <div class="card-body" style="display: block;">
                                        <div class="container-fluid">
                                            <div class="row">
                                                <div class="col-12 col-sm-12 col-md-3">
                                                </div>
                                                    <div class="col-12 col-sm-12 col-md-2">
                                                        <div class="form-group">
                                                            <br>
                                                             <select id="idtorre" name="idtorre" class="form-control select2" data-live-search="true" required>
                                                            </select>
                                                        </div>
                                                    </div>
                                                    <div class="col-12 col-sm-12 col-md-2">
                                                        <div class="form-group">
                                                            <br>
                                                             <select id="idtecnologia" name="idtecnologia" class="form-control select2" data-live-search="true" required>
                                                            </select>
                                                        </div>
                                                    </div>
                                                    <div class="form-group col-lg-3 col-md-3 col-sm-3 col-xs-12">
                                                        <br>
                                                        <button class="btn btn-success btn-flat " style="margin-bottom:-10px" onclick="listar_torre(event)"><i class="fas fa-save"></i> Consultar Torres</button>
                                                        <button class="btn btn-primary btn-flat " style="margin-bottom:-10px" onclick="generarExcel()"><i class="fa fa-table"></i> Excel</button>
                                                    </div>
                                                </div>
                                                <div class="card-body" style="display: block;">
                                                    <div class="container-fluid">
                                                        <table style="width:100%;" class="table table-bordered" id="listar_torre">
                                                            <thead>
                                                            <tr>
                                                            <th>Repetidora</th>
                                                            <th>Olt</th>                      
                                                            <th>Cliente</th> 
                                                            <th>Modalidad Equipo</th>
                                                            <th>Mensualidad</th>
                                                            <th>Estado Contrato</th>    
                                                            <th>Descripcion</th> 
                                                            <th>Direccion</th> 
                                                            <th>Celular</th> 
                                                            <th>Telefono</th> 
                                                            <th>whatsapp</th>  
                                                            </tr>
                                                            </thead>
                                                            <tbody>
                                                            </tbody>
                                                        </table>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </section>                
                    </div>

           

               
<?php
}
require '../footer.php';
?>
<script src="https://cdn.jsdelivr.net/npm/exceljs/dist/exceljs.min.js"></script>
<script type="text/javascript" src="../../scripts/reporte.js"></script>
<?php 
}
ob_end_flush();
?>