<?php
@require_once(dirLibPHP.'tcpdf/tcpdf.php');

class MYPDF extends TCPDF{

	public function Header(){
		$nInforme = nInforme();
		$est = new UAdmin();
		$est = $est->estacionamiento($_GET['id'][0]);
		$f_inicio = str_replace('-', '/', $_POST['f_inicio']);
		$f_termino = str_replace('-', '/', $_POST['f_termino']);
		$image_file = dirImg.'logoSiste.png';
		$this->SetFont('helvetica', 'BU', 13);
		$this->Cell(0, 0, $nInforme , 0, 0, 'C');
		$this->Image($image_file, 10, 7, 40, 0, 'png', '', 'T', false, 300, 'L', false, false, 0, false, false, false);
		$this->Ln(6);
		$this->SetFont('helvetica', '', 10);
		$this->Cell(0, 0, '                                            '.$est['nombre'].' - '.date('d/m/Y'), 0, 0, 'L');
		$this->SetFont('helvetica', '', 9);
		$this->Cell(0, 0, 'Rango de fechas: '.$f_inicio, 0, 0, 'R');
		$this->Ln(4);
		$this->Cell(0, 0, $f_termino, 0, 0, 'R');
	}

	public function Footer(){
		$this->SetY(-22);
		$this->SetLineStyle(array('width' => 0.85 / $this->k, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0));
		$this->Cell(0, 0, '', 'T', 0, 'C');
		$this->SetY(-15);
		$this->SetFont('helvetica', '', 10);
		$this->Cell(0, 0, 'Siste.cl', 0, false, 'C');
		$this->Cell(0, 0, 'Página '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'R');
	}
}
?>