61 lines
1.8 KiB
PHP
Executable File
61 lines
1.8 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleurrequete.php'; // OK
|
|
require_once 'Modele/Statistique.php';
|
|
|
|
class ControleurAjaxetatstatsmaladieft1pdf extends Controleur
|
|
{
|
|
private $detailsp;
|
|
|
|
public function __construct() {
|
|
$this->detailsp = new Statistique();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
$idPolice = $this->requete->getParametreFormulaire("idPolice");
|
|
|
|
$_SESSION['idPoliceStat'] = $idPolice;
|
|
|
|
$debutStat = $this->requete->getParametreDate("debutStat");
|
|
$finStat = $this->requete->getParametreDate("finStat");
|
|
|
|
$_SESSION['debutStat'] = $debutStat;
|
|
$_SESSION['finStat'] = $finStat;
|
|
|
|
$entete = $this->detailsp->detailrapportspperiodepdfentete($idPolice);
|
|
//$rapportsps = $this->rapportsp->etatrapportspperiode($debutStat, $finStat);
|
|
|
|
$detailsps = $this->detailsp->detailrapportspperiodepdf($idPolice);
|
|
|
|
$pdf = new FPDF_Protection();
|
|
$pdf->SetAuthor('EBENE SOLUTIONS INFORMATIQUES');
|
|
$userPassword = '';
|
|
$ownerPassword = null;
|
|
$pdf->SetProtection(['print'], $userPassword, $ownerPassword);
|
|
|
|
$pdf->AliasNbPages();
|
|
$pdf->AddPage();
|
|
|
|
$pdf->SetMargins(15, 15, 15) ;
|
|
$pdf->Image($_SESSION['lienLogo'],94,3,18);
|
|
$pdf->Cell(0,5,'FICHE TECHNIQUE N° 1',0,1,'L',false);
|
|
$pdf->Cell(0,5,'Edition : '.heureCouranteLang($_SESSION['lang']),0,1,'R',false);
|
|
|
|
$pdf->Ln(10);
|
|
|
|
$pdf->SetFont('Arial','BU',10);
|
|
|
|
// $pdf->AliasNbPages();
|
|
$pdf->Cell(0,6,convertirc(_("RAPPORT SINISTRE A PRIME DETAIL PAR FAMILLE")),0,1,'C',false);
|
|
|
|
|
|
|
|
$fichier="Temp/TMP_FICHE_TECHNIQUE_N1"."_".uniqid().".pdf";
|
|
$pdf->Output($fichier,"F");
|
|
|
|
$t_html =' <div id ="div_export_b" class="alert alert-info"> ';
|
|
$t_html .=' <a style="font-size:15pt;" href="'.$fichier.'" target="_blank" > '._("TELECHARGER").' </a> ';
|
|
$t_html .=' </div ';
|
|
echo $t_html;
|
|
}
|
|
} |