<?php

include_once '../modelos/tickets.php';
$ticket = new Tickets();
//Amonestado, por Asesino de Felinos
$band = $_REQUEST["band"];
switch ($band) {
    case 'verColas':
        echo json_encode($ticket->getColas());
        break;
    case 'generarGrafica':
        $fechaIni = $_REQUEST["fecha_inicio"];
        $fechaFin = $_REQUEST["fecha_fin"];
        echo json_encode($ticket->getCantidadPacientes($fechaIni, $fechaFin));
        break;
    case 'getPromedioTiempo':
        $fecha = $_REQUEST["fecha"];
        echo json_encode($ticket->getTiempoPromedio($fecha));
        break;
}
예제 #2
0
<?php

include "../modelos/tickets.php";
include "../clases/Sesion.php";
$sesion = new Sesion();
$modulo = new Tickets();
if ($sesion->sesion_iniciada() == false) {
    header('location:../login.php');
}
$arrayColas = $modulo->getColas();
?>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Llamar Paciente</title>
    <script src="../js/jquery.min.js"></script>
    <!-- Bootstrap -->
    <link rel="stylesheet" href="../css/bootstrap.min.css">
    <link rel="stylesheet" href="../css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="../font-awesome/css/font-awesome.css">
    <link rel="stylesheet" href="../css/vistas.css">
    <script src="../js/bootstrap.min.js"></script>
    <script src="../js/estadisticas.js?r=<?php 
echo date('d-m-Y H:i:s');
?>
"></script>
    <style>
        .estaciones {
            width: 500px;
            height: 70px;