Your IP : 216.73.216.65


Current Path : /home/ataenra/www/ATA/FICHIERS/MES/1/Photos/
Upload File :
Current File : /home/ataenra/www/ATA/FICHIERS/MES/1/Photos/RappGen.php

<?php
 
    use setasign\Fpdi\Fpdi;
    require_once('./ATA/INTRANET/Outils/fpdf/fpdf.php');
    require_once('./ATA/INTRANET/Outils/FPDI-2.3.7/src/autoload.php');

    //require_once('../../Outils/fpdf/fpdf.php');
    //require_once('../../Outils/FPDI-2.3.7/src/autoload.php');

    $ID = $_GET['ID'];
require ('./ATA/INTRANET/Outils/co.php');

//require ('../../Outils/co.php');
$sth1 = $dbco->prepare("SELECT * FROM gest_mes G JOIN gest_mes_detail D ON G.ID_Mes=D.ID_mes WHERE G.ID_Mes = '$ID'"); 
$sth1->execute();
$G1 = $sth1->fetch(PDO::FETCH_OBJ);

if($G1->Ens_ae !=0){$table1="gest_ens_pac_ae"; $table2="gest_gamme_pac"; $Ens="Ens_ae"; $table3="gest_produits_pac_ae"; $table4="gest_join_pac_ae";}
if($G1->Ens_aa !=0){$table1="gest_ens_pac_aa"; $table2="gest_gamme_pac_aa"; $Ens="Ens_aa"; $table3="gest_produits_pac_aa"; $table4="gest_join_pac_aa";}

$l5 = $dbco->prepare("SELECT * FROM ".$table3." P JOIN ".$table4." J ON J.ID_produit=P.ID_Produit WHERE J.ID_ens='".$G1->$Ens."' AND P.Emp='UE'");
$l5->execute();
$r5 = $l5->fetch(PDO::FETCH_OBJ);

$l6 = $dbco->prepare("SELECT * FROM ".$table3." P JOIN ".$table4." J ON J.ID_produit=P.ID_Produit WHERE J.ID_ens='".$G1->$Ens."' AND P.Emp='UI'");
$l6->execute();
$r6= $l6->fetch(PDO::FETCH_OBJ);

$l7 = $dbco->prepare("SELECT * FROM fgaz WHERE ID = '$G1->ID_Fgaz'");
$l7->execute();
$r7= $l7->fetch(PDO::FETCH_OBJ);




$projet ="./ATA/FICHIERS/MES/".$ID."/Rapport";
    if (!is_dir($projet)) {mkdir($projet, 0777,true);}

// initiate FPDI
$pdf= new FPDI();
$pdf->SetAutoPagebreak(False);



//PAGE 1 PRESENTATION DOSSIER
$pdf->AddPage();
$pdf->setSourceFile('./ATA/INTRANET/Tech/Required/pdf/NP.pdf');
//$pdf->setSourceFile('../Required/pdf/NP.pdf');
$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx, 0, 0, 210); 

//Numero de dossier
$pdf->SetFont('Helvetica','','14');
$pdf->SetXY(160, 99);
$pdf->Cell(50,8,''.$G1->ID_Mes.'',0,0,'L',false);

//Reference Fabricant

$pdf->SetXY(60, 120);
$pdf->Cell(50,8,''.$G1->RefF.'',0,0,'L',false);

//Date de saisie intervention

$pdf->SetXY(60, 145);
$pdf->Cell(50,8,''.$G1->DateS.'',0,0,'L',false);

//Date planifie

$pdf->SetXY(60, 153);
$pdf->Cell(50,8,''.$G1->DateP.'',0,0,'L',false);

//Date realisation

$pdf->SetXY(60, 161);
$pdf->Cell(50,8,'x',0,0,'L',false);

//Coordonnees NomC

$pdf->SetXY(60, 185.5);
$pdf->Cell(50,8,''.$G1->NomC.'',0,0,'L',false);


$pdf->SetXY(65, 216.5);
$pdf->Cell(50,8,''.$G1->AdresseC.'',0,0,'L',false);


$pdf->SetXY(65, 227);
$pdf->Cell(50,8,''.$G1->CPC.'',0,0,'L',false);


$pdf->SetXY(65, 237.5);
$pdf->Cell(50,8,''.$G1->VilleC.'',0,0,'L',false);


$pdf->SetXY(60, 194.5);
$pdf->Cell(50,8,''.$G1->EmailC.'',0,0,'L',false);

//Image du fabricant
$pdf->SetXY(10, 135);
$pdf->Image('./ATA/INTRANET/Outils/required/'.$G1->Fabricant.'.png',15,25,130);

//$pdf->Image('../../Outils/required/'.$G1->Fabricant.'.png',50,50,100);




//PAGE 2 EDL UE ENTREE
$pdf->AddPage();

//CADRE info ext
$pdf->SetFont('Helvetica','B','14');
$pdf->SetXY(10, 10);
$pdf->Cell(140,10,'ETAT DES LIEUX MODULE EXTERIEUR',1,1,'C',false);

//CADRE Remarques ext
$pdf->SetFont('Helvetica','B','14');
$pdf->SetXY(150, 10);
$pdf->Cell(0,10,'Observations',1,1,'C',false);

//INFO Info ext
$pdf->SetXY(10, 20);
$pdf->Cell(140,110,'',1,0,'C',false);
$pdf->Cell(0,110,'',1,1,'C',false);
$pdf->Image('./ATA/FICHIERS/MES/'.$ID.'/Photos/EDL/UE/EDLUE1.'.$ID.'.jpg',15,25,130);
//$pdf->Image('../../../FICHIERS/MES/'.$ID.'/Photos/EDL/UE/EDLUE1.'.$ID.'.jpg',15,25,130);
//Observations

$pdf->SetFont('Helvetica','','10');
$pdf->SetXY(150, 20);

$pdf->Cell(0,8,'General Installation',0,1,'',false);

$pdf->SetFont('Helvetica','','8');
$pdf->SetXY(150, 24);
$pdf->Cell(0,8,'Emplacement UE : '.$G1->UE_Emp.' ',0,1,'L',false);
$pdf->SetXY(150, 28);
$pdf->Cell(0,8,'Etat des liaisons : '.$G1->Gaz_Etat_Liaison.' ',0,1,'L',false);
$pdf->SetXY(150, 32);
$pdf->Cell(0,8,'Observations : '.$G1->UE_Obs.' ',0,1,'L',false);
$pdf->SetXY(150, 36);
$pdf->Cell(0,8,'Numero de serie : '.$G1->UE_NumS.' ',0,1,'L',false);
$pdf->SetXY(150, 40);

$pdf->SetFont('Helvetica','','10');
$pdf->SetXY(150, 44);

$pdf->Cell(0,8,'Electrique',0,1,'',false);
$pdf->SetFont('Helvetica','','8');
$pdf->SetXY(150, 48);

$pdf->Cell(0,8,'Protection Electrique : '.$G1->Elec_Protection_UE.'A ',0,1,'L',false);
$pdf->SetXY(150, 52);
$pdf->Cell(0,8,'Section Electrique UE : '.$G1->Elec_Section_UE.' ',0,1,'L',false);
$pdf->SetXY(150, 56);
$pdf->Cell(0,8,'Section Com UE-UI : '.$G1->Elec_Section_UEUI.' ',0,1,'L',false);
$pdf->SetXY(150, 60);
$pdf->Cell(0,8,'Observations Electrique : '.$G1->Elec_Obs1.' ',0,1,'L',false);

//CADRE info ext
$pdf->SetFont('Helvetica','B','14');
$pdf->SetXY(10, 130);
$pdf->Cell(140,110,'',1,1,'C',false);

$pdf->Image('./ATA/FICHIERS/MES/'.$ID.'/Photos/EDL/UE/EDLUE3.'.$ID.'.jpg',15,135,130);
//$pdf->Image('../../../FICHIERS/MES/'.$ID.'/Photos/EDL/UE/EDLUE3.'.$ID.'.jpg',15,135,130);

//CADRE Remarques ext
$pdf->SetFont('Helvetica','','8');
$pdf->SetXY(150, 130);
$pdf->Cell(0,110,'',1,1,'C',false);

//CADRE conformite
$pdf->SetFont('Helvetica','','14');
$pdf->SetXY(10, 240);
$pdf->Cell(0,10,"INFORMATIONS GENERALES INSTALLATION",1,1,'C',false);
$pdf->SetXY(10, 250);
$pdf->Cell(0,40,'',1,1,'C',false);

$pdf->SetFont('Helvetica','','8');
$pdf->SetXY(15, 250);
$pdf->Cell(0,8,'Abonnement Electrique : '.$G1->Elec_Abo.' ',0,1,'',false);
$pdf->SetXY(15, 254);
$pdf->Cell(0,8,'Type de courant : '.$G1->Elec_Alim.' ',0,1,'',false);
if($G1->Elec_Alim =="Mono"){
    
$pdf->SetXY(15, 258);
$pdf->Cell(0,8,'Tension de base : '.$G1->Elec_Tension_Base_Mono.'V',0,1,'',false);
$pdf->SetXY(15, 262);
$pdf->Cell(0,8,'Presence de la Terre : '.$G1->Elec_Terre.' ',0,1,'',false);

}

if($G1->Elec_Alim =="Tri"){
    $pdf->Cell(0,8,'Tension de base L1N : '.$G1->Elec_Tension_Base_L1N.' ',0,1,'',false);
    $pdf->SetXY(15, 262);
    $pdf->Cell(0,8,'Tension de base L2N : '.$G1->Elec_Tension_Base_L2N.' ',0,1,'',false);
    $pdf->SetXY(15, 266);
    $pdf->Cell(0,8,'Tension de base L3N : '.$G1->Elec_Tension_Base_L3N.' ',0,1,'',false);
    $pdf->SetXY(15, 270);
    $pdf->Cell(0,8,'Presence de la Terre : '.$G1->Elec_Terre.' ',0,1,'',false);
    
    }




//PAGE 3 EDL UE ENTREE
$pdf->AddPage();

//CADRE info ext
$pdf->SetFont('Helvetica','B','14');
$pdf->SetXY(10, 10);
$pdf->Cell(140,10,'ETAT DES LIEUX MODULE INTERIEUR',1,1,'C',false);

//CADRE Remarques ext
$pdf->SetFont('Helvetica','B','14');
$pdf->SetXY(150, 10);
$pdf->Cell(0,10,'Observations',1,1,'C',false);

//INFO Info ext
$pdf->SetXY(10, 20);
$pdf->Cell(140,110,'',1,0,'C',false);
$pdf->Cell(0,110,'',1,1,'C',false);
$pdf->Image('./ATA/FICHIERS/MES/'.$ID.'/Photos/EDL/UI/EDLUI1.'.$ID.'.jpg',15,25,130);
//$pdf->Image('../../../FICHIERS/MES/'.$ID.'/Photos/EDL/UI/EDLUI1.'.$ID.'.jpg',15,25,130);
//Observations
$pdf->SetFont('Helvetica','','10');
$pdf->SetXY(150, 20);
$pdf->Cell(0,8,'General Installation',0,1,'',false);

$pdf->SetFont('Helvetica','','8');
$pdf->SetXY(150, 24);
$pdf->Cell(0,8,'UI Raccordement : '.$G1->UI_Eau.' ',0,1,'',false);
$pdf->SetXY(150, 28);
$pdf->Cell(0,8,'Observations : '.$G1->UI_Obs.' ',0,1,'',false);
$pdf->SetXY(150, 32);
$pdf->Cell(0,8,'Numero de serie : '.$G1->UI_NumS.' ',0,1,'',false);
$pdf->SetXY(150, 36);

$pdf->SetFont('Helvetica','','10');
$pdf->SetXY(150, 40);

$pdf->Cell(0,8,'Electrique',0,1,'',false);

$pdf->SetFont('Helvetica','','8');
$pdf->SetXY(150, 44);
$pdf->Cell(0,8,'Protection Electrique UI : '.$G1->Elec_Protection_UI.'A ',0,1,'',false);
$pdf->SetXY(150, 48);
$pdf->Cell(0,8,'Protection Electrique Appoint : '.$G1->Elec_Protection_Appoint.'A ',0,1,'',false);
$pdf->SetXY(150, 52);
$pdf->Cell(0,8,'Protection Differentielle : '.$G1->Elec_Protection_Dif.'A ',0,1,'',false);
$pdf->SetXY(150, 56);
$pdf->Cell(0,8,'Section Alimentation UI : '.$G1->Elec_Section_UI.' ',0,1,'',false);
$pdf->SetXY(150, 60);
$pdf->Cell(0,8,'Section Alimentation Appoint : '.$G1->Elec_Section_Appoint.' ',0,1,'',false);

$pdf->SetFont('Helvetica','','10');
$pdf->SetXY(150, 68);

$pdf->Cell(0,8,'Hydraulique',0,1,'',false);



$pdf->SetFont('Helvetica','','8');


$pdf->SetXY(150, 72);
$pdf->Cell(0,8,'Volume Vase Total : '.$G1->UI_VaseExpVol.' L',0,1,'L',false);
$pdf->SetXY(150, 76);
$pdf->Cell(0,8,'Section du Primaire : '.$G1->UI_secprim.' ',0,1,'L',false);
$pdf->SetXY(150, 80);
$pdf->Cell(0,8,'Section Ecs : '.$G1->UI_sececs.' ',0,1,'L',false);
$pdf->SetXY(150, 84);
$pdf->Cell(0,8,'Fuite reperee : '.$G1->UI_Fuite.' ',0,1,'L',false);
$pdf->SetXY(150, 88);
$pdf->Cell(0,8,'Clapet Securite : '.$G1->UI_clapet.' ',0,1,'L',false);
$pdf->SetXY(150, 92);
$pdf->Cell(0,8,'Disconnecteur : '.$G1->UI_disco.' ',0,1,'L',false);
$pdf->SetXY(150, 96);
$pdf->Cell(0,8,'Filtre : '.$G1->UI_filtre.' ',0,1,'L',false);
$pdf->SetXY(150, 100);
$pdf->Cell(0,8,'Emetteurs : '.$G1->UI_Reseau.' ',0,1,'L',false);
$pdf->SetXY(150, 104);
$pdf->Cell(0,8,'Volume Eau Total : '.$G1->UI_Volume.' L',0,1,'L',false);


//CADRE info ext
$pdf->SetFont('Helvetica','B','14');
$pdf->SetXY(10, 130);
$pdf->Cell(140,110,'',1,1,'C',false);
$pdf->Image('./ATA/FICHIERS/MES/'.$ID.'/Photos/EDL/UI/EDLUI3.'.$ID.'.jpg',15,135,130);
//$pdf->Image('../../../FICHIERS/MES/'.$ID.'/Photos/EDL/UI/EDLUI3.'.$ID.'.jpg',15,135,130);

//CADRE Remarques ext
$pdf->SetFont('Helvetica','','8');
$pdf->SetXY(150, 130);
$pdf->Cell(0,110,'',1,1,'C',false);

//CADRE conformite
$pdf->SetFont('Helvetica','','14');
$pdf->SetXY(10, 240);
$pdf->Cell(0,10,"CONFORMITE DE L'INSTALLATION",1,1,'C',false);
$pdf->SetXY(10, 250);
$pdf->Cell(0,40,'',1,1,'C',false);

//Partie Hydraulique
$pdf->SetFont('Helvetica','','10');
$pdf->SetXY(15, 250);
$pdf->Cell(0,8,'Conformite Hydraulique',0,1,'',false);

$pdf->SetFont('Helvetica','','8');
$pdf->SetXY(15, 254);
$pdf->Cell(0,8,'Volume Eau Total : '.$G1->UI_VolumeConf.' ',0,1,'',false);
$pdf->SetXY(15, 258);
$pdf->Cell(0,8,'Volume Vase Expansion  : '.$G1->UI_VaseExp.' ',0,1,'',false);
$pdf->SetXY(15, 262);
$pdf->Cell(0,8,'Raccordement Hydraulique  : '.$G1->UI_Racc.' ',0,1,'',false);

//Partie Electrique
$pdf->SetFont('Helvetica','','10');
$pdf->SetXY(120, 250);
$pdf->Cell(0,8,'Conformite Electrique',0,1,'',false);

$pdf->SetFont('Helvetica','','8');
$pdf->SetXY(120, 254);
$pdf->Cell(0,8,'Puissance Abonnement Electrique : '.$G1->Elec_Abo_Detail.' ',0,1,'',false);
$pdf->SetXY(120, 258);
$pdf->Cell(0,8,'Section Electrique  : '.$G1->Elec_Section.' ',0,1,'',false);
$pdf->SetXY(120, 262);
$pdf->Cell(0,8,'Protection Electrique  : '.$G1->Elec_Protection.' ',0,1,'',false);
$pdf->SetXY(120, 266);
$pdf->Cell(0,8,'Raccordement Electrique  : '.$G1->Elec_Racc.' ',0,1,'',false);



//PAGE 4 PRESENTATION DOSSIER
$pdf->AddPage();
//$pdf->setSourceFile('../Required/pdf/mes.pdf');
$pdf->setSourceFile('./ATA/INTRANET/Tech/Required/pdf/mes.pdf');
$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx, 0, 0, 210); 
$pdf->SetFont('Helvetica','','8');
//Num serie UE
$pdf->SetXY(60, 26);
$pdf->Cell(0,8,''.$G1->UE_NumS.' ',0,1,'',false);
//Num serie UI
$pdf->SetXY(146, 26);
$pdf->Cell(0,8,''.$G1->UI_NumS.' ',0,1,'',false);
//Modele UE
$pdf->SetXY(60, 31);
$pdf->Cell(0,8,''.$r5->modele.' ',0,1,'',false);
//Modele UI
$pdf->SetXY(146, 31);
$pdf->Cell(0,8,''.$r6->modele.' ',0,1,'',false);
//Type de gaz
$pdf->SetXY(60, 39);
$pdf->Cell(0,8,''.$G1->Gaz_Type.' ',0,1,'',false);
//Charge Totale
$pdf->SetXY(176, 39);
$pdf->Cell(0,8,''.$r7->ChargeT.' ',0,1,'',false);
//Respect implantation
$pdf->SetXY(80, 51);
$pdf->Cell(0,8,''.$G1->UE_Emp.' ',0,1,'',false);
//Respect condensats
$pdf->SetXY(80, 56);
$pdf->Cell(0,8,''.$G1->UE_Emp.' ',0,1,'',false);
//Racco elelctrique
$pdf->SetXY(80, 61);
$pdf->Cell(0,8,''.$G1->Elec_Racc.' ',0,1,'',false);
//Fuite Gaz
$pdf->SetXY(80, 68);
$pdf->Cell(0,8,'Etanche',0,1,'',false);
//Fuite detecteur
$pdf->SetXY(44, 69);
$pdf->Cell(0,8,''.$r7->IdetectF.'',0,1,'',false);
//Longueur liaison
$pdf->SetXY(82, 73.8);
$pdf->Cell(0,8,''.$G1->Gaz_Lg_Liaison.'',0,1,'',false);
//Temp refoul
$pdf->SetXY(82, 83.5);
$pdf->Cell(0,8,''.$G1->Gaz_Temp_Refoul.'',0,1,'',false);
//Temp liquide
$pdf->SetXY(82, 88.5);
$pdf->Cell(0,8,''.$G1->Gaz_Temp_Liquide.'',0,1,'',false);
//Temp condensation
$pdf->SetXY(82, 93.5);
$pdf->Cell(0,8,''.$G1->Gaz_Temp_Condens.'',0,1,'',false);
//Press condensation
$pdf->SetXY(58, 93.5);
$pdf->Cell(0,8,''.$G1->Gaz_Press_Condens.'',0,1,'',false);
//Temp Eau Dep
$pdf->SetXY(82, 98.5);
$pdf->Cell(0,8,''.$G1->Eau_Temp_Dep.'',0,1,'',false);
//Temp Eau Retour
$pdf->SetXY(82, 103.5);
$pdf->Cell(0,8,''.$G1->Eau_Temp_Retour.'',0,1,'',false);
//Temp Evaporation
$pdf->SetXY(82, 108.5);
$pdf->Cell(0,8,''.$G1->Gaz_Temp_Evap.'',0,1,'',false);
//Press Evaporation
$pdf->SetXY(58, 108.5);
$pdf->Cell(0,8,''.$G1->Gaz_Temp_Evap.'',0,1,'',false);
//Temp aspiration
$pdf->SetXY(82, 113);
$pdf->Cell(0,8,''.$G1->Gaz_Temp_Aspi.'',0,1,'',false);
//Temp air Amb
$pdf->SetXY(82, 118);
$pdf->Cell(0,8,''.$G1->Air_Temp_Amb.'',0,1,'',false);
//Temp air bat
$pdf->SetXY(82, 123);
$pdf->Cell(0,8,''.$G1->Air_Temp_Bat.'',0,1,'',false);

//Reseau secondaire
if($G1->UI_Reseau=='PC'){
$pdf->SetXY(82, 132);
$pdf->Cell(0,8,'X',0,1,'',false);}
if($G1->UI_Reseau=='Rad'){
$pdf->SetXY(82, 137);
$pdf->Cell(0,8,'X',0,1,'',false);}
if($G1->UI_Reseau=='PCRad'){
$pdf->SetXY(82, 142);
$pdf->Cell(0,8,'X',0,1,'',false);}

//Volume Eau
$pdf->SetXY(90, 152);
$pdf->Cell(0,8,''.$G1->UI_Volume.'',0,1,'',false);

//Tensions
if($G1->Elec_Type == "Mono"){
$pdf->SetXY(130, 51.5);
$pdf->Cell(0,8,''.$G1->Elec_Tension_LN.'',0,1,'',false);
$pdf->SetXY(130, 67.5);
$pdf->Cell(0,8,''.$G1->Elec_Tension_LT.'',0,1,'',false);
$pdf->SetXY(130, 83.5);
$pdf->Cell(0,8,''.$G1->Elec_Tension_NT.'',0,1,'',false);
$pdf->SetXY(130, 88.5);
$pdf->Cell(0,8,''.$G1->Elec_Icomp.'',0,1,'',false);

}
if($G1->Elec_Type == "Tri"){
    $pdf->SetXY(130, 51.5);
    $pdf->Cell(0,8,''.$G1->Elec_Tension_L1N.'',0,1,'',false);
    $pdf->SetXY(130, 56.5);
    $pdf->Cell(0,8,''.$G1->Elec_Tension_L2N.'',0,1,'',false);
    $pdf->SetXY(130, 61.5);
    $pdf->Cell(0,8,''.$G1->Elec_Tension_L3N.'',0,1,'',false);

    $pdf->SetXY(130, 67.5);
    $pdf->Cell(0,8,''.$G1->Elec_Tension_L1T.'',0,1,'',false);
    $pdf->SetXY(130, 73.5);
    $pdf->Cell(0,8,''.$G1->Elec_Tension_L2T.'',0,1,'',false);
    $pdf->SetXY(130, 78.5);
    $pdf->Cell(0,8,''.$G1->Elec_Tension_L3T.'',0,1,'',false);

    $pdf->SetXY(130, 83.5);
    $pdf->Cell(0,8,''.$G1->Elec_Tension_NT.'',0,1,'',false);
    $pdf->SetXY(130, 88.5);
    $pdf->Cell(0,8,''.$G1->Elec_Icomp.'',0,1,'',false);
    
    }

//SR
$pdf->SetXY(176,93.5);
$pdf->Cell(0,8,''.$G1->Gaz_SR.'',0,1,'',false);

//DT condensation
$DTcondens = $G1->Gaz_Temp_Refoul-$G1->Gaz_Temp_Liquide;
$pdf->SetXY(176,98.5);
$pdf->Cell(0,8,''.$DTcondens.'',0,1,'',false);

//DT secondaire
$pdf->SetXY(176,103.5);
$pdf->Cell(0,8,''.$G1->Eau_DT.'',0,1,'',false);

//SC
$pdf->SetXY(176,113);
$pdf->Cell(0,8,''.$G1->Gaz_SC.'',0,1,'',false);

//Temp Evap
$pdf->SetXY(176,122.5);
$pdf->Cell(0,8,''.$G1->Air_DT.'',0,1,'',false);


//PAGE 5 RECEPTION DOSSIER
$pdf->AddPage(); 
$pdf->SetFont('Helvetica','','8');

//CADRE info ext
$pdf->SetFont('Helvetica','B','14');
$pdf->SetXY(10, 10);
$pdf->Cell(190,10,'PHOTOS DE RECEPTION UE ET UI',1,1,'C',false);

//CADRE Remarques ext
$pdf->SetFont('Helvetica','B','14');


//INFO Info ext
$pdf->SetXY(10, 20);

$pdf->Cell(190,130,'',1,1,'C',false);
$pdf->Image('./ATA/FICHIERS/MES/'.$ID.'/Photos/Recep/UE/UE1.'.$ID.'.jpg',15,25,180);
//$pdf->Image('../../../FICHIERS/MES/'.$ID.'/Photos/Recep/UE/UE1.'.$ID.'.jpg',30,25,150);
//Observations


//CADRE info ext
$pdf->SetFont('Helvetica','B','14');
$pdf->SetXY(10, 150);
$pdf->Cell(190,130,'',1,1,'C',false);

//$pdf->Image('../../../FICHIERS/MES/'.$ID.'/Photos/Recep/UI/UI1.'.$ID.'.jpg',30,160,150);
$pdf->Image('./ATA/FICHIERS/MES/'.$ID.'/Photos/Recep/UI/UI1.'.$ID.'.jpg',30,160,150);


//PAGE 6 Integration Cerfa
$pdf->AddPage(); 

//$pdf->setSourceFile('../../../FICHIERS/MES/'.$ID.'/Cerfa/Cerfa'.$ID.'.pdf');
$pdf->setSourceFile('./ATA/FICHIERS/MES/'.$ID.'/Cerfa/Cerfa'.$ID.'.pdf');
$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx, 0, 0, 210); 

$pdf->SetFont('Helvetica','','8');



//PAGE  testo1
$pdf->AddPage(); 

//$pdf->setSourceFile('../../../FICHIERS/MES/'.$ID.'/Tech/Testo1.'.$ID.'.pdf');
$pdf->setSourceFile('./ATA/FICHIERS/MES/'.$ID.'/Tech/Testo1.'.$ID.'.pdf');

$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx, 0, 0, 210); 

$pdf->SetFont('Helvetica','','8');

//PAGE testo2
$pdf->AddPage(); 

//$pdf->setSourceFile('../../../FICHIERS/MES/'.$ID.'/Tech/Testo2.'.$ID.'.pdf');
$pdf->setSourceFile('./ATA/FICHIERS/MES/'.$ID.'/Tech/Testo2.'.$ID.'.pdf');

$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx, 0, 0, 210); 

$pdf->SetFont('Helvetica','','8');



//Sortie du fichier
$pdf->Output('F', './ATA/FICHIERS/MES/'.$ID.'/Rapport/Rapport'.$ID.'.pdf'); 

$Update = $dbco->prepare('UPDATE gest_mes_detail SET ID_mes = :id, Etat = :Etat WHERE ID_mes = :id'); 
    
$Update->bindvalue('id', $ID);
$Update->bindvalue('Etat',"Termine");
$Update->execute();


$Update = $dbco->prepare('UPDATE gest_mes SET ID_Mes = :id, Etat = :Etat WHERE ID_Mes = :id'); 
    
$Update->bindvalue('id', $ID);
$Update->bindvalue('Etat',"Termine");
$Update->execute();

//$pdf->Output("I", 'test');