Files

114 lines
3.1 KiB
PHP

<?php
require("reportes/mc_table.php");
include("sql/conexion.php");
include ("sql/funciones.php");
$con = Conectarse();
session_start();
if(empty($_SESSION))
{
header("location:index.php");
}
$peticion = $_REQUEST['id'];
$email = $peticion;
$query = "call st_trae_boleto('$email')";
$pdf = new FPDF('P','mm',array(200,200));
if ($resultado = mysqli_query($con, $query)) {
/* obtener array asociativo */
while ($datos = mysqli_fetch_assoc($resultado)) {
$pdf->AddPage();
//$pdf->Image("images/logo_dsc.png", 5, 5, 0, 0);
//$pdf->SetFont('Arial','B',12);
//$pdf->Cell(0, 0, utf8_decode('Fecha de solicitud:')." ".$fecha, 0, 1, 'R');
//$pdf->ln(8);
//$pdf->SetFont('Arial','B',12);
//$pdf->Cell(0, 0, utf8_decode('Número de solicitud:')." ".$datos['id_registro'], 0, 1, 'R');
$pdf->ln(10);
$pdf->SetFont('Arial', 'B', 12);
$pdf->Cell(0, 0, utf8_decode('Nombre:'), 0, 1, 'L');
$pdf->SetFont('Arial', '', 12);
$pdf->Cell(0, 0, utf8_decode($datos['nombre_completo']), 0, 1, 'C');
/*
$pdf->ln(10);
$pdf->SetFont('Arial', 'B', 12);
$pdf->Cell(0, 0, utf8_decode('e-mail:'), 0, 1, 'L');
$pdf->SetFont('Arial', '', 12);
$pdf->Cell(0, 0, $datos['correo'], 0, 1, 'C');
*/
$pdf->ln(10);
$pdf->SetFont('Arial', 'B', 12);
$pdf->Cell(0, 0, utf8_decode('Generación:'), 0, 1, 'L');
$pdf->SetFont('Arial', '', 12);
$pdf->Cell(0, 0, $datos['generacion'], 0, 1, 'C');
$pdf->ln(10);
$pdf->SetFont('Arial', 'B', 12);
$pdf->Cell(0, 0, utf8_decode('Carrera:'), 0, 1, 'L');
$pdf->SetFont('Arial', '', 12);
$pdf->Cell(0, 0, $datos['carrera'], 0, 1, 'C');
$pdf->ln(10);
$pdf->SetFont('Arial', 'B', 12);
$pdf->Cell(0, 0, utf8_decode('Asignado a mesa:'), 0, 1, 'L');
$pdf->SetFont('Arial', '', 12);
$pdf->Cell(0, 0, $datos['mesa'], 0, 1, 'C');
$pdf->ln(10);
$pdf->SetFont('Arial', '', 12);
$pdf->Cell(0, 0, $datos['sistema'], 0, 1, 'C');
$pdf->ln(12);
$pdf->Cell(0, 0, "", 1, 1, 'L');
$pdf->ln(12);
$pdf->SetFont('Arial','B',40);
$pdf->Cell(0, 0, utf8_decode('MAGNO DESAYUNO'), 0, 1, 'L');
$pdf->ln(12);
$pdf->SetFont('Arial','B',16.5);
$pdf->Cell(0, 0, utf8_decode('MULTIDISCIPLINARIO PARA EGRESADOS DE LA'), 0, 1, 'L');
$pdf->ln(12);
$pdf->SetFont('Arial','B',38);
$pdf->Cell(0, 0, utf8_decode('FES ACATLÁN UNAM'), 0, 1, 'L');
$pdf->ln(12);
$pdf->SetFont('Arial','B',15);
$pdf->Cell(0, 0, utf8_decode('CENTRO DE ESTUDIOS MUNICIPALES'), 0, 1, 'L');
$pdf->ln(8);
$pdf->SetFont('Arial','B',15);
$pdf->Cell(0, 0, utf8_decode('Y METROPOLITANOS'), 0, 1, 'L');
$pdf->ln(8);
$pdf->SetFont('Arial','B',15);
$pdf->Cell(0, 0, utf8_decode('27 octubre 2018 - 8:15 horas'), 0, 1, 'L');
$pdf->ln(8);
$pdf->SetFont('Arial','B',15);
$pdf->Cell(0, 0, utf8_decode('DONATIVO $350.00'), 0, 1, 'L');
$pdf->ln(8);
$pdf->SetFont('Arial','',10);
$pdf->Cell(0, 0, utf8_decode('CUPO LIMITADO'), 0, 1, 'L');
$pdf->ln(8);
$pdf->SetFont('Arial', '', 12);
$pdf->Code39(80, 160, $datos['id_registro'], 1, 13);
$pdf->ln(10);
}
/* liberar el conjunto de resultados */
mysqli_free_result($resultado);
}
mysqli_close($con);
$pdf->Output();