Ejemplo n.º 1
0
    require '../includes/funcionesFiestas.php';
    require '../includes/funcionesVentas.php';
    $serviciosProductos = new ServiciosProductos();
    $serviciosClientes = new ServiciosClientes();
    $serviciosTurnos = new ServiciosTurnos();
    $serviciosVentas = new ServiciosVentas();
    $serviciosFiestas = new ServiciosFiestas();
    $resProductos = $serviciosProductos->traerProductosLimite(5);
    $resProveedores = $serviciosProductos->traerProveedores();
    $resTipoProducto = $serviciosProductos->traerTipoProducto();
    $resClientes = $serviciosClientes->traerClientes();
    $cantClientes = mysql_num_rows($resClientes);
    $fecha = date('Y-m-d');
    $resTurnos = $serviciosTurnos->traerTurnosPorDia($fecha);
    $cantTurnos = mysql_num_rows($resTurnos);
    $resPrimerUltimoTurno = $serviciosTurnos->traerPrimerUltimoTurno(date('Y-m-d'));
    $resTurnosAgrup = $serviciosTurnos->traerTurnosPorDiaAgrupado($fecha);
    $cantFiestas = mysql_num_rows($serviciosFiestas->traerFiestasPost($fecha));
    $resFiestas = $serviciosFiestas->traerFiestasPost($fecha);
    $resVentas = $serviciosVentas->traerVentasPorDiaEntero();
    $cantVentas = mysql_num_rows($serviciosVentas->traerVentasPorDiaEntero());
    $stockminimo = $serviciosProductos->traerProductosStockMin();
    ?>

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Gestión de Cancha: La Caldera del Diablo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Ejemplo n.º 2
0
date_default_timezone_set('America/Buenos_Aires');
require '../includes/funcionesProductos.php';
require '../includes/funcionesTurnos.php';
require '../includes/funcionesConfiguraciones.php';
$serviciosProductos = new ServiciosProductos();
$serviciosTurnos = new ServiciosTurnos();
$serviciosConfiguraciones = new ServiciosConfiguraciones();
$resCanchas = $serviciosTurnos->traerCanchas();
$resClientes = $serviciosTurnos->traerClientes();
$resTurnos = $serviciosTurnos->traerTurnos();
$fecha = $_GET['fecha'];
if ($fecha == '') {
    $fecha = date('Y-m-d');
}
$resPrimerUltimoTurno = $serviciosTurnos->traerPrimerUltimoTurno($fecha);
require 'fpdf.php';
//$header = array("Hora", "Cancha 1", "Cancha 2", "Cancha 3");
class PDF extends FPDF
{
    // Cargar los datos
    // Tabla coloreada
    function FancyTable($header, $data, $serviciosTurnos, $fecha)
    {
        $this->Cell(60, 7, 'Fecha:' . $fecha, 0, 0, 'C', false);
        $this->Ln();
        // Colores, ancho de línea y fuente en negrita
        $this->SetFillColor(255, 0, 0);
        $this->SetTextColor(255);
        $this->SetDrawColor(128, 0, 0);
        $this->SetLineWidth(0.3);