50 lines
1.2 KiB
PHP
50 lines
1.2 KiB
PHP
<?php
|
|
// require_once '././Fpdf/fpdf.php';
|
|
require_once('././Fpdf/fpdf_protection.php');
|
|
|
|
class Pdfrq extends FPDF
|
|
{
|
|
protected $titre;
|
|
protected $largeurtitre;
|
|
protected $entete;
|
|
|
|
function __construct($orientation, $unit, $size, $titre=array('TITRE',100), $entete=array('Colonne1',150))
|
|
{
|
|
parent::__construct($orientation, $unit, $size);
|
|
$this->titre = $titre['0'];
|
|
$this->largeurtitre = $titre['1'];
|
|
$this->entete = $entete;
|
|
}
|
|
|
|
// En-tête
|
|
function Header()
|
|
{
|
|
// Logo
|
|
$this->SetMargins(20, 20,20);
|
|
// $this->Image('Bootstrap/images/logo_loyale.png',0,20,35,0,'','http://gessante.com/');
|
|
$this->SetFont('Arial','BU',10);
|
|
$this->SetXY(40,20);
|
|
$this->Cell($this->largeurtitre,10,convertirc($this->titre),1,1,'C');
|
|
|
|
$this->SetFont('Arial','B',7);
|
|
|
|
$this->Ln(5);
|
|
$this->Cell(0,5,convertirc("Edité le : ").date("d/m/Y"),0,1,'L');
|
|
|
|
foreach ($this->entete as $entete){
|
|
$this->Cell($entete['1'],6,convertirc($entete['0']),1,0,'C');
|
|
}
|
|
$this->SetFont('Arial','',7);
|
|
$this->Ln(6);
|
|
}
|
|
|
|
// Pied de page
|
|
function Footer()
|
|
{
|
|
$this->SetY(-15);
|
|
$this->SetFont('Arial','',8);
|
|
// Numéro et nombre de pages
|
|
$this->Cell(0,5,'Page '.$this->PageNo().'/{nb}',0,0,'C');
|
|
}
|
|
}
|