Primo commit: trasferimento del progetto PPEasy

This commit is contained in:
2024-09-18 10:30:50 +02:00
commit eb475f257e
4233 changed files with 1043848 additions and 0 deletions
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_chemicalagentlist" value="name:idtrfchemicalagent;datatype:3,name:idtrf;datatype:3,name:idchemicalagent;datatype:3,name:idchemicalagent;datatype:3,name:name_chemicalagent;datatype:253,name:name_chemicalagent_en;datatype:253,name:idstandard;datatype:3,name:idarticletype;datatype:3,name:variablehelp_chemialagent;datatype:253" />
</info>
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_artchname" value="name:idarticlecharacteristic;datatype:3,name:name_articlecharacteristic;datatype:253,name:name_articlecharacteristic_eng;datatype:253,name:description_articlecharacteristic;datatype:252,name:idarticletype;datatype:3,name:variablehelp_articlecharacteristic;datatype:253" />
</info>
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_manufactlist" value="name:idauditmanufacturer;datatype:3,name:nameauditmanufacturer;datatype:253,name:idtrfdetails;datatype:3,name:idauditdpi;datatype:3,name:idauditdpi;datatype:3,name:idtrfdetails;datatype:3,name:idcertificate;datatype:3,name:certificatenumber;datatype:253,name:issuebycimac;datatype:254,name:moduleselection;datatype:253,name:sampleinstore;datatype:254,name:filenameaudit;datatype:253,name:filenameauditdescription;datatype:253,name:dpicode;datatype:3" />
</info>
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_identpartlist" value="name:ididentificationparts;datatype:3,name:description_identificationparts;datatype:253,name:article_identificationparts;datatype:253,name:color_identificationparts;datatype:253,name:component_identificationparts;datatype:253,name:material_identificationparts;datatype:253,name:cmcreportnumber_identificationparts;datatype:253,name:cmcreportdate_identificationparts;datatype:10,name:thirdlabreportnumber_identificationparts;datatype:253,name:thirdlabreportdate_identificationparts;datatype:10,name:reportof;datatype:253,name:idtrfdetails;datatype:3,name:kindoftest;datatype:254" />
</info>
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_identpartlist" value="name:ididentificationparts;datatype:3,name:description_identificationparts;datatype:253,name:article_identificationparts;datatype:253,name:color_identificationparts;datatype:253,name:component_identificationparts;datatype:253,name:material_identificationparts;datatype:253,name:cmcreportnumber_identificationparts;datatype:253,name:cmcreportdate_identificationparts;datatype:10,name:thirdlabreportnumber_identificationparts;datatype:253,name:thirdlabreportdate_identificationparts;datatype:10,name:reportof;datatype:253,name:idtrfdetails;datatype:3,name:kindoftest;datatype:254" />
</info>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<info>
<infoitem key="UD_auditdpilist" value="name:idauditdpi;datatype:3,name:idtrfdetails;datatype:3,name:idcertificate;datatype:3,name:certificatenumber;datatype:253,name:issuebycimac;datatype:254,name:moduleselection;datatype:253,name:sampleinstore;datatype:254,name:filenameaudit;datatype:253,name:filenameauditdescription;datatype:253,name:dpicode;datatype:3,name:idauditsurveillancetype;datatype:3,name:surveillancenameit;datatype:253,name:surveillancenameen;datatype:253,name:module;datatype:253" />
<infoitem key="UD_fileattachedlist" value="name:idfileattached;datatype:3,name:idtrfdetails;datatype:3,name:filename_fileattached;datatype:253,name:description_fileattached;datatype:252,name:idauditdpi;datatype:3,name:idauditdpi;datatype:3,name:idtrfdetails;datatype:3,name:idcertificate;datatype:3,name:certificatenumber;datatype:253,name:issuebycimac;datatype:254,name:moduleselection;datatype:253,name:sampleinstore;datatype:254,name:filenameaudit;datatype:253,name:filenameauditdescription;datatype:253,name:dpicode;datatype:3" />
</info>
+41
View File
@@ -0,0 +1,41 @@
<?php if ($trfData['idarticletype']==2) { } else { ?>
<?php
$pdf->SetFont('','B','10');
$pdf->Cell(190,6,$otherifopdf,1,0,'C');
$pdf->Ln();
$pdf->SetFont('','','8');
$sizerec=47.5;
$pdf->Cell($sizerec,6,$slippingpdf,1,0,'L',TRUE);
$pdf->Cell($sizerec,6,$trfData['slipping'],1,0,'L',TRUE);
$pdf->Cell($sizerec,6,$orthopedicpdf,1,0,'L',TRUE);
if ($trfData['shoesorthopedic']=='Y') {
$orthresult=utf8_decode("Sì");
} else { $orthresult="No"; }
$pdf->Cell($sizerec,6,$orthresult,1,0,'L',TRUE);
$pdf->Ln();
$pdf->Cell($sizerec,6,$autoclavpdf,1,0,'L',TRUE);
if ($trfData['autoclavable']=='Y') {
$autoclresult=utf8_decode("Sì");
} else { $autoclresult="No"; }
$pdf->Cell($sizerec,6,$autoclresult,1,0,'L',TRUE);
$pdf->Cell($sizerec,6,$esdpdf,1,0,'L',TRUE);
if ($trfData['esd']=='Y') {
$esdresult=utf8_decode($yespdf);
} else { $esdresult=$nopdf; }
$pdf->Cell($sizerec,6,$esdresult,1,0,'L',TRUE);
$pdf->Ln();
$pdf->Cell($sizerec,6,$ukcapdf,1,0,'L',TRUE);
if ($trfData['ukcacert']=='Y') {
$ukcacert=utf8_decode($yespdf);
} else { $ukcacert=$nopdf; }
$pdf->Cell($sizerec,6,$ukcacert,1,0,'L',TRUE);
$pdf->Cell($sizerec,6,'',1,0,'L',TRUE);
$pdf->Cell($sizerec,6,'',1,0,'L',TRUE);
$pdf->Ln();
?>
<?php } ?>
+32
View File
@@ -0,0 +1,32 @@
<?php
if (!empty($addreqlist->getColumnVal("name_additionalrequirements_it"))) {
$pdf->SetFont('','B','10');
$pdf->Cell(190,6,$pdfaddrequirements,1,0,'C');
$pdf->Ln();
$pdf->SetFont('','','8');
$wa_startindex = 0;
while(!$addreqlist->atEnd()) {
$wa_startindex = $stdinfo->Index;
$sizerec=190/$totreq;
// Determina quale campo utilizzare in base alla lingua selezionata
$columnName = ($_SESSION['langselect'] == 'it') ?
"name_additionalrequirements_it" :
"name_additionalrequirements_en";
// Ottieni il valore dal campo appropriato
$nameaddreq = $addreqlist->getColumnVal($columnName);
$nameaddreq = html_entity_decode($nameaddreq, ENT_QUOTES);
$nameaddreq = iconv('UTF-8', 'windows-1252//IGNORE', $nameaddreq);
// Stampa la cella con il valore dei requisiti aggiuntivi indipendentemente dal fatto che sia vuoto o meno
$pdf->Cell(190, 6, $nameaddreq, 1, 0, 'L', TRUE);
$pdf->Ln();
$addreqlist->moveNext();
}
$addreqlist->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
$pdf->Ln();
}
?>
+47
View File
@@ -0,0 +1,47 @@
<?php
//invoice contacts
// ***start with invoice address
$kindcont='audit';
// parse contacts data with variable kindofcontacts
$contactsinfo = mysqli_query($cmctrfdb, "SELECT * FROM contacts WHERE contacts.idtrf='$idtrf' AND contacts.kindofcontacts=
'$kindcont'");
$contactsinfoData = mysqli_fetch_assoc($contactsinfo);
$companyname=$contactsinfoData['companyname'];
$pdf->SetFont('Arial','',8);
$pdf->SetTextColor(0,0,0);
$pdf->SetFont('','B','10');
$audititletop=html_entity_decode($auditplacepdf);
$audititletop = iconv('UTF-8', 'windows-1252', $audititletop);
$pdf->Cell(190,6,$audititletop,1,0,'C');
$pdf->Ln();
$pdf->SetFont('','',8);
$pdf->Cell(40,6,$companypdf,1,0,'C');
$pdf->SetFillColor(232, 242, 255);
$pdf->Cell(150,6,$companyname,1,0,'C',TRUE);
$pdf->Ln();
$pdf->Cell(40,6,$addresspdf,1,0,'C');
$pdf->Cell(150,6,$contactsinfoData['address'],1,0,'C',TRUE);
$pdf->Ln();
$pdf->Cell(40,6,$citypdf,1,0,'C');
$pdf->Cell(55,6,$contactsinfoData['city'],1,0,'C',TRUE);
$pdf->Cell(40,6,$zippdf,1,0,'C');
$pdf->Cell(55,6,$contactsinfoData['cap'],1,0,'C',TRUE);
$pdf->Ln();
$pdf->Cell(40,6,$vatpdf,1,0,'C');
$pdf->Cell(55,6,$contactsinfoData['piva'],1,0,'C',TRUE);
$pdf->Cell(40,6,$countrypdf,1,0,'C');
$pdf->Cell(55,6,$contactsinfoData['country'],1,0,'C',TRUE);
$pdf->Ln();
$pdf->Cell(40,6,$phonepdf,1,0,'C');
$pdf->Cell(55,6,$contactsinfoData['telephone'],1,0,'C',TRUE);
$pdf->Cell(40,6,$emailpdf,1,0,'C');
$pdf->Cell(55,6,$contactsinfoData['email'],1,0,'C',TRUE);
$pdf->Ln();
$pdf->Cell(40,6,$contactnamepdf,1,0,'C');
$pdf->Cell(55,6,$contactsinfoData['contactname'],1,0,'C',TRUE);
$pdf->Cell(40,6,$contactsurnamepdf,1,0,'C');
$pdf->Cell(55,6,$contactsinfoData['contactsurname'],1,0,'C',TRUE);
$pdf->Ln();
?>
+77
View File
@@ -0,0 +1,77 @@
<?php // pdf creation for certification 1
$pdf->SetFont('Arial','',7);
$firstsent=html_entity_decode("Ai sensi e per gli effetti dell’ art. 5 del REG 01 Regolamento per la valutazione della conformità dei Dispositivi di Protezione Individuale");
$firstsent = iconv('UTF-8', 'windows-1252', $firstsent);
$secondsent=utf8_decode('secondo il Regolamento (UE) 2016/425 disponibile sul nostro sito web www.cimac.it');
//$thirdsent=utf8_decode('For the purposes of Article 6 of the REG 01 "Regulation for the assessment of the conformity of Personal Protective Equipment ');
//$foursent=utf8_decode('according to Regulation (EU) 2016/425" available on our website www.cimac.it');
$pdf->Cell(0,0,$firstsent,0,1);
$pdf->Cell(0,9,$secondsent,0,1);
//$pdf->Cell(0,0,$thirdsent,0,1);
//$pdf->Cell(0,9,$foursent,0,1);
//description table
include('pdfcreation/descriptiontable.php');
$pdf->Ln();
// standards table
include('pdfcreation/standardstable.php');
$pdf->Ln();
// additionalinfo
//include('pdfcreation/m30table.php');
$pdf->Ln();
// additionalinfo requirements
include('pdfcreation/addreqtable.php');
$pdf->Ln();
// additionalinfo
include('pdfcreation/addinfotable.php');
$pdf->Ln();
// chem table
include('pdfcreation/chemtable.php');
$pdf->Ln();
//trf option
include('pdfcreation/trfoption.php');
$pdf->Ln();
//trf option
include('pdfcreation/fileattached.php');
$pdf->Ln();
$pdf->Ln();
//header report contact
//include('pdfcreation/headerreporttable.php');
//$pdf->Ln();
//header certificate contact
include('pdfcreation/headercertificatetable.php');
$pdf->Ln();
//invoice contact
include('pdfcreation/invoicecontacttable.php');
$pdf->Ln();
// parts table
//include('pdfcreation/partstable.php');
//$pdf->Ln();
//Sign datatable
include('pdfcreation/signdatatable.php');
$pdf->Ln();
?>
+82
View File
@@ -0,0 +1,82 @@
<?php // pdf creation for certification 1
$pdf->SetFont('Arial','',7);
$firstsent=html_entity_decode('Ai sensi e per gli effetti dell’art. 7 del REG 01 Regolamento per la valutazione della conformità dei Dispositivi di Protezione Individuale');
$firstsent = iconv('UTF-8', 'windows-1252', $firstsent);
$secondsent=utf8_decode('secondo il Regolamento (UE) 2016/425 disponibile sul nostro sito web www.cimac.it');
//$thirdsent=utf8_decode('For the purposes of Article 6 of the REG 01 "Regulation for the assessment of the conformity of Personal Protective Equipment ');
//$foursent=utf8_decode('according to Regulation (EU) 2016/425" available on our website www.cimac.it');
$pdf->Cell(0,0,$firstsent,0,1);
$pdf->Cell(0,9,$secondsent,0,1);
//$pdf->Cell(0,0,$thirdsent,0,1);
//$pdf->Cell(0,9,$foursent,0,1);
//description table
include('pdfcreation/descriptiontable.php');
$pdf->Ln();
//typecert 3 info
include('pdfcreation/type3table.php');
$pdf->Ln();
// standards table
include('pdfcreation/standardstable.php');
$pdf->Ln();
// additionalinfo
include('pdfcreation/m30table.php');
$pdf->Ln();
// additionalinfo requirements
include('pdfcreation/addreqtable.php');
$pdf->Ln();
// additionalinfo
include('pdfcreation/addinfotable.php');
$pdf->Ln();
// chem table
include('pdfcreation/chemtable.php');
$pdf->Ln();
//trf option
include('pdfcreation/trfoption.php');
$pdf->Ln();
//trf option
include('pdfcreation/fileattached.php');
$pdf->Ln();
$pdf->Ln();
//header report contact
//include('pdfcreation/headerreporttable.php');
//$pdf->Ln();
//header certificate contact
include('pdfcreation/headercertificatetable.php');
$pdf->Ln();
//invoice contact
include('pdfcreation/invoicecontacttable.php');
$pdf->Ln();
// parts table
//include('pdfcreation/partstable.php');
//$pdf->Ln();
//Sign datatable
include('pdfcreation/signdatatable.php');
$pdf->Ln();
?>
+76
View File
@@ -0,0 +1,76 @@
<?php // pdf creation for certification 1
$pdf->SetFont('Arial','',7);
$firstsent=html_entity_decode('Ai sensi e per gli effetti dell’art. 6 del REG 01 Regolamento per la valutazione della conformità dei Dispositivi di Protezione Individuale');
$firstsent = iconv('UTF-8', 'windows-1252', $firstsent);
$secondsent=utf8_decode('secondo il Regolamento (UE) 2016/425 disponibile sul nostro sito web www.cimac.it');
//$thirdsent=utf8_decode('For the purposes of Article 6 of the REG 01 "Regulation for the assessment of the conformity of Personal Protective Equipment ');
//$foursent=utf8_decode('according to Regulation (EU) 2016/425" available on our website www.cimac.it');
$pdf->Cell(0,0,$firstsent,0,1);
$pdf->Cell(0,9,$secondsent,0,1);
//$pdf->Cell(0,0,$thirdsent,0,1);
//$pdf->Cell(0,9,$foursent,0,1);
//description table
include('pdfcreation/descriptiontable.php');
$pdf->Ln();
//typecert 3 info
include('pdfcreation/type4table.php');
$pdf->Ln();
// standards table
include('pdfcreation/standardstable.php');
$pdf->Ln();
// additionalinfo
include('pdfcreation/m30table.php');
$pdf->Ln();
// additionalinfo requirements
include('pdfcreation/addreqtable.php');
$pdf->Ln();
// additionalinfo
include('pdfcreation/addinfotable.php');
$pdf->Ln();
// chem table
include('pdfcreation/chemtable.php');
$pdf->Ln();
//trf option
include('pdfcreation/trfoption.php');
$pdf->Ln();
//trf option
include('pdfcreation/fileattached.php');
$pdf->Ln();
$pdf->Ln();
//header report contact
//include('pdfcreation/headerreporttable.php');
//$pdf->Ln();
//header certificate contact
include('pdfcreation/headercertificatetable.php');
$pdf->Ln();
//invoice contact
include('pdfcreation/invoicecontacttable.php');
$pdf->Ln();
//Sign datatable
include('pdfcreation/signdatatable.php');
$pdf->Ln();
?>
+82
View File
@@ -0,0 +1,82 @@
<?php // pdf creation for certification 1
$pdf->SetFont('Arial','',7);
$firstsent=html_entity_decode('Ai sensi e per gli effetti dell’art. 12 del REG 01 Regolamento per la valutazione della conformità dei Dispositivi di Protezione Individuale');
$firstsent = iconv('UTF-8', 'windows-1252', $firstsent);
$secondsent=utf8_decode('secondo il Regolamento (UE) 2016/425 disponibile sul nostro sito web www.cimac.it');
//$thirdsent=utf8_decode('For the purposes of Article 12 of the REG 01 "Regulation for the assessment of the conformity of Personal Protective Equipment ');
//$foursent=utf8_decode('according to Regulation (EU) 2016/425" available on our website www.cimac.it');
$pdf->Cell(0,0,$firstsent,0,1);
$pdf->Cell(0,9,$secondsent,0,1);
//$pdf->Cell(0,0,$thirdsent,0,1);
//$pdf->Cell(0,9,$foursent,0,1);
//description table
include('pdfcreation/descriptiontable.php');
$pdf->Ln();
//typecert 3 info
include('pdfcreation/type8table.php');
$pdf->Ln();
// standards table
include('pdfcreation/standardstable.php');
$pdf->Ln();
// additionalinfo
include('pdfcreation/m30table.php');
$pdf->Ln();
// additionalinfo requirements
include('pdfcreation/addreqtable.php');
$pdf->Ln();
// additionalinfo
include('pdfcreation/addinfotable.php');
$pdf->Ln();
// chem table
include('pdfcreation/chemtable.php');
$pdf->Ln();
//trf option
include('pdfcreation/trfoption.php');
$pdf->Ln();
//trf option
include('pdfcreation/fileattached.php');
$pdf->Ln();
$pdf->Ln();
//header report contact
//include('pdfcreation/headerreporttable.php');
//$pdf->Ln();
//header certificate contact
include('pdfcreation/headercertificatetable.php');
$pdf->Ln();
//invoice contact
include('pdfcreation/invoicecontacttable.php');
$pdf->Ln();
// parts table
//include('pdfcreation/partstable.php');
//$pdf->Ln();
//Sign datatable
include('pdfcreation/signdatatable.php');
$pdf->Ln();
?>
+41
View File
@@ -0,0 +1,41 @@
<?php
$chemicalagentlist = new WA_MySQLi_RS("chemicalagentlist",$cmctrfdb,0);
$chemicalagentlist->setQuery("SELECT * FROM trfchemicalagent LEFT JOIN chemicalagent ON trfchemicalagent.idchemicalagent=chemicalagent.idchemicalagent WHERE trfchemicalagent.idtrf='$idtrf'");
$chemicalagentlist->execute();
?>
<?php
$totreqchem=$chemicalagentlist->TotalRows;
?>
<?php if ($totreqchem>0) { ?>
<?php
$pdf->SetFont('','B','10');
$pdf->Cell(190,6,$chemicalagentpdf,1,0,'C');
$pdf->Ln();
$pdf->SetFont('','','9'); ?>
<?php
$wa_startindex = 0;
while(!$chemicalagentlist->atEnd()) {
$wa_startindex = $chemicalagentlist->Index;
$chemag=$chemicalagentlist->getColumnVal("name_chemicalagent");
$chemag=html_entity_decode($chemag);
$chemag = iconv('UTF-8', 'windows-1252', $chemag);
$pdf->Cell(190,6,$chemag,1,0,'L',TRUE);
$pdf->Ln();
$chemicalagentlist->moveNext();
}
$chemicalagentlist->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
?><?php } ?>
+78
View File
@@ -0,0 +1,78 @@
<?php
$pdf->SetFont('Arial','',9);
$pdf->SetFont('','B','10');
//$pdf->Cell(190,6,$appformn,1,0,'C');
//$pdf->Ln();
$pdf->SetFont('','',8);
$pdf->Cell(50,6,$kindcertpdf,1,0,'L');
$pdf->SetFillColor(232, 242, 255);
// Determina quale campo utilizzare in base alla lingua selezionata
$columnName = ($_SESSION['langselect'] == 'it') ? "description" : "description_en";
// Ottieni il valore dal campo appropriato
$certrev1 = $certificationrevision->getColumnVal($columnName);
$certrev1 = html_entity_decode($certrev1, ENT_QUOTES);
$certrev = iconv('UTF-8', 'windows-1252//IGNORE', $certrev1);
// Stampa la cella nel PDF
$pdf->Cell(70, 6, $certrev, 1, 0, 'L', TRUE);
//$pdf->Cell(70,50,'Terza',1,0,'C');
if (isset($trfData['photofilename'])) {
// $pdf->Cell( 70, 42, $pdf->Image($image1, $pdf->GetX() + 10, $pdf->GetY(), 42), 1, 0, 'L');
// $pdf->Cell( 70, 42, $pdf->Image($image1, $pdf->GetX(), $pdf->GetY(), -120, 42), 1, 0, 'L');
$pdf->Cell( 70, 42, $pdf->centreImage($image1, 70, 42, "S"), 1, 0, 'C');
} else {
$image1="uploadimages/notav.jpg";
// $pdf->Cell( 70, 42, $pdf->Image($image1, $pdf->GetX() + 10, $pdf->GetY(), 42), 1, 0, 'L');
$pdf->Cell( 70, 42, $pdf->Image($image1, $pdf->GetX(), $pdf->GetY(), 0, 42), 1, 0, 'L');
}
$pdf->Cell(1,6,'',0,0,'L');
$pdf->Ln();
$pdf->Cell(50,6,$dateinsertpdf,1,0,'L');
if ($sndrpt=='Y') {
$signed=$trfData['signedonsecondcert']; } else { $signed=$trfData['signedon']; }
if ($sndrpt=='N') {
$newDate = DateTime::createFromFormat('Y-m-d', $signed)->format('d-m-Y'); }
$pdf->Cell(70,6,$newDate,1,0,'L',TRUE);
$pdf->Ln();
$pdf->Cell(50,6,$pdfdescriptionpart,1,0,'L');
$pdf->Cell(70,6,$trfData['sample_description'],1,0,'L',TRUE);
$pdf->Ln();
$pdf->Cell(50,6,$pdfarticlekind,1,0,'L');
// Verifica la lingua scelta e imposta il nome appropriato dell'articolo
$articleName = ($_SESSION['langselect'] == 'it') ? $trfData['name_articletype'] : $trfData['name_articletypeeng'];
// Stampa la cella con il nome dell'articolo corretto
$pdf->Cell(70, 6, $articleName, 1, 0, 'L', TRUE);
$pdf->Ln();
$pdf->Cell(50,6,$pdfmodeltitle,1,0,'L');
// Verifica la lingua scelta e imposta il nome del modello appropriato
$modelName = ($_SESSION['langselect'] == 'it') ? $trfData['namemodelarticle'] : $trfData['namemodelarticle_eng'];
// Stampa la cella con il nome del modello corretto
$pdf->Cell(70, 6, $modelName, 1, 0, 'L', TRUE);
$pdf->Ln();
$measuretotal=$trfData['measurefrom']."-".$trfData['measureto'];
$pdf->Cell(50,6,$pdfrangemeasure,1,0,'L');
$pdf->Cell(70,6,$measuretotal,1,0,'L',TRUE);
$pdf->Ln();
$pdf->Cell(50,6,$pdfregisteredmark,1,0,'L');
$pdf->Cell(70,6,$trfData['registeredmark'],1,0,'L',TRUE);
$pdf->Ln();
$idartchs=explode(",",$trfData['idarticle_characteristics']);
foreach($idartchs as $idartch) {
$artchname = new WA_MySQLi_RS("artchname",$cmctrfdb,1);
$artchname->setQuery("SELECT * FROM `article_characteristic` WHERE `article_characteristic`.idarticlecharacteristic='$idartch'");
$artchname->execute();
$pdf->Cell(50,6,$kinddpipdf,1,0,'L');
// Determina quale campo utilizzare in base alla lingua selezionata
$articleCharacteristic = ($_SESSION['langselect'] == 'it') ?
$artchname->getColumnVal("name_articlecharacteristic") :
$artchname->getColumnVal("name_articlecharacteristic_eng");
// Stampa la cella con il valore caratteristico dell'articolo corretto
$pdf->Cell(140, 6, $articleCharacteristic, 1, 0, 'L', TRUE);
$pdf->Ln();
}
?>
@@ -0,0 +1,103 @@
<?php
$pdf->SetFont('Arial', '', 9);
$pdf->SetFont('', 'B', '10');
//$pdf->Cell(190,6,$appformn,1,0,'C');
//$pdf->Ln();
$pdf->SetFont('', '', 8);
$pdf->Cell(50, 6, '', 1, 0, 'L');
$pdf->SetFillColor(232, 242, 255);
$certrev1 = html_entity_decode($certname = $certificationrevision->getColumnVal("description"), ENT_QUOTES);
// $certrev = iconv('UTF-8', 'windows-1252', $certrev1);
$certrev = iconv('UTF-8', 'windows-1252//IGNORE', $certrev1);
//$certrev = iconv('UTF-8', 'windows-1252', $certrev);
$pdf->Cell(70, 6, '', 1, 0, 'L', TRUE);
//$pdf->Cell(70,50,'Terza',1,0,'C');
if (isset($trfData['photofilename'])) {
// $pdf->Cell( 70, 42, $pdf->Image($image1, $pdf->GetX() + 10, $pdf->GetY(), 42), 1, 0, 'L');
// $pdf->Cell( 70, 42, $pdf->Image($image1, $pdf->GetX(), $pdf->GetY(), -120, 42), 1, 0, 'L');
$pdf->Cell(70, 42, $pdf->centreImage($image1, 70, 42, "S"), 1, 0, 'C');
} else {
$image1 = "uploadimages/notav.jpg";
// $pdf->Cell( 70, 42, $pdf->Image($image1, $pdf->GetX() + 10, $pdf->GetY(), 42), 1, 0, 'L');
$pdf->Cell(70, 42, $pdf->Image($image1, $pdf->GetX(), $pdf->GetY(), 0, 42), 1, 0, 'L');
}
$pdf->Cell(1, 6, '', 0, 0, 'L');
$pdf->Ln();
$pdf->Cell(50, 6, $dateinsertpdf, 1, 0, 'L');
if ((Auth::user()->hasRole('Admin')) || (Auth::user()->hasRole('User')) || (Auth::user()->hasRole('Superuser'))) :
if ($sndrpt == 'Y') {
$signed = $trfData['signedonsecondcert'];
} else {
$signed = $trfData['signedon'];
}
if ($sndrpt == 'N') {
// Prova a creare un oggetto DateTime dalla variabile $signed
$dateObject = DateTime::createFromFormat('Y-m-d', $signed);
// Verifica se la creazione della data ha avuto successo
if ($dateObject !== false) {
// Se ha successo, formatta la data
$newDate = $dateObject->format('d-m-Y');
} else {
// Se la creazione della data fallisce, imposta $newDate come una stringa vuota
$newDate = ''; // Impostato come vuoto
}
}
endif;
if ((Auth::user()->hasRole('CustomerService'))) :
if ($sndrpt == 'Y') {
$signed = "";
} else {
$signed = "";
}
if ($sndrpt == 'N') {
$newDate = "";
}
endif;
$pdf->Cell(70, 6, $newDate, 1, 0, 'L', TRUE);
$pdf->Ln();
$pdf->Cell(50, 6, $pdfdescriptionpart, 1, 0, 'L');
$pdf->Cell(70, 6, $trfData['sample_description'], 1, 0, 'L', TRUE);
$pdf->Ln();
$pdf->Cell(50, 6, $pdfarticlekind, 1, 0, 'L');
// Verifica la lingua scelta e imposta il nome appropriato dell'articolo
$articleName = ($_SESSION['langselect'] == 'it') ? $trfData['name_articletype'] : $trfData['name_articletypeeng'];
// Stampa la cella con il nome dell'articolo corretto
$pdf->Cell(70, 6, $articleName, 1, 0, 'L', TRUE);
$pdf->Ln();
$pdf->Cell(50, 6, $pdfmodeltitle, 1, 0, 'L');
// Verifica la lingua scelta e imposta il nome del modello appropriato
$modelName = ($_SESSION['langselect'] == 'it') ? $trfData['namemodelarticle'] : $trfData['namemodelarticle_eng'];
// Stampa la cella con il nome del modello corretto
$pdf->Cell(70, 6, $modelName, 1, 0, 'L', TRUE);
$pdf->Ln();
$measuretotal = $trfData['measurefrom'] . "-" . $trfData['measureto'];
$pdf->Cell(50, 6, $pdfrangemeasure, 1, 0, 'L');
$pdf->Cell(70, 6, $measuretotal, 1, 0, 'L', TRUE);
$pdf->Ln();
$pdf->Cell(50, 6, $pdfregisteredmark, 1, 0, 'L');
$pdf->Cell(70, 6, $trfData['registeredmark'], 1, 0, 'L', TRUE);
$pdf->Ln();
$idartchs = explode(",", $trfData['idarticle_characteristics']);
foreach ($idartchs as $idartch) {
$artchname = new WA_MySQLi_RS("artchname", $cmctrfdb, 1);
$artchname->setQuery("SELECT * FROM `article_characteristic` WHERE `article_characteristic`.idarticlecharacteristic='$idartch'");
$artchname->execute();
$pdf->Cell(50, 6, $kinddpipdf, 1, 0, 'L');
// Determina quale campo utilizzare in base alla lingua selezionata
$articleCharacteristic = ($_SESSION['langselect'] == 'it') ?
$artchname->getColumnVal("name_articlecharacteristic") :
$artchname->getColumnVal("name_articlecharacteristic_eng");
// Stampa la cella con il valore caratteristico dell'articolo corretto
$pdf->Cell(140, 6, $articleCharacteristic, 1, 0, 'L', TRUE);
$pdf->Ln();
}
+37
View File
@@ -0,0 +1,37 @@
<?php
// fileattached table
$fileattachedlist = new WA_MySQLi_RS("fileattachedlist",$cmctrfdb,0);
$fileattachedlist->setQuery("SELECT * FROM fileattached WHERE fileattached.idtrfdetails='$idtrf'");
$fileattachedlist->execute();
if (!empty($fileattachedlist->getColumnVal("idfileattached"))) {
$pdf->SetFont('','B','10');
$pdf->Cell(190,6,$fileattachedtitle,1,0,'C');
$pdf->SetFillColor(232, 242, 255);
$pdf->Ln();
$pdf->SetFont('','',8);
$pdf->Cell(90,6,$filenametitle,1,0,'C');
$pdf->Cell(100,6,$descriptionfiletitle,1,0,'C');
$pdf->Ln();
$wa_startindex = 0;
while(!$fileattachedlist->atEnd()) {
$wa_startindex = $fileattachedlist->Index;
$pdf->SetTextColor(0, 0, 0);
$linkspecific='public/uploaddocuments/'.$fileattachedlist->getColumnVal("filename_fileattached");
$linkfile=$linkglobal.$linkspecific;
$fileattachedlimited=substr($fileattachedlist->getColumnVal("filename_fileattached"), 0, 30);
$pdf->Cell(90,6,$fileattachedlimited,1,0,'C',true,$linkfile);
$pdf->SetTextColor(0, 0, 0);
$descriptionlimited=substr($fileattachedlist->getColumnVal("description_fileattached"), 0, 30);
$pdf->Cell(100,6,$descriptionlimited,1,0,'C',true);
$pdf->Ln();
$fileattachedlist->moveNext();
}
$fileattachedlist->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
//download zip
$pdf->SetTextColor(0, 0, 0);
$pdf->Cell(190,6,'Scarica da questo link un file ZIP con tutti gli allegati',1,0,'C',false,$namefilezippathpdf);
}
$pdf->SetTextColor(0, 0, 0);
?>
+32
View File
@@ -0,0 +1,32 @@
<?php
// Page header
function Header()
{
// Logo
$this->Image('../images/cimaclaboratories.png',5,5,60);
$this->SetFont('Arial','',7);
$this->Cell(0,-5,'A.N.C.I. Servizi S.r.l. a socio unico',0,0,"R");
$this->Cell(0,2,'Sede operativa / Operational headquarters: Via Aguzzafame 60/b - 27029 Vigevano (PV)',0,0,"R");
$this->Cell(0,9,'ORGANISMO NOTIFICATO / NOTIFIED BODY N. 0465',0,0,"R");
$this->SetFont('Arial','B',14);
$this->Cell(-180,25,$GLOBALS['nappform'],0,0,"C");
// Line break
$this->Ln(20);
}
// Page footer
function Footer()
{
// Position at 1.5 cm from bottom
$this->SetY(-15);
// Arial italic 8
$this->SetFont('Arial','',8);
// Page number and certification revision
$revisioncert=$certificationrevision->getColumnVal("rev");
$certname=$certificationrevision->getColumnVal("name_certification");
$certdate=$certificationrevision->getColumnVal("date");
$certtitle=$certname.' rev. '.$revisioncert.' '.$certdate;
M18a rev. 5 del 29.06.2022
$this->Cell(0,10,$certtitle.' - Pagina '.$this->PageNo().'/{nb}',0,0,'C');
}
?>
@@ -0,0 +1,59 @@
<?php
$citytitle = html_entity_decode($citytitle);
$citytitleb = utf8_decode($citytitle);
//invoice contacts
// ***start with invoice address
$kindcont = 'headercertificate';
// parse contacts data with variable kindofcontacts
$contactsinfo = mysqli_query($cmctrfdb, "SELECT * FROM contacts LEFT JOIN countries ON countries.idcountries=contacts.country WHERE contacts.idtrf='$idtrf' AND contacts.kindofcontacts=
'$kindcont'");
$contactsinfoData = mysqli_fetch_assoc($contactsinfo);
$companyname = $contactsinfoData['companyname'];
$pdf->SetFont('dejavusans', '', 8);
$pdf->SetFont('', 'B', '10');
$pdf->Cell(190, 6, $manufdata, 1, 0, 'C');
$pdf->Ln();
$pdf->SetFont('dejavusans', '', 8);
$pdf->Cell(40, 6, $companypdf, 1, 0, 'L');
$pdf->SetFillColor(232, 242, 255);
$companyname = html_entity_decode($companyname);
$companyname = iconv('UTF-8', 'windows-1252', $companyname);
$pdf->Cell(150, 6, $companyname, 1, 0, 'L', TRUE);
$pdf->Ln();
$pdf->Cell(40, 6, $addresspdf, 1, 0, 'L');
$contactsaddress = html_entity_decode($contactsinfoData['address']);
$contactsaddress = iconv('UTF-8', 'windows-1252', $contactsaddress);
$pdf->Cell(150, 6, $contactsaddress, 1, 0, 'L', TRUE);
$pdf->Ln();
$pdf->Cell(40, 6, $citytitleb, 1, 0, 'L');
$pdf->Cell(55, 6, $contactsinfoData['city'], 1, 0, 'L', TRUE);
$pdf->Cell(40, 6, $zippdf, 1, 0, 'L');
$pdf->Cell(55, 6, $contactsinfoData['cap'], 1, 0, 'L', TRUE);
$pdf->Ln();
$pdf->Cell(40, 6, $vatpdf, 1, 0, 'L');
$pdf->Cell(55, 6, $contactsinfoData['piva'], 1, 0, 'L', TRUE);
$pdf->Cell(40, 6, $countrypdf, 1, 0, 'L');
$pdf->Cell(55, 6, $contactsinfoData['namecountry'], 1, 0, 'L', TRUE);
$pdf->Ln();
$pdf->Cell(40, 6, $phonepdf, 1, 0, 'L');
$pdf->Cell(55, 6, $contactsinfoData['telephone'], 1, 0, 'L', TRUE);
$pdf->Cell(40, 6, $emailpdf, 1, 0, 'L');
$pdf->Cell(55, 6, $contactsinfoData['email'], 1, 0, 'L', TRUE);
$pdf->Ln();
$pdf->Cell(40, 6, $contactnamepdf, 1, 0, 'L');
$pdf->Cell(55, 6, $contactsinfoData['contactname'], 1, 0, 'L', TRUE);
$pdf->Cell(40, 6, $contactsurnamepdf, 1, 0, 'L');
$pdf->Cell(55, 6, $contactsinfoData['contactsurname'], 1, 0, 'L', TRUE);
$namecertificatecontact = $contactsinfoData['contactname'];
$surnamecertificatecontact = $contactsinfoData['contactsurname'];
$namesurnamecertcontact = $namecertificatecontact . ' ' . $surnamecertificatecontact;
$pdf->Ln();
?>
@@ -0,0 +1,48 @@
<?php
$citytitle=html_entity_decode($citytitle);
$citytitleb=utf8_decode($citytitle);
//invoice contacts
// ***start with invoice address
$kindcont='headertest';
// parse contacts data with variable kindofcontacts
$contactsinfo = mysqli_query($cmctrfdb, "SELECT * FROM contacts LEFT JOIN countries ON countries.idcountries=contacts.country WHERE contacts.idtrf='$idtrf' AND contacts.kindofcontacts='$kindcont'");
$contactsinfoData = mysqli_fetch_assoc($contactsinfo);
$companyname=$contactsinfoData['companyname'];
$pdf->SetFont('Arial','',8);
$pdf->SetTextColor(0,0,0);
$pdf->SetFont('','B','10');
$pdf->Cell(190,6,$headerreportpdf,1,0,'C');
$pdf->Ln();
$pdf->SetFont('','',8);
$pdf->Cell(40,6,$companypdf,1,0,'L');
$pdf->SetFillColor(232, 242, 255);
$companyname=html_entity_decode($companyname);
$companyname = iconv('UTF-8', 'windows-1252', $companyname);
$pdf->Cell(150,6,$companyname,1,0,'L',TRUE);
$pdf->Ln();
$pdf->Cell(40,6,$addresspdf,1,0,'L');
$contactsaddress=html_entity_decode($contactsinfoData['address']);
$contactsaddress = iconv('UTF-8', 'windows-1252', $contactsaddress);
$pdf->Cell(150,6,$contactsaddress,1,0,'L',TRUE);
$pdf->Ln();
$pdf->Cell(40,6,$citytitleb,1,0,'L');
$pdf->Cell(55,6,$contactsinfoData['city'],1,0,'L',TRUE);
$pdf->Cell(40,6,$zippdf,1,0,'L');
$pdf->Cell(55,6,$contactsinfoData['cap'],1,0,'L',TRUE);
$pdf->Ln();
$pdf->Cell(40,6,$vatpdf,1,0,'L');
$pdf->Cell(55,6,$contactsinfoData['piva'],1,0,'L',TRUE);
$pdf->Cell(40,6,$countrypdf,1,0,'L');
$pdf->Cell(55,6,$contactsinfoData['namecountry'],1,0,'L',TRUE);
$pdf->Ln();
$pdf->Cell(40,6,$phonepdf,1,0,'L');
$pdf->Cell(55,6,$contactsinfoData['telephone'],1,0,'L',TRUE);
$pdf->Cell(40,6,$emailpdf,1,0,'L');
$pdf->Cell(55,6,$contactsinfoData['email'],1,0,'L',TRUE);
$pdf->Ln();
$pdf->Cell(40,6,$contactnamepdf,1,0,'L');
$pdf->Cell(55,6,$contactsinfoData['contactname'],1,0,'L',TRUE);
$pdf->Cell(40,6,$contactsurnamepdf,1,0,'L');
$pdf->Cell(55,6,$contactsinfoData['contactsurname'],1,0,'L',TRUE);
$pdf->Ln();
?>
@@ -0,0 +1,43 @@
<?php
$citytitle = html_entity_decode($citytitle);
$citytitleb = utf8_decode($citytitle);
//invoice contacts
// ***start with invoice address
$kindcont = 'invoice';
// parse contacts data with variable kindofcontacts
$contactsinfo = mysqli_query($cmctrfdb, "SELECT * FROM contacts LEFT JOIN countries ON countries.idcountries=contacts.country WHERE contacts.idtrf='$idtrf' AND contacts.kindofcontacts=
'$kindcont'");
$contactsinfoData = mysqli_fetch_assoc($contactsinfo);
$companyname = $contactsinfoData['companyname'];
$pdf->SetFont('Arial', '', 8);
$pdf->SetFont('', 'B', '10');
$pdf->Cell(190, 6, $headerinvoicepdf, 1, 0, 'C');
$pdf->Ln();
$pdf->SetFont('', '', 8);
$pdf->Cell(40, 6, $companypdf, 1, 0, 'L');
$pdf->SetFillColor(232, 242, 255);
$pdf->Cell(150, 6, $companyname, 1, 0, 'L', TRUE);
$pdf->Ln();
$pdf->Cell(40, 6, $addresspdf, 1, 0, 'L');
$pdf->Cell(150, 6, $contactsinfoData['address'], 1, 0, 'L', TRUE);
$pdf->Ln();
$pdf->Cell(40, 6, $citytitleb, 1, 0, 'L');
$pdf->Cell(55, 6, $contactsinfoData['city'], 1, 0, 'L', TRUE);
$pdf->Cell(40, 6, $zippdf, 1, 0, 'L');
$pdf->Cell(55, 6, $contactsinfoData['cap'], 1, 0, 'L', TRUE);
$pdf->Ln();
$pdf->Cell(40, 6, $vatpdf, 1, 0, 'L');
$pdf->Cell(55, 6, $contactsinfoData['piva'], 1, 0, 'L', TRUE);
$pdf->Cell(40, 6, $countrypdf, 1, 0, 'L');
$pdf->Cell(55, 6, $contactsinfoData['namecountry'], 1, 0, 'L', TRUE);
$pdf->Ln();
$pdf->Cell(40, 6, $phonepdf, 1, 0, 'L');
$pdf->Cell(55, 6, $contactsinfoData['telephone'], 1, 0, 'L', TRUE);
$pdf->Cell(40, 6, $emailpdf, 1, 0, 'L');
$pdf->Cell(55, 6, $contactsinfoData['email'], 1, 0, 'L', TRUE);
$pdf->Ln();
$pdf->Cell(40, 6, $contactnamepdf, 1, 0, 'L');
$pdf->Cell(55, 6, $contactsinfoData['contactname'], 1, 0, 'L', TRUE);
$pdf->Cell(40, 6, $contactsurnamepdf, 1, 0, 'L');
$pdf->Cell(55, 6, $contactsinfoData['contactsurname'], 1, 0, 'L', TRUE);
$pdf->Ln();
+95
View File
@@ -0,0 +1,95 @@
<head>
<meta charset="UTF-8">
</head>
<?php require_once('../../Connections/cmctrfdb.php'); ?>
<?php require_once('../../webassist/mysqli/rsobj.php');
require_once('../../webassist/mysqli/queryobj.php'); ?>
<?php
//global variable
include('../include/generalsettings.php');
// start fpdf
//include('../languages/' . $_SESSION['langselect'] . '/pdflang.php');
//include('include/headscript.php');
?>
<?php
if (isset($_GET["idtrf"])) {
$idtrf = $_GET["idtrf"];
}
if (isset($_POST["idtrf"])) {
$idtrf = $_POST["idtrf"];
}
//zip creation
include('../datarecover/parsedatajson.php');
//variable creation for json
$trfnumber = $trfData['trfnumber'];
$idtrfdetails = $trfData['idtrfdetails'];
$revision = $trfData['revtrf'];
$descriptionart = $trfData['sample_description'];
$model = $trfData['namemodelarticle'];
$articletype = $trfData['name_articletype'];
$modeldesc = $model . ' - ' . $descriptionart;
$measurerange = $trfData['measurefrom'] . '-' . $trfData['measureto'];
$reportlanguage = $trfData['languagereport'];
$certificatelanguage = $trfData['languagecertificate'];
//$certificationlanguage = $trfData['certification'];
$prevreportnumber = $trfData['previousreportnumber'];
$revisionfor = $trfData['revisionfor'];
$virusprotection = $trfData['virus_protection'];
$esd = $trfData['esd'];
$headercertid = $contactsinfoData['fmcode'];
$headertestid = $contactsinfoDatatest['fmcode'];
$headerbillingid = $contactsinfoDatabilling['fmcode'];
// Itera sui risultati della query e popola $identificationPartsDetails
$identificationPartsDetails = [];
while ($row = mysqli_fetch_assoc($identparts)) {
$identificationPartsDetails[] = [
'article-identificationparts' => $row['article_identificationparts'],
'color-identificationsparts' => $row['color_identificationparts'],
'description-identificationparts' => $row['description_identificationparts'],
];
}
// Itera sui risultati della query e popola $standards
$standardsDetails = [];
while ($rowstd = mysqli_fetch_assoc($stdinfo)) {
$standardsDetails[] = [
'standard_name' => $rowstd['standardname'],
'standard_code' => $rowstd['standardcode'],
];
}
// Preparazione dei dati per la conversione in JSON
$dataToConvertToJson = [
'idtrf' => $idtrfdetails,
'trfnumber' => $trfnumber,
'revision' => $revision,
'descriptionart' => $trfData['sample_description'],
'article-type' => $trfData['name_articletype'],
'model-description' => $modeldesc,
'measurerange' => $trfData['measurefrom'] . '-' . $trfData['measureto'],
'client_certification' => $headercertid,
'client_test' => $headertestid,
'client_billing' => $headerbillingid,
'reportlanguage' => $reportlanguage,
'certificatelanguage' => $certificatelanguage,
'certificate_renew_review' => $prevreportnumber,
'revisionwhy' => $revisionfor,
];
// Aggiungi i dettagli delle parti di identificazione all'array principale
$dataToConvertToJson['identification-parts-details'] = $identificationPartsDetails;
$dataToConvertToJson['standards-details'] = $standardsDetails;
// Conversione dei dati in JSON
$jsonData = json_encode($dataToConvertToJson, JSON_PRETTY_PRINT);
// Output the JSON
echo $jsonData;
+57
View File
@@ -0,0 +1,57 @@
<?php
/*
$pdf->SetFont('','B','8');
if ($trfData['idarticletype']=='1') {
$photo1=$photoshoesside;
$photo2=$photoshoessole;
} elseif ($trfData['idarticletype']=='2') {
$photo1=$photogloveup;
$photo2=$photoglovebottom;
} elseif ($trfData['idarticletype']=='3') {
$photo1=$photomask;
$photo2="";
}
if (!isset($photo1)) { $photo1=""; }
if (!isset($photo2)) { $photo2=""; }
$pdf->SetFont('','B','8');
$sizerec=47.5;
$pdf->Cell(95,6,$photo1,1,0,'C');
$pdf->Cell(95,6,$photo2,1,0,'C');
$pdf->Ln();
if (isset($trfData['photoone'])) {
$image1="uploaddocuments/".$trfData['photoone'];
/* CHECK IF FILE TYPE IS JPEG
$img_info = getimagesize($image1);
if($img_info[2] <> IMG_JPEG){
/* IF NOT JPEG, USE DEFAULT IMAGE INSTEAD
$image1="uploadimages/notav.jpg";
}
$exif = exif_read_data($image1);
// $pdf->Cell( 95, 60, $pdf->Image($image1, $pdf->GetX() + 10, $pdf->GetY(), 60), 1, 0, 'C');
// $pdf->Cell( 95, 60, $pdf->Image($image1, $pdf->GetX(), $pdf->GetY(), -90, 60), 1, 0, 'C');
$pdf->Cell( 95, 60, $pdf->centreImage($image1, 95, 60, ""), 1, 0, 'C');
} else {
$image1="uploadimages/notav.jpg";
// $pdf->Cell( 95, 60, $pdf->Image($image1, $pdf->GetX() + 10, $pdf->GetY(), 60), 1, 0, 'C');
$pdf->Cell( 95, 60, $pdf->Image($image1, $pdf->GetX(), $pdf->GetY(), 0, 60), 1, 0, 'C');
}
if (isset($trfData['phototwo'])) {
$image1="uploaddocuments/".$trfData['phototwo'];
/* CHECK IF FILE TYPE IS JPEG
$img_info = getimagesize($image1);
if($img_info[2] <> IMG_JPEG){
/* IF NOT JPEG, USE DEFAULT IMAGE INSTEAD
$image1="uploadimages/notav.jpg";
}
// $pdf->Cell( 95, 60, $pdf->Image($image1, $pdf->GetX() + 10, $pdf->GetY(), 60), 1, 0, 'C');
// $pdf->Cell( 95, 60, $pdf->Image($image1, $pdf->GetX(), $pdf->GetY(), -90, 60), 1, 0, 'C');
$pdf->Cell( 95, 60, $pdf->centreImage($image1, 95, 60, ""), 1, 0, 'C');
} else {
$image1="uploadimages/notav.jpg";
// $pdf->Cell( 95, 60, $pdf->Image($image1, $pdf->GetX() + 10, $pdf->GetY(), 60), 1, 0, 'C');
$pdf->Cell( 95, 60, $pdf->Image($image1, $pdf->GetX(), $pdf->GetY(), 0, 60), 1, 0, 'C');
}
$pdf->Ln(); */
?>
@@ -0,0 +1,28 @@
<?php
$manufactlist = new WA_MySQLi_RS("manufactlist",$cmctrfdb,0);
$manufactlist->setQuery("SELECT * FROM auditmanufacturer LEFT JOIN auditdpi ON auditdpi.idauditdpi=auditmanufacturer.idauditdpi WHERE auditmanufacturer.idtrfdetails='$idtrf' ORDER BY auditmanufacturer.idauditdpi");
$manufactlist->execute();
?>
<?php
$pdf->SetFont('','B','10');
$pdf->Cell(190,6,$manufacturerspdf,1,0,'C');
$pdf->SetFillColor(232, 242, 255);
$pdf->SetFont('','',9);
$pdf->Ln();
$pdf->Cell(100,6,$numberdpipdf,1,0,'L');
$pdf->Cell(90,6,$manufacturerpdf,1,0,'L');
$pdf->Ln(); ?>
<?php
$wa_startindex = 0;
while(!$manufactlist->atEnd()) {
$wa_startindex = $manufactlist->Index;
$pdf->Cell(100,6,$manufactlist->getColumnVal("dpicode"),1,0,'L');
$pdf->Cell(90,6,$manufactlist->getColumnVal("nameauditmanufacturer"),1,0,'L',TRUE);
$pdf->Ln();
$manufactlist->moveNext();
}
$manufactlist->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
$pdf->Ln();
?>
+198
View File
@@ -0,0 +1,198 @@
<?php
$artid=$trfData['idarticletype'];
// parse new component query for shoes
if ($artid=='1') {
$identpartlist = new WA_MySQLi_RS("identpartlist", $cmctrfdb, 0);
$identpartlist->setQuery("
SELECT *
FROM identificationparts
LEFT JOIN partsordercimac ON partsordercimac.arttypeid = identificationparts.arttypeid
AND partsordercimac.partsidpicture = identificationparts.partsidnumber
WHERE identificationparts.idtrfdetails = '$idtrf'
ORDER BY
CASE
WHEN partsordercimac.partsidcimac IS NULL THEN 9999
ELSE partsordercimac.partsidcimac
END
");
$identpartlist->execute();
} else {
//parse new component query for other articles
$identpartlist = new WA_MySQLi_RS("identpartlist",$cmctrfdb,0);
$identpartlist->setQuery("SELECT * FROM identificationparts WHERE identificationparts.idtrfdetails='$idtrf'");
$identpartlist->execute();
}
$pdf->AddPage('P');
$pdf->SetFont('','B','10');
$pdf->Cell(190,6,$testPartsPdf,1,0,'C');
$pdf->Ln();
$pdf->SetFont('','','8');
$wa_startindex = 0;
while(!$identpartlist->atEnd()) {
$wa_startindex = $identpartlist->Index;
$pdf->Cell(45,6,$partPdf,1,0,'L');
$descpart=$identpartlist->getColumnVal("description_identificationparts");
$pdf->Cell(145,6,$descpart,1,0,'L',TRUE);
$pdf->Ln();
$pdf->Cell(45,6,$descriptionPdf,1,0,'L');
$materialpt=$identpartlist->getColumnVal("material_identificationparts");
$materialpt=html_entity_decode($materialpt);
$materialpt = iconv('UTF-8', 'windows-1252', $materialpt);
$pdf->Cell(145,6,$materialpt,1,0,'L', TRUE);
$pdf->Ln();
$pdf->Cell(45,6,$articlePdf,1,0,'L');
$articlept=$identpartlist->getColumnVal("article_identificationparts");
$articlept=html_entity_decode($articlept);
$articlept = iconv('UTF-8', 'windows-1252', $articlept);
$pdf->Cell(145,6,$articlept,1,0,'L', TRUE);
$pdf->Ln();
$pdf->Cell(45,6,$colorPdf,1,0,'L');
$pdf->Cell(145,6,$identpartlist->getColumnVal("color_identificationparts"),1,0,'L', TRUE);
$pdf->Ln();
$pdf->Cell(45,6,$whotest,1,0,'L');
$kindtest=$identpartlist->getColumnVal("kindoftest");
if ($kindtest == 'new') { $whotestreply=$tobetestedwho; }
else if ($kindtest == 'cmc') { $whotestreply=$alreadytestedcmc; }
else { $whotestreply=$alreradytestedtlab; }
$pdf->Cell(145,6,$whotestreply,1,0,'L', TRUE);
$pdf->Ln();
if ($identpartlist->getColumnVal("kindoftest")!='new') {
$cmcrepnumb=$identpartlist->getColumnVal("cmcreportnumber_identificationparts");
$cmcrepnumb=html_entity_decode($cmcrepnumb);
$cmcrepnumb = iconv('UTF-8', 'windows-1252', $cmcrepnumb);
$pdf->Cell(45,6,$reportPdf,1,0,'L');
$pdf->Cell(145,6,$cmcrepnumb,1,0,'L', TRUE);
$pdf->Ln();
$pdf->Cell(45,6,$datePdf,1,0,'L');
$pdf->Cell(145,6,$identpartlist->getColumnVal("cmcreportdate_identificationparts"),1,0,'L', TRUE);
$pdf->Ln();
$pdf->Cell(45,6,$headedPdf,1,0,'L');
$pdf->Cell(145,6,$identpartlist->getColumnVal("reportof"),1,0,'L',TRUE);
$pdf->Ln();
}
$pdf->SetFillColor(192,192,192);
$pdf->Cell(190,3,'',1,0,'L',TRUE);
$pdf->SetFillColor(232, 242, 255);
$pdf->Ln();
$identpartlist->moveNext();
}
$identpartlist->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
$pdf->Ln();
/*
// parse issue by cmc
$identpartlistcmc = new WA_MySQLi_RS("identpartlist",$cmctrfdb,0);
$identpartlistcmc->setQuery("SELECT * FROM identificationparts WHERE identificationparts.idtrfdetails='$idtrf' AND identificationparts.kindoftest='cmc'");
$identpartlistcmc->execute();
if (!empty($identpartlistcmc->getColumnVal("ididentificationparts"))) {
$pdf->SetFont('','B','10');
$pdf->Cell(190,6,'Parti testate da CIMAC',1,0,'C');
$pdf->Ln();
$pdf->SetFont('','','8');
$wa_startindex = 0;
while(!$identpartlistcmc->atEnd()) {
$wa_startindex = $identpartlistcmc->Index;
$pdf->Cell(45,6,'Parte',1,0,'L');
$descpart=$identpartlistcmc->getColumnVal("description_identificationparts");
$pdf->Cell(145,6,$descpart,1,0,'L',TRUE);
$pdf->Ln();
$pdf->Cell(45,6,'Descrizione',1,0,'L');
$pdf->Cell(145,6,$identpartlistcmc->getColumnVal("material_identificationparts"),1,0,'L', TRUE);
$pdf->Ln();
$pdf->Cell(45,6,'Articolo',1,0,'L');
$articlept=$identpartlistcmc->getColumnVal("article_identificationparts");
$articlept=html_entity_decode($articlept);
$articlept = iconv('UTF-8', 'windows-1252', $articlept);
$pdf->Cell(145,6,$articlept,1,0,'L', TRUE);
$pdf->Ln();
$pdf->Cell(45,6,'Colore',1,0,'L');
$pdf->Cell(145,6,$identpartlistcmc->getColumnVal("color_identificationparts"),1,0,'L', TRUE);
$pdf->Ln();
$pdf->Cell(45,6,'Rapporto',1,0,'L');
$cmcrepnumb=$identpartlistcmc->getColumnVal("cmcreportnumber_identificationparts");
$cmcrepnumb=html_entity_decode($cmcrepnumb);
$cmcrepnumb = iconv('UTF-8', 'windows-1252', $cmcrepnumb);
$pdf->Cell(145,6,$cmcrepnumb,1,0,'L', TRUE);
$pdf->Ln();
$pdf->Cell(45,6,'Data',1,0,'L');
$pdf->Cell(145,6,$identpartlistcmc->getColumnVal("cmcreportdate_identificationparts"),1,0,'L', TRUE);
$pdf->Ln();
$pdf->Cell(45,6,'Intestato',1,0,'L');
$pdf->Cell(145,6,$identpartlistcmc->getColumnVal("reportof"),1,0,'L',TRUE);
$pdf->Ln();
$pdf->SetFillColor(192,192,192);
$pdf->Cell(190,3,'',1,0,'L',TRUE);
$pdf->SetFillColor(232, 242, 255);
$pdf->Ln();
$identpartlistcmc->moveNext();
}
$identpartlistcmc->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
}
$pdf->Ln(); */
/*
// parse issue by trd
$identpartlisttrd = new WA_MySQLi_RS("identpartlist",$cmctrfdb,0);
$identpartlisttrd->setQuery("SELECT * FROM identificationparts WHERE identificationparts.idtrfdetails='$idtrf' AND identificationparts.kindoftest='trd'");
$identpartlisttrd->execute();
if (!empty($identpartlisttrd->getColumnVal("ididentificationparts"))) {
$pdf->SetFont('','B','10');
$pdf->Cell(190,6,'Parti testate da altro laboratorio',1,0,'C');
$pdf->Ln();
$pdf->SetFont('','','8');
$wa_startindex = 0;
while(!$identpartlisttrd->atEnd()) {
$wa_startindex = $identpartlisttrd->Index;
$pdf->Cell(45,6,'Parte',1,0,'L');
$descpart=$identpartlisttrd->getColumnVal("description_identificationparts");
$pdf->Cell(145,6,$descpart,1,0,'L',TRUE);
$pdf->Ln();
$pdf->Cell(45,6,'Descrizione',1,0,'L');
$pdf->Cell(145,6,$identpartlisttrd->getColumnVal("material_identificationparts"),1,0,'L', TRUE);
$pdf->Ln();
$pdf->Cell(45,6,'Articolo',1,0,'L');
$articlept=$identpartlisttrd->getColumnVal("article_identificationparts");
$articlept=html_entity_decode($articlept);
$articlept = iconv('UTF-8', 'windows-1252', $articlept);
$pdf->Cell(145,6,$articlept,1,0,'L', TRUE);
$pdf->Ln();
$pdf->Cell(45,6,'Colore',1,0,'L');
$pdf->Cell(145,6,$identpartlisttrd->getColumnVal("color_identificationparts"),1,0,'L', TRUE);
$pdf->Ln();
$pdf->Cell(45,6,'Rapporto',1,0,'L');
$cmcrepn=$identpartlisttrd->getColumnVal("cmcreportnumber_identificationparts");
$cmcrepn=html_entity_decode($cmcrepn);
$cmcrepn = iconv('UTF-8', 'windows-1252', $cmcrepn);
$pdf->Cell(145,6,$cmcrepn,1,0,'L', TRUE);
$pdf->Ln();
$pdf->Cell(45,6,'Data',1,0,'L');
$pdf->Cell(145,6,$identpartlisttrd->getColumnVal("cmcreportdate_identificationparts"),1,0,'L', TRUE);
$pdf->Ln();
$pdf->Cell(45,6,'Intestato',1,0,'L');
$pdf->Cell(145,6,$identpartlisttrd->getColumnVal("reportof"),1,0,'L',TRUE);
$pdf->Ln();
$pdf->SetFillColor(192,192,192);
$pdf->Cell(190,3,'',1,0,'L',TRUE);
$pdf->SetFillColor(232, 242, 255);
$pdf->Ln();
$pdf->SetFont('','','8');
$pdf->Ln();
$identpartlisttrd->moveNext();
}
$identpartlisttrd->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
}
$pdf->Ln(); */
?>
+121
View File
@@ -0,0 +1,121 @@
<?php
// parse new component
$identpartlist = new WA_MySQLi_RS("identpartlist",$cmctrfdb,0);
$identpartlist->setQuery("SELECT * FROM identificationparts WHERE identificationparts.idtrfdetails='$idtrf' AND identificationparts.kindoftest='new'");
$identpartlist->execute();
$pdf->AddPage('L');
$pdf->SetFont('','B','9');
$pdf->Cell(275,6,'Parti da testare',1,0,'C');
$pdf->Ln();
$pdf->SetFont('','B','8');
$pdf->Cell(55,6,'Parte',1,0,'C');
$pdf->Cell(85,6,'Descrizione',1,0,'C');
$pdf->Cell(80,6,'Articolo',1,0,'C');
$pdf->Cell(55,6,'Colore',1,0,'C');
$pdf->Ln();
$pdf->SetFont('','','8');
$wa_startindex = 0;
while(!$identpartlist->atEnd()) {
$wa_startindex = $identpartlist->Index;
$descpart=$identpartlist->getColumnVal("description_identificationparts");
$pdf->Cell(55,6,$descpart,1,0,'L',TRUE);
$pdf->Cell(85,6,$identpartlist->getColumnVal("material_identificationparts"),1,0,'L', TRUE);
$pdf->Cell(80,6,$identpartlist->getColumnVal("article_identificationparts"),1,0,'L', TRUE);
$pdf->Cell(55,6,$identpartlist->getColumnVal("color_identificationparts"),1,0,'L', TRUE);
$pdf->Ln();
$identpartlist->moveNext();
}
$identpartlist->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
// parse issue by cmc
$identpartlistcmc = new WA_MySQLi_RS("identpartlist",$cmctrfdb,0);
$identpartlistcmc->setQuery("SELECT * FROM identificationparts WHERE identificationparts.idtrfdetails='$idtrf' AND identificationparts.kindoftest='cmc'");
$identpartlistcmc->execute();
if (!empty($identpartlistcmc->getColumnVal("ididentificationparts"))) {
$pdf->SetFont('','B','8');
$pdf->Cell(275,6,'Parti testate da CIMAC',1,0,'C');
$pdf->Ln();
$pdf->Cell(40,6,'Parte',1,0,'C');
$pdf->Cell(50,6,'Descrizione',1,0,'C');
$pdf->Cell(50,6,'Articolo',1,0,'C');
$pdf->Cell(40,6,'Colore',1,0,'C');
$pdf->Cell(30,6,'Rapporto',1,0,'C');
$pdf->Cell(30,6,'Data',1,0,'C');
$pdf->Cell(35,6,'Intestato',1,0,'C');
$pdf->Ln();
$pdf->SetFont('','','8');
$wa_startindex = 0;
while(!$identpartlistcmc->atEnd()) {
$wa_startindex = $identpartlistcmc->Index;
$descpart=$identpartlistcmc->getColumnVal("description_identificationparts");
$pdf->Cell(40,6,$descpart,1,0,'L',TRUE);
$pdf->Cell(50,6,$identpartlistcmc->getColumnVal("material_identificationparts"),1,0,'L', TRUE);
$pdf->Cell(50,6,$identpartlistcmc->getColumnVal("article_identificationparts"),1,0,'L', TRUE);
$pdf->Cell(40,6,$identpartlistcmc->getColumnVal("color_identificationparts"),1,0,'L', TRUE);
$pdf->Cell(30,6,$identpartlistcmc->getColumnVal("cmcreportnumber_identificationparts"),1,0,'L', TRUE);
$pdf->Cell(30,6,$identpartlistcmc->getColumnVal("cmcreportdate_identificationparts"),1,0,'L', TRUE);
$pdf->Cell(35,6,$identpartlistcmc->getColumnVal("reportof"),1,0,'L',TRUE);
$pdf->Ln();
$identpartlistcmc->moveNext();
}
$identpartlistcmc->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
}
// parse issue by trd
$identpartlisttrd = new WA_MySQLi_RS("identpartlist",$cmctrfdb,0);
$identpartlisttrd->setQuery("SELECT * FROM identificationparts WHERE identificationparts.idtrfdetails='$idtrf' AND identificationparts.kindoftest='trd'");
$identpartlisttrd->execute();
if (!empty($identpartlisttrd->getColumnVal("ididentificationparts"))) {
$pdf->SetFont('','B','8');
$pdf->Cell(275,6,'Parti testate da altro laboratorio',1,0,'C');
$pdf->Ln();
$pdf->Cell(40,6,'Parte',1,0,'C');
$pdf->Cell(50,6,'Descrizione',1,0,'C');
$pdf->Cell(50,6,'Articolo',1,0,'C');
$pdf->Cell(40,6,'Colore',1,0,'C');
$pdf->Cell(30,6,'Rapporto',1,0,'C');
$pdf->Cell(30,6,'Data',1,0,'C');
$pdf->Cell(35,6,'Intestato',1,0,'C');
$pdf->Ln();
$pdf->SetFont('','','8');
$wa_startindex = 0;
while(!$identpartlisttrd->atEnd()) {
$wa_startindex = $identpartlisttrd->Index;
$descpart=$identpartlisttrd->getColumnVal("description_identificationparts");
$pdf->Cell(40,6,$descpart,1,0,'L',TRUE);
$pdf->Cell(50,6,$identpartlisttrd->getColumnVal("material_identificationparts"),1,0,'L', TRUE);
$pdf->Cell(50,6,$identpartlisttrd->getColumnVal("article_identificationparts"),1,0,'L', TRUE);
$pdf->Cell(40,6,$identpartlisttrd->getColumnVal("color_identificationparts"),1,0,'L', TRUE);
$pdf->Cell(30,6,$identpartlisttrd->getColumnVal("cmcreportnumber_identificationparts"),1,0,'L', TRUE);
$pdf->Cell(30,6,$identpartlisttrd->getColumnVal("cmcreportdate_identificationparts"),1,0,'L', TRUE);
$pdf->Cell(35,6,$identpartlisttrd->getColumnVal("reportof"),1,0,'L',TRUE);
$pdf->Ln();
$identpartlisttrd->moveNext();
}
$identpartlisttrd->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
}
?>
+17
View File
@@ -0,0 +1,17 @@
<?php
$filepathname = $tdnumber . "rev" . $trfData['revtrf'] . "technicaldossier" . ".pdf";
$filename = "tdpdf/" . $filepathname;
ob_end_clean();
$pdf->Output($filename, 'D');
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "data_td";
$UpdateQuery->bindColumn("pdffilenametd", "s", "$filepathname", "WA_DEFAULT");
$UpdateQuery->bindColumn("zipname", "s", "$zipnamefile", "WA_DEFAULT");
$UpdateQuery->addFilter("iddata_td", "=", "i", "" . ($idtd) . "");
$UpdateQuery->execute();
$UpdateGoTo = "";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo ? rel2abs($UpdateGoTo, dirname(__FILE__)) : "";
$UpdateQuery->redirect($UpdateGoTo);
+47
View File
@@ -0,0 +1,47 @@
<?php
$prodplacelist = new WA_MySQLi_RS("prodplacelist", $cmctrfdb, 0);
$prodplacelist->setQuery("SELECT * FROM contacts_td WHERE contacts_td.idtd='$idtd' ORDER BY contacts_td.sitenumber");
$prodplacelist->execute();
?>
<?php
$totprodplace = $prodplacelist->TotalRows;
?>
<?php if ($totprodplace > 0) { ?>
<?php
$pdf->SetFont('', 'B', '10');
$pdf->Cell(190, 6, $chemicalagentpdf, 1, 0, 'C');
$pdf->Ln();
$pdf->SetFont('', '', '9'); ?>
<?php
$wa_startindex = 0;
while (!$prodplacelist->atEnd()) {
$wa_startindex = $prodplacelist->Index;
$companyname = convertToPDFEncoding($prodplacelist->getColumnVal("companyname"));
$companyaddress = convertToPDFEncoding($prodplacelist->getColumnVal("address"));
$companycity = convertToPDFEncoding($prodplacelist->getColumnVal("city"));
$companycap = convertToPDFEncoding($prodplacelist->getColumnVal("cap"));
$companycountry = convertToPDFEncoding($prodplacelist->getColumnVal("country"));
$companytelephone = convertToPDFEncoding($prodplacelist->getColumnVal("telephone"));
$companyemail = convertToPDFEncoding($prodplacelist->getColumnVal("email"));
$contactname = convertToPDFEncoding($prodplacelist->getColumnVal("contactname"));
$companyfax = convertToPDFEncoding($prodplacelist->getColumnVal("fax"));
$pdf->Cell(190, 6, $companyname, 1, 0, 'L', TRUE);
$pdf->Ln();
$prodplacelist->moveNext();
}
$prodplacelist->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
?><?php } ?>
+80
View File
@@ -0,0 +1,80 @@
<?php
$prodplacelist = new WA_MySQLi_RS("prodplacelist", $cmctrfdb, 0);
$prodplacelist->setQuery("SELECT * FROM contacts_td WHERE contacts_td.idtd='$idtd' ORDER BY contacts_td.sitenumber");
$prodplacelist->execute();
?>
<?php
$totprodplace = $prodplacelist->TotalRows;
?>
<?php if ($totprodplace > 0) { ?>
<?php
$prodplacesame = convertToPDFEncoding($tdData['productionplace_same']);
if ($prodplacesame == 'Y') {
$prosame = $sameprod;
} else {
$prosame = $nosameprod;
}
$pdf->SetFont('dejavusans', 'B', '9');
$pdf->Cell(100, 6, $sitenumbertitle, 1, 0, 'L');
$pdf->SetFont('dejavusans', '', '9');
$pdf->Cell(90, 6, $prosame, 1, 0, 'L', TRUE);
$pdf->Ln();
$pdf->Ln();
if ($prodplacesame == 'N') {
$pdf->SetFont('dejavusans', 'B', '10');
$pdf->SetFont('dejavusans', '', '9');
$wa_startindex = 0;
while (!$prodplacelist->atEnd()) {
$wa_startindex = $prodplacelist->Index;
$companyname = convertToPDFEncoding($prodplacelist->getColumnVal("companyname"));
$companyaddress = convertToPDFEncoding($prodplacelist->getColumnVal("address"));
$companycity = convertToPDFEncoding($prodplacelist->getColumnVal("city"));
$companycap = convertToPDFEncoding($prodplacelist->getColumnVal("cap"));
$companyaddresscomplete = $companyaddress . ',' . $companycap . ' ' . $companycity;
$siten = convertToPDFEncoding($prodplacelist->getColumnVal("sitenumber"));
$companycountry = convertToPDFEncoding($prodplacelist->getColumnVal("country"));
$companytelephone = convertToPDFEncoding($prodplacelist->getColumnVal("telephone"));
$companyemail = convertToPDFEncoding($prodplacelist->getColumnVal("email"));
$contactname = convertToPDFEncoding($prodplacelist->getColumnVal("contactname"));
$companyfax = convertToPDFEncoding($prodplacelist->getColumnVal("fax"));
$sitenumberpdf = $sitenumbertitle . ' N. ' . $siten;
$pdf->Cell(190, 6, $sitenumberpdf, 1, 0, 'C');
$pdf->Ln();
$pdf->Cell(80, 6, $companypdf, 1, 0, 'L', TRUE);
$pdf->Cell(110, 6, $companyname, 1, 0, 'L');
$pdf->Ln();
$pdf->Cell(80, 6, $addresspdf, 1, 0, 'L', TRUE);
$pdf->Cell(110, 6, $companyaddresscomplete, 1, 0, 'L');
$pdf->Ln();
$pdf->Cell(80, 6, $countrypdf, 1, 0, 'L', TRUE);
$pdf->Cell(110, 6, $companycountry, 1, 0, 'L');
$pdf->Ln();
$pdf->Cell(80, 6, $phonepdf, 1, 0, 'L', TRUE);
$pdf->Cell(110, 6, $companytelephone, 1, 0, 'L');
$pdf->Ln();
$pdf->Cell(80, 6, 'Fax', 1, 0, 'L', TRUE);
$pdf->Cell(110, 6, $companyfax, 1, 0, 'L');
$pdf->Ln();
$pdf->Cell(80, 6, $emailpdf, 1, 0, 'L', TRUE);
$pdf->Cell(110, 6, $companyemail, 1, 0, 'L');
$pdf->Ln();
$pdf->Cell(80, 6, $contactnamepdf, 1, 0, 'L', TRUE);
$pdf->Cell(110, 6, $contactname, 1, 0, 'L');
$pdf->Ln();
$prodplacelist->moveNext();
}
$prodplacelist->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
}
?><?php } ?>
+65
View File
@@ -0,0 +1,65 @@
<?php
$risklist = new WA_MySQLi_RS("risklist", $cmctrfdb, 0);
$risklist->setQuery("SELECT * FROM fillrisk_td LEFT JOIN riskarea_td ON fillrisk_td.idriskarea_td=riskarea_td.idriskarea_td WHERE fillrisk_td.iddata_td='$idtd' ORDER BY riskarea_td.risknumber");
$risklist->execute();
?>
<?php
$totrisk = $risklist->TotalRows;
?>
<?php if ($totrisk > 0) {
$pdf->SetFont('dejavusans', '', '7');
$pdf->Cell(130, 6, $reqessent, 1, 0, 'C');
$pdf->Cell(15, 6, $riskn, 1, 0, 'C');
$pdf->Cell(15, 6, $riskapp, 1, 0, 'C');
$pdf->Cell(30, 6, $riskcovered, 1, 0, 'C');
$pdf->Ln();
$pdf->SetFont('dejavusans', '', 7);
$wa_startindex = 0;
while (!$risklist->atEnd()) {
$wa_startindex = $risklist->Index;
$applicablerisk = $risklist->getColumnVal("applicable");
// Sostituisci il valore di $applicablerisk con il carattere Unicode per un checkbox pieno o vuoto
if ($applicablerisk == '1') {
// Carattere Unicode per un checkbox selezionato (pieno)
$checkbox = "Sì"; // Oppure usa un'icona o un'immagine che preferisci
} else {
// Carattere Unicode per un checkbox non selezionato (vuoto)
$checkbox = "No"; // Oppure usa un'icona o un'immagine che preferisci
}
$checkbox = convertToPDFEncoding($checkbox);
$coveredbyrisk = convertToPDFEncoding($risklist->getColumnVal("coveredby"));
$risknameit = convertToPDFEncoding($risklist->getColumnVal("riskname_it"));
$risknameen = convertToPDFEncoding($risklist->getColumnVal("riskname_en"));
$risknumber = convertToPDFEncoding($risklist->getColumnVal("risknumber"));
if ($coveredbyrisk == 'coverone') {
$coveredbytext = $coverone;
} elseif ($coveredbyrisk == 'covertwo') {
$coveredbytext = $covertwo;
} elseif ($coveredbyrisk == 'coverthree') {
$coveredbytext = $coverthree;
} else {
$coveredbytext = ''; // Gestisci il caso in cui nessuno dei valori corrisponde
}
$pdf->MultiCell(130, 6, $risknameit, 1, 'L', 1, 0, '', '', true);
$pdf->Cell(15, 6, $risknumber, 1, 0, 'L', TRUE);
$pdf->Cell(15, 6, $checkbox, 1, 0, 'C', TRUE);
$pdf->Cell(30, 6, $coveredbytext, 1, 0, 'L', TRUE);
$pdf->Ln();
$risklist->moveNext();
}
$risklist->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
} ?>
+46
View File
@@ -0,0 +1,46 @@
<?php
if (Auth::user()->hasRole('User')) :
// trf option
$nameuser = $_SESSION["nameuser"];
//$pdf->Cell(120,6,'Intendo sottoporre questo modello a sorveglianza (presso CIMAC)',1,0,'C');
//$pdf->Cell(70,6,$trfData['surveillanceselectoption'],1,0,'C',TRUE);
$statement = html_entity_decode($statement);
$statement = iconv('UTF-8', 'windows-1252', $statement);
//$statement = iconv('UTF-8', 'iso-8859-1', $statement);
$addstatement = html_entity_decode($addstatement);
$addstatement = iconv('UTF-8', 'windows-1252', $addstatement);
//$addstatement = iconv('UTF-8', 'iso-8859-1', $addstatement);
$pdf->Ln();
$pdf->MultiCell(190, 6, $statement, 1);
if ($trfData['certotherclient'] == 'Y') {
$pdf->MultiCell(190, 6, $addstatement, 1);
}
$pdf->Ln();
$pdf->Cell(40, 6, $signedonpdf, 1, 0, 'C');
$signedonnew = date("d/m/Y", strtotime($trfData['signedon']));
$pdf->Cell(40, 6, $signedonnew, 1, 0, 'C', TRUE);
$pdf->Cell(40, 6, ' Da ', 1, 0, 'C');
$pdf->Cell(70, 6, $nameuser, 1, 0, 'C', TRUE);
$pdf->Ln();
$pdf->SetFont('', '', 7);
$pdf->Cell(190, 6, $signedtokenpdf, 0, 0, 'C');
$pdf->Ln();
if (($otherclient == 'Y') || ($idcertificate == '4')) {
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont('', '', 9);
$pdf->Cell(190, 6, $producersign, 0, 0, 'C');
$pdf->Ln();
$pdf->SetFont('Arial', '', 8);
$pdf->Cell(40, 6, $signedonpdf, 1, 0, 'C');
$pdf->Cell(40, 6, '', 1, 0, 'C', TRUE);
$pdf->Cell(40, 6, ' Da ', 1, 0, 'C');
$pdf->Cell(70, 6, $namesurnamecertcontact, 1, 0, 'C', TRUE);
$pdf->Ln();
$pdf->Ln();
$pdf->Cell(40, 6, $signtext, 1, 0, 'C');
$pdf->Cell(70, 6, '', 1, 0, 'C', TRUE);
$pdf->Ln();
}
endif;
@@ -0,0 +1,29 @@
<?php
if (Auth::user()->hasRole('User')) :
// trf option
$nameuser = $_SESSION["nameuser"];
//$pdf->Cell(120,6,'Intendo sottoporre questo modello a sorveglianza (presso CIMAC)',1,0,'C');
//$pdf->Cell(70,6,$trfData['surveillanceselectoption'],1,0,'C',TRUE);
$pdf->Ln();
$statementnocert = html_entity_decode($statementnocert);
$statementnocert = iconv('UTF-8', 'windows-1252', $statementnocert);
$pdf->MultiCell(190, 6, $statementnocert, 1);
if ($trfData['certotherclient'] == 'Y') {
$addstatement = html_entity_decode($addstatement);
$addstatement = iconv('UTF-8', 'windows-1252', $addstatement);
$pdf->MultiCell(190, 6, $addstatement, 1);
}
$pdf->Ln();
$pdf->Cell(40, 6, $signedonpdf, 1, 0, 'C');
$signedonnew = date("d/m/Y", strtotime($trfData['signedon']));
$pdf->Cell(40, 6, $signedonnew, 1, 0, 'C', TRUE);
$pdf->Cell(40, 6, ' Da ', 1, 0, 'C');
$pdf->Cell(70, 6, $nameuser, 1, 0, 'C', TRUE);
$pdf->Ln();
$pdf->SetFont('', '', 7);
$pdf->Cell(190, 6, $signedtokenpdf, 0, 0, 'C');
$pdf->Ln();
endif;
?>
+42
View File
@@ -0,0 +1,42 @@
<?php
$pdf->SetFont('','B','10');
//$pdf->Cell(190,6,'',1,0,'C');
$pdf->Ln();
$pdf->Cell(60,6,$pdfstandard,1,0,'C');
$pdf->Cell(85,6,$pdfprotection,1,0,'C');
$pdf->Cell(45,6,$pdfdpi,1,0,'C');
$pdf->Ln();
$pdf->SetFont('','','9');
$wa_startindex = 0;
while(!$stdinfo->atEnd()) {
$wa_startindex = $stdinfo->Index;
$stdnamecode=$stdinfo->getColumnVal("standardcode");
$pdf->Cell(60,6,$stdnamecode,1,0,'L',TRUE);
// Determina quale campo utilizzare in base alla lingua selezionata
$columnName = ($_SESSION['langselect'] == 'it') ?
"name_protectioncategory" :
"name_protectioncategory_en";
// Ottieni il valore dal campo appropriato
$nameprotcat = $stdinfo->getColumnVal($columnName);
// Verifica se il valore è vuoto e decodifica HTML solo se non è vuoto
if (!empty($nameprotcat)) {
$nameprotcat = html_entity_decode($nameprotcat);
$nameprotcat = iconv('UTF-8', 'windows-1252', $nameprotcat);
// Stampa la cella con il valore della categoria di protezione, solo se non è vuoto
$pdf->Cell(85, 6, $nameprotcat, 1, 0, 'L', TRUE);
} else {
// Se è vuoto, potresti voler stampare una cella vuota o gestire in modo diverso
// Ad esempio, puoi decidere di lasciare la cella vuota o inserire un testo predefinito
$pdf->Cell(85, 6, '', 1, 0, 'L', TRUE);
}
$pdf->Cell(45,6,$stdinfo->getColumnVal("value_dpicategory"),1,0,'L', TRUE);
$pdf->Ln();
$stdinfo->moveNext();
}
$stdinfo->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
?>
+16
View File
@@ -0,0 +1,16 @@
<?php
// trf option
$pdf->SetFont('','',8);
//$pdf->Cell(40,6,'Lingua Report',1,0,'C');
//$pdf->Cell(150,6,$trfData['languagereport'],1,0,'C',TRUE);
//$pdf->Ln();
$pdf->Cell(40,6,$certlangpdf,1,0,'C');
$pdf->Cell(150,6,$trfData['languagecertificate'],1,0,'C',TRUE);
$pdf->Ln();
$pdf->Cell(40,6,$contactpdf,1,0,'C');
$pdf->Cell(150,6,$trfData['contacttrfname'],1,0,'C',TRUE);
$pdf->Ln();
$pdf->Cell(40,6,$emailpdf,1,0,'C');
$pdf->Cell(150,6,$trfData['emailtrfname'],1,0,'C',TRUE);
$pdf->Ln();
?>
+16
View File
@@ -0,0 +1,16 @@
<?php
// trf option
$pdf->SetFont('','',8);
$pdf->Cell(40,6,$reportlangpdf,1,0,'C');
$pdf->Cell(150,6,$trfData['languagereport'],1,0,'C',TRUE);
$pdf->Ln();
$pdf->Cell(40,6,$contactpdf,1,0,'C');
$pdf->Cell(150,6,$trfData['contacttrfname'],1,0,'C',TRUE);
$pdf->Ln();
$pdf->Cell(40,6,$emailpdf,1,0,'C');
$pdf->Cell(150,6,$trfData['emailtrfname'],1,0,'C',TRUE);
$pdf->Ln();
?>
+14
View File
@@ -0,0 +1,14 @@
<?php
$pdf->SetFont('','B','8');
$pdf->Ln();
$pdf->SetFont('','','8');
$sizerec=47.5;
$pdf->Cell(100,6,$numbercecertpdf,1,0,'L');
$pdf->Cell(90,6,$trfData['previousreportnumber'],1,0,'L',TRUE);
$pdf->Ln();
$organismtype2=html_entity_decode($organismcertpdf);
$organismtype2fix = iconv('UTF-8', 'windows-1252', $organismtype2);
$pdf->Cell(100,6,$organismtype2fix,1,0,'L');
$pdf->Cell(90,6,$trfData['notificatedorganismname'],1,0,'L',TRUE);
$pdf->Ln();
?>
+11
View File
@@ -0,0 +1,11 @@
<?php
$pdf->SetFont('','B','8');
$pdf->SetFont('','','8');
$sizerec=47.5;
$pdf->Cell(100,6,$nrevpdf,1,0,'L');
$pdf->Cell(90,6,$trfData['previousreportnumber'],1,0,'L',TRUE);
$pdf->Ln();
$pdf->Cell(100,6,$reasonpdf,1,0,'L');
$pdf->Cell(90,6,$trfData['revisionfor'],1,0,'L',TRUE);
$pdf->Ln();
?>
+14
View File
@@ -0,0 +1,14 @@
<?php
$pdf->SetFont('','B','8');
$pdf->SetFont('','','8');
$sizerec=47.5;
$pdf->Cell(100,6,$certuebpdf,1,0,'L');
$pdf->Cell(90,6,$trfData['previousreportnumber'],1,0,'L',TRUE);
$pdf->Ln();
$pdf->Cell(100,6,$extendtopdf,1,0,'L');
$pdf->Cell(90,6,$trfData['toextend'],1,0,'L',TRUE);
$pdf->Ln();
$pdf->Cell(100,6,$surveillancetopdf,1,0,'L');
$pdf->Cell(90,6,$trfData['surveillanceselectoption'],1,0,'L',TRUE);
$pdf->Ln();
?>
+10
View File
@@ -0,0 +1,10 @@
<?php
$pdf->SetFont('', 'B', '8');
$pdf->SetFont('', '', '8');
$sizerec = 47.5;
$pdf->Cell(100, 6, $renewcertpdf, 1, 0, 'L');
$pdf->Cell(90, 6, $trfData['previousreportnumber'], 1, 0, 'L', TRUE);
$pdf->Ln();
$pdf->Cell(100, 6, $renewdate, 1, 0, 'L');
$pdf->Cell(90, 6, $trfData['renewdate'], 1, 0, 'L', TRUE);
$pdf->Ln();