<?php
ob_start();
session_start();

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

if($_SESSION['pago']==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_pendiente_pago.php">
                                                <i class="module-icon"></i> Lista Llamadas
                                            </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 Registro Llamadas
                                        </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>
                                                        <input name="fecha_inicio" id="fecha_inicio" class="form-control" type="date" required>
                                                    </div>
                                                </div>
                                                <div class="col-12 col-sm-12 col-md-2">
                                                    <div class="form-group">
                                                        <br>
                                                        <input name="fecha_fin" id="fecha_fin" class="form-control" type="date" required>
                                                    </div>
                                                </div>
                                                <div class="form-group col-lg-5 col-md-5 col-sm-5 col-xs-12">
                                                    <br>
                                                    <button class="btn btn-success btn-flat" style="margin-bottom:-10px" onclick="listar_llamada(event)"><i class="fa-solid fa-magnifying-glass"></i> Consultar Registro</button>
                                                </div>
                                                <div class="form-group col-lg-6 col-md-5 col-sm-5 col-xs-12">
                                                    <button class="btn btn-danger btn-flat" style="margin-bottom:-10px" onclick="generarPDF_llamada()"><i class="fa fa-file"></i> PDF</button>
                                                </div>
                                                </div>
                                                <div class="card-body" style="display: block;">
                                                    <div class="container-fluid">
                                                        <table style="width:100%;" class="table table-bordered" id="listar_llamada">
                                                            <thead>
                                                            <tr>
                                                            <th>Usuario</th>
                                                            <th>Fecha Registro</th>                      
                                                            <th>Nro Contrato</th> 
                                                            <th>Cliente</th>
                                                            <th>Servicio</th>
                                                            <th>Tecnologia</th>    
                                                            <th>Descripcion</th> 
                                                            </tr>
                                                            </thead>
                                                            <tbody>
                                                            </tbody>
                                                        </table>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </section>                
                    </div>

           

               
<?php
}
require '../footer.php';
?>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/3.5.25/jspdf.plugin.autotable.min.js"></script>
<script type="text/javascript" src="../../scripts/consulta.js"></script>
<?php 
}
ob_end_flush();
?>