示例#1
0
<?php

/**
 * Archivo del controlador para modulo de Reporte de Ventas por periodo
 * @package cRVentas_periodo.php
 * @author Brenda Batista B. - <*****@*****.**>
 * @copyright Grupo de empresas Voila
 * @license BSD License
 * @version v 1.0 Junio - 2013
 */
// Vista asignada
$obj_xtpl->assign_file('contenido', $obj_config->GetVar('ruta_vista') . 'RVentas_periodo' . $obj_config->GetVar('ext_vista'));
// Modelo asignado
require $obj_config->GetVar('ruta_modelo') . 'RVentas_periodo.php';
$obj_date = new Fecha();
$obj_modelo = new RVentas_periodo($obj_conexion);
require './fpdf/fpdf.php';
switch (ACCION) {
    case 'listar_resultados':
        // Ruta actual
        $_SESSION['Ruta_Lista'] = $obj_generico->RutaRegreso();
        // Ruta regreso
        $obj_xtpl->assign('ruta_regreso', $_SESSION['Ruta_Form']);
        /*        $fecha_desde= $obj_generico->CleanText($_GET['fechadesde']);
                $fecha_hasta= $obj_generico->CleanText($_GET['fechahasta']);
          */
        $taquilla = $obj_generico->CleanText($_GET['op_taquilla']);
        $sorteo = $obj_generico->CleanText($_GET['sorteo']);
        $obj_xtpl->assign('fechadesde', $_GET['fechadesde']);
        $obj_xtpl->assign('fechahasta', $_GET['fechahasta']);
        $obj_xtpl->assign('taquilla', $taquilla);
require_once '.' . $obj_config->GetVar('ruta_config') . 'mensajes.php';
// Clase Generica
require '.' . $obj_config->GetVar('ruta_libreria') . 'Generica.php';
$obj_generico = new Generica();
// Clase Date
require '.' . $obj_config->GetVar('ruta_libreria') . 'Fecha.php';
$obj_date = new Fecha();
// Conexion a la bases de datos
require '.' . $obj_config->GetVar('ruta_libreria') . 'Bd.php';
$obj_conexion = new Bd();
if (!$obj_conexion->ConnectDataBase($obj_config->GetVar('host'), $obj_config->GetVar('data_base'), $obj_config->GetVar('usuario_db'), $obj_config->GetVar('clave_db'))) {
    echo "sin_conexion_bd";
}
// Modelo asignado
require '.' . $obj_config->GetVar('ruta_modelo') . 'RVentas_periodo.php';
$obj_modelo = new RVentas_periodo($obj_conexion);
session_start();
//$id_taquilla=2;
// Obtenemos los datos de la taquilla
$id_taquilla = $_GET['taquilla'];
$string = date('Y-m-d H:i:s');
$year = substr($string, 0, 4);
$month = substr($string, 5, 2);
$day = substr($string, 8, 2);
$hour = substr($string, 11, 2);
$minute = substr($string, 14, 2);
$dias = array("Domingo", "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sabado");
//$fecha_hora=$day."-".$month."-".$year." ".$hour.":".$minute;
$fecha_hora = $day . "-" . $month . "-" . $year;
if ($hour > 11) {
    $formato = "PM";
示例#3
0
require_once '.' . $obj_config->GetVar('ruta_config') . 'mensajes.php';
// Clase Generica
require '.' . $obj_config->GetVar('ruta_libreria') . 'Generica.php';
$obj_generico = new Generica();
// Clase Date
require '.' . $obj_config->GetVar('ruta_libreria') . 'Fecha.php';
$obj_date = new Fecha();
// Conexion a la bases de datos
require '.' . $obj_config->GetVar('ruta_libreria') . 'Bd.php';
$obj_conexion = new Bd();
if (!$obj_conexion->ConnectDataBase($obj_config->GetVar('host'), $obj_config->GetVar('data_base'), $obj_config->GetVar('usuario_db'), $obj_config->GetVar('clave_db'))) {
    echo "sin_conexion_bd";
}
// Modelo asignado
require '.' . $obj_config->GetVar('ruta_modelo') . 'RVentas_periodo.php';
$obj_modelo = new RVentas_periodo($obj_conexion);
$id_ticket = $_GET['id_ticket'];
$data = "<table border='1'>";
$data .= "<tr>";
$data .= "<td colspan='5'>Detalle del Ticket No. " . $id_ticket . "</td>";
$data .= "</tr>";
if ($result = $obj_modelo->GetDetalleTicket($id_ticket)) {
    if ($obj_conexion->GetNumberRows($result) > 0) {
        // Establecemos la cabecera de la tabla
        $data .= "<tr>";
        $data .= "<td>Numero</td>";
        $data .= "<td>Sorteo</td>";
        $data .= "<td>Signo</td>";
        $data .= "<td>Monto</td>";
        $data .= "<td>Apuesta Ganadora</td>";
        $data .= "</tr>";