<?php
//activamos almacenamiento en el buffer
//ob_start();
//session_start();
if (!isset($_SESSION['nombre'])) {
  header("Location: login.html");
}else{

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

 ?>
   
    <!-- Main content -->
    <section class="content">

      <!-- Default box -->
      <div class="row">
        <div class="col-md-12">
          <div class="box">
            <div class="box-header with-border">
                <h1 class="box-title">Consulta de Comisión</h1>
                <div class="box-tools pull-right">
    
                </div>
            </div>
            <!--box-header-->
            <!--centro-->
            <div class="panel-body table-responsive" id="listadoregistros">
              <div class="form-group col-lg-2 col-md-2 col-sm-6 col-xs-12">
                <label>Fecha Inicio</label>
                <input type="date" class="form-control" name="fecha_inicio" id="fecha_inicio" value="<?php echo date("Y-m-d"); ?>">
              </div>
              <div class="form-group col-lg-2 col-md-2 col-sm-6 col-xs-12">
                <label>Fecha Fin</label>
                <input type="date" class="form-control" name="fecha_fin" id="fecha_fin" value="<?php echo date("Y-m-d"); ?>">
              </div>
              <div class="form-group col-lg-3 col-md-3 col-sm-6 col-xs-12">
                <label>Paciente</label>
                <select name="idcliente" id="idcliente" class="form-control selectpicker" data-live-search="true" required></select>
               
              </div>
              <div class="form-group col-lg-3 col-md-3 col-sm-6 col-xs-12" align="center">
                
                <br>
                  <button class="btn btn-success" onclick="listar()"> Mostrar</button>
              </div>

              <div class="form-group col-lg-2 col-md-2 col-sm-6 col-xs-12" id="cupos">
                
                
              </div>
              <div class="form-group col-lg-12 col-md-12 col-sm-12 col-xs-12">
                
                
              </div>
                <table id="tbllistado" class="table table-striped table-bordered table-condensed table-hover">
                  <thead>
                    <th>Paciente</th>
                    <th>Fecha</th>
                    <th>Sesión</th>
                    <th>Costo</th>
                    <th>Estado</th>
                  </thead>
                  <tbody>
                  </tbody>
                  <tfoot>
                    <th></th>
                    <th></th>
                    <th></th>
                    <th></th>
                    <th></th>
                  </tfoot>   
                </table>
            </div>

            <!--fin centro-->
          </div>
        </div>
      </div>
      <!-- /.box -->

    </section>
    <!-- /.content -->
  </div>
  <?php 
  }else{
    require 'vistas/contenidos/noacceso-view.php';
  }
 ?>
  <!-- Main Footer -->
  <?php include "vistas/modulos/mainfooter.php";?>
  </div>
  <!-- ./wrapper -->
  <!-- REQUIRED JS SCRIPTS -->
  <?php include "vistas/modulos/script.php";?>
  <script src="vistas/scripts/citasporfechaypaciente.js"></script>
  </body>
  </html> 
<?php 
}

ob_end_flush();
  ?>
