<?php
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */


require_once './modelos/Consultas.php';
$dbManager = new Consultas();
$jornadas = $dbManager->todasJornadas();
$empleados = $dbManager->empleados($_POST["sede"], $_POST["depto"], $_POST["persona"]);
$start = new DateTime($_POST['desde'] . " 00:00:00");
$interval = new DateInterval('P1D');
$end = new DateTime($_POST['hasta'] . " 23:59:59");
$dias = new DatePeriod($start, $interval, $end);
$diasEntreFechas = date_diff($start, $end);
switch($_POST['tipo']) {
  case 1:
    $empleados = reporteMarcas($dbManager, $empleados, $dias, $jornadas, $diasEntreFechas);
    break;
  default :
    $empleados = array();
    break;
}
?>

<?php include 'vistas/tablaReportes.php'; ?>


<?php
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
