first commit
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
$pdf->SetFont('Arial','',9);
|
||||
$pdf->SetFont('','B','10');
|
||||
//$pdf->Cell(190,6,$appformn,1,0,'C');
|
||||
//$pdf->Ln();
|
||||
$pdf->SetFont('','',8);
|
||||
$pdf->Cell(50,6,'',1,0,'L');
|
||||
$pdf->SetFillColor(232, 242, 255);
|
||||
$certrev1=html_entity_decode($certname=$certificationrevision->getColumnVal("description"), ENT_QUOTES);
|
||||
// $certrev = iconv('UTF-8', 'windows-1252', $certrev1);
|
||||
$certrev = iconv('UTF-8', 'windows-1252//IGNORE', $certrev1);
|
||||
//$certrev = iconv('UTF-8', 'windows-1252', $certrev);
|
||||
$pdf->Cell(70,6,'',1,0,'L',TRUE);
|
||||
//$pdf->Cell(70,50,'Terza',1,0,'C');
|
||||
if (isset($trfData['photofilename'])) {
|
||||
// $pdf->Cell( 70, 42, $pdf->Image($image1, $pdf->GetX() + 10, $pdf->GetY(), 42), 1, 0, 'L');
|
||||
// $pdf->Cell( 70, 42, $pdf->Image($image1, $pdf->GetX(), $pdf->GetY(), -120, 42), 1, 0, 'L');
|
||||
$pdf->Cell( 70, 42, $pdf->centreImage($image1, 70, 42, "S"), 1, 0, 'C');
|
||||
} else {
|
||||
$image1="uploadimages/notav.jpg";
|
||||
// $pdf->Cell( 70, 42, $pdf->Image($image1, $pdf->GetX() + 10, $pdf->GetY(), 42), 1, 0, 'L');
|
||||
$pdf->Cell( 70, 42, $pdf->Image($image1, $pdf->GetX(), $pdf->GetY(), 0, 42), 1, 0, 'L');
|
||||
}
|
||||
$pdf->Cell(1,6,'',0,0,'L');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50,6,$dateinsertpdf,1,0,'L');
|
||||
if ($sndrpt=='Y') {
|
||||
$signed=$trfData['signedonsecondcert']; } else { $signed=$trfData['signedon']; }
|
||||
if ($sndrpt=='N') {
|
||||
$newDate = DateTime::createFromFormat('Y-m-d', $signed)->format('d-m-Y'); }
|
||||
$pdf->Cell(70,6,$newDate,1,0,'L',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50,6,$pdfdescriptionpart,1,0,'L');
|
||||
$pdf->Cell(70,6,$trfData['sample_description'],1,0,'L',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50,6,$pdfarticlekind,1,0,'L');
|
||||
// Verifica la lingua scelta e imposta il nome appropriato dell'articolo
|
||||
$articleName = ($_SESSION['langselect'] == 'it') ? $trfData['name_articletype'] : $trfData['name_articletypeeng'];
|
||||
|
||||
// Stampa la cella con il nome dell'articolo corretto
|
||||
$pdf->Cell(70, 6, $articleName, 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50,6,$pdfmodeltitle,1,0,'L');
|
||||
// Verifica la lingua scelta e imposta il nome del modello appropriato
|
||||
$modelName = ($_SESSION['langselect'] == 'it') ? $trfData['namemodelarticle'] : $trfData['namemodelarticle_eng'];
|
||||
|
||||
// Stampa la cella con il nome del modello corretto
|
||||
$pdf->Cell(70, 6, $modelName, 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
$measuretotal=$trfData['measurefrom']."-".$trfData['measureto'];
|
||||
$pdf->Cell(50,6,$pdfrangemeasure,1,0,'L');
|
||||
$pdf->Cell(70,6,$measuretotal,1,0,'L',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50,6,$pdfregisteredmark,1,0,'L');
|
||||
$pdf->Cell(70,6,$trfData['registeredmark'],1,0,'L',TRUE);
|
||||
$pdf->Ln();
|
||||
$idartchs=explode(",",$trfData['idarticle_characteristics']);
|
||||
foreach($idartchs as $idartch) {
|
||||
$artchname = new WA_MySQLi_RS("artchname",$cmctrfdb,1);
|
||||
$artchname->setQuery("SELECT * FROM `article_characteristic` WHERE `article_characteristic`.idarticlecharacteristic='$idartch'");
|
||||
$artchname->execute();
|
||||
$pdf->Cell(50,6,$kinddpipdf,1,0,'L');
|
||||
// Determina quale campo utilizzare in base alla lingua selezionata
|
||||
$articleCharacteristic = ($_SESSION['langselect'] == 'it') ?
|
||||
$artchname->getColumnVal("name_articlecharacteristic") :
|
||||
$artchname->getColumnVal("name_articlecharacteristic_eng");
|
||||
|
||||
// Stampa la cella con il valore caratteristico dell'articolo corretto
|
||||
$pdf->Cell(140, 6, $articleCharacteristic, 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,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,8 @@
|
||||
<?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();
|
||||
?>
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
$pdf->SetFont('Arial','',9);
|
||||
$pdf->SetFont('','B','10');
|
||||
//$pdf->Cell(190,6,$appformn,1,0,'C');
|
||||
//$pdf->Ln();
|
||||
$pdf->SetFont('','',8);
|
||||
$pdf->Cell(50,6,$kindcertpdf,1,0,'L');
|
||||
$pdf->SetFillColor(232, 242, 255);
|
||||
// Determina quale campo utilizzare in base alla lingua selezionata
|
||||
$columnName = ($_SESSION['langselect'] == 'it') ? "description" : "description_en";
|
||||
|
||||
// Ottieni il valore dal campo appropriato
|
||||
$certrev1 = $certificationrevision->getColumnVal($columnName);
|
||||
$certrev1 = html_entity_decode($certrev1, ENT_QUOTES);
|
||||
$certrev = iconv('UTF-8', 'windows-1252//IGNORE', $certrev1);
|
||||
|
||||
// Stampa la cella nel PDF
|
||||
$pdf->Cell(70, 6, $certrev, 1, 0, 'L', TRUE);
|
||||
//$pdf->Cell(70,50,'Terza',1,0,'C');
|
||||
if (isset($trfData['photofilename'])) {
|
||||
// $pdf->Cell( 70, 42, $pdf->Image($image1, $pdf->GetX() + 10, $pdf->GetY(), 42), 1, 0, 'L');
|
||||
// $pdf->Cell( 70, 42, $pdf->Image($image1, $pdf->GetX(), $pdf->GetY(), -120, 42), 1, 0, 'L');
|
||||
$pdf->Cell( 70, 42, $pdf->centreImage($image1, 70, 42, "S"), 1, 0, 'C');
|
||||
} else {
|
||||
$image1="uploadimages/notav.jpg";
|
||||
// $pdf->Cell( 70, 42, $pdf->Image($image1, $pdf->GetX() + 10, $pdf->GetY(), 42), 1, 0, 'L');
|
||||
$pdf->Cell( 70, 42, $pdf->Image($image1, $pdf->GetX(), $pdf->GetY(), 0, 42), 1, 0, 'L');
|
||||
}
|
||||
$pdf->Cell(1,6,'',0,0,'L');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50,6,$dateinsertpdf,1,0,'L');
|
||||
if ($sndrpt=='Y') {
|
||||
$signed=$trfData['signedonsecondcert']; } else { $signed=$trfData['signedon']; }
|
||||
if ($sndrpt=='N') {
|
||||
$newDate = DateTime::createFromFormat('Y-m-d', $signed)->format('d-m-Y'); }
|
||||
$pdf->Cell(70,6,$newDate,1,0,'L',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50,6,$pdfdescriptionpart,1,0,'L');
|
||||
$pdf->Cell(70,6,$trfData['sample_description'],1,0,'L',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50,6,$pdfarticlekind,1,0,'L');
|
||||
// Verifica la lingua scelta e imposta il nome appropriato dell'articolo
|
||||
$articleName = ($_SESSION['langselect'] == 'it') ? $trfData['name_articletype'] : $trfData['name_articletypeeng'];
|
||||
|
||||
// Stampa la cella con il nome dell'articolo corretto
|
||||
$pdf->Cell(70, 6, $articleName, 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50,6,$pdfmodeltitle,1,0,'L');
|
||||
// Verifica la lingua scelta e imposta il nome del modello appropriato
|
||||
$modelName = ($_SESSION['langselect'] == 'it') ? $trfData['namemodelarticle'] : $trfData['namemodelarticle_eng'];
|
||||
|
||||
// Stampa la cella con il nome del modello corretto
|
||||
$pdf->Cell(70, 6, $modelName, 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
$measuretotal=$trfData['measurefrom']."-".$trfData['measureto'];
|
||||
$pdf->Cell(50,6,$pdfrangemeasure,1,0,'L');
|
||||
$pdf->Cell(70,6,$measuretotal,1,0,'L',TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50,6,$pdfregisteredmark,1,0,'L');
|
||||
$pdf->Cell(70,6,$trfData['registeredmark'],1,0,'L',TRUE);
|
||||
$pdf->Ln();
|
||||
$idartchs=explode(",",$trfData['idarticle_characteristics']);
|
||||
foreach($idartchs as $idartch) {
|
||||
$artchname = new WA_MySQLi_RS("artchname",$cmctrfdb,1);
|
||||
$artchname->setQuery("SELECT * FROM `article_characteristic` WHERE `article_characteristic`.idarticlecharacteristic='$idartch'");
|
||||
$artchname->execute();
|
||||
$pdf->Cell(50,6,$kinddpipdf,1,0,'L');
|
||||
// Determina quale campo utilizzare in base alla lingua selezionata
|
||||
$articleCharacteristic = ($_SESSION['langselect'] == 'it') ?
|
||||
$artchname->getColumnVal("name_articlecharacteristic") :
|
||||
$artchname->getColumnVal("name_articlecharacteristic_eng");
|
||||
|
||||
// Stampa la cella con il valore caratteristico dell'articolo corretto
|
||||
$pdf->Cell(140, 6, $articleCharacteristic, 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
$pdf->SetFont('Arial', '', 9);
|
||||
$pdf->SetFont('', 'B', '10');
|
||||
//$pdf->Cell(190,6,$appformn,1,0,'C');
|
||||
//$pdf->Ln();
|
||||
$pdf->SetFont('', '', 8);
|
||||
$pdf->Cell(50, 6, '', 1, 0, 'L');
|
||||
$pdf->SetFillColor(232, 242, 255);
|
||||
$certrev1 = html_entity_decode($certname = $certificationrevision->getColumnVal("description"), ENT_QUOTES);
|
||||
// $certrev = iconv('UTF-8', 'windows-1252', $certrev1);
|
||||
$certrev = iconv('UTF-8', 'windows-1252//IGNORE', $certrev1);
|
||||
//$certrev = iconv('UTF-8', 'windows-1252', $certrev);
|
||||
$pdf->Cell(70, 6, '', 1, 0, 'L', TRUE);
|
||||
//$pdf->Cell(70,50,'Terza',1,0,'C');
|
||||
if (isset($trfData['photofilename'])) {
|
||||
// $pdf->Cell( 70, 42, $pdf->Image($image1, $pdf->GetX() + 10, $pdf->GetY(), 42), 1, 0, 'L');
|
||||
// $pdf->Cell( 70, 42, $pdf->Image($image1, $pdf->GetX(), $pdf->GetY(), -120, 42), 1, 0, 'L');
|
||||
$pdf->Cell(70, 42, $pdf->centreImage($image1, 70, 42, "S"), 1, 0, 'C');
|
||||
} else {
|
||||
$image1 = "uploadimages/notav.jpg";
|
||||
// $pdf->Cell( 70, 42, $pdf->Image($image1, $pdf->GetX() + 10, $pdf->GetY(), 42), 1, 0, 'L');
|
||||
$pdf->Cell(70, 42, $pdf->Image($image1, $pdf->GetX(), $pdf->GetY(), 0, 42), 1, 0, 'L');
|
||||
}
|
||||
$pdf->Cell(1, 6, '', 0, 0, 'L');
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50, 6, $dateinsertpdf, 1, 0, 'L');
|
||||
if ((Auth::user()->hasRole('Admin')) || (Auth::user()->hasRole('User')) || (Auth::user()->hasRole('Superuser'))) :
|
||||
if ($sndrpt == 'Y') {
|
||||
$signed = $trfData['signedonsecondcert'];
|
||||
} else {
|
||||
$signed = $trfData['signedon'];
|
||||
}
|
||||
|
||||
if ($sndrpt == 'N') {
|
||||
// Prova a creare un oggetto DateTime dalla variabile $signed
|
||||
$dateObject = DateTime::createFromFormat('Y-m-d', $signed);
|
||||
|
||||
// Verifica se la creazione della data ha avuto successo
|
||||
if ($dateObject !== false) {
|
||||
// Se ha successo, formatta la data
|
||||
$newDate = $dateObject->format('d-m-Y');
|
||||
} else {
|
||||
// Se la creazione della data fallisce, imposta $newDate come una stringa vuota
|
||||
$newDate = ''; // Impostato come vuoto
|
||||
}
|
||||
}
|
||||
endif;
|
||||
if ((Auth::user()->hasRole('CustomerService'))) :
|
||||
if ($sndrpt == 'Y') {
|
||||
$signed = "";
|
||||
} else {
|
||||
$signed = "";
|
||||
}
|
||||
|
||||
if ($sndrpt == 'N') {
|
||||
$newDate = "";
|
||||
}
|
||||
endif;
|
||||
$pdf->Cell(70, 6, $newDate, 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50, 6, $pdfdescriptionpart, 1, 0, 'L');
|
||||
$pdf->Cell(70, 6, $trfData['sample_description'], 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50, 6, $pdfarticlekind, 1, 0, 'L');
|
||||
// Verifica la lingua scelta e imposta il nome appropriato dell'articolo
|
||||
$articleName = ($_SESSION['langselect'] == 'it') ? $trfData['name_articletype'] : $trfData['name_articletypeeng'];
|
||||
|
||||
// Stampa la cella con il nome dell'articolo corretto
|
||||
$pdf->Cell(70, 6, $articleName, 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50, 6, $pdfmodeltitle, 1, 0, 'L');
|
||||
// Verifica la lingua scelta e imposta il nome del modello appropriato
|
||||
$modelName = ($_SESSION['langselect'] == 'it') ? $trfData['namemodelarticle'] : $trfData['namemodelarticle_eng'];
|
||||
|
||||
// Stampa la cella con il nome del modello corretto
|
||||
$pdf->Cell(70, 6, $modelName, 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
$measuretotal = $trfData['measurefrom'] . "-" . $trfData['measureto'];
|
||||
$pdf->Cell(50, 6, $pdfrangemeasure, 1, 0, 'L');
|
||||
$pdf->Cell(70, 6, $measuretotal, 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell(50, 6, $pdfregisteredmark, 1, 0, 'L');
|
||||
$pdf->Cell(70, 6, $trfData['registeredmark'], 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
$idartchs = explode(",", $trfData['idarticle_characteristics']);
|
||||
foreach ($idartchs as $idartch) {
|
||||
$artchname = new WA_MySQLi_RS("artchname", $cmctrfdb, 1);
|
||||
$artchname->setQuery("SELECT * FROM `article_characteristic` WHERE `article_characteristic`.idarticlecharacteristic='$idartch'");
|
||||
$artchname->execute();
|
||||
$pdf->Cell(50, 6, $kinddpipdf, 1, 0, 'L');
|
||||
// Determina quale campo utilizzare in base alla lingua selezionata
|
||||
$articleCharacteristic = ($_SESSION['langselect'] == 'it') ?
|
||||
$artchname->getColumnVal("name_articlecharacteristic") :
|
||||
$artchname->getColumnVal("name_articlecharacteristic_eng");
|
||||
|
||||
// Stampa la cella con il valore caratteristico dell'articolo corretto
|
||||
$pdf->Cell(140, 6, $articleCharacteristic, 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
}
|
||||
@@ -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,50 @@
|
||||
<?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');
|
||||
|
||||
$sizerec = 47.5;
|
||||
$pdf->Cell($sizerec, 6, $slippingpdf, 1, 0, 'L', TRUE);
|
||||
|
||||
$pdf->Cell($sizerec, 6, $trfData['slipping'], 1, 0, 'L', TRUE);
|
||||
$pdf->Cell($sizerec, 6, $orthopedicpdf, 1, 0, 'L', TRUE);
|
||||
if ($trfData['shoesorthopedic'] == 'Y') {
|
||||
$orthresult = utf8_decode("Sì");
|
||||
} else {
|
||||
$orthresult = "No";
|
||||
}
|
||||
$pdf->Cell($sizerec, 6, $orthresult, 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell($sizerec, 6, $autoclavpdf, 1, 0, 'L', TRUE);
|
||||
if ($trfData['autoclavable'] == 'Y') {
|
||||
$autoclresult = utf8_decode("Sì");
|
||||
} else {
|
||||
$autoclresult = "No";
|
||||
}
|
||||
$pdf->Cell($sizerec, 6, $autoclresult, 1, 0, 'L', TRUE);
|
||||
$pdf->Cell($sizerec, 6, $esdpdf, 1, 0, 'L', TRUE);
|
||||
if ($trfData['esd'] == 'Y') {
|
||||
$esdresult = utf8_decode($yespdf);
|
||||
} else {
|
||||
$esdresult = $nopdf;
|
||||
}
|
||||
$pdf->Cell($sizerec, 6, $esdresult, 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
$pdf->Cell($sizerec, 6, $ukcapdf, 1, 0, 'L', TRUE);
|
||||
if ($trfData['ukcacert'] == 'Y') {
|
||||
$ukcacert = utf8_decode($yespdf);
|
||||
} else {
|
||||
$ukcacert = $nopdf;
|
||||
}
|
||||
$pdf->Cell($sizerec, 6, $ukcacert, 1, 0, 'L', TRUE);
|
||||
$pdf->Cell($sizerec, 6, '', 1, 0, 'L', TRUE);
|
||||
$pdf->Cell($sizerec, 6, '', 1, 0, 'L', TRUE);
|
||||
$pdf->Ln();
|
||||
?>
|
||||
<?php } ?>
|
||||
@@ -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,26 @@
|
||||
<?php
|
||||
// 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();
|
||||
?>
|
||||
@@ -0,0 +1,27 @@
|
||||
|
||||
<?php
|
||||
// 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();
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,60 @@
|
||||
<?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,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();
|
||||
?>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?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();
|
||||
endif;
|
||||
@@ -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,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 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,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,52 @@
|
||||
<?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);
|
||||
if (!mb_check_encoding($statement, 'UTF-8')) {
|
||||
$statement = utf8_encode($statement); // Forza la codifica in UTF-8
|
||||
}
|
||||
|
||||
$statement = html_entity_decode($statement);
|
||||
$statement = mb_convert_encoding($statement, 'windows-1252', 'UTF-8');
|
||||
|
||||
//$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,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,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);
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user