function getReporteAccesos() { $cLibreria = new cLibreria(); $fechaInicio = $cLibreria->getFechaYMD($_POST['txtFechaInicio']); $fechaFin = $cLibreria->getFechaYMD($_POST['txtFechaFin']); $usuariosModel = new usuariosModel(); $tipoReporte = $_POST['tipoReporte']; switch ($tipoReporte) { case 1: //accesos al sistema $datos = $usuariosModel->getRegistroAccesos($fechaInicio, $fechaFin); break; case 2: //nuevos registros al sistema $datos = $usuariosModel->getRegistrosNuevos($fechaInicio, $fechaFin); break; default: echo "<h1>Error en tipo de reporte :P</h1>"; break; } ?> <table class="table table-striped table-bordered table-hover table-responsive" id="tabla"> <!-- <caption> --> <!-- <h1>Reporte de accesos al tablero cieft(Participantes)</h1> --> <!-- </caption> --> <thead> <tr> <th>NOMBRE</th> <th>CORREO</th> <th>FECHA</th> </tr> </thead> <tbody> <?php foreach ($datos as $key => $rowReportes) { echo "<tr>\n\t\t\t\t\t\t<td>" . $rowReportes['nombre'] . "</td>\n\t\t\t\t\t\t<td>" . $rowReportes['correo'] . "</td>\n\t\t\t\t\t\t<td>" . $rowReportes['fecha'] . "</td>\n\t\t\t\t\t\t</tr>"; } ?> </tbody> </table> <?php }