| Current Path : /home/happyrenas/old/happy-r.fr/transfere_pro/administration/templates/admin2/fpdfi/ |
Linux webd005.cluster105.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 |
| Current File : /home/happyrenas/old/happy-r.fr/transfere_pro/administration/templates/admin2/fpdfi/carte.php |
<?php
//http://convert.neevia.com/pdfconvert/
session_start();
include_once("../config.php");
function nettoyerChaine($chaine)
{
$caracteres = array(
'À' => 'a', 'Á' => 'a', 'Â' => 'a', 'Ä' => 'a', 'à' => 'a', 'á' => 'a', 'â' => 'a', 'ä' => 'a', '@' => 'a',
'È' => 'e', 'É' => 'e', 'Ê' => 'e', 'Ë' => 'e', 'è' => 'e', 'é' => 'e', 'ê' => 'e', 'ë' => 'e', '€' => 'e',
'Ì' => 'i', 'Í' => 'i', 'Î' => 'i', 'Ï' => 'i', 'ì' => 'i', 'í' => 'i', 'î' => 'i', 'ï' => 'i',
'Ò' => 'o', 'Ó' => 'o', 'Ô' => 'o', 'Ö' => 'o', 'ò' => 'o', 'ó' => 'o', 'ô' => 'o', 'ö' => 'o',
'Ù' => 'u', 'Ú' => 'u', 'Û' => 'u', 'Ü' => 'u', 'ù' => 'u', 'ú' => 'u', 'û' => 'u', 'ü' => 'u', 'µ' => 'u',
'Œ' => 'oe', 'œ' => 'oe',
'$' => 's',
'é' => 'e',
'’' => '`',
'à' => 'a',
'è' => 'e',
'â' => 'a',
'â' => 'a',
'ê' => 'e',
''' => '',
'ï' => 'i',
' ' => ' '
);
$chaine = strtr($chaine, $caracteres);
return $chaine;
}
/*
$commande_id=$_REQUEST['commande_id'];
$produit_id=$_REQUEST['produit_id'];
if (!$commande_id) {$commande_id=37;}
if (!$produit_id) {$produit_id=18;}
$requete_commande = "SELECT * from commande where id=".$commande_id;
$commande = $db->get_row($requete_commande);
// VERIF HACKING
if ($_SESSION['client_statut']!='2' && $commande->client_id!=$_SESSION['client_id']) {echo "ERREUR";exit;}
$requete_client = "SELECT * from client where id=".$commande->client_id;
$client = $db->get_row($requete_client);
$requete_produit = "SELECT * from produit where id=".$produit_id;
$produit = $db->get_row($requete_produit);
$nom_prenom = utf8_decode($client->prenom." ".$client->nom);
$prestation = utf8_decode($produit->produit);
$validite = utf8_decode($produit->validite);
$description_long = utf8_decode($produit->description_long);
$description_long = nettoyerChaine($description_long);
$description_long = strip_tags($description_long, '');
$message = "Message : " . utf8_decode($commande->message);
$commande_id = "LSDC".utf8_decode($commande->id);
$commande_date = utf8_decode($commande->vdate);
*/
$nom = utf8_decode("toto");
$prenom = utf8_decode("toto");
$adresse = utf8_decode("adresse");
$mail = utf8_decode("mail");
require_once('fpdf.php');
require_once('fpdi.php');
// initiate FPDI
$pdf = new FPDI();
// add a page
$pdf->AddPage();
// set the source file
$pdf->setSourceFile("../../../assets/global/plugins/jquery-file-upload/server/php/files/assurance_formulaire_souscription.pdf");
// import page 1
$tplIdx = $pdf->importPage(1);
// use the imported page and place it at point 10,10 with a width of 100 mm
$pdf->useTemplate($tplIdx, 0, 0, 210);
// now write some text above the imported page
$pdf->SetFont('Arial');
$pdf->SetFontSize('14');
$pdf->SetTextColor(107, 125, 157);
$pdf->SetXY(40, 78);
$pdf->Write(0, $nom);
$pdf->SetXY(45, 85);
$pdf->Write(0, $prenom);
$pdf->SetXY(45, 93);
$pdf->Write(0, $adresse);
$pdf->SetXY(52, 100);
$pdf->Write(0, $mail);
/*
$pdf->SetXY(108, 74);
$pdf->SetTextColor(107, 125, 157);
$pdf->SetFillColor(255, 255, 255);
$pdf->MultiCell(90,4,$message,0,1,'C',false);
$pdf->SetXY(131, 99);
$pdf->Write(2, $commande_id.'-'.$produit_id);
$pdf->SetXY(127, 102);
$pdf->Write(5, $commande_date);
$pdf->SetXY(10, 110);
$pdf->SetTextColor(107, 125, 157);
$pdf->SetFillColor(255, 255, 255);
$pdf->MultiCell(120,4,$description_long,0,1,'C',false);
*/
//$pdf->SetXY(10, 70);
//$pdf->Write(2, 'MASSAGE 2 heures');
//$pdf->SetXY(61, 45);
//$pdf->SetTextColor(11, 8, 59);
//$pdf->SetFillColor(255, 255, 255);
//$pdf->MultiCell(44,5,'sum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum \n Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum Lorem ipsum',1,1,'C',false);
//$pdf->Ln();
//$pdf->Image('logo.png',10,10,-300);
$pdf->Output();