Primo commit: trasferimento del progetto PPEasy
This commit is contained in:
@@ -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>
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php if ($trfData['idarticletype'] == 2 || $trfData['idarticletype'] == 4) {
|
||||
} else { ?>
|
||||
<?php
|
||||
$pdf->SetFont('', 'B', '10');
|
||||
|
||||
|
||||
$pdf->Cell(190, 6, $otherifopdf, 1, 0, 'C');
|
||||
|
||||
$pdf->Ln();
|
||||
$pdf->SetFont('', '', '8');
|
||||
|
||||
$sizerteclow = 70;
|
||||
$sizerec = 100;
|
||||
$sizerec2 = 10;
|
||||
$pdf->Cell($sizerteclow, 6, $slippingpdf, 1, 0, 'L', TRUE);
|
||||
|
||||
$pdf->Cell($sizerec2, 6, $trfData['slipping'], 1, 0, 'L', TRUE);
|
||||
$pdf->Cell($sizerec, 6, $orthopedicpdf, 1, 0, 'L', TRUE);
|
||||
if ($trfData['shoesorthopedic'] == 'Y') {
|
||||
$orthresult = utf8_decode($yespdf);
|
||||
} else {
|
||||
$orthresult = "No";
|
||||
}
|
||||
$pdf->Cell($sizerec2, 6, $orthresult, 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell($sizerteclow, 6, $autoclavpdf, 1, 0, 'L', TRUE);
|
||||
if ($trfData['autoclavable'] == 'Y') {
|
||||
$autoclresult = utf8_decode($yespdf);
|
||||
} else {
|
||||
$autoclresult = "No";
|
||||
}
|
||||
$pdf->Cell($sizerec2, 6, $autoclresult, 1, 0, 'L', TRUE);
|
||||
$pdf->Cell($sizerec, 6, $orthopedicmodpdf, 1, 0, 'L', TRUE);
|
||||
if ($trfData['shoesorthopedicmod'] == 'Y') {
|
||||
$orthomodresult = utf8_decode($yespdf);
|
||||
} else {
|
||||
$orthomodresult = "No";
|
||||
}
|
||||
$pdf->Cell($sizerec2, 6, $orthomodresult, 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell($sizerteclow, 6, $ukcapdf, 1, 0, 'L', TRUE);
|
||||
if ($trfData['ukcacert'] == 'Y') {
|
||||
$ukcacert = utf8_decode($yespdf);
|
||||
} else {
|
||||
$ukcacert = $nopdf;
|
||||
}
|
||||
$pdf->Cell($sizerec2, 6, $ukcacert, 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($sizerec2, 6, $esdresult, 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
?>
|
||||
<?php } ?>
|
||||
@@ -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();
|
||||
}
|
||||
?>
|
||||
@@ -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();
|
||||
?>
|
||||
@@ -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();
|
||||
|
||||
?>
|
||||
@@ -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();
|
||||
|
||||
?>
|
||||
@@ -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();
|
||||
|
||||
?>
|
||||
@@ -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();
|
||||
|
||||
?>
|
||||
@@ -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. 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');
|
||||
|
||||
// nota di testa
|
||||
//$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/descriptiontablenocert.php');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// standards table
|
||||
include('pdfcreation/standardstable.php');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
// m30info
|
||||
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/trfoptionnocert.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/signdatatablenocert.php');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,57 @@
|
||||
<?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;
|
||||
|
||||
$nameaddreqconva=$addreqlist->getColumnVal("name_additionalrequirements_it");
|
||||
|
||||
$nameaddreqconvb=html_entity_decode($nameaddreqconva, ENT_QUOTES);
|
||||
|
||||
$nameaddreqconv = iconv('UTF-8', 'windows-1252//IGNORE', $nameaddreqconvb);
|
||||
|
||||
|
||||
|
||||
$pdf->Cell(190,6,$nameaddreqconv,1,0,'L',TRUE);
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
|
||||
|
||||
$addreqlist->moveNext();
|
||||
|
||||
}
|
||||
|
||||
$addreqlist->moveFirst(); //return RS to first record
|
||||
|
||||
unset($wa_startindex);
|
||||
|
||||
unset($wa_repeatcount);
|
||||
|
||||
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,130 @@
|
||||
|
||||
|
||||
<?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,'Tipo certificazione',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,$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,'Data inserimento',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');
|
||||
|
||||
$pdf->Cell(70,6,$trfData['name_articletype'],1,0,'L',TRUE);
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
$pdf->Cell(50,6,$pdfmodeltitle,1,0,'L');
|
||||
|
||||
$pdf->Cell(70,6,$trfData['namemodelarticle'],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,'TIPO di DPI',1,0,'L');
|
||||
|
||||
$pdf->Cell(140,6,$artchname->getColumnVal("name_articlecharacteristic"),1,0,'L',TRUE);
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
|
||||
|
||||
<?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,'Data inserimento',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');
|
||||
|
||||
$pdf->Cell(70,6,$trfData['name_articletype'],1,0,'L',TRUE);
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
$pdf->Cell(50,6,$pdfmodeltitle,1,0,'L');
|
||||
|
||||
$pdf->Cell(70,6,$trfData['namemodelarticle'],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,'TIPO di DPI',1,0,'L');
|
||||
|
||||
$pdf->Cell(140,6,$artchname->getColumnVal("name_articlecharacteristic"),1,0,'L',TRUE);
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
<?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'];
|
||||
|
||||
//$exif = exif_read_data($image1);
|
||||
//echo $exif;
|
||||
|
||||
// $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'];
|
||||
|
||||
// $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,76 @@
|
||||
<?php
|
||||
if (!empty($documentlist->getColumnVal("idfileattached"))) {
|
||||
if ($sndrpt=='N') {
|
||||
//$pdf->Output(); second module
|
||||
$filepathname=$trfData['trfnumber']."applicationform".".pdf";
|
||||
$filename="pdf/".$filepathname;
|
||||
$pdf->Output($filename,'F');
|
||||
|
||||
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
|
||||
$UpdateQuery->Action = "update";
|
||||
$UpdateQuery->Table = "`trf-details`";
|
||||
$UpdateQuery->bindColumn("pdffilename", "s", "$filepathname", "WA_DEFAULT");
|
||||
$UpdateQuery->bindColumn("zipname", "s", "$zipnamefile", "WA_DEFAULT");
|
||||
$UpdateQuery->addFilter("idtrfdetails", "=", "i", "".($idtrf) ."");
|
||||
$UpdateQuery->execute();
|
||||
$UpdateGoTo = "";
|
||||
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo?rel2abs($UpdateGoTo,dirname(__FILE__)):"";
|
||||
$UpdateQuery->redirect($UpdateGoTo);
|
||||
|
||||
} else {
|
||||
//$pdf->Output(); first module
|
||||
$filepathname=$trfData['trfnumber']."applicationformb".".pdf";
|
||||
$filename="pdf/".$filepathname;
|
||||
$pdf->Output($filename,'F');
|
||||
|
||||
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
|
||||
$UpdateQuery->Action = "update";
|
||||
$UpdateQuery->Table = "`trf-details`";
|
||||
$UpdateQuery->bindColumn("pdffilename2", "s", "$filepathname", "WA_DEFAULT");
|
||||
$UpdateQuery->bindColumn("zipname", "s", "$zipnamefile", "WA_DEFAULT");
|
||||
$UpdateQuery->addFilter("idtrfdetails", "=", "i", "".($idtrf) ."");
|
||||
$UpdateQuery->execute();
|
||||
$UpdateGoTo = "";
|
||||
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo?rel2abs($UpdateGoTo,dirname(__FILE__)):"";
|
||||
$UpdateQuery->redirect($UpdateGoTo);
|
||||
|
||||
|
||||
|
||||
}} else {
|
||||
if ($sndrpt=='N') {
|
||||
//$pdf->Output(); second module
|
||||
$filepathname=$trfData['trfnumber']."applicationform".".pdf";
|
||||
$filename="pdf/".$filepathname;
|
||||
$pdf->Output($filename,'F');
|
||||
|
||||
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
|
||||
$UpdateQuery->Action = "update";
|
||||
$UpdateQuery->Table = "`trf-details`";
|
||||
$UpdateQuery->bindColumn("pdffilename", "s", "$filepathname", "WA_DEFAULT");
|
||||
|
||||
$UpdateQuery->addFilter("idtrfdetails", "=", "i", "".($idtrf) ."");
|
||||
$UpdateQuery->execute();
|
||||
$UpdateGoTo = "";
|
||||
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo?rel2abs($UpdateGoTo,dirname(__FILE__)):"";
|
||||
$UpdateQuery->redirect($UpdateGoTo);
|
||||
|
||||
} else {
|
||||
//$pdf->Output(); first module
|
||||
$filepathname=$trfData['trfnumber']."applicationformb".".pdf";
|
||||
$filename="pdf/".$filepathname;
|
||||
$pdf->Output($filename,'F');
|
||||
|
||||
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
|
||||
$UpdateQuery->Action = "update";
|
||||
$UpdateQuery->Table = "`trf-details`";
|
||||
$UpdateQuery->bindColumn("pdffilename2", "s", "$filepathname", "WA_DEFAULT");
|
||||
|
||||
$UpdateQuery->addFilter("idtrfdetails", "=", "i", "".($idtrf) ."");
|
||||
$UpdateQuery->execute();
|
||||
$UpdateGoTo = "";
|
||||
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo?rel2abs($UpdateGoTo,dirname(__FILE__)):"";
|
||||
$UpdateQuery->redirect($UpdateGoTo);
|
||||
|
||||
|
||||
}}
|
||||
?>
|
||||
@@ -0,0 +1,56 @@
|
||||
<?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,29 @@
|
||||
<?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;
|
||||
$nameaddreqconva=$addreqlist->getColumnVal("name_additionalrequirements_it");
|
||||
$nameaddreqconvb=html_entity_decode($nameaddreqconva);
|
||||
$nameaddreqconv = iconv('UTF-8', 'windows-1252', $nameaddreqconvb);
|
||||
|
||||
$pdf->Cell(190,6,$nameaddreqconv,1,0,'L',TRUE);
|
||||
$pdf->Ln();
|
||||
|
||||
$addreqlist->moveNext();
|
||||
}
|
||||
$addreqlist->moveFirst(); //return RS to first record
|
||||
unset($wa_startindex);
|
||||
unset($wa_repeatcount);
|
||||
|
||||
$pdf->Ln();
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,129 @@
|
||||
|
||||
|
||||
<?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,'Tipo certificazione',1,0,'L');
|
||||
|
||||
$pdf->SetFillColor(232, 242, 255);
|
||||
|
||||
$certrev1=html_entity_decode($certname=$certificationrevision->getColumnVal("description"));
|
||||
|
||||
$certrev = iconv('UTF-8', 'windows-1252', $certrev1);
|
||||
|
||||
//$certrev = iconv('UTF-8', 'windows-1252', $certrev);
|
||||
|
||||
$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,'Data inserimento',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');
|
||||
|
||||
$pdf->Cell(70,6,$trfData['name_articletype'],1,0,'L',TRUE);
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
$pdf->Cell(50,6,$pdfmodeltitle,1,0,'L');
|
||||
|
||||
$pdf->Cell(70,6,$trfData['namemodelarticle'],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,'TIPO di DPI',1,0,'L');
|
||||
|
||||
$pdf->Cell(140,6,$artchname->getColumnVal("name_articlecharacteristic"),1,0,'L',TRUE);
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
|
||||
|
||||
<?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"));
|
||||
|
||||
$certrev = iconv('UTF-8', 'windows-1252', $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,'Data inserimento',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');
|
||||
|
||||
$pdf->Cell(70,6,$trfData['name_articletype'],1,0,'L',TRUE);
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
$pdf->Cell(50,6,$pdfmodeltitle,1,0,'L');
|
||||
|
||||
$pdf->Cell(70,6,$trfData['namemodelarticle'],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,'TIPO di DPI',1,0,'L');
|
||||
|
||||
$pdf->Cell(140,6,$artchname->getColumnVal("name_articlecharacteristic"),1,0,'L',TRUE);
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
<?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' AND identificationparts.kindoftest='new'");
|
||||
$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();
|
||||
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(); */
|
||||
?>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?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');
|
||||
|
||||
// nota di testa
|
||||
//$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/descriptiontablenocert.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/trfoptionnocert.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/signdatatablenocert.php');
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,129 @@
|
||||
|
||||
|
||||
<?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,'Tipo certificazione',1,0,'L');
|
||||
|
||||
$pdf->SetFillColor(232, 242, 255);
|
||||
|
||||
$certrev1=html_entity_decode($certname=$certificationrevision->getColumnVal("description"));
|
||||
|
||||
$certrev = iconv('UTF-8', 'windows-1252', $certrev1);
|
||||
|
||||
//$certrev = iconv('UTF-8', 'windows-1252', $certrev);
|
||||
|
||||
$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), 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,'Data inserimento',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');
|
||||
|
||||
$pdf->Cell(70,6,$trfData['name_articletype'],1,0,'L',TRUE);
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
$pdf->Cell(50,6,$pdfmodeltitle,1,0,'L');
|
||||
|
||||
$pdf->Cell(70,6,$trfData['namemodelarticle'],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,'TIPO di DPI',1,0,'L');
|
||||
|
||||
$pdf->Cell(140,6,$artchname->getColumnVal("name_articlecharacteristic"),1,0,'L',TRUE);
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
|
||||
|
||||
<?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"));
|
||||
|
||||
$certrev = iconv('UTF-8', 'windows-1252', $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), 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,'Data inserimento',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');
|
||||
|
||||
$pdf->Cell(70,6,$trfData['name_articletype'],1,0,'L',TRUE);
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
$pdf->Cell(50,6,$pdfmodeltitle,1,0,'L');
|
||||
|
||||
$pdf->Cell(70,6,$trfData['namemodelarticle'],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,'TIPO di DPI',1,0,'L');
|
||||
|
||||
$pdf->Cell(140,6,$artchname->getColumnVal("name_articlecharacteristic"),1,0,'L',TRUE);
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
<?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'];
|
||||
|
||||
$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'];
|
||||
|
||||
// $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,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 } ?>
|
||||
@@ -0,0 +1,81 @@
|
||||
<?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, $pdfdescriptionpart, 1, 0, 'L');
|
||||
$pdf->SetFillColor(232, 242, 255);
|
||||
$pdf->Cell(140, 6, $trfData['sample_description'], 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50, 7, $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, 7, $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, 7, '', 0, 0, 'L');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50, 7, $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, 7, $newDate, 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50, 7, $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, 7, $articleName, 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50, 7, $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, 7, $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,105 @@
|
||||
<?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, $pdfdescriptionpart, 1, 0, 'L');
|
||||
$pdf->SetFillColor(232, 242, 255);
|
||||
$pdf->Cell(140, 6, $trfData['sample_description'], 1, 0, 'L', TRUE);
|
||||
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50, 7, '', 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, 7, '', 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, 7, '', 0, 0, 'L');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50, 7, $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, 7, $newDate, 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50, 7, $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, 7, $articleName, 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50, 7, $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, 7, $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,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);
|
||||
?>
|
||||
@@ -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('Arial', '', 8);
|
||||
|
||||
$pdf->SetFont('', 'B', '10');
|
||||
$pdf->Cell(190, 6, $headercertpdf, 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);
|
||||
$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();
|
||||
@@ -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;
|
||||
@@ -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,33 @@
|
||||
<?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(30, 6, $numberdpipdf, 1, 0, 'L');
|
||||
$pdf->Cell(160, 6, $manufacturerpdf, 1, 0, 'L');
|
||||
$pdf->Ln(); ?>
|
||||
<?php
|
||||
$wa_startindex = 0;
|
||||
while (!$manufactlist->atEnd()) {
|
||||
$wa_startindex = $manufactlist->Index;
|
||||
$pdf->Cell(30, 6, $manufactlist->getColumnVal("dpicode"), 1, 0, 'L');
|
||||
// Decodifica i caratteri HTML
|
||||
$nameAuditManufacturer = html_entity_decode($manufactlist->getColumnVal("nameauditmanufacturer"));
|
||||
|
||||
// Stampa il valore decodificato
|
||||
$pdf->Cell(160, 6, $nameAuditManufacturer, 1, 0, 'L', TRUE);
|
||||
|
||||
$pdf->Ln();
|
||||
$manufactlist->moveNext();
|
||||
}
|
||||
$manufactlist->moveFirst(); //return RS to first record
|
||||
unset($wa_startindex);
|
||||
unset($wa_repeatcount);
|
||||
$pdf->Ln();
|
||||
?>
|
||||
@@ -0,0 +1,204 @@
|
||||
<?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');
|
||||
$colorname = $identpartlist->getColumnVal("color_identificationparts");
|
||||
$colorname = html_entity_decode($colorname);
|
||||
|
||||
// Aggiungi il contenuto decodificato nella cella del PDF
|
||||
$pdf->Cell(145, 6, $colorname, 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 = str_replace("‐", "-", $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(); */
|
||||
@@ -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);
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?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');
|
||||
// nota di testa
|
||||
//$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/descriptiontablenocert.php');
|
||||
$pdf->Ln();
|
||||
// standards table
|
||||
|
||||
|
||||
include('pdfcreation/standardstable.php');
|
||||
$pdf->Ln();
|
||||
// m30info
|
||||
|
||||
//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/trfoptionnocert.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/signdatatablenocert.php');
|
||||
$pdf->Ln();
|
||||
include('photobook.php');
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php // pdf creation for certification 1
|
||||
$pdf->SetFont('Arial', '', 7);
|
||||
$firstsent = html_entity_decode($firstsentpdf1);
|
||||
$firstsent = iconv('UTF-8', 'windows-1252', $firstsent);
|
||||
$secondsent = utf8_decode($secondsentpdf1);
|
||||
//$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();
|
||||
include('photobook.php');
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php // pdf creation for certification 1
|
||||
$pdf->SetFont('Arial', '', 7);
|
||||
$firstsent = html_entity_decode($firstsetnpdf2);
|
||||
$firstsent = iconv('UTF-8', 'windows-1252', $firstsent);
|
||||
$secondsent = utf8_decode($secondsentpdf2);
|
||||
//$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');
|
||||
//typecert 2 info
|
||||
include('pdfcreation/type2table.php');
|
||||
$pdf->Ln();
|
||||
// standards table
|
||||
include('pdfcreation/standardstable.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();
|
||||
include('photobook.php');
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php // pdf creation for certification 1
|
||||
$pdf->SetFont('Arial', '', 7);
|
||||
$firstsent = html_entity_decode($firstsentpdf3);
|
||||
$firstsent = iconv('UTF-8', 'windows-1252', $firstsent);
|
||||
$secondsent = utf8_decode($secondsentpdf3);
|
||||
//$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');
|
||||
// nota di testa
|
||||
//$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/descriptiontablenocert.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/trfoptionnocert.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/signdatatablenocert.php');
|
||||
$pdf->Ln();
|
||||
include('photobook.php');
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php // pdf creation for certification 1
|
||||
$pdf->SetFont('Arial', '', 7);
|
||||
$firstsent = html_entity_decode($firstsentpdf3);
|
||||
$firstsent = iconv('UTF-8', 'windows-1252', $firstsent);
|
||||
$secondsent = utf8_decode($secondsentpdf3);
|
||||
//$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();
|
||||
include('photobook.php');
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php // pdf creation for certification 1
|
||||
$pdf->SetFont('Arial', '', 7);
|
||||
$firstsent = html_entity_decode($firstsentpdf4);
|
||||
$firstsent = iconv('UTF-8', 'windows-1252', $firstsent);
|
||||
$secondsent = utf8_decode($secondsentpdf4);
|
||||
//$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');
|
||||
// nota di testa
|
||||
$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/descriptiontablenocert.php');
|
||||
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/trfoptionnocert.php');
|
||||
$pdf->Ln();
|
||||
//trf option
|
||||
include('pdfcreation/fileattached.php');
|
||||
$pdf->Ln();
|
||||
$pdf->Ln();
|
||||
//header certificate contact
|
||||
include('pdfcreation/headercertificatetable.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();
|
||||
include('photobook.php');
|
||||
@@ -0,0 +1,206 @@
|
||||
<?php // M15A (certificate n.4)
|
||||
// ***start with Manufacturer address
|
||||
$kindcont='manufacturer';
|
||||
// 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','',9);
|
||||
|
||||
$pdf->SetFont('','B','10');
|
||||
$pdf->Cell(190,6,"Dati del Fabbricante Originario",1,0,'C');
|
||||
$pdf->Ln();
|
||||
$pdf->SetFont('','',9);
|
||||
$pdf->Cell(40,6,'Company Name',1,0,'C');
|
||||
$pdf->SetFillColor(232, 242, 255);
|
||||
|
||||
$pdf->Cell(150,6,$companyname,1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,'Address',1,0,'C');
|
||||
$pdf->Cell(150,6,$contactsinfoData['address'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,'City',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['city'],1,0,'C',TRUE);
|
||||
$pdf->Cell(40,6,'Cap',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['cap'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,'PIVA',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['piva'],1,0,'C',TRUE);
|
||||
$pdf->Cell(40,6,'Country',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['country'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,'Telephone',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['telephone'],1,0,'C',TRUE);
|
||||
$pdf->Cell(40,6,'Email',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['email'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,'Contact Name',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['contactname'],1,0,'C',TRUE);
|
||||
$pdf->Cell(40,6,'Contact Surname',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['contactsurname'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
//invoice contacts
|
||||
// ***start with invoice address
|
||||
$kindcont='invoice';
|
||||
// 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','',9);
|
||||
|
||||
$pdf->SetFont('','B','10');
|
||||
$pdf->Cell(190,6,"INVOICE CONTACTS",1,0,'C');
|
||||
$pdf->Ln();
|
||||
$pdf->SetFont('','',9);
|
||||
$pdf->Cell(40,6,'Company Name',1,0,'C');
|
||||
$pdf->SetFillColor(232, 242, 255);
|
||||
|
||||
$pdf->Cell(150,6,$companyname,1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,'Address',1,0,'C');
|
||||
$pdf->Cell(150,6,$contactsinfoData['address'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,'City',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['city'],1,0,'C',TRUE);
|
||||
$pdf->Cell(40,6,'Cap',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['cap'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,'PIVA',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['piva'],1,0,'C',TRUE);
|
||||
$pdf->Cell(40,6,'Country',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['country'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,'Telephone',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['telephone'],1,0,'C',TRUE);
|
||||
$pdf->Cell(40,6,'Email',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['email'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,'Contact Name',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['contactname'],1,0,'C',TRUE);
|
||||
$pdf->Cell(40,6,'Contact Surname',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['contactsurname'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
// trf option
|
||||
$pdf->Ln();
|
||||
$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,'Lingua Certificato',1,0,'C');
|
||||
$pdf->Cell(150,6,$trfData['languagecertificate'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,'Contatto Application Form',1,0,'C');
|
||||
$pdf->Cell(150,6,$trfData['contacttrfname'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,'Email Application Form',1,0,'C');
|
||||
$pdf->Cell(150,6,$trfData['emailtrfname'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Ln();
|
||||
// auditdpi query
|
||||
$auditdpilist = new WA_MySQLi_RS("auditdpilist",$cmctrfdb,0);
|
||||
$auditdpilist->setQuery("SELECT * FROM auditdpi LEFT JOIN auditsurveillancetype ON auditsurveillancetype.idauditsurveillancetype=auditdpi.moduleselection WHERE auditdpi.idtrfdetails='$idtrf'");
|
||||
$auditdpilist->execute();
|
||||
|
||||
if ($idcertificate==5) {
|
||||
|
||||
$pdf->SetFont('','B','10');
|
||||
$pdf->Cell(190,6,"DPI",1,0,'C');
|
||||
$pdf->SetFillColor(232, 242, 255);
|
||||
$pdf->Ln();
|
||||
$pdf->SetFont('','',9);
|
||||
$pdf->Cell(20,6,'N.',1,0,'C');
|
||||
$pdf->Cell(30,6,'Cert N.',1,0,'C');
|
||||
$pdf->Cell(15,6,'Cimac',1,0,'C');
|
||||
$pdf->Cell(110,6,'Sorveglianza',1,0,'C');
|
||||
$pdf->Cell(15,6,'Store',1,0,'C');
|
||||
$pdf->Ln();
|
||||
$wa_startindex = 0;
|
||||
while(!$auditdpilist->atEnd()) {
|
||||
$wa_startindex = $auditdpilist->Index;
|
||||
$pdf->Cell(20,6,'1',1,0,'C',TRUE);
|
||||
$pdf->Cell(30,6,$auditdpilist->getColumnVal("certificatenumber"),1,0,'C',TRUE);
|
||||
$pdf->Cell(15,6,$auditdpilist->getColumnVal("issuebyciamc"),1,0,'C',TRUE);
|
||||
$pdf->Cell(110,6,$auditdpilist->getColumnVal("surveillancenameit"),1,0,'C',TRUE);
|
||||
$pdf->Cell(15,6,$auditdpilist->getColumnVal("sampleinstore"),1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$auditdpilist->moveNext();
|
||||
}
|
||||
$auditdpilist->moveFirst(); //return RS to first record
|
||||
unset($wa_startindex);
|
||||
unset($wa_repeatcount);
|
||||
$pdf->Ln();
|
||||
|
||||
} elseif ($idcertificate==6) {
|
||||
|
||||
$pdf->SetFont('','B','10');
|
||||
$pdf->Cell(190,6,"DPI",1,0,'C');
|
||||
$pdf->SetFillColor(232, 242, 255);
|
||||
$pdf->Ln();
|
||||
$pdf->SetFont('','',9);
|
||||
$pdf->Cell(20,6,'N.',1,0,'C');
|
||||
$pdf->Cell(30,6,'Cert N.',1,0,'C');
|
||||
$pdf->Cell(30,6,'Cimac',1,0,'C');
|
||||
$pdf->Cell(110,6,'Sorveglianza',1,0,'C');
|
||||
$pdf->Ln();
|
||||
$wa_startindex = 0;
|
||||
while(!$auditdpilist->atEnd()) {
|
||||
$wa_startindex = $auditdpilist->Index;
|
||||
$pdf->Cell(20,6,'1',1,0,'C',TRUE);
|
||||
$pdf->Cell(30,6,$auditdpilist->getColumnVal("certificatenumber"),1,0,'C',TRUE);
|
||||
$pdf->Cell(30,6,$auditdpilist->getColumnVal("issuebyciamc"),1,0,'C',TRUE);
|
||||
$pdf->Cell(110,6,$auditdpilist->getColumnVal("surveillancenameit"),1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$auditdpilist->moveNext();
|
||||
}
|
||||
$auditdpilist->moveFirst(); //return RS to first record
|
||||
unset($wa_startindex);
|
||||
unset($wa_repeatcount);
|
||||
$pdf->Ln();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// file attached details
|
||||
$fileattachedlist = new WA_MySQLi_RS("fileattachedlist",$cmctrfdb,0);
|
||||
$fileattachedlist->setQuery("SELECT * FROM fileattached LEFT JOIN auditdpi ON fileattached.idauditdpi=auditdpi.idauditdpi WHERE fileattached.idtrfdetails='$idtrf'");
|
||||
$fileattachedlist->execute();
|
||||
if (!empty($fileattachedlist->getColumnVal("idfileattached"))) {
|
||||
$pdf->SetFont('','B','10');
|
||||
$pdf->Cell(190,6,"FILES ATTACHED",1,0,'C');
|
||||
$pdf->SetFillColor(232, 242, 255);
|
||||
$pdf->Ln();
|
||||
$pdf->SetFont('','',9);
|
||||
$pdf->Cell(20,6,'DPI CODE',1,0,'C');
|
||||
$pdf->Cell(70,6,'Filename',1,0,'C');
|
||||
$pdf->Cell(100,6,'Description',1,0,'C');
|
||||
$pdf->Ln();
|
||||
$wa_startindex = 0;
|
||||
while(!$fileattachedlist->atEnd()) {
|
||||
$wa_startindex = $fileattachedlist->Index;
|
||||
$pdf->Cell(20,6,$fileattachedlist->getColumnVal("dpicode"),1,0,'C',true);
|
||||
$pdf->SetTextColor(0, 0, 245);
|
||||
$linkspecific='uploaddocuments/'.$fileattachedlist->getColumnVal("filename_fileattached");
|
||||
$linkfile=$linkglobal.$linkspecific;
|
||||
$fileattachedlimited=substr($fileattachedlist->getColumnVal("filename_fileattached"), 0, 30);
|
||||
$pdf->Cell(70,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, 245);
|
||||
|
||||
$pdf->Cell(190,6,'Scarica da questo link un file ZIP con tutti gli allegati',1,0,'C',false,$namefilezippathpdf);
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php // pdf creation for certification 1
|
||||
$pdf->SetFont('Arial', '', 7);
|
||||
$firstsent = html_entity_decode($firstsentpdf4);
|
||||
$firstsent = iconv('UTF-8', 'windows-1252', $firstsent);
|
||||
$secondsent = utf8_decode($secondsentpdf4);
|
||||
//$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();
|
||||
include('photobook.php');
|
||||
@@ -0,0 +1,147 @@
|
||||
<?php
|
||||
$pdf->SetFont('Arial', '', 7);
|
||||
$firstsent = html_entity_decode($firstsentpdf5);
|
||||
$firstsent = iconv('UTF-8', 'windows-1252', $firstsent);
|
||||
$secondsent = utf8_decode($secondsentpdf5);
|
||||
//$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);
|
||||
// ***start with Audit address
|
||||
//typecert 3 info
|
||||
include('pdfcreation/auditable.php');
|
||||
$pdf->Ln();
|
||||
//include('pdfcreation/invoicecontacttable.php');
|
||||
$pdf->Ln();
|
||||
// auditdpi query
|
||||
$auditdpilist = new WA_MySQLi_RS("auditdpilist", $cmctrfdb, 0);
|
||||
$auditdpilist->setQuery("SELECT * FROM auditdpi LEFT JOIN auditsurveillancetype ON auditsurveillancetype.idauditsurveillancetype=auditdpi.moduleselection WHERE auditdpi.idtrfdetails='$idtrf'");
|
||||
$auditdpilist->execute();
|
||||
if ($idcertificate == 5) {
|
||||
$pdf->SetFont('', 'B', '10');
|
||||
$pdf->Cell(190, 6, $dpipdf, 1, 0, 'C');
|
||||
$pdf->SetFillColor(232, 242, 255);
|
||||
$pdf->Ln();
|
||||
$pdf->SetFont('', '', 9);
|
||||
$pdf->Cell(15, 6, $numberpdf, 1, 0, 'C');
|
||||
$pdf->Cell(80, 6, $certnumberpdf, 1, 0, 'C');
|
||||
$pdf->Cell(15, 6, $clientnamepdf, 1, 0, 'C');
|
||||
$pdf->Cell(60, 6, $surveillancepdf, 1, 0, 'C');
|
||||
$pdf->Cell(20, 6, $storagepdf, 1, 0, 'C');
|
||||
$pdf->Ln();
|
||||
$wa_startindex = 0;
|
||||
while (!$auditdpilist->atEnd()) {
|
||||
$yesreply = html_entity_decode('Sì');
|
||||
$yesreply = iconv('UTF-8', 'windows-1252', $yesreply);
|
||||
$wa_startindex = $auditdpilist->Index;
|
||||
$pdf->Cell(15, 6, $auditdpilist->getColumnVal("dpicode"), 1, 0, 'C', TRUE);
|
||||
// Decodifica i caratteri HTML
|
||||
$certificateNumber = html_entity_decode($auditdpilist->getColumnVal("certificatenumber"));
|
||||
|
||||
// Stampa il valore decodificato
|
||||
$pdf->Cell(80, 6, $certificateNumber, 1, 0, 'C', TRUE);
|
||||
|
||||
if ($auditdpilist->getColumnVal("issuebycimac") == 'yes') {
|
||||
$issuecmc = $yesreply;
|
||||
} else {
|
||||
$issuecmc = "No";
|
||||
}
|
||||
$pdf->Cell(15, 6, $issuecmc, 1, 0, 'C', TRUE);
|
||||
$pdf->Cell(60, 6, $auditdpilist->getColumnVal("survellaincetextit"), 1, 0, 'C', TRUE);
|
||||
if ($auditdpilist->getColumnVal("sampleinstore") == 'yes') {
|
||||
$smpstore = $yesreply;
|
||||
} else {
|
||||
$smpstore = 'No';
|
||||
}
|
||||
$pdf->Cell(20, 6, $smpstore, 1, 0, 'C', TRUE);
|
||||
$pdf->Ln();
|
||||
$auditdpilist->moveNext();
|
||||
}
|
||||
$auditdpilist->moveFirst(); //return RS to first record
|
||||
unset($wa_startindex);
|
||||
unset($wa_repeatcount);
|
||||
$pdf->Ln();
|
||||
} elseif ($idcertificate == 6) {
|
||||
$pdf->SetFont('', 'B', '10');
|
||||
$pdf->Cell(190, 6, $dpipdf, 1, 0, 'C');
|
||||
$pdf->SetFillColor(232, 242, 255);
|
||||
$pdf->Ln();
|
||||
$pdf->SetFont('', '', 9);
|
||||
$pdf->Cell(20, 6, $numberpdf, 1, 0, 'C');
|
||||
$pdf->Cell(30, 6, $certnumberpdf, 1, 0, 'C');
|
||||
$pdf->Cell(30, 6, $clientnamepdf, 1, 0, 'C');
|
||||
$pdf->Cell(110, 6, $surveillancepdf, 1, 0, 'C');
|
||||
$pdf->Ln();
|
||||
$wa_startindex = 0;
|
||||
while (!$auditdpilist->atEnd()) {
|
||||
$wa_startindex = $auditdpilist->Index;
|
||||
$pdf->Cell(20, 6, '1', 1, 0, 'C', TRUE);
|
||||
$pdf->Cell(30, 6, $auditdpilist->getColumnVal("certificatenumber"), 1, 0, 'C', TRUE);
|
||||
if ($auditdpilist->getColumnVal("issuebycimac") == 'Y') {
|
||||
$issuecmc = $yesreply;
|
||||
} else {
|
||||
$issuecmc = "No";
|
||||
}
|
||||
$pdf->Cell(30, 6, $issuecmc, 1, 0, 'C', TRUE);
|
||||
$pdf->Cell(110, 6, $auditdpilist->getColumnVal("surveillancenameit"), 1, 0, 'C', TRUE);
|
||||
$pdf->Ln();
|
||||
$auditdpilist->moveNext();
|
||||
}
|
||||
$auditdpilist->moveFirst(); //return RS to first record
|
||||
unset($wa_startindex);
|
||||
unset($wa_repeatcount);
|
||||
$pdf->Ln();
|
||||
}
|
||||
// file attached details
|
||||
$fileattachedlist = new WA_MySQLi_RS("fileattachedlist", $cmctrfdb, 0);
|
||||
$fileattachedlist->setQuery("SELECT * FROM fileattached LEFT JOIN auditdpi ON fileattached.idauditdpi=auditdpi.idauditdpi 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('', '', 9);
|
||||
$pdf->Cell(20, 6, $dpicodetitle, 1, 0, 'C');
|
||||
$pdf->Cell(70, 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->Cell(20, 6, $fileattachedlist->getColumnVal("dpicode"), 1, 0, 'C', true);
|
||||
$pdf->SetTextColor(0, 0, 245);
|
||||
$linkspecific = 'public/uploaddocuments/' . $fileattachedlist->getColumnVal("filename_fileattached");
|
||||
$linkfile = $linkglobal . $linkspecific;
|
||||
$fileattachedlimited = substr($fileattachedlist->getColumnVal("filename_fileattached"), 0, 30);
|
||||
$pdf->Cell(70, 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, 245);
|
||||
$pdf->Cell(190, 6, $zipsentpdf, 1, 0, 'C', false, $namefilezippathpdf);
|
||||
}
|
||||
$pdf->Ln();
|
||||
$pdf->Ln();
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
include('pdfcreation/manufacturertable.php');
|
||||
$pdf->Ln();
|
||||
//invoice contact
|
||||
include('pdfcreation/invoicecontacttable.php');
|
||||
$pdf->Ln();
|
||||
//trf option
|
||||
include('pdfcreation/trfoption.php');
|
||||
$pdf->Ln();
|
||||
//Sign datatable
|
||||
include('pdfcreation/signdatatable.php');
|
||||
$pdf->Ln();
|
||||
include('photobook.php');
|
||||
@@ -0,0 +1,207 @@
|
||||
<?php
|
||||
// ***start with Audit 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','',9);
|
||||
|
||||
$pdf->SetFont('','B','10');
|
||||
$pdf->Cell(190,6,"$auditplacetitle",1,0,'C');
|
||||
$pdf->Ln();
|
||||
$pdf->SetFont('','',9);
|
||||
$pdf->Cell(40,6,'Company Name',1,0,'C');
|
||||
$pdf->SetFillColor(232, 242, 255);
|
||||
|
||||
$pdf->Cell(150,6,$companyname,1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,$addresstitle,1,0,'C');
|
||||
$pdf->Cell(150,6,$contactsinfoData['address'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,$citytitle,1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['city'],1,0,'C',TRUE);
|
||||
$pdf->Cell(40,6,$captitle,1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['cap'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,$pivatitle,1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['piva'],1,0,'C',TRUE);
|
||||
$pdf->Cell(40,6,$countrytitle,1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['country'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,$telephonetitle,1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['telephone'],1,0,'C',TRUE);
|
||||
$pdf->Cell(40,6,$emailtitle,1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['email'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,$contactnametitle,1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['contactname'],1,0,'C',TRUE);
|
||||
$pdf->Cell(40,6,$contactsurnametitle,1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['contactsurname'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
|
||||
$pdf->Ln();
|
||||
|
||||
//invoice contacts
|
||||
// ***start with invoice address
|
||||
$kindcont='invoice';
|
||||
// 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','',9);
|
||||
|
||||
$pdf->SetFont('','B','10');
|
||||
$pdf->Cell(190,6,$invoicecontacttitle,1,0,'C');
|
||||
$pdf->Ln();
|
||||
$pdf->SetFont('','',9);
|
||||
$pdf->Cell(40,6,'Company Name',1,0,'C');
|
||||
$pdf->SetFillColor(232, 242, 255);
|
||||
|
||||
$pdf->Cell(150,6,$companyname,1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,'Address',1,0,'C');
|
||||
$pdf->Cell(150,6,$contactsinfoData['address'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,'City',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['city'],1,0,'C',TRUE);
|
||||
$pdf->Cell(40,6,'Cap',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['cap'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,'PIVA',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['piva'],1,0,'C',TRUE);
|
||||
$pdf->Cell(40,6,'Country',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['country'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,'Telephone',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['telephone'],1,0,'C',TRUE);
|
||||
$pdf->Cell(40,6,'Email',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['email'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,'Contact Name',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['contactname'],1,0,'C',TRUE);
|
||||
$pdf->Cell(40,6,'Contact Surname',1,0,'C');
|
||||
$pdf->Cell(55,6,$contactsinfoData['contactsurname'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
// trf option
|
||||
$pdf->Ln();
|
||||
$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,'Lingua Certificato',1,0,'C');
|
||||
$pdf->Cell(150,6,$trfData['languagecertificate'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,'Contatto APplication Form',1,0,'C');
|
||||
$pdf->Cell(150,6,$trfData['contacttrfname'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(40,6,'Email Application Form',1,0,'C');
|
||||
$pdf->Cell(150,6,$trfData['emailtrfname'],1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Ln();
|
||||
// auditdpi query
|
||||
$auditdpilist = new WA_MySQLi_RS("auditdpilist",$cmctrfdb,0);
|
||||
$auditdpilist->setQuery("SELECT * FROM auditdpi LEFT JOIN auditsurveillancetype ON auditsurveillancetype.idauditsurveillancetype=auditdpi.moduleselection WHERE auditdpi.idtrfdetails='$idtrf'");
|
||||
$auditdpilist->execute();
|
||||
|
||||
if ($idcertificate==5) {
|
||||
|
||||
$pdf->SetFont('','B','10');
|
||||
$pdf->Cell(190,6,"DPI",1,0,'C');
|
||||
$pdf->SetFillColor(232, 242, 255);
|
||||
$pdf->Ln();
|
||||
$pdf->SetFont('','',9);
|
||||
$pdf->Cell(20,6,'N.',1,0,'C');
|
||||
$pdf->Cell(30,6,'Cert N.',1,0,'C');
|
||||
$pdf->Cell(15,6,'Cimac',1,0,'C');
|
||||
$pdf->Cell(110,6,'Sorveglianza',1,0,'C');
|
||||
$pdf->Cell(15,6,'Store',1,0,'C');
|
||||
$pdf->Ln();
|
||||
$wa_startindex = 0;
|
||||
while(!$auditdpilist->atEnd()) {
|
||||
$wa_startindex = $auditdpilist->Index;
|
||||
$pdf->Cell(20,6,'1',1,0,'C',TRUE);
|
||||
$pdf->Cell(30,6,$auditdpilist->getColumnVal("certificatenumber"),1,0,'C',TRUE);
|
||||
$pdf->Cell(15,6,$auditdpilist->getColumnVal("issuebyciamc"),1,0,'C',TRUE);
|
||||
$pdf->Cell(110,6,$auditdpilist->getColumnVal("surveillancenameit"),1,0,'C',TRUE);
|
||||
$pdf->Cell(15,6,$auditdpilist->getColumnVal("sampleinstore"),1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$auditdpilist->moveNext();
|
||||
}
|
||||
$auditdpilist->moveFirst(); //return RS to first record
|
||||
unset($wa_startindex);
|
||||
unset($wa_repeatcount);
|
||||
$pdf->Ln();
|
||||
|
||||
} elseif ($idcertificate==6) {
|
||||
|
||||
$pdf->SetFont('','B','10');
|
||||
$pdf->Cell(190,6,"DPI",1,0,'C');
|
||||
$pdf->SetFillColor(232, 242, 255);
|
||||
$pdf->Ln();
|
||||
$pdf->SetFont('','',9);
|
||||
$pdf->Cell(20,6,'N.',1,0,'C');
|
||||
$pdf->Cell(30,6,'Cert N.',1,0,'C');
|
||||
$pdf->Cell(30,6,'Cimac',1,0,'C');
|
||||
$pdf->Cell(110,6,'Sorveglianza',1,0,'C');
|
||||
$pdf->Ln();
|
||||
$wa_startindex = 0;
|
||||
while(!$auditdpilist->atEnd()) {
|
||||
$wa_startindex = $auditdpilist->Index;
|
||||
$pdf->Cell(20,6,'1',1,0,'C',TRUE);
|
||||
$pdf->Cell(30,6,$auditdpilist->getColumnVal("certificatenumber"),1,0,'C',TRUE);
|
||||
$pdf->Cell(30,6,$auditdpilist->getColumnVal("issuebyciamc"),1,0,'C',TRUE);
|
||||
$pdf->Cell(110,6,$auditdpilist->getColumnVal("surveillancenameit"),1,0,'C',TRUE);
|
||||
$pdf->Ln();
|
||||
$auditdpilist->moveNext();
|
||||
}
|
||||
$auditdpilist->moveFirst(); //return RS to first record
|
||||
unset($wa_startindex);
|
||||
unset($wa_repeatcount);
|
||||
$pdf->Ln();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// file attached details
|
||||
$fileattachedlist = new WA_MySQLi_RS("fileattachedlist",$cmctrfdb,0);
|
||||
$fileattachedlist->setQuery("SELECT * FROM fileattached LEFT JOIN auditdpi ON fileattached.idauditdpi=auditdpi.idauditdpi WHERE fileattached.idtrfdetails='$idtrf'");
|
||||
$fileattachedlist->execute();
|
||||
if (!empty($fileattachedlist->getColumnVal("idfileattached"))) {
|
||||
$pdf->SetFont('','B','10');
|
||||
$pdf->Cell(190,6,"FILES ATTACHED",1,0,'C');
|
||||
$pdf->SetFillColor(232, 242, 255);
|
||||
$pdf->Ln();
|
||||
$pdf->SetFont('','',9);
|
||||
$pdf->Cell(20,6,'DPI CODE',1,0,'C');
|
||||
$pdf->Cell(70,6,'Filename',1,0,'C');
|
||||
$pdf->Cell(100,6,'Description',1,0,'C');
|
||||
$pdf->Ln();
|
||||
$wa_startindex = 0;
|
||||
while(!$fileattachedlist->atEnd()) {
|
||||
$wa_startindex = $fileattachedlist->Index;
|
||||
$pdf->Cell(20,6,$fileattachedlist->getColumnVal("dpicode"),1,0,'C',true);
|
||||
$pdf->SetTextColor(0, 0, 245);
|
||||
$linkspecific='uploaddocuments/'.$fileattachedlist->getColumnVal("filename_fileattached");
|
||||
$linkfile=$linkglobal.$linkspecific;
|
||||
$fileattachedlimited=substr($fileattachedlist->getColumnVal("filename_fileattached"), 0, 30);
|
||||
$pdf->Cell(70,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, 245);
|
||||
|
||||
$pdf->Cell(190,6,'Scarica da questo link un file ZIP con tutti gli allegati',1,0,'C',false,$namefilezippathpdf);
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php // pdf creation for certification 1
|
||||
$pdf->SetFont('Arial', '', 7);
|
||||
$firstsent = html_entity_decode($firstsentpdf8);
|
||||
$firstsent = iconv('UTF-8', 'windows-1252', $firstsent);
|
||||
$secondsent = utf8_decode($secondsentpdf8);
|
||||
//$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,$thirdsent,0,1);
|
||||
//$pdf->Cell(0,9,$foursent,0,1);
|
||||
//description table
|
||||
include('pdfcreation/descriptiontablenocert.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/trfoptionnocert.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/signdatatablenocert.php');
|
||||
$pdf->Ln();
|
||||
include('photobook.php');
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php // pdf creation for certification 1
|
||||
$pdf->SetFont('Arial', '', 7);
|
||||
$firstsent = html_entity_decode($firstsentpdf8);
|
||||
$firstsent = iconv('UTF-8', 'windows-1252', $firstsent);
|
||||
$secondsent = utf8_decode($secondsentpdf8);
|
||||
//$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();
|
||||
include('photobook.php');
|
||||
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
$timestamppdf = date('YmdHis');
|
||||
if ((!empty($documentlist->getColumnVal("idfileattached"))) || (!empty($photolist->getColumnVal("photofilename"))) || (!empty($photolist->getColumnVal("photoone"))) || (!empty($photolist->getColumnVal("phototwo")))) {
|
||||
$timestamppdf = date('YmdHis');
|
||||
if ($sndrpt == 'N') {
|
||||
//$pdf->Output(); second module
|
||||
$filepathname = $trfData['trfnumber'] . "rev" . $trfData['revtrf'] . "applicationform" . $timestamppdf . ".pdf";
|
||||
$filename = "pdf/" . $filepathname;
|
||||
$pdf->Output($filename, 'F');
|
||||
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
|
||||
$UpdateQuery->Action = "update";
|
||||
$UpdateQuery->Table = "`trf-details`";
|
||||
$UpdateQuery->bindColumn("pdffilename", "s", "$filepathname", "WA_DEFAULT");
|
||||
$UpdateQuery->bindColumn("zipname", "s", "$zipnamefile", "WA_DEFAULT");
|
||||
$UpdateQuery->addFilter("idtrfdetails", "=", "i", "" . ($idtrf) . "");
|
||||
$UpdateQuery->execute();
|
||||
$UpdateGoTo = "";
|
||||
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo ? rel2abs($UpdateGoTo, dirname(__FILE__)) : "";
|
||||
$UpdateQuery->redirect($UpdateGoTo);
|
||||
} else {
|
||||
//$pdf->Output(); first module
|
||||
$filepathname = $trfData['trfnumber'] . "rev" . $trfData['revtrf'] . "applicationformb" . $timestamppdf . ".pdf";
|
||||
$filename = "pdf/" . $filepathname;
|
||||
$pdf->Output($filename, 'F');
|
||||
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
|
||||
$UpdateQuery->Action = "update";
|
||||
$UpdateQuery->Table = "`trf-details`";
|
||||
$UpdateQuery->bindColumn("pdffilename2", "s", "$filepathname", "WA_DEFAULT");
|
||||
$UpdateQuery->bindColumn("zipname", "s", "$zipnamefile", "WA_DEFAULT");
|
||||
$UpdateQuery->addFilter("idtrfdetails", "=", "i", "" . ($idtrf) . "");
|
||||
$UpdateQuery->execute();
|
||||
$UpdateGoTo = "";
|
||||
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo ? rel2abs($UpdateGoTo, dirname(__FILE__)) : "";
|
||||
$UpdateQuery->redirect($UpdateGoTo);
|
||||
}
|
||||
} else {
|
||||
if ($sndrpt == 'N') {
|
||||
//$pdf->Output(); second module
|
||||
$filepathname = $trfData['trfnumber'] . "rev" . $trfData['revtrf'] . "applicationform" . $timestamppdf . ".pdf";
|
||||
$filename = "pdf/" . $filepathname;
|
||||
$pdf->Output($filename, 'F');
|
||||
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
|
||||
$UpdateQuery->Action = "update";
|
||||
$UpdateQuery->Table = "`trf-details`";
|
||||
$UpdateQuery->bindColumn("pdffilename", "s", "$filepathname", "WA_DEFAULT");
|
||||
$UpdateQuery->addFilter("idtrfdetails", "=", "i", "" . ($idtrf) . "");
|
||||
$UpdateQuery->execute();
|
||||
$UpdateGoTo = "";
|
||||
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo ? rel2abs($UpdateGoTo, dirname(__FILE__)) : "";
|
||||
$UpdateQuery->redirect($UpdateGoTo);
|
||||
} else {
|
||||
//$pdf->Output(); first module
|
||||
$filepathname = $trfData['trfnumber'] . "rev" . $trfData['revtrf'] . "applicationformb" . $timestamppdf . ".pdf";
|
||||
$filename = "pdf/" . $filepathname;
|
||||
$pdf->Output($filename, 'F');
|
||||
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
|
||||
$UpdateQuery->Action = "update";
|
||||
$UpdateQuery->Table = "`trf-details`";
|
||||
$UpdateQuery->bindColumn("pdffilename2", "s", "$filepathname", "WA_DEFAULT");
|
||||
$UpdateQuery->addFilter("idtrfdetails", "=", "i", "" . ($idtrf) . "");
|
||||
$UpdateQuery->execute();
|
||||
$UpdateGoTo = "";
|
||||
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo ? rel2abs($UpdateGoTo, dirname(__FILE__)) : "";
|
||||
$UpdateQuery->redirect($UpdateGoTo);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
// La tua query per ottenere le foto
|
||||
$additionalphotoslist = new WA_MySQLi_RS("additionalphotoslist", $cmctrfdb, 0);
|
||||
$additionalphotoslist->setQuery("SELECT * FROM additionalphotos WHERE additionalphotos.idtrf='$idtrf'");
|
||||
$additionalphotoslist->execute();
|
||||
|
||||
// Verifica se ci sono foto da includere
|
||||
if (count($additionalphotoslist->Results) > 0) {
|
||||
// Aggiungi una nuova pagina per il Photo Book
|
||||
$pdf->AddPage();
|
||||
$pdf->SetFont('Arial', 'B', 20);
|
||||
$pdf->Cell(0, 10, 'Photo Book', 0, 1, 'C');
|
||||
$pdf->Ln(10); // Spazio dopo il titolo
|
||||
|
||||
// Margini iniziali
|
||||
$x_initial = 10;
|
||||
$y_initial = 40;
|
||||
|
||||
// Posizione corrente delle immagini
|
||||
$x = $x_initial;
|
||||
$y = $y_initial;
|
||||
|
||||
// Contatore per il numero di immagini
|
||||
$image_counter = 0;
|
||||
|
||||
// Larghezza e altezza delle celle della tabella
|
||||
$cell_width = 90;
|
||||
$cell_height = 70;
|
||||
|
||||
// Larghezza e altezza massime dell'immagine
|
||||
$max_width = 70;
|
||||
$max_height = 50;
|
||||
|
||||
// Itera attraverso le foto e aggiungile al PDF
|
||||
while (!$additionalphotoslist->atEnd()) {
|
||||
$image_path = 'uploadimages/' . $additionalphotoslist->getColumnVal("filenameadditionalphotos");
|
||||
|
||||
// Ottieni le dimensioni dell'immagine originale
|
||||
list($original_width, $original_height) = getimagesize($image_path);
|
||||
|
||||
// Calcola le nuove dimensioni mantenendo le proporzioni
|
||||
$img_width = $max_width;
|
||||
$img_height = ($original_height / $original_width) * $img_width;
|
||||
|
||||
// Se l'altezza calcolata supera l'altezza massima, ridimensiona in base all'altezza massima
|
||||
if ($img_height > $max_height) {
|
||||
$img_height = $max_height;
|
||||
$img_width = ($original_width / $original_height) * $img_height;
|
||||
}
|
||||
|
||||
// Aggiungi la cella della tabella con bordo
|
||||
$pdf->Cell($cell_width, $cell_height, '', 1, 0, 'C');
|
||||
|
||||
// Calcola la posizione x e y dell'immagine per centrarla nella cella
|
||||
$x = $pdf->GetX() - $cell_width + (($cell_width - $img_width) / 2);
|
||||
$y = $pdf->GetY() + (($cell_height - $img_height) / 2);
|
||||
|
||||
// Aggiungi l'immagine al centro della cella
|
||||
$pdf->Image($image_path, $x, $y, $img_width, $img_height);
|
||||
|
||||
// Incrementa il contatore e la posizione x
|
||||
$image_counter++;
|
||||
|
||||
// Se abbiamo aggiunto due immagini, resettiamo x e incrementiamo y
|
||||
if ($image_counter % 2 == 0) {
|
||||
$pdf->Ln($cell_height); // Nuova riga
|
||||
} else {
|
||||
$pdf->SetX($x_initial + $cell_width); // Spostati alla prossima cella della riga
|
||||
}
|
||||
|
||||
$additionalphotoslist->moveNext();
|
||||
}
|
||||
|
||||
// Se il numero di immagini è dispari, aggiungi una cella vuota per completare la riga
|
||||
if ($image_counter % 2 != 0) {
|
||||
$pdf->Cell($cell_width, $cell_height, '', 1, 0, 'C');
|
||||
}
|
||||
}
|
||||
@@ -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') {
|
||||
$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;
|
||||
?>
|
||||
@@ -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);
|
||||
?>
|
||||
@@ -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();
|
||||
?>
|
||||
@@ -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();
|
||||
|
||||
?>
|
||||
@@ -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();
|
||||
?>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
$prevrep = convertToPDFEncoding($trfData['previousreportnumber']);
|
||||
$revfor = convertToPDFEncoding($trfData['revisionfor']);
|
||||
$pdf->SetFont('', 'B', '8');
|
||||
$pdf->SetFont('', '', '8');
|
||||
$sizerec = 47.5;
|
||||
$pdf->Cell(100, 6, $nrevpdf, 1, 0, 'L');
|
||||
$pdf->Cell(90, 6, $prevrep, 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(190, 6, $reasonpdf, 1, 0, 'C');
|
||||
$pdf->Ln();
|
||||
$pdf->MultiCell(190, 6, $revfor, 1, 'L', true);
|
||||
$pdf->Ln();
|
||||
@@ -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();
|
||||
?>
|
||||
@@ -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();
|
||||
Reference in New Issue
Block a user