Пример #1
0
 $pdf->AddPage();
 $id_ticket = $_GET['id_ticket'];
 // Imagen  de encabezado
 $pdf->Image("./images/banner4.jpg", 10, 0, 180, 40, "JPG", "");
 // Titulo del Reporte
 $pdf->SetFont('Arial', 'B', 20);
 $pdf->SetY(45);
 $pdf->Cell(50, 10, 'Detalle del Ticket No. ' . $id_ticket);
 // Configuracion de colores
 $pdf->SetY(60);
 $pdf->SetFillColor(224, 235, 255);
 $pdf->SetTextColor(0);
 $pdf->SetDrawColor(0, 0, 0);
 $pdf->SetLineWidth(0.1);
 $pdf->SetFont('', 'B');
 if ($result = $obj_modelo->GetDetalleTicket($id_ticket)) {
     if ($obj_conexion->GetNumberRows($result) > 0) {
         // Establecemos la cabecera de la tabla
         $pdf->SetFont('Arial', 'B', 10);
         $pdf->SetTextColor(128, 0, 0);
         $pdf->Cell(20, 7, 'Numero', 1, 0, 'C', true);
         $pdf->Cell(40, 7, 'Sorteo', 1, 0, 'C', true);
         $pdf->Cell(30, 7, 'Signo', 1, 0, 'C', true);
         $pdf->Cell(30, 7, 'Monto Jugado', 1, 0, 'C', true);
         $pdf->Cell(30, 7, 'Monto Ganado', 1, 0, 'C', true);
         $pdf->Cell(35, 7, 'Apuesta Ganadora', 1, 0, 'C', true);
         $pdf->SetFont('Arial', '', 8);
         while ($row = $obj_conexion->GetArrayInfo($result)) {
             if ($row['monto'] != 0) {
                 $hora_sorteo = $obj_modelo->GetHoraSorteo($row['id_sorteo']);
                 $pdf->Ln();