Пример #1
0
$MiPDF->Cell(37, 5, 'MUY GRAVES: ', 1, 0, 'C', 0);
$MiPDF->SetFont('NewsGotT', '', 12);
$MiPDF->Cell(10, 5, $numMuyGraves, 1, 0, 'C', 0);
$MiPDF->SetFont('NewsGotT', 'B', 12);
$MiPDF->SetFont('NewsGotT', 'B', 12);
$MiPDF->Cell(37, 5, 'EXPULSIONES: ', 1, 0, 'C', 0);
$MiPDF->SetFont('NewsGotT', '', 12);
$MiPDF->Cell(10, 5, $numExpulsiones, 1, 0, 'C', 0);
$MiPDF->SetFont('NewsGotT', 'B', 12);
$MiPDF->SetFont('NewsGotT', '', 12);
// Consulta del historial delictivo del alumno.
$consulta = "select fecha, grave, asunto from Fechoria where claveal = '" . $claveal . "' and fecha >= '" . $config['curso_inicio'] . "' order by fecha DESC";
$result = mysqli_query($db_con, $consulta);
$MiPDF->Ln(8);
$MiPDF->SetFont('NewsGotT', '', 10);
$MiPDF->AddPage();
$contador = 0;
while ($fila = mysqli_fetch_array($result)) {
    if ($fila[1] == 'leve') {
        $gravedad = '[L]';
    } elseif ($fila[1] == 'grave') {
        $gravedad = '[G]';
    } elseif ($fila[1] == 'muy grave') {
        $gravedad = '[MG]';
    } else {
        $gravedad = '[?]';
    }
    $MiPDF->Cell(140, 5, $fila[0] . '   ' . $gravedad . '   ' . $fila[2], 0, 1, 'L', 0);
    $contador++;
}
$MiPDF->Output();