| Current Path : /home/ataenra/www/ATA/INTRANET/Tech/MesSav/ |
| Current File : /home/ataenra/www/ATA/INTRANET/Tech/MesSav/RappGen.php |
<?php
if(isset($_GET['V'])){$V="1";}else{$V="0";}
if(isset($_GET['P'])){$P=$_GET['P'];}else{$P="ALL";}
use setasign\Fpdi\Fpdi;
if($V == 1){
require_once('../../Outils/fpdf/fpdf.php');
require_once('../../Outils/FPDI-2.3.7/src/autoload.php');
}else{
require_once('./ATA/INTRANET/Outils/fpdf/fpdf.php');
require_once('./ATA/INTRANET/Outils/FPDI-2.3.7/src/autoload.php');
}
$ID = $_GET['ID'];
if($V == 0){
require ('./ATA/INTRANET/Outils/co.php');}else{
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);
if($V == 0){
$projet ="./ATA/FICHIERS/MES/".$ID."/Rapport";
if (!is_dir($projet)) {mkdir($projet, 0777,true);}}else{
$projet ="../../../FICHIERS/MES/".$ID."/Rapport";
if (!is_dir($projet)) {mkdir($projet, 0777,true);
}}
// initiate FPDI
$pdf= new FPDI();
$pdf->SetAutoPagebreak(False);
//PAGE 1 PRESENTATION DOSSIER
if($P == 1 || $P== "ALL"){
$pdf->AddPage();
if($V == 0){
$pdf->setSourceFile('./ATA/INTRANET/Tech/Required/pdf/Dos_MES_Couv.pdf');}else
{$pdf->setSourceFile('../Required/pdf/Dos_MES_Couv.pdf');}
$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx, 0, 0, 210);
//Numero de dossier
$pdf->SetFont('Helvetica','','12');
$pdf->SetXY(156, 87.5);
$pdf->Cell(50,8,'MES.'.$G1->ID_Mes.'',0,0,'L',false);
//Reference Fabricant
$pdf->SetFont('Helvetica','','14');
$pdf->SetXY(60, 108);
$pdf->Cell(50,8,''.$G1->RefF.'',0,0,'L',false);
//Date de saisie intervention
$dateS = $G1->DateS;
$DS = new DateTime($dateS);
$pdf->SetXY(60, 132.5);
$pdf->Cell(50,8,''.$DS->Format('d-m-Y').'',0,0,'L',false);
//Date planifie
$dateP = $G1->DateP;
$DP = new DateTime($dateP);
$pdf->SetXY(60, 141);
$pdf->Cell(50,8,''.$DP->Format('d-m-Y').'',0,0,'L',false);
//Date realisation
$dateR = $G1->DateR;
$DR = new DateTime($dateR);
$pdf->SetXY(60, 149.5);
$pdf->Cell(50,8,''.$DR->Format('d-m-Y').'',0,0,'L',false);
//Coordonnees NomC
$pdf->SetXY(50, 174);
$pdf->Cell(50,8,''.$G1->NomC.'',0,0,'L',false);
$pdf->SetXY(50, 181.9);
$pdf->Cell(50,8,''.$G1->EmailC.'',0,0,'L',false);
$pdf->SetXY(65, 206.5);
$pdf->Cell(50,8,''.$G1->AdresseC.'',0,0,'L',false);
$pdf->SetXY(65, 217);
$pdf->Cell(50,8,''.$G1->CPC.'',0,0,'L',false);
$pdf->SetXY(65, 227.5);
$pdf->Cell(50,8,''.$G1->VilleC.'',0,0,'L',false);
if($G1->Fabricant != "ATA"){
//Image du fabricant
$pdf->SetXY(10, 135);
if($V == 0){
$pdf->Image('./ATA/INTRANET/Outils/required/'.$G1->Fabricant.'.png',90,10,100);}else{
$pdf->Image('../../Outils/required/'.$G1->Fabricant.'.png',90,10,100);}}
}
//PAGE 2 EDL UE ENTREE
if($P == 2 || $P== "ALL"){
$pdf->AddPage();
if($V == 0){
$pdf->setSourceFile('./ATA/INTRANET/Tech/Required/pdf/Dos_MES_Fond.pdf');}else{
$pdf->setSourceFile('../Required/pdf/Dos_MES_Fond.pdf');}
$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx, 0, 0, 210);
//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);
if($V == 0){
$pdf->Image('./ATA/FICHIERS/MES/'.$ID.'/Photos/EDL/UE/EDLUE1.'.$ID.'.jpg',15,25,130);}else{
$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);
if($V == 0){
$pdf->Image('./ATA/FICHIERS/MES/'.$ID.'/Photos/EDL/UE/EDLUE3.'.$ID.'.jpg',15,135,130);}else{
$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,30,'',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
if($P == 3 || $P== "ALL"){
$pdf->AddPage();
if($V == 0){
$pdf->setSourceFile('./ATA/INTRANET/Tech/Required/pdf/Dos_MES_Fond.pdf');}else{
$pdf->setSourceFile('../Required/pdf/Dos_MES_Fond.pdf');}
$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx, 0, 0, 210);
//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);
if($V == 0){
$pdf->Image('./ATA/FICHIERS/MES/'.$ID.'/Photos/EDL/UI/EDLUI1.'.$ID.'.jpg',15,25,130);}else{
$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);
if($V == 0){
$pdf->Image('./ATA/FICHIERS/MES/'.$ID.'/Photos/EDL/UI/EDLUI3.'.$ID.'.jpg',15,135,130);}else{
$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
if($P == 4 || $P== "ALL"){
$pdf->AddPage();
if($V == 0){
$pdf->setSourceFile('./ATA/INTRANET/Tech/Required/pdf/Dos_MES_FichTech.pdf');}else{
$pdf->setSourceFile('../Required/pdf/Dos_MES_FichTech.pdf');
}
$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx, 0, 0, 210);
$pdf->SetFont('Helvetica','','8');
//Num serie UE
$pdf->SetXY(62, 64.5);
$pdf->Cell(0,8,''.$G1->UE_NumS.' ',0,1,'',false);
//Num serie UI
$pdf->SetXY(151.5, 64.5);
$pdf->Cell(0,8,''.$G1->UI_NumS.' ',0,1,'',false);
//Modele UE
$pdf->SetFont('Helvetica','','6');
$pdf->SetXY(61, 69.5);
$pdf->Cell(0,8,''.$r5->modele.' ',0,1,'',false);
//Modele UI
$pdf->SetXY(151.5,70);
$pdf->Cell(0,8,''.$r6->modele.' ',0,1,'',false);
//Type de gaz
$pdf->SetFont('Helvetica','','8');
$pdf->SetXY(62, 77.5);
$pdf->Cell(0,8,''.$G1->Gaz_Type.' ',0,1,'',false);
//Charge Totale
$pdf->SetXY(151.5, 77.5);
$pdf->Cell(0,8,''.$r7->ChargeT.' ',0,1,'',false);
//Respect implantation
$pdf->SetXY(85.5, 90);
$pdf->Cell(0,8,''.$G1->UE_Emp.' ',0,1,'',false);
//Respect condensats
$pdf->SetXY(85.5, 95.5);
$pdf->Cell(0,8,''.$G1->UE_Emp.' ',0,1,'',false);
//Racco electrique
$pdf->SetXY(85.5,100);
$pdf->Cell(0,8,''.$G1->Elec_Racc.' ',0,1,'',false);
//Fuite Gaz
$pdf->SetXY(85.5, 108);
$pdf->Cell(0,8,'Etanche',0,1,'',false);
//Fuite detecteur
$pdf->SetXY(50, 108);
$pdf->Cell(0,8,''.$r7->IdetectF.'',0,1,'',false);
//Longueur liaison
$pdf->SetXY(88.5, 112.5);
$pdf->Cell(0,8,''.$G1->Gaz_Lg_Liaison.'',0,1,'',false);
//Temp refoul
$pdf->SetXY(88.5, 122);
$pdf->Cell(0,8,''.$G1->Gaz_Temp_Refoul.'',0,1,'',false);
//Temp liquide
$pdf->SetXY(88.5, 127.5);
$pdf->Cell(0,8,''.$G1->Gaz_Temp_Liquide.'',0,1,'',false);
//Temp condensation
$pdf->SetXY(88.5, 131.5);
$pdf->Cell(0,8,''.$G1->Gaz_Temp_Condens.'',0,1,'',false);
//Press condensation
$pdf->SetXY(60, 132);
$pdf->Cell(0,8,''.$G1->Gaz_Press_Condens.'',0,1,'',false);
//Temp Eau Dep
$pdf->SetXY(88.5, 136.5);
$pdf->Cell(0,8,''.$G1->Eau_Temp_Dep.'',0,1,'',false);
//Temp Eau Retour
$pdf->SetXY(88.5, 141.5);
$pdf->Cell(0,8,''.$G1->Eau_Temp_Retour.'',0,1,'',false);
//Temp Evaporation
$pdf->SetXY(88.5, 147);
$pdf->Cell(0,8,''.$G1->Gaz_Temp_Evap.'',0,1,'',false);
//Press Evaporation
$pdf->SetXY(60, 146);
$pdf->Cell(0,8,''.$G1->Gaz_Press_Evap.'',0,1,'',false);
//Temp aspiration
$pdf->SetXY(88.5, 151);
$pdf->Cell(0,8,''.$G1->Gaz_Temp_Aspi.'',0,1,'',false);
//Temp air Amb
$pdf->SetXY(88.5, 156);
$pdf->Cell(0,8,''.$G1->Air_Temp_Amb.'',0,1,'',false);
//Temp air bat
$pdf->SetXY(88.5, 161);
$pdf->Cell(0,8,''.$G1->Air_Temp_Bat.'',0,1,'',false);
//Reseau secondaire
if($G1->UI_Reseau=='PC'){
$pdf->SetXY(88, 170);
$pdf->Cell(0,8,'u',0,1,'',false);}
if($G1->UI_Reseau=='Rad'){
$pdf->SetXY(88, 175.5);
$pdf->Cell(0,8,'X',0,1,'',false);}
if($G1->UI_Reseau=='PCRad'){
$pdf->SetXY(88, 180.5);
$pdf->Cell(0,8,'O',0,1,'',false);}
//Volume Eau
$pdf->SetXY(94.5, 190.5);
$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,'ln'.$G1->Elec_Tension_LN.'',0,1,'',false);
$pdf->SetXY(130, 67.5);
$pdf->Cell(0,8,'lt'.$G1->Elec_Tension_LT.'',0,1,'',false);
$pdf->SetXY(130, 83.5);
$pdf->Cell(0,8,'nt'.$G1->Elec_Tension_NT.'',0,1,'',false);
$pdf->SetXY(130, 88.5);
$pdf->Cell(0,8,'icomp'.$G1->Elec_Icomp.'',0,1,'',false);
}
if($G1->Elec_Type == "Tri"){
$pdf->SetXY(130, 90);
$pdf->Cell(0,8,''.$G1->Elec_Tension_L1N.'',0,1,'',false);
$pdf->SetXY(130, 95);
$pdf->Cell(0,8,''.$G1->Elec_Tension_L2N.'',0,1,'',false);
$pdf->SetXY(130, 100);
$pdf->Cell(0,8,''.$G1->Elec_Tension_L3N.'',0,1,'',false);
$pdf->SetXY(130, 107.5);
$pdf->Cell(0,8,''.$G1->Elec_Tension_L1T.'',0,1,'',false);
$pdf->SetXY(130, 112.5);
$pdf->Cell(0,8,''.$G1->Elec_Tension_L2T.'',0,1,'',false);
$pdf->SetXY(130, 117.5);
$pdf->Cell(0,8,''.$G1->Elec_Tension_L3T.'',0,1,'',false);
$pdf->SetXY(130, 122.5);
$pdf->Cell(0,8,''.$G1->Elec_Tension_NT.'',0,1,'',false);
$pdf->SetXY(130, 127.5);
$pdf->Cell(0,8,''.$G1->Elec_Icomp.'',0,1,'',false);
}
//SR
$pdf->SetXY(177,131.5);
$pdf->Cell(0,8,''.$G1->Gaz_SR.'',0,1,'',false);
//DT condensation
$DTcondens = $G1->Gaz_Temp_Refoul-$G1->Gaz_Temp_Liquide;
$pdf->SetXY(177,136.5);
$pdf->Cell(0,8,''.$DTcondens.'',0,1,'',false);
//DT secondaire
$pdf->SetXY(177,141.5);
$pdf->Cell(0,8,''.$G1->Eau_DT.'',0,1,'',false);
//SC
$pdf->SetXY(177,152);
$pdf->Cell(0,8,''.$G1->Gaz_SC.'',0,1,'',false);
//Temp Evap
$pdf->SetXY(177,156.5);
$pdf->Cell(0,8,''.$G1->Air_DT.'',0,1,'',false);
}
if($P == 5 || $P== "ALL"){
//PAGE 5 RECEPTION DOSSIER
$pdf->AddPage();
if($V == 0){
$pdf->setSourceFile('./ATA/INTRANET/Tech/Required/pdf/Dos_MES_Fond.pdf');}else{
$pdf->setSourceFile('../Required/pdf/Dos_MES_Fond.pdf');}
$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx, 0, 0, 210);
//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);
if($V == 0){
$pdf->Image('./ATA/FICHIERS/MES/'.$ID.'/Photos/Recep/UE/UE1.'.$ID.'.jpg',15,25,150);}else{
$pdf->Image('../../../FICHIERS/MES/'.$ID.'/Photos/Recep/UE/UE1.'.$ID.'.jpg',15,25,150);}
//Observations
//CADRE info ext
$pdf->SetFont('Helvetica','B','14');
$pdf->SetXY(10, 150);
$pdf->Cell(190,130,'',1,1,'C',false);
if($V == 0){
$pdf->Image('./ATA/FICHIERS/MES/'.$ID.'/Photos/Recep/UI/UI1.'.$ID.'.jpg',15,160,150);}else{
$pdf->Image('../../../FICHIERS/MES/'.$ID.'/Photos/Recep/UI/UI1.'.$ID.'.jpg',15,160,150);}
}
if($P == 6 || $P== "ALL"){
//PAGE 6 Integration Cerfa
$pdf->AddPage();
if($V == 0){
$pdf->setSourceFile('./ATA/FICHIERS/MES/'.$ID.'/Cerfa/Cerfa'.$ID.'.pdf');}else{
$pdf->setSourceFile('../../../FICHIERS/MES/'.$ID.'/Cerfa/Cerfa'.$ID.'.pdf');
}
$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx, 0, 0, 210);
$pdf->SetFont('Helvetica','','8');
}
if($P == 7 || $P== "ALL"){
//PAGE testo1
$pdf->AddPage();
if($V == 0){
$pdf->setSourceFile('./ATA/FICHIERS/MES/'.$ID.'/Tech/Testo1.'.$ID.'.pdf');}else{
$pdf->setSourceFile('../../../FICHIERS/MES/'.$ID.'/Tech/Testo1.'.$ID.'.pdf');
}
$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx, 0, 0, 210);
$pdf->SetFont('Helvetica','','8');
}
//PAGE testo2
if($P == 8 || $P== "ALL"){
$pdf->AddPage();
if($V == 0){
$pdf->setSourceFile('./ATA/FICHIERS/MES/'.$ID.'/Tech/Testo2.'.$ID.'.pdf');}else{
$pdf->setSourceFile('../../../FICHIERS/MES/'.$ID.'/Tech/Testo2.'.$ID.'.pdf');
}
$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx, 0, 0, 210);
$pdf->SetFont('Helvetica','','8');
}
//Sortie du fichier
if($V == 0){
$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();
header("location: ../../../index.php/tmes");
}else{
$pdf->Output("I", 'test');
}