| Current Path : /home/ataenra/www/ATA/INTRANET/Tech/ |
| Current File : /home/ataenra/www/ATA/INTRANET/Tech/modifcalculFgaz.php |
<?php
//Numero de la fiche
$d1 = Date('Y');
$d2 = Date('d-m-Y');
$NumFiche = "".$d1."/C".$ID."/O".$R1->EQ."/";
//Detendeur de l'installation
$nomD = "".$R1->nom." ".$R1->prenom."";
$adresseD = "".$R1->rueC." ".$R1->CodePC." ".$R1->VilleC."";
$SiretD = "0";
if(isset($_POST['SiretD'])){$SiretD = $_POST['SiretD'];}
//NumCapacite
$NumCapacite = "SQ01933-001";
//Equipement
$Equipement = "".$R2->Marque." ".$R2->modele."";
//Fluide
if(isset($_POST['FLUIDE'])){$Fluide = $_POST['FLUIDE'];}else{$Fluide = $R2->GAZ;}
//Intervention
if(isset($_POST['INTERV'])){$Interv = $_POST['INTERV'];}else{$Interv = $R2->GAZ;}
//Identifiant Detecteur fuite
if(isset($_POST['DETECT'])){$IdetectF = $_POST['DETECT'];}else{$IdetectF = $R3->ref;}
$DControle = $R3->Dcontrol;
//Fuite sur installation
$PDfuite = "Non";
$Cfuites = "Non";
$Rfuites = "0"; //AJOUTER REPARATION FUITE POUR DEPANNEURS
//Quantite FLUDIE SELON INTERVENTION
if(isset($_POST['CHARGEI'])){$QuantiteI = $_POST['CHARGEI'];}
$QA = "0";
if(isset($_POST['CHARGEADD'])){$QA = $_POST['CHARGEADD'];}
$QB = "0";
$QC = "0";
$QD = "0";
$QE = "0";
$Trackdechets = "0";
$IDrecup = "0";
$DechetsA = "0";
$DechetsB = "0";
$InstallDesti = "0";
//OBSERVATIONS
$Observations = "0";
if(isset($_POST['OBSERVATIONS'])){$Observations = $_POST['OBSERVATIONS'];}
$OPnom = $R4->Nom;
$OPqualite = "Technicien";
$DateA = $d2;
if($QA!= "0"){$ChargeT = $QuantiteI+$QA;}else{$ChargeT = $QuantiteI;}
if($Fluide == "R-32"){
$PRG = 0.675; $TCo2 = $ChargeT*$PRG;
if($TCo2 <5){$Quantite = "0";}elseif(($TCo2 >5 )&&($TCo2 <50)){$Quantite = "5";}else{$Quantite = "50";}
}
if($Fluide == "R-410A"){
$PRG = 2.087; $TCo2 = $ChargeT*$PRG;
if($TCo2 <5){$Quantite = "0";}elseif(($TCo2 >5 )&&($TCo2 <50)){$Quantite = "5";}else{$Quantite = "50";}
}
if($Fluide == "R-290"){
$PRG = 0.003; $TCo2 = $ChargeT*$PRG;
if($TCo2 <5){$Quantite = "0";}elseif(($TCo2 >5 )&&($TCo2 <50)){$Quantite = "5";}else{$Quantite = "50";}
}
$sth = $dbco->prepare("UPDATE fgaz SET NumFiche=:NumFiche, nomD=:nomD, adresseD=:adresseD, NumCapacite=:NumCapacite, Equipement=:Equipement, Fluide=:Fluide, ChargeT=:ChargeT, TCo2=:TCo2, Interv=:Interv,
IdetectF=:IdetectF, DControle=:DControle, PDfuite=:PDfuite, Quantite=:Quantite, Cfuites=:Cfuites, Rfuites=:Rfuites, QuantiteI=:QuantiteI, QA=:QA, QB=:QB, QC=:QC, QD=:QD, QE=:QE, Trackdechets=:Trackdechets,
IDrecup=:IDrecup, DechetsA=:DechetsA, DechetsB=:DechetsB, InstallDesti=:InstallDesti, Observations=:Observations, OPnom=:OPnom, OPqualite=:OPqualite, DateA=:DateA WHERE ID =:ID" );
$sth->bindParam(':ID',$Fgaz);
$sth->bindParam(':NumFiche',$NumFiche);
$sth->bindParam(':nomD',$nomD);
$sth->bindParam(':adresseD',$adresseD);
$sth->bindParam(':NumCapacite',$NumCapacite);
$sth->bindParam(':Equipement',$Equipement);
$sth->bindParam(':Fluide',$Fluide);
$sth->bindParam(':ChargeT',$ChargeT);
$sth->bindParam(':TCo2',$TCo2);
$sth->bindParam(':Interv',$Interv);
$sth->bindParam(':IdetectF',$IdetectF);
$sth->bindParam(':DControle',$DControle);
$sth->bindParam(':PDfuite',$PDfuite);
$sth->bindParam(':Quantite',$Quantite);
$sth->bindParam(':Cfuites',$Cfuites);
$sth->bindParam(':Rfuites',$Rfuites);
$sth->bindParam(':QuantiteI',$QuantiteI);
$sth->bindParam(':QA',$QA);
$sth->bindParam(':QB',$QB);
$sth->bindParam(':QC',$QC);
$sth->bindParam(':QD',$QD);
$sth->bindParam(':QE',$QE);
$sth->bindParam(':Trackdechets',$Trackdechets);
$sth->bindParam(':IDrecup',$IDrecup);
$sth->bindParam(':DechetsA',$DechetsA);
$sth->bindParam(':DechetsB',$DechetsB);
$sth->bindParam(':InstallDesti',$InstallDesti);
$sth->bindParam(':DechetsA',$DechetsA);
$sth->bindParam(':Observations',$Observations);
$sth->bindParam(':OPnom',$OPnom);
$sth->bindParam(':OPqualite',$OPqualite);
$sth->bindParam(':DateA',$DateA);
$sth->execute();
?>