Primo commit: trasferimento del progetto PPEasy
This commit is contained in:
@@ -0,0 +1,392 @@
|
||||
<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
|
||||
require('fpdf/fpdf.php');
|
||||
include('languages/it/pdflang.php');
|
||||
|
||||
//include('include/headscript.php'); ?>
|
||||
<?php
|
||||
if (isset($_GET["idtrf"])) {
|
||||
$idtrf=$_GET["idtrf"];
|
||||
}
|
||||
if (isset($_POST["idtrf"])) {
|
||||
$idtrf=$_POST["idtrf"];
|
||||
}
|
||||
|
||||
|
||||
|
||||
//zip creation
|
||||
include('include/zipcreation.php');
|
||||
include('datarecover/parsedata.php');
|
||||
$nappform=$trfData['trfnumber'];
|
||||
$pdnappform==html_entity_decode($nappform);
|
||||
$pdnappform = iconv('UTF-8', 'windows-1252', $pdnappform);
|
||||
$nappform=$pdnappform.' '.$nappform;
|
||||
$_SESSION["idcertificatesession"]=$idcertificate;
|
||||
$_SESSION["sndrptsession"]=$sndrpt;
|
||||
$_SESSION["revisioncert"]=$certificationrevision->getColumnVal("rev");
|
||||
$_SESSION["certname"]=$certificationrevision->getColumnVal("name_certification");
|
||||
$daterevformat=$certificationrevision->getColumnVal("date");
|
||||
$timeStamp = strtotime($daterevformat);
|
||||
$_SESSION["certdate"] = date("d-m-Y", $timeStamp);
|
||||
$_SESSION["certtitle"]=$_SESSION["certname"].' rev. '.$_SESSION["revisioncert"].' del '.$_SESSION["certdate"];
|
||||
|
||||
class PDF extends FPDF
|
||||
{
|
||||
// Page header
|
||||
function Header()
|
||||
{
|
||||
// Logo
|
||||
if ($_SESSION["sndrptsession"]=='N' and $_SESSION["idcertificatesession"]==1 || $_SESSION["idcertificatesession"]==3 || $_SESSION["idcertificatesession"]==5 || $_SESSION["idcertificatesession"]==7) {
|
||||
$this->Image('../images/cimaccertifications.png',10,5,190);
|
||||
|
||||
} else {
|
||||
$this->Image('../images/cimaclaboratories.png',10,5,190); }
|
||||
$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(0,70,$GLOBALS['nappform'],0,0,"C");
|
||||
// Line break
|
||||
$this->Ln(45);
|
||||
}
|
||||
// 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;
|
||||
$certittle=$_SESSION["certtitle"];
|
||||
$this->Cell(0,10,$certittle.' - Pagina '.$this->PageNo().'/{nb}',0,0,'C');
|
||||
|
||||
}
|
||||
//include('pdfcreation/headerandfooter.php');
|
||||
}
|
||||
|
||||
//some general data
|
||||
$certname=$certificationrevision->getColumnVal("name_certification");
|
||||
|
||||
// Instanciation of inherited class
|
||||
$pdf = new PDF();
|
||||
$pdf->AliasNbPages();
|
||||
$pdf->AddPage();
|
||||
$pdf->SetFont('Times','',9);
|
||||
|
||||
|
||||
|
||||
|
||||
// from here start customization based on certification required required
|
||||
|
||||
|
||||
// certificate 5 and 6 Table: contacts auditdpi and documents
|
||||
if ($idcertificate==5 and $idcertificate==6) {
|
||||
|
||||
include('pdfcreation/pdf5and6.php');
|
||||
|
||||
} elseif ($sndrpt=='Y' and $idcertificate==4) {
|
||||
|
||||
include('pdfcreation/pdf4snd.php');
|
||||
|
||||
} elseif ($sndrpt=='Y' and $idcertificate==1) {
|
||||
|
||||
include('pdfcreation/pdf1snd.php');
|
||||
|
||||
} elseif ($sndrpt=='N' and $idcertificate==4) {
|
||||
|
||||
include('pdfcreation/pdf4.php');
|
||||
|
||||
} elseif ($sndrpt=='N' and $idcertificate==1) {
|
||||
|
||||
include('pdfcreation/pdf1.php');
|
||||
|
||||
} elseif ($idcertificate==2) {
|
||||
|
||||
include('pdfcreation/pdf2.php');
|
||||
|
||||
} elseif ($sndrpt=='Y' and $idcertificate==3) {
|
||||
|
||||
include('pdfcreation/pdf3snd.php');
|
||||
|
||||
} elseif ($sndrpt=='N' and $idcertificate==3) {
|
||||
|
||||
include('pdfcreation/pdf3.php');
|
||||
|
||||
} elseif ($idcertificate==8) {
|
||||
|
||||
include('pdfcreation/pdf8.php');
|
||||
|
||||
} else {
|
||||
|
||||
//othercertificate
|
||||
|
||||
//description table
|
||||
include('pdfcreation/descriptiontable.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();
|
||||
|
||||
// parts table
|
||||
include('pdfcreation/partstable.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();
|
||||
}
|
||||
//outpt pdf for all certificate
|
||||
|
||||
include('pdfcreation/pdfoutput.php');
|
||||
//include('pdfcreation/pdf1sndbis.php');
|
||||
?>
|
||||
<?php
|
||||
if ($idcertificate==1 or $idcertificate==3 or $idcertificate==4) {
|
||||
|
||||
if (isset($_GET["idtrf"])) {
|
||||
$idtrf=$_GET["idtrf"];
|
||||
}
|
||||
if (isset($_POST["idtrf"])) {
|
||||
$idtrf=$_POST["idtrf"];
|
||||
}
|
||||
|
||||
|
||||
|
||||
//zip creation
|
||||
include('include/zipcreation.php');
|
||||
include('datarecover/parsedata.php');
|
||||
$_SESSION["sndrptsession"]='Y';
|
||||
$_SESSION["idcertificatesession"]=$idcertificate;
|
||||
$sndrpt="Y";
|
||||
$_SESSION["revisioncert"]=$certificationrevision->getColumnVal("rev");
|
||||
$_SESSION["certname"]=$certificationrevision->getColumnVal("name_certification");
|
||||
$daterevformat=$certificationrevision->getColumnVal("date");
|
||||
$timeStamp = strtotime($daterevformat);
|
||||
$_SESSION["certdate"] = date("d-m-Y", $timeStamp);
|
||||
$_SESSION["certtitle"]=$_SESSION["certname"].' rev. '.$_SESSION["revisioncert"].' del '.$_SESSION["certdate"];
|
||||
|
||||
class PDF2 extends FPDF
|
||||
{
|
||||
// Page header
|
||||
function Header()
|
||||
{
|
||||
// Logo
|
||||
if ($_SESSION["sndrptsession"]=='N' and $_SESSION["idcertificatesession"]==1 || $_SESSION["idcertificatesession"]==3 || $_SESSION["idcertificatesession"]==5 || $_SESSION["idcertificatesession"]==7) {
|
||||
$this->Image('../images/cimaccertifications.png',10,5,190);
|
||||
|
||||
} else {
|
||||
$this->Image('../images/cimaclaboratories.png',10,5,190); }
|
||||
$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(0,70,$GLOBALS['nappform'],0,0,"C");
|
||||
// Line break
|
||||
$this->Ln(45);
|
||||
}
|
||||
// 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;
|
||||
$certittle=$_SESSION["certtitle"];
|
||||
$this->Cell(0,10,$certittle.' - Pagina '.$this->PageNo().'/{nb}',0,0,'C');
|
||||
|
||||
}
|
||||
//include('pdfcreation/headerandfooter.php');
|
||||
}
|
||||
|
||||
//some general data
|
||||
$certname=$certificationrevision->getColumnVal("name_certification");
|
||||
|
||||
// Instanciation of inherited class
|
||||
$pdf = new PDF2();
|
||||
$pdf->AliasNbPages();
|
||||
$pdf->AddPage();
|
||||
$pdf->SetFont('Times','',9);
|
||||
|
||||
|
||||
|
||||
|
||||
// from here start customization based on certification required required
|
||||
|
||||
|
||||
// certificate 5 and 6 Table: contacts auditdpi and documents
|
||||
if ($idcertificate==5 and $idcertificate==6) {
|
||||
|
||||
include('pdfcreation/pdf5and6.php');
|
||||
|
||||
} elseif ($sndrpt=='Y' and $idcertificate==4) {
|
||||
|
||||
include('pdfcreation/pdf4snd.php');
|
||||
|
||||
} elseif ($sndrpt=='Y' and $idcertificate==1) {
|
||||
|
||||
include('pdfcreation/pdf1snd.php');
|
||||
|
||||
} elseif ($sndrpt=='N' and $idcertificate==4) {
|
||||
|
||||
include('pdfcreation/pdf4.php');
|
||||
|
||||
} elseif ($sndrpt=='N' and $idcertificate==1) {
|
||||
|
||||
include('pdfcreation/pdf1.php');
|
||||
|
||||
} elseif ($idcertificate==2) {
|
||||
|
||||
include('pdfcreation/pdf2.php');
|
||||
|
||||
} elseif ($sndrpt=='Y' and $idcertificate==3) {
|
||||
|
||||
include('pdfcreation/pdf3snd.php');
|
||||
|
||||
} elseif ($sndrpt=='N' and $idcertificate==3) {
|
||||
|
||||
include('pdfcreation/pdf3.php');
|
||||
|
||||
} elseif ($idcertificate==8) {
|
||||
|
||||
include('pdfcreation/pdf8.php');
|
||||
|
||||
} else {
|
||||
|
||||
//othercertificate
|
||||
|
||||
//description table
|
||||
include('pdfcreation/descriptiontable.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();
|
||||
|
||||
// parts table
|
||||
include('pdfcreation/partstable.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();
|
||||
}
|
||||
//outpt pdf for all certificate
|
||||
|
||||
include('pdfcreation/pdfoutput.php');
|
||||
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user