Ejemplo n.º 1
0
<?php

require '../../bootstrap.php';
// VARIABLES DEL FORMULARIO
$unidad = $_POST['unidad'];
require '../../pdf/mc_table.php';
$pdf = new PDF_MC_Table();
$pdf->Open();
$pdf->SetMargins(11, 10, 11);
$pdf->SetDisplayMode('fullpage');
// Cargamos las fuentes corporativas
$pdf->AddFont('NewsGotT', '', 'NewsGotT.php');
$pdf->AddFont('NewsGotT', 'B', 'NewsGotTb.php');
// En el caso de haber seleccionado una unidad, se muestra el listado de alumnos de dicha unidad,
// en otro caso mostramos el listado de faltas de todas las unidades.
$query = "SELECT DISTINCT unidad FROM FALUMNOS where unidad not like '' ";
if ($unidad) {
    $query .= " and unidad='{$unidad}'";
}
$query .= " order by unidad";
// echo $query;
$unidades = mysqli_query($db_con, $query);
while ($unidad = mysqli_fetch_array($unidades)) {
    $unidad = $unidad[0];
    $pdf->AddPage('L', 'A4');
    // CABECERA DEL DOCUMENTO
    // Obtenemos la fecha inicial y final de la semana en curso
    list($anio, $mes, $dia, $semana, $sdia) = explode(':', date('Y:m:d:W:w'));
    $inicio = strtotime("{$anio}-{$mes}-{$dia} 12:00am");
    $inicio += (1 - $sdia) * 86400;
    $fin = $inicio + 6 * 86400;
Ejemplo n.º 2
0
require 'connection.php';
require 'functions.php';
validate_user();
$request = filter_input_array(INPUT_POST);
$resident_id = $request[resident_id];
$r = mysql_query("SELECT * FROM residents LEFT JOIN countries ON residents.country_id=countries.country_id WHERE resident_id={$resident_id}");
$arrResident = mysql_fetch_assoc($r);
//$pdf=new FPDF();
$pdf = new PDF_MC_Table();
$pdf->AliasNbPages();
$pdf->SetTopMargin(10);
$pdf->SetLeftMargin(20);
$pdf->SetAutoPageBreak(1, 20);
$pdf->AddPage();
//$pdf->AddPage('L');
$pdf->SetDisplayMode(100, "single");
$pdf->SetTitle("Netherhall House");
$border = 1;
$high = 6;
$width1 = 180;
$width2 = $width1 / 2;
$width3 = $width1 / 3;
$width4 = $width1 / 4;
/*
$pdf->SetFont('Arial','B',12);
$pdf->Cell(180,$high,"OUTSTANDING SUMMARY",0,0,'C',true);
$pdf->Ln();
$pdf->Ln();
*/
$pdf->SetFillColor(255, 255, 255);
$pdf->SetFont('Arial', 'B', 18);