removed bck files and imporved passowrd on env

This commit is contained in:
2026-05-14 12:06:24 +02:00
parent 3ed4a1b682
commit 403f74778d
72 changed files with 887 additions and 14858 deletions
-678
View File
@@ -1,678 +0,0 @@
/*!
* Tabledit v1.2.3 (https://github.com/markcell/jQuery-Tabledit)
* Copyright (c) 2015 Celso Marques
* Licensed under MIT (https://github.com/markcell/jQuery-Tabledit/blob/master/LICENSE)
*/
/**
* @description Inline editor for HTML tables compatible with Bootstrap
* @version 1.2.3
* @author Celso Marques
*/
if (typeof jQuery === 'undefined') {
throw new Error('Tabledit requires jQuery library.');
}
(function($) {
'use strict';
$.fn.Tabledit = function(options) {
if (!this.is('table')) {
throw new Error('Tabledit only works when applied to a table.');
}
var $table = this;
var defaults = {
url: window.location.href,
inputClass: 'form-control input-sm',
toolbarClass: 'btn-toolbar',
groupClass: 'btn-group btn-group-sm',
dangerClass: 'danger',
warningClass: 'warning',
mutedClass: 'text-muted bg-light',
eventType: 'click',
rowIdentifier: 'id',
hideIdentifier: false,
autoFocus: true,
editButton: true,
deleteButton: true,
saveButton: true,
restoreButton: true,
buttons: {
edit: {
class: 'btn btn-sm btn-default',
html: '<span class="fa fa-pencil "></span>',
action: 'edit'
},
delete: {
class: 'btn btn-sm btn-default',
html: '<span class="fa fa-trash "></span>',
action: 'delete'
},
save: {
class: 'btn btn-sm btn-success',
html: 'Save'
},
restore: {
class: 'btn btn-sm btn-warning',
html: 'Restore',
action: 'restore'
},
confirm: {
class: 'btn btn-sm btn-danger',
html: 'Confirm'
}
},
onDraw: function() { return; },
onSuccess: function() { return; },
onFail: function() { return; },
onAlways: function() { return; },
onAjax: function() { return; }
};
var settings = $.extend(true, defaults, options);
var $lastEditedRow = 'undefined';
var $lastDeletedRow = 'undefined';
var $lastRestoredRow = 'undefined';
/**
* Draw Tabledit structure (identifier column, editable columns, toolbar column).
*
* @type {object}
*/
var Draw = {
columns: {
identifier: function() {
// Hide identifier column.
if (settings.hideIdentifier) {
$table.find('th:nth-child(' + parseInt(settings.columns.identifier[0]) + 1 + '), tbody td:nth-child(' + parseInt(settings.columns.identifier[0]) + 1 + ')').hide();
}
var $td = $table.find('tbody td:nth-child(' + (parseInt(settings.columns.identifier[0]) + 1) + ')');
$td.each(function() {
// Create hidden input with row identifier.
var span = '<span class="tabledit-span tabledit-identifier">' + $(this).text() + '</span>';
var input = '<input class="tabledit-input tabledit-identifier" type="hidden" name="' + settings.columns.identifier[1] + '" value="' + $(this).text() + '" disabled>';
// Add elements to table cell.
$(this).html(span + input);
// Add attribute "id" to table row.
$(this).parent('tr').attr(settings.rowIdentifier, $(this).text());
});
},
editable: function() {
for (var i = 0; i < settings.columns.editable.length; i++) {
var $td = $table.find('tbody td:nth-child(' + (parseInt(settings.columns.editable[i][0]) + 1) + ')');
$td.each(function() {
// Get text of this cell.
var text = $(this).text();
// Add pointer as cursor.
if (!settings.editButton) {
$(this).css('cursor', 'pointer');
}
if(settings.columns.editable[i][1]=='filenameaudit'){
var spantext='<a href="upload/'+$(this).text() +'" target="_blank">'+$(this).text()+' </a>';
}
else {
var spantext=$(this).text();
}
// Create span element.
var span = '<span class="tabledit-span">' + spantext + '</span>';
// Check if exists the third parameter of editable array.
if (typeof settings.columns.editable[i][2] !== 'undefined') {
// Create select element.
if(settings.columns.editable[i][2]=='checkbox'){
if (text === yessent) {
var input = '<input class="tabledit-input" type="checkbox" name="' + settings.columns.editable[i][1] + '" value="yes" checked="checked" style="display: none;" disabled>';
}
else{
var input = '<input class="tabledit-input" type="checkbox" name="' + settings.columns.editable[i][1] + '" value="yes" style="display: none;" disabled>';
}
}
else if(settings.columns.editable[i][2]=='file'){
var input = '<input class="tabledit-input file-upload" type="text" name="' + settings.columns.editable[i][1] + '" style="display: none;" value="' + $(this).text() + '" disabled><span style="display:none;" class="uploadfile" >Upload File</span>';
}
else{
var input = '<select class="tabledit-input ' + settings.inputClass + '" name="' + settings.columns.editable[i][1] + '" style="display: none;" disabled>';
// Create options for select element.
$.each(jQuery.parseJSON(settings.columns.editable[i][2]), function(index, value) {
if (text === value) {
input += '<option value="' + index + '" selected>' + value + '</option>';
} else {
input += '<option value="' + index + '">' + value + '</option>';
}
});
// Create last piece of select element.
input += '</select>';
}
} else {
// Create text input element.
var input = '<input class="tabledit-input ' + settings.inputClass + '" type="text" name="' + settings.columns.editable[i][1] + '" value="' + $(this).text() + '" style="display: none;" disabled>';
}
// Add elements and class "view" to table cell.
$(this).html(span + input);
$(this).addClass('tabledit-view-mode');
});
}
},
toolbar: function() {
if (settings.editButton || settings.deleteButton) {
var editButton = '';
var deleteButton = '';
var saveButton = '';
var restoreButton = '';
var confirmButton = '';
// Add toolbar column header if not exists.
if ($table.find('th.tabledit-toolbar-column').length === 0) {
$table.find('tr:first').append('<th class="tabledit-toolbar-column"></th>');
}
// Create edit button.
if (settings.editButton) {
editButton = '<button type="button" class="tabledit-edit-button ' + settings.buttons.edit.class + '" style="float: none;">' + settings.buttons.edit.html + '</button>';
}
// Create delete button.
if (settings.deleteButton) {
deleteButton = '<button type="button" class="tabledit-delete-button ' + settings.buttons.delete.class + '" style="float: none;">' + settings.buttons.delete.html + '</button>';
confirmButton = '<button type="button" class="tabledit-confirm-button ' + settings.buttons.confirm.class + '" style="display: none; float: none;">' + settings.buttons.confirm.html + '</button>';
}
// Create save button.
if (settings.editButton && settings.saveButton) {
saveButton = '<button type="button" class="tabledit-save-button ' + settings.buttons.save.class + '" style="display: none; float: none;">' + settings.buttons.save.html + '</button>';
}
// Create restore button.
if (settings.deleteButton && settings.restoreButton) {
restoreButton = '<button type="button" class="tabledit-restore-button ' + settings.buttons.restore.class + '" style="display: none; float: none;">' + settings.buttons.restore.html + '</button>';
}
var toolbar = '<div class="tabledit-toolbar ' + settings.toolbarClass + '" style="text-align: left;">\n\
<div class="' + settings.groupClass + '" style="float: none;">' + editButton + deleteButton + '</div>\n\
' + saveButton + '\n\
' + confirmButton + '\n\
' + restoreButton + '\n\
</div></div>';
// Add toolbar column cells.
$table.find('tr:gt(0)').append('<td style="white-space: nowrap; width: 1%;">' + toolbar + '</td>');
}
}
}
};
/**
* Change to view mode or edit mode with table td element as parameter.
*
* @type object
*/
var Mode = {
view: function(td) {
// Get table row.
var $tr = $(td).parent('tr');
// Disable identifier.
$(td).parent('tr').find('.tabledit-input.tabledit-identifier').prop('disabled', true);
// Hide and disable input element.
$(td).find('.tabledit-input').blur().hide().prop('disabled', true);
// Show span element.
$(td).find('.tabledit-span').show();
$(td).find('.uploadfile').hide();
// Add "view" class and remove "edit" class in td element.
$(td).addClass('tabledit-view-mode').removeClass('tabledit-edit-mode');
// Update toolbar buttons.
if (settings.editButton) {
$tr.find('button.tabledit-save-button').hide();
$tr.find('button.tabledit-edit-button').removeClass('active').blur();
}
},
edit: function(td) {
Delete.reset(td);
// Get table row.
var $tr = $(td).parent('tr');
// Enable identifier.
$tr.find('.tabledit-input.tabledit-identifier').prop('disabled', false);
// Hide span element.
$(td).find('.tabledit-span').hide();
$(td).find('.uploadfile').show();
// Get input element.
var $input = $(td).find('.tabledit-input');
// Enable and show input element.
$input.prop('disabled', false).show();
// Focus on input element.
if (settings.autoFocus) {
$input.focus();
}
// Add "edit" class and remove "view" class in td element.
$(td).addClass('tabledit-edit-mode').removeClass('tabledit-view-mode');
// Update toolbar buttons.
if (settings.editButton) {
$tr.find('button.tabledit-edit-button').addClass('active');
$tr.find('button.tabledit-save-button').show();
}
}
};
/**
* Available actions for edit function, with table td element as parameter or set of td elements.
*
* @type object
*/
var Edit = {
reset: function(td) {
$(td).each(function() {
// Get input element.
var $input = $(this).find('.tabledit-input');
var inputname=$input.attr('name');
// Get span text.
var text = $(this).find('.tabledit-span').text();
// Set input/select value with span text.
if ($input.is('select')) {
$input.find('option').filter(function() {
return $.trim($(this).text()) === text;
}).attr('selected', true);
}
else if($input.is(':checkbox')){
if(text==yessent){
$input.attr('checked', 'checked');
}
}
else if(inputname=='filenameaudit'){
var filename=$(this).find('.tabledit-span').text();
if(filename!=''){
$(this).find('.tabledit-span').html('<a href="upload/'+filename +'" target="_blank">'+filename+' </a>');
}
}
else {
$input.val(text);
}
// Change to view mode.
Mode.view(this);
});
},
submit: function(td) {
// Send AJAX request to server.
var ajaxResult = ajax(settings.buttons.edit.action);
if (ajaxResult === false) {
return;
}
$(td).each(function() {
// Get input element.
var $input = $(this).find('.tabledit-input');
var inputname=$input.attr('name');
// Set span text with input/select new value.
if ($input.is('select')) {
$(this).find('.tabledit-span').text($input.find('option:selected').text());
} else {
$(this).find('.tabledit-span').text($input.val());
}
if ($input.is(':checkbox')) {
if($input.prop('checked')==true){
$(this).find('.tabledit-span').text(yessent);
-693
View File
@@ -1,693 +0,0 @@
/*!
* Tabledit v1.2.3 (https://github.com/markcell/jQuery-Tabledit)
* Copyright (c) 2015 Celso Marques
* Licensed under MIT (https://github.com/markcell/jQuery-Tabledit/blob/master/LICENSE)
*/
/**
* @description Inline editor for HTML tables compatible with Bootstrap
* @version 1.2.3
* @author Celso Marques
*/
if (typeof jQuery === 'undefined') {
throw new Error('Tabledit requires jQuery library.');
}
(function($) {
'use strict';
$.fn.Tabledit = function(options) {
if (!this.is('table')) {
throw new Error('Tabledit only works when applied to a table.');
}
var $table = this;
var defaults = {
url: window.location.href,
inputClass: 'form-control input-sm',
toolbarClass: 'btn-toolbar',
groupClass: 'btn-group btn-group-sm',
dangerClass: 'danger',
warningClass: 'warning',
mutedClass: 'text-muted bg-light',
eventType: 'click',
rowIdentifier: 'id',
hideIdentifier: false,
autoFocus: true,
editButton: true,
deleteButton: true,
saveButton: true,
restoreButton: true,
buttons: {
edit: {
class: 'btn btn-sm btn-default',
html: '<span class="fa fa-pencil "></span>',
action: 'edit'
},
delete: {
class: 'btn btn-sm btn-default',
html: '<span class="fa fa-trash "></span>',
action: 'delete'
},
save: {
class: 'btn btn-sm btn-success',
html: 'Save'
},
restore: {
class: 'btn btn-sm btn-warning',
html: 'Restore',
action: 'restore'
},
confirm: {
class: 'btn btn-sm btn-danger',
html: 'Confirm'
}
},
onDraw: function() { return; },
onSuccess: function() { return; },
onFail: function() { return; },
onAlways: function() { return; },
onAjax: function() { return; }
};
var settings = $.extend(true, defaults, options);
var $lastEditedRow = 'undefined';
var $lastDeletedRow = 'undefined';
var $lastRestoredRow = 'undefined';
/**
* Draw Tabledit structure (identifier column, editable columns, toolbar column).
*
* @type {object}
*/
var Draw = {
columns: {
identifier: function() {
// Hide identifier column.
if (settings.hideIdentifier) {
$table.find('th:nth-child(' + parseInt(settings.columns.identifier[0]) + 1 + '), tbody td:nth-child(' + parseInt(settings.columns.identifier[0]) + 1 + ')').hide();
}
var $td = $table.find('tbody td:nth-child(' + (parseInt(settings.columns.identifier[0]) + 1) + ')');
$td.each(function() {
// Create hidden input with row identifier.
var span = '<span class="tabledit-span tabledit-identifier">' + $(this).text() + '</span>';
var input = '<input class="tabledit-input tabledit-identifier" type="hidden" name="' + settings.columns.identifier[1] + '" value="' + $(this).text() + '" disabled>';
// Add elements to table cell.
$(this).html(span + input);
// Add attribute "id" to table row.
$(this).parent('tr').attr(settings.rowIdentifier, $(this).text());
});
},
editable: function() {
for (var i = 0; i < settings.columns.editable.length; i++) {
var $td = $table.find('tbody td:nth-child(' + (parseInt(settings.columns.editable[i][0]) + 1) + ')');
$td.each(function() {
// Get text of this cell.
var text = $(this).text();
// Add pointer as cursor.
if (!settings.editButton) {
$(this).css('cursor', 'pointer');
}
if(settings.columns.editable[i][1]=='filenameaudit'){
var spantext='<a href="upload/'+$(this).text() +'" target="_blank">'+$(this).text()+' </a>';
}
else {
var spantext=$(this).text();
}
// Create span element.
var span = '<span class="tabledit-span">' + spantext + '</span>';
// Check if exists the third parameter of editable array.
if (typeof settings.columns.editable[i][2] !== 'undefined') {
// Create select element.
if(settings.columns.editable[i][2]=='checkbox'){
if (text === yessent) {
var input = '<input class="tabledit-input" type="checkbox" name="' + settings.columns.editable[i][1] + '" value="yes" checked="checked" style="display: none;" disabled>';
}
else{
var input = '<input class="tabledit-input" type="checkbox" name="' + settings.columns.editable[i][1] + '" value="yes" style="display: none;" disabled>';
}
}
else if(settings.columns.editable[i][2]=='file'){
var input = '<input class="tabledit-input file-upload" type="text" name="' + settings.columns.editable[i][1] + '" style="display: none;" value="' + $(this).text() + '" disabled><span style="display:none;" class="uploadfile" >Upload File</span>';
}
else{
var input = '<select class="tabledit-input ' + settings.inputClass + '" name="' + settings.columns.editable[i][1] + '" style="display: none;" disabled>';
// Create options for select element.
$.each(jQuery.parseJSON(settings.columns.editable[i][2]), function(index, value) {
if (text === value) {
input += '<option value="' + index + '" selected>' + value + '</option>';
} else {
input += '<option value="' + index + '">' + value + '</option>';
}
});
// Create last piece of select element.
input += '</select>';
}
} else {
// Create text input element.
var input = '<input class="tabledit-input ' + settings.inputClass + '" type="text" name="' + settings.columns.editable[i][1] + '" value="' + $(this).text() + '" style="display: none;" disabled>';
}
// Add elements and class "view" to table cell.
$(this).html(span + input);
$(this).addClass('tabledit-view-mode');
});
}
},
toolbar: function() {
if (settings.editButton || settings.deleteButton) {
var editButton = '';
var deleteButton = '';
var saveButton = '';
var restoreButton = '';
var confirmButton = '';
// Add toolbar column header if not exists.
if ($table.find('th.tabledit-toolbar-column').length === 0) {
$table.find('tr:first').append('<th class="tabledit-toolbar-column"></th>');
}
// Create edit button.
if (settings.editButton) {
editButton = '<button type="button" class="tabledit-edit-button ' + settings.buttons.edit.class + '" style="float: none;">' + settings.buttons.edit.html + '</button>';
}
// Create delete button.
if (settings.deleteButton) {
deleteButton = '<button type="button" class="tabledit-delete-button ' + settings.buttons.delete.class + '" style="float: none;">' + settings.buttons.delete.html + '</button>';
confirmButton = '<button type="button" class="tabledit-confirm-button ' + settings.buttons.confirm.class + '" style="display: none; float: none;">' + settings.buttons.confirm.html + '</button>';
}
// Create save button.
if (settings.editButton && settings.saveButton) {
saveButton = '<button type="button" class="tabledit-save-button ' + settings.buttons.save.class + '" style="display: none; float: none;">' + settings.buttons.save.html + '</button>';
}
// Create restore button.
if (settings.deleteButton && settings.restoreButton) {
restoreButton = '<button type="button" class="tabledit-restore-button ' + settings.buttons.restore.class + '" style="display: none; float: none;">' + settings.buttons.restore.html + '</button>';
}
var toolbar = '<div class="tabledit-toolbar ' + settings.toolbarClass + '" style="text-align: left;">\n\
<div class="' + settings.groupClass + '" style="float: none;">' + editButton + deleteButton + '</div>\n\
' + saveButton + '\n\
' + confirmButton + '\n\
' + restoreButton + '\n\
</div></div>';
// Add toolbar column cells.
$table.find('tr:gt(0)').append('<td style="white-space: nowrap; width: 1%;">' + toolbar + '</td>');
}
}
}
};
/**
* Change to view mode or edit mode with table td element as parameter.
*
* @type object
*/
var Mode = {
view: function(td) {
// Get table row.
var $tr = $(td).parent('tr');
// Disable identifier.
$(td).parent('tr').find('.tabledit-input.tabledit-identifier').prop('disabled', true);
// Hide and disable input element.
$(td).find('.tabledit-input').blur().hide().prop('disabled', true);
// Show span element.
$(td).find('.tabledit-span').show();
$(td).find('.uploadfile').hide();
// Add "view" class and remove "edit" class in td element.
$(td).addClass('tabledit-view-mode').removeClass('tabledit-edit-mode');
// Update toolbar buttons.
if (settings.editButton) {
$tr.find('button.tabledit-save-button').hide();
$tr.find('button.tabledit-edit-button').removeClass('active').blur();
}
},
edit: function(td) {
Delete.reset(td);
// Get table row.
var $tr = $(td).parent('tr');
// Enable identifier.
$tr.find('.tabledit-input.tabledit-identifier').prop('disabled', false);
// Hide span element.
$(td).find('.tabledit-span').hide();
$(td).find('.uploadfile').show();
// Get input element.
var $input = $(td).find('.tabledit-input');
// Enable and show input element.
$input.prop('disabled', false).show();
// Focus on input element.
if (settings.autoFocus) {
$input.focus();
}
// Add "edit" class and remove "view" class in td element.
$(td).addClass('tabledit-edit-mode').removeClass('tabledit-view-mode');
// Update toolbar buttons.
if (settings.editButton) {
$tr.find('button.tabledit-edit-button').addClass('active');
$tr.find('button.tabledit-save-button').show();
}
}
};
/**
* Available actions for edit function, with table td element as parameter or set of td elements.
*
* @type object
*/
var Edit = {
reset: function(td) {
$(td).each(function() {
// Get input element.
var $input = $(this).find('.tabledit-input');
var inputname=$input.attr('name');
// Get span text.
var text = $(this).find('.tabledit-span').text();
// Set input/select value with span text.
if ($input.is('select')) {
$input.find('option').filter(function() {
return $.trim($(this).text()) === text;
}).attr('selected', true);
}
else if($input.is(':checkbox')){
if(text==yessent){
$input.attr('checked', 'checked');
}
}
else if(inputname=='filenameaudit'){
var filename=$(this).find('.tabledit-span').text();
if(filename!=''){
$(this).find('.tabledit-span').html('<a href="upload/'+filename +'" target="_blank">'+filename+' </a>');
}
}
else {
$input.val(text);
}
// Change to view mode.
Mode.view(this);
});
},
submit: function(td) {
// Send AJAX request to server.
var ajaxResult = ajax(settings.buttons.edit.action);
if (ajaxResult === false) {
return;
}
$(td).each(function() {
// Get input element.
var $input = $(this).find('.tabledit-input');
var inputname=$input.attr('name');
// Set span text with input/select new value.
if ($input.is('select')) {
$(this).find('.tabledit-span').text($input.find('option:selected').text());
} else {
$(this).find('.tabledit-span').text($input.val());
}
if ($input.is(':checkbox')) {
if($input.prop('checked')==true){
$(this).find('.tabledit-span').text(yessent);
}
else{
$(this).find('.tabledit-span').text(nosent);
}
}
if( $(this).find('.active-badge')){
// alert($(this).parents('tr').find('input[type=checkbox]').prop('checked'));
File diff suppressed because it is too large Load Diff
-360
View File
@@ -1,360 +0,0 @@
<?php
//You shall use the following exact namespaces no
//matter in whathever directory you upload your
//phpmailer files.
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
ob_start();
include('include/headscript.php'); ?>
<?php
if (isset($companyData["logoimage"]) && !empty($companyData["logoimage"])) {
$companylogo = $companyData["logoimage"];
$_SESSION['companylogo'] = $companylogo;
}
// pickup the get variable
if (isset($_POST["idtrf"])) {
$idtrf = $_POST["idtrf"];
}
if (isset($_GET["idtrf"])) {
$idtrf = $_GET["idtrf"];
}
if (isset($_GET["idtrftd"])) {
$idtrftd = $_GET["idtrftd"];
}
if (isset($_POST["idtrftd"])) {
$idtrftd = $_GET["idtrftd"];
}
if (isset($_GET["idtd"])) {
$idtd = $_GET["idtd"];
}
if (isset($_POST["idtd"])) {
$idtd = $_POST["idtd"];
}
if (isset($_POST["tokensignatureon"])) {
$tokensignatureon = $_POST["tokensignatureon"];
}
if (isset($_POST["clientname"])) {
$clientname = $_POST["clientname"];
}
if (isset($_POST["datetrf"])) {
$datetrf = $_POST["datetrf"];
}
if (isset($_POST["sndrpt"])) {
$sndrpt = $_POST["sndrpt"];
} else {
$sndrpt = "N";
}
if (isset($_POST["adminconfirm"])) {
$adminconfirm = $_POST["adminconfirm"];
} else {
$adminconfirm = "N";
}
?>
<?php
$tokenid = $user->present()->signaturecode;
if ($tokenid != $tokensignatureon) {
header("Location: declaration.php?idtrf=$idtrf&tokenresult=ko");
} else {
// update trf details`
if (isset($_POST["formdeclaration"])) {
if ($sndrpt == 'N') {
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "data_td";
$UpdateQuery->bindColumn("signnametd", "s", "$clientname", "WA_DEFAULT");
$UpdateQuery->bindColumn("signedontd", "s", "$datetrf", "WA_DEFAULT");
$UpdateQuery->bindColumn("statustd", "s", "Signed", "WA_DEFAULT");
$UpdateQuery->addFilter("iddata_td", "=", "i", "" . ($idtd) . "");
$UpdateQuery->execute();
$UpdateGoTo = "";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo ? rel2abs($UpdateGoTo, dirname(__FILE__)) : "";
$UpdateQuery->redirect($UpdateGoTo);
}
}
?>
<?php
$trfnumberfinal = new WA_MySQLi_RS("trfnumberfinal", $cmctrfdb, 1);
$trfnumberfinal->setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.idtrfdetails='$idtrf'");
$trfnumberfinal->execute();
$idcertn = $trfnumberfinal->getColumnVal("idcertification");
$idarticletype = $trfnumberfinal->getColumnVal("idarticletype");
$appformn = $trfnumberfinal->getColumnVal("trfnumber");
$ntrfmail = $trfnumberfinal->getColumnVal("trfnumber");;
$revnumb = $trfnumberfinal->getColumnVal("revtrf");
?>
<?php $idcert = $trfnumberfinal->getColumnVal("idcertification") ?>
<?php
// query data_td
$conn = new mysqli($servername, $username, $password, $dbname);
$sql = "SELECT * FROM data_td WHERE iddata_td = ?";
$stmt = $conn->prepare($sql);
$stmt->bind_param("i", $idtd); // "i" indica che l'id è un intero
$stmt->execute();
$result = $stmt->get_result();
$row = $result->fetch_assoc();
$statustd = $row['statustd'];
$idtrftd = $row['idtrf'];
$tdnumber = $row['tdnumber'];
$tdrev = $row['td_rev'];
$trfmod = $row['trfmod'];
$stmt->close();
$conn->close();
?>
<?php
$certname = new WA_MySQLi_RS("certname", $cmctrfdb, 1);
$certname->setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcert'");
$certname->execute(); ?>
<?php
$chemicalagentlist = new WA_MySQLi_RS("chemicalagentlist", $cmctrfdb, 0);
$chemicalagentlist->setQuery("SELECT * FROM chemicalagent ORDER BY chemicalagent.name_chemicalagent");
$chemicalagentlist->execute();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>TRF <?php echo $ownercompanyname; ?> </title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta content="<?php echo $ownercompanyname; ?> TRF Portal" name="description" />
<meta content="" name="author" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- App favicon -->
<link rel="shortcut icon" href="../images/favicon.ico">
<!--Form Wizard-->
<link href="../plugins/jquery-steps/jquery.steps.css" rel="stylesheet" type="text/css">
<!-- App css -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/jquery-ui.min.css" rel="stylesheet">
<link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/metisMenu.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/app.min.css" rel="stylesheet" type="text/css" />
<!-- submit form with button -->
<style>
input:invalid {
border-color: #ff0000;
background-color: #fff7e6;
}
input:focus {
background: yellow;
}
input:valid {
border-color: #66ff33;
background-color: #eeffe6;
}
select:invalid {
border-color: #ff0000;
background-color: #fff7e6;
}
select:focus {
background-color: yellow;
}
select:valid {
border-color: #66ff33;
background-color: #eeffe6;
}
</style>
<style>
body {
font-family: arial;
}
.hide {
display: none;
}
p {
font-weight: bold;
}
</style>
<script>
function formSubmit() {
document.forms["myForm"].submit();
}
</script>
<script>
function show1() {
document.getElementById('div1').style.display = 'none';
}
function show2() {
document.getElementById('div1').style.display = 'block';
}
function show3() {
document.getElementById('div3').style.display = 'none';
}
function show4() {
document.getElementById('div3').style.display = 'block';
}
function show5() {
document.getElementById('div5').style.display = 'none';
}
function show6() {
document.getElementById('div5').style.display = 'block';
}
</script>
</head>
<body>
<!-- Top Bar Start -->
<?php include('include/topbar.php'); ?>
<!-- Top Bar End -->
<!-- Left Sidenav -->
<?php include('include/leftsidenav2.php'); ?>
<!-- end left-sidenav-->
<div class="page-wrapper">
<!-- Page Content-->
<div class="page-content">
<div class="container-fluid">
<!-- Page-Title -->
<div class="row">
<div class="col-sm-12">
<div class="page-title-box">
<div class="float-right">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="javascript:void(0);">TRF</a></li>
<li class="breadcrumb-item active">Starter</li>
</ol>
</div>
<h4 class="page-title"><?php echo $titlewb; ?></h4>
</div><!--end page-title-box-->
</div><!--end col-->
</div>
<div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-body">
<div class="media">
<?php include('include/appformtd.php'); ?>
</div><!--end media-->
</div><!--end card-body-->
</div><!--end card-->
<div class="progress mb-4">
<div class="progress-bar" role="progressbar" style="width: 100%;" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">100%</div>
</div>
<!-- card for optional TRF -->
<?php //pdf creation
include('tf_pdfcreation.php');
if ($trfmod == 'Y') {
// Esegui la chiamata cURL per previewtrf.php
$url = $linkglobalpublic . "previewtrf.php?idtrf=" . urlencode($idtrf);
// Recupera i cookie di sessione
$cookies = '';
foreach ($_COOKIE as $key => $value) {
$cookies .= $key . '=' . $value . '; ';
}
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 15); // Timeout leggermente più lungo
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_COOKIE, $cookies); // Invia i cookie di sessione
// Aggiungi gestione degli errori cURL
$response = curl_exec($ch);
if (curl_errno($ch)) {
$error_msg = curl_error($ch);
error_log("cURL error: " . $error_msg, 3, "../logfile.log"); // Sostituisci con il percorso del tuo file di log
} else {
// Registra la risposta per debug
error_log("cURL response: " . $response, 3, "../logfile.log"); // Sostituisci con il percorso del tuo file di log
}
curl_close($ch);
}
$checkpdffiles = new WA_MySQLi_RS("checkpdffiles", $cmctrfdb, 1);
$checkpdffiles->setQuery("SELECT * FROM `data_td` WHERE data_td.iddata_td='$idtd'");
$checkpdffiles->execute();
$path = 'tdpdf';
$filename1 = $checkpdffiles->getColumnVal("pdffilenametd");
$file1 = $path . "/" . $filename1;
//Now include the following following files based
//on the correct file path. Third file is required only if you want to enable SMTP.
require 'phpmailer/src/Exception.php';
require 'phpmailer/src/PHPMailer.php';
require 'phpmailer/src/SMTP.php';
//mail to client
$mail = new PHPMailer(true);
try {
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = $mailhost; // Specify main and backup server
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = $mailusername; // SMTP username
$mail->Password = $mailpassword; // SMTP password
$mail->SMTPSecure = $mailmethod; // Enable encryption, 'ssl' also accepted
$mail->Port = $mailport;
$mmessage = "mailtf";
include('include/mailhtml.php');
// Email body content
//$trfnmbmail = $appformn . 'r' . $revnumb;
$htmlContent = $mailmessage1;
$mail->From = $fromaddresssmail;
$mail->FromName = 'CIMAC Technical File System';
$mail->addAddress($emailuser); // Add a recipient
$mail->addAttachment($file1); // Add attachments
// Optional name
$mail->Subject = "Technical File:" . $tdnumber;
$mail->Body = $htmlContent;
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if ($adminconfirm == 'N') {
$mail->send();
}
// echo 'Message has been sent';
} catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
}
?>
<div class="card">
<div class="card-body">
<h4 class="mt-0 header-title"><?php echo $sendtdtitle; ?></h4>
<br><br>
<p><?php echo $companyname; ?> <?php echo $sendtdsentence; ?></p><br>
</div><!--end card-body-->
</div><!--end card-->
</div><!--end col-->
</div>
<!-- end page title end breadcrumb -->
</div><!-- container -->
<!-- footer start -->
<?php include('include/footer.php'); ?>
</footer><!--end footer-->
</div>
<!-- end page content -->
</div>
<!-- end page-wrapper -->
<!-- jQuery -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/metismenu.min.js"></script>
<script src="assets/js/waves.js"></script>
<script src="assets/js/feather.min.js"></script>
<script src="assets/js/jquery.slimscroll.min.js"></script>
<script src="assets/js/jquery-ui.min.js"></script>
<script src="../plugins/jquery-steps/jquery.steps.min.js"></script>
<script src="assets/pages/jquery.form-wizard.init.js"></script>
<!-- App js -->
<script src="assets/js/app.js"></script>
</body>
</html>
-246
View File
@@ -1,246 +0,0 @@
<?php
include('include/headscript.php'); ?>
<?php
// pickup the get variable
if (isset($_GET["idtrf"])) {
$idtrf=$_GET["idtrf"]; }
if (isset($_POST["idtrf"])) {
$idtrf=$_POST["idtrf"]; }
//include('include/alertcheckquery.php');
if (isset($_GET["codestep"])) {
$code="4";
$InsertQuery = new WA_MySQLi_Query($cmctrfdb);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "wheretrfstep";
$InsertQuery->bindColumn("idtrf", "i", "$idtrf", "WA_DEFAULT");
$InsertQuery->bindColumn("code", "i", "$code", "WA_DEFAULT");
$InsertQuery->saveInSession("");
$InsertQuery->execute();
$InsertGoTo = "";
$InsertQuery->redirect($InsertGoTo);
}
?>
<?php /*
$conn = mysqli_connect($hostname_cmctrfdb, $username_cmctrfdb, $password_cmctrfdb, $database_cmctrfdb);
if (!$conn) {
die("Connessione al database fallita: " . mysqli_connect_error());
}
// Controllo dei campi nulli
$sql = "SELECT COUNT(*) AS num_rows FROM trfstandards WHERE idtrfdetails = $idtrf AND (idprotectioncategory IS NULL OR iddpicategory IS NULL)";
$resultcat = mysqli_query($conn, $sql);
// Controllo degli errori
if (!$resultcat) {
die("Errore nella query: " . mysqli_error($conn));
}
$row = mysqli_fetch_assoc($resultcat);
if ($row['num_rows'] > 0) {
// Campi nulli trovati, torna alla pagina standardstep.php e mostra il messaggio di errore
header("Location: standardstep.php?idtrf=$idtrf&error=tuttiicampidevonoesserericompilati");
exit;
} */
?>
<?php
$trfnumberfinal = new WA_MySQLi_RS("trfnumberfinal",$cmctrfdb,1);
$trfnumberfinal->setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.idtrfdetails='$idtrf'");
$trfnumberfinal->execute();
?>
<?php
$idcertn=$trfnumberfinal->getColumnVal("idcertification");
$idtrf=$trfnumberfinal->getColumnVal("idtrfdetails");
?>
<?php $idcert=$trfnumberfinal->getColumnVal("idcertification") ?>
<?php
$certname = new WA_MySQLi_RS("certname",$cmctrfdb,1);
$certname->setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcert'");
$certname->execute();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>TRF CIMAC </title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta content="CIMAC TRF Portal" name="description"/>
<meta content="" name="author"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<!-- App favicon -->
<link rel="shortcut icon" href="../images/favicon.ico">
<!--Form Wizard-->
<link href="../plugins/jquery-steps/jquery.steps.css" rel="stylesheet" type="text/css">
<!-- App css -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/jquery-ui.min.css" rel="stylesheet">
<link href="assets/css/icons.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/metisMenu.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/app.min.css" rel="stylesheet" type="text/css"/>
<!-- submit form with button -->
<script>
function formSubmit() {
document.forms["myForm"].submit();
}
</script>
</head>
<body>
<!-- Top Bar Start -->
<?php include('include/topbar.php'); ?>
<!-- Top Bar End -->
<!-- Left Sidenav -->
<?php include('include/leftsidenav.php'); ?>
<!-- end left-sidenav-->
<div class="page-wrapper">
<!-- Page Content-->
<div class="page-content">
<div class="container-fluid">
<!-- Page-Title -->
<div class="row">
<div class="col-sm-12">
<div class="page-title-box">
<div class="float-right">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="javascript:void(0);">TRF</a>
</li>
<li class="breadcrumb-item active">Starter</li>
</ol>
</div>
<h4 class="page-title"><?php echo $titlewb; ?>
</h4>
</div>
<!--end page-title-box-->
</div>
<!--end col-->
</div>
<div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-body">
<div class="media">
<?php include('include/appform.php'); ?>
</div>
<!--end media-->
</div>
<!--end card-body-->
</div>
<!--end card-->
<div class="progress mb-4">
<div class="progress-bar" role="progressbar" style="width: 60%;" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100">60%</div>
</div>
<!-- card for additional info gloves -->
<?php if ($trfnumberfinal->getColumnVal("idarticletype")=="2") { ?>
<div class="card">
<div class="card-body">
<h4 class="mt-0 header-title"><?php echo $additionalinfotitle; ?>
</h4>
<p class="text-muted mb-3"><?php echo $additionalinfotitle_help; ?>
</p>
<form class="was-validated" action="addrequirements.php" method="post" name="myForm">
<div class="checkbox my-2">
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="virusprot" name="virusprot" data-parsley-multiple="groups" value="Y" data-parsley-mincheck="2" <?php if ($trfnumberfinal->getColumnVal("virusprotection")=='Y') { echo "checked"; } ?>>
<label class="custom-control-label" for="virusprot"><?php echo $virusprottitle; ?>
</label>
</div>
</div>
<input type="hidden" name="addinfo" id="addinfo" value="Y">
<input type="hidden" name="idtrf" id="idtrf" value="<?php echo $idtrf; ?>">
<br>
<br>
<input type="button" onclick="formSubmit()" class="btn btn-gradient-success waves-effect waves-light" value="<?php echo $nextsteptitle; ?>">
<a href="standardstep.php?idtrf=<?php echo $idtrf; ?>"
<button type="button" class="btn btn-dark waves-effect waves-light"><?php echo $backstep; ?>
</button>
</a>
</div>
</form>
</div>
<!--end card-body-->
<?php } ?>
<!-- card for additional info shoes -->
<?php if ($trfnumberfinal->getColumnVal("idarticletype")=="1") { ?>
<div class="card">
<div class="card-body">
<h4 class="mt-0 header-title"><?php echo $additionalinfotitle; ?>
</h4>
<p class="text-muted mb-3"><?php echo $additionalinfotitle_help; ?>
</p>
<form class="form-parsley" action="addrequirements.php" method="post" name="myForm">
<div class="form-group row">
<label class="col-sm-3 col-form-label"><?php echo $slippingtitle; ?>
</label>
<div class="col-sm-2">
<select class="form-control" id="slipping" name="slipping">
<option value="" <?php if (!(strcmp("", ($trfnumberfinal->getColumnVal("slipping"))))) {echo "selected=\"selected\"";} ?>>No</option>
<option value="SR" <?php if (!(strcmp("SR", ($trfnumberfinal->getColumnVal("slipping"))))) {echo "selected=\"selected\"";} ?>>SR</option>
<option value="SRA" <?php if (!(strcmp("SRA", ($trfnumberfinal->getColumnVal("slipping"))))) {echo "selected=\"selected\"";} ?>>SRA</option>
<option value="SRB" <?php if (!(strcmp("SRB", ($trfnumberfinal->getColumnVal("slipping"))))) {echo "selected=\"selected\"";} ?>>SRB</option>
<option value="SRC" <?php if (!(strcmp("SRC", ($trfnumberfinal->getColumnVal("slipping"))))) {echo "selected=\"selected\"";} ?>>SRC</option>
</select>
</select>
</div>
</div>
<div class="checkbox my-2">
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="orthopedic" name="orthopedic" data-parsley-multiple="groups" value="Y" data-parsley-mincheck="2" <?php if ($trfnumberfinal->getColumnVal("shoesorthopedic")=='Y') { echo "checked"; } ?>>
<label class="custom-control-label" for="orthopedic"><?php echo $orthopedictitle; ?> (DGUV)
</label>
</div>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="autoclavable" name="autoclavable" data-parsley-multiple="groups" value="Y" data-parsley-mincheck="2" <?php if ($trfnumberfinal->getColumnVal("autoclavable")=='Y') { echo "checked"; } ?>>
<label class="custom-control-label" for="autoclavable"><?php echo $autoclavabletitle; ?>
</label>
</div>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="esd" name="esd" data-parsley-multiple="groups" value="Y" data-parsley-mincheck="2" <?php if ($trfnumberfinal->getColumnVal("esd")=='Y') { echo "checked"; } ?>>
<label class="custom-control-label" for="esd"><?php echo $esdtitle; ?>
</label>
</div>
</div>
<input type="hidden" name="addinfo" id="addinfo" value="Y">
<input type="hidden" name="idtrf" id="idtrf" value="<?php echo $idtrf; ?>">
<input type="hidden" name="codestep" id="codestep" value="4">
<br>
<br>
<input type="button" onclick="formSubmit()" class="btn btn-gradient-success waves-effect waves-light" value="<?php echo $nextsteptitle; ?>">
<a href="standardstep.php?idtrf=<?php echo $idtrf; ?>"
<button type="button" class="btn btn-dark waves-effect waves-light"><?php echo $backstep; ?>
</button>
</a>
</div>
</form>
</div>
<!--end card-body-->
<?php } ?>
</div>
<!--end card-->
</div>
<!--end col-->
</div>
<!-- end page title end breadcrumb -->
</div>
<!-- container -->
<!-- footer start -->
<?php include('include/footer.php'); ?>
</footer>
<!--end footer-->
</div>
<!-- end page content -->
</div>
<!-- end page-wrapper -->
<!-- jQuery -->
<script src="assets/js/jquery.min.js"/></script>
<script src="assets/js/bootstrap.bundle.min.js"/></script>
<script src="assets/js/metismenu.min.js"/></script>
<script src="assets/js/waves.js"/></script>
<script src="assets/js/feather.min.js"/></script>
<script src="assets/js/jquery.slimscroll.min.js"/></script>
<script src="assets/js/jquery-ui.min.js"/></script>
<script src="../plugins/jquery-steps/jquery.steps.min.js"/></script>
<script src="assets/pages/jquery.form-wizard.init.js"/></script>
<!-- App js -->
<script src="assets/js/app.js"/></script>
</body>
</html>
-404
View File
@@ -1,404 +0,0 @@
<?php
include('include/headscript.php'); ?>
<?php
// pickup the get variable
if (isset($_GET["idtrf"])) {
$idtrf=$_GET["idtrf"]; }
if (isset($_POST["idtrf"])) {
$idtrf=$_POST["idtrf"]; }
//include('include/alertcheckquery.php');
if (isset($_POST["virusprot"])) {
$virusprot=$_POST["virusprot"]; }
else { $virusprot=""; }
if (isset($_POST["addinfo"])) {
$addinfo=$_POST["addinfo"]; }
else { $addinfo=""; }
if (isset($_POST["slipping"])) {
$slipping=$_POST["slipping"]; }
else { $slipping=""; }
if (isset($_POST["orthopedic"])) {
$orthopedic=$_POST["orthopedic"]; }
else { $orthopedic=""; }
if (isset($_POST["autoclavable"])) {
$autoclavable=$_POST["autoclavable"]; }
else { $autoclavable=""; }
if (isset($_POST["esd"])) {
$esd=$_POST["esd"]; }
else { $esd=""; }
if (isset($_POST["ukcacert"])) {
$ukcacert=$_POST["ukcacert"]; }
else { $ukcacert=""; }
if (isset($_POST["addreq"])) {
$addreq=$_POST["addreq"]; }
if (isset($_POST["addreqform"])) {
$addreqform=$_POST["addreqform"]; }
else { $addreqform=""; }
if (isset($_POST["codestep"])) {
$code="5";
$InsertQuery = new WA_MySQLi_Query($cmctrfdb);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "wheretrfstep";
$InsertQuery->bindColumn("idtrf", "i", "$idtrf", "WA_DEFAULT");
$InsertQuery->bindColumn("code", "i", "$code", "WA_DEFAULT");
$InsertQuery->saveInSession("");
$InsertQuery->execute();
$InsertGoTo = "";
$InsertQuery->redirect($InsertGoTo);
}
?>
<?php
$conn = mysqli_connect($hostname_cmctrfdb, $username_cmctrfdb, $password_cmctrfdb, $database_cmctrfdb);
if (!$conn) {
die("Connessione al database fallita: " . mysqli_connect_error());
}
// Controllo dei campi nulli
$sql = "SELECT COUNT(*) AS num_rows FROM trfstandards WHERE idtrfdetails = $idtrf AND (idprotectioncategory IS NULL OR iddpicategory IS NULL)";
$resultcat = mysqli_query($conn, $sql);
// Controllo degli errori
if (!$resultcat) {
die("Errore nella query: " . mysqli_error($conn));
}
/*$row = mysqli_fetch_assoc($resultcat);
if ($row['num_rows'] > 0) {
// Campi nulli trovati, torna alla pagina standardstep.php e mostra il messaggio di errore
header("Location: standardstep.php?idtrf=$idtrf&error=tuttiicampidevonoesserericompilati");
exit;
}*/
?>
<?php
$trfnumberfinal = new WA_MySQLi_RS("trfnumberfinal",$cmctrfdb,1);
$trfnumberfinal->setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.idtrfdetails='$idtrf'");
$trfnumberfinal->execute();
$idcertn=$trfnumberfinal->getColumnVal("idcertification");
$idstandards=$trfnumberfinal->getColumnVal("idstandards");
$idarticletype=$trfnumberfinal->getColumnVal("idarticletype");
?>
<?php
$standardlistsel = new WA_MySQLi_RS("standardlistsel",$cmctrfdb,0);
$standardlistsel->setQuery("SELECT * FROM trfstandards WHERE trfstandards.idtrfdetails='$idtrf'");
$standardlistsel->execute();
?>
<?php
$arraystd=array(); ?>
<?php
$wa_startindex = 0;
while(!$standardlistsel->atEnd()) {
$wa_startindex = $standardlistsel->Index;
?>
<?php
$idstandards=$standardlistsel->getColumnVal("idstandards");
$arraystd[]=$idstandards;
?>
<?php
$standardlistsel->moveNext();
}
$standardlistsel->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
$array2std=implode("','",$arraystd);
$array3std="'".$array2std."'";
?>
<?php $idcert=$trfnumberfinal->getColumnVal("idcertification") ?>
<?php
$certname = new WA_MySQLi_RS("certname",$cmctrfdb,1);
$certname->setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcert'");
$certname->execute();?>
<?php //complete list add req
//$addreqlist = new WA_MySQLi_RS("addreqlist",$cmctrfdb,0);
//$addreqlist->setQuery("SELECT * FROM additionalrequirements WHERE additionalrequirements.idarticletype='$idarticletype' ORDER BY additionalrequirements.name_additionalrequirements");
//$addreqlist->execute();?>
<?php // specific list of add req for std
// Determine the column to select based on the session variable
$additionalRequirementsField = ($_SESSION['langselect'] == 'en') ? 'name_additionalrequirements_en' : 'name_additionalrequirements_it';
// Specific list of add req for std
$addreqlist = new WA_MySQLi_RS("addreqlist", $cmctrfdb, 0);
$addreqlist->setQuery("SELECT DISTINCT stdreqlist.idadditionalrequirements, additionalrequirements." . $additionalRequirementsField . " FROM stdreqlist LEFT JOIN additionalrequirements ON stdreqlist.idadditionalrequirements=additionalrequirements.idadditionalrequirements WHERE stdreqlist.idstandards IN ($array3std)");
$addreqlist->execute();
?>
<?php
if ($addinfo=="Y") {
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "`trf-details`";
$UpdateQuery->bindColumn("virusprotection", "s", "$virusprot", "WA_DEFAULT");
$UpdateQuery->bindColumn("shoesorthopedic", "s", "$orthopedic", "WA_DEFAULT");
$UpdateQuery->bindColumn("autoclavable", "s", "$autoclavable", "WA_DEFAULT");
$UpdateQuery->bindColumn("esd", "s", "$esd", "WA_DEFAULT");
$UpdateQuery->bindColumn("slipping", "s", "$slipping", "WA_DEFAULT");
$UpdateQuery->addFilter("idtrfdetails", "=", "i", "".($idtrf) ."");
$UpdateQuery->execute();
$UpdateGoTo = "";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo?rel2abs($UpdateGoTo,dirname(__FILE__)):"";
$UpdateQuery->redirect($UpdateGoTo);
}
?>
<?php
if ($addreqform=="Y") {
$addreqcheck = new WA_MySQLi_RS("addreqcheck",$cmctrfdb,1);
$addreqcheck->setQuery("SELECT * FROM trfaddrequirements WHERE trfaddrequirements.idtrf='$idtrf' AND trfaddrequirements.idadditionalrequirements='$addreq'");
$addreqcheck->execute();
if (empty($addreqcheck->getColumnVal("idtrfaddrequirements"))) {
$InsertQuery = new WA_MySQLi_Query($cmctrfdb);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "trfaddrequirements";
$InsertQuery->bindColumn("idtrf", "i", "$idtrf", "WA_DEFAULT");
$InsertQuery->bindColumn("idadditionalrequirements", "i", "$addreq", "WA_DEFAULT");
$InsertQuery->saveInSession("");
$InsertQuery->execute();
$InsertGoTo = "";
if (function_exists("rel2abs")) $InsertGoTo = $InsertGoTo?rel2abs($InsertGoTo,dirname(__FILE__)):"";
$InsertQuery->redirect($InsertGoTo);
}}
?>
<?php
$addreqselectedlist = new WA_MySQLi_RS("addreqselectedlist",$cmctrfdb,0);
$addreqselectedlist->setQuery("SELECT * FROM trfaddrequirements LEFT JOIN additionalrequirements ON trfaddrequirements.idadditionalrequirements=additionalrequirements.idadditionalrequirements WHERE trfaddrequirements.idtrf='$idtrf'");
$addreqselectedlist->execute();?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>TRF CIMAC </title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta content="CIMAC TRF Portal" name="description" />
<meta content="" name="author" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- App favicon -->
<link rel="shortcut icon" href="../images/favicon.ico">
<!--Form Wizard-->
<link href="../plugins/jquery-steps/jquery.steps.css" rel="stylesheet" type="text/css">
<!-- App css -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/jquery-ui.min.css" rel="stylesheet">
<link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/metisMenu.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/app.min.css" rel="stylesheet" type="text/css" />
<!-- submit form with button -->
<script>
function formSubmit() {
document.forms["myForm"].submit();
}
</script>
</head>
<body>
<!-- Top Bar Start -->
<?php include('include/topbar.php'); ?>
<!-- Top Bar End -->
<!-- Left Sidenav -->
<?php include('include/leftsidenav.php'); ?>
<!-- end left-sidenav-->
<div class="page-wrapper">
<!-- Page Content-->
<div class="page-content">
<div class="container-fluid">
<!-- Page-Title -->
<div class="row">
<div class="col-sm-12">
<div class="page-title-box">
<div class="float-right">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="javascript:void(0);">TRF</a></li>
<li class="breadcrumb-item active">Starter</li>
</ol>
</div>
<h4 class="page-title"><?php echo $titlewb; ?></h4>
</div><!--end page-title-box-->
</div><!--end col-->
</div>
<div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-body">
<div class="media">
<?php include('include/appform.php'); ?>
</div><!--end media-->
</div><!--end card-body-->
</div><!--end card-->
<div class="progress mb-4">
<div class="progress-bar" role="progressbar" style="width: 70%;" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100">70%</div>
</div>
<!-- card for additional info gloves -->
<div class="card">
<div class="card-body">
<h4 class="mt-0 header-title"><?php echo $additionalreqtitle; ?></h4>
<p class="text-muted mb-3"><?php echo $additionalreqtitle_help; ?></p>
<form class="form-parsley" action="" method="post" name="myForm">
<div class="form-group row">
<?php // var for language translation table name and help
$colvarname=$addreqlist->getColumnVal("name_additionalrequirements");
$varnamelang=$colvarname.$lang;
$varhelplang="additionalrequirements_".$lang;
?>
<div class="col-sm-5">
<select class="form-control" id="addreq" name="addreq">
<option value=""><?php echo $pleaseselect; ?></option>
<?php
while(!$addreqlist->atEnd()) { //dyn select
?><?php
// Assuming the session_start() has been called earlier in the PHP code to start the session.
$nameField = ($_SESSION['langselect'] == 'en') ? "name_additionalrequirements_en" : "name_additionalrequirements_it";
?>
<option value="<?php echo($addreqlist->getColumnVal("idadditionalrequirements")); ?>">
<?php echo($addreqlist->getColumnVal($nameField)); ?>
</option> <?php
$addreqlist->moveNext();
} //dyn select
$addreqlist->moveFirst();
?>
</select>
</div>
</div>
<input type="hidden" name="addreqform" id="addreqform" value="Y">
<input type="hidden" name="idtrf" id="idtrf" value="<?php echo($trfnumberfinal->getColumnVal("idtrfdetails")); ?>">
<br><br>
<input type="button" onclick="formSubmit()" class="btn btn-gradient-success waves-effect waves-light" value="<?php echo $addtitle; ?>">
</div>
</form>
</div><!--end card-body-->
<!-- card for show requirements -->
<div class="card">
<div class="card-body">
<h4 class="mt-0 header-title"><?php echo $additionalreqtitleselected; ?></h4>
<p class="text-muted mb-3"><?php echo $additionalreqtitleselected_help; ?></p>
<table class="table table-striped mb-0">
<thead>
<tr>
<th><?php echo $addreqtitle; ?></th>
<th><?php echo $action; ?></th>
</tr>
</thead>
<tbody>
<?php
$wa_startindex = 0;
while(!$addreqselectedlist->atEnd()) {
$wa_startindex = $addreqselectedlist->Index;
?>
<tr>
<td>
<?php
// Assuming session_start() has already been called.
$nameField = ($_SESSION['langselect'] == 'en') ? 'name_additionalrequirements_en' : 'name_additionalrequirements_it';
echo($addreqselectedlist->getColumnVal($nameField));
?>
</td>
<td>
<a href="deleteaddreq.php?idaddreq=<?php echo($addreqselectedlist->getColumnVal("idtrfaddrequirements")); ?>&idtrf=<?php echo $idtrf; ?>"><i class="fas fa-trash-alt text-danger font-16"></i></a>
</td>
</tr>
<?php
$addreqselectedlist->moveNext();
}
$addreqselectedlist->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
?>
</tbody>
</table>
<?php include('include/chemicalsquerycheck.php'); ?>
<?php if (!empty($chemicalstep)) { ?>
<a href="chemicalagent.php?idtrf=<?php echo $idtrf; ?>&codestep=5"><button type="button" class="btn btn-success waves-effect waves-light"><?php echo $nextsteptitle; ?></button> </a>
<?php } else { ?>
<a href="identificationparts.php?idtrf=<?php echo $idtrf; ?>&codestep=6"><button type="button" class="btn btn-success waves-effect waves-light"><?php echo $nextsteptitle; ?></button> </a>
<?php } ?>
<button type="button" class="btn btn-dark waves-effect waves-light" onclick="history.back()"><?php echo $backstep; ?></button>
</div><!--end card-body-->
</div><!--end card-->
</div><!--end col-->
</div>
<!-- end page title end breadcrumb -->
</div><!-- container -->
<!-- footer start -->
<?php include('include/footer.php'); ?>
</footer><!--end footer-->
</div>
<!-- end page content -->
</div>
<!-- end page-wrapper -->
<!-- jQuery -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/metismenu.min.js"></script>
<script src="assets/js/waves.js"></script>
<script src="assets/js/feather.min.js"></script>
<script src="assets/js/jquery.slimscroll.min.js"></script>
<script src="assets/js/jquery-ui.min.js"></script>
<script src="../plugins/jquery-steps/jquery.steps.min.js"></script>
<script src="assets/pages/jquery.form-wizard.init.js"></script>
<!-- App js -->
<script src="assets/js/app.js"></script>
</body>
</html>
-890
View File
@@ -1,890 +0,0 @@
<?php require_once('../Connections/cmctrfdb.php'); ?>
<?php require_once('../webassist/mysqli/rsobj.php'); ?>
<?php
include('include/headscript.php');
include('db-connect.php');
?>
<?php
// pickup the get variable
// pickup the get variable
if (isset($_POST["idtrf"])) {
$idtrf = $_POST["idtrf"];
}
if (isset($_GET["idtrf"])) {
$idtrf = $_GET["idtrf"];
}
if (isset($_POST["photoname"])) {
$photoname = $_POST["photoname"];
}
if (isset($_POST["description"])) {
$description = $_POST["description"];
}
if (isset($_POST["model"])) {
$model = $_POST["model"];
}
if (isset($_POST["rangemeasuremin"])) {
$rangemeasuremin = $_POST["rangemeasuremin"];
}
if (isset($_POST["rangemeasuremax"])) {
$rangemeasuremax = $_POST["rangemeasuremax"];
}
if (isset($_POST["registeredmark"])) {
$registeredmark = $_POST["registeredmark"];
}
if (isset($_POST["rangemeasuremintext"])) {
$rangemeasuremintext = $_POST["rangemeasuremintext"];
}
if (isset($_POST["rangemeasuremaxtext"])) {
$rangemeasuremaxtext = $_POST["rangemeasuremaxtext"];
}
if (isset($_POST["articletype"])) {
$articletype = $_POST["articletype"];
}
if (isset($_POST["previousreportnumber"])) {
$previousreportnumber = $_POST["previousreportnumber"];
} else {
$previousreportnumber = '';
}
if (isset($_POST["toextend"])) {
$toextend = $_POST["toextend"];
} else {
$toextend = '';
}
if (isset($_POST["revisionfor"])) {
$revisionfor = $_POST["revisionfor"];
} else {
$revisionfor = '';
}
if (isset($_POST["renewdate"])) {
$renewdate = $_POST["renewdate"];
} else {
$renewdate = '';
}
if (isset($_POST["articlecharacteristic"])) {
$articlecharacteristic = $_POST["articlecharacteristic"];
}
if (isset($_POST["formupdtrfdetails"])) {
$formupdtrfdetails = $_POST["formupdtrfdetails"];
}
if (isset($_POST['stdselected'])) {
$stds = $_POST['stdselected'];
}
if (isset($_POST["updstdform"])) {
$updstdform = $_POST["updstdform"];
}
if (isset($articlecharacteristic)) {
$listartchar = implode(',', $articlecharacteristic);
} else {
$listartchar = "";
}
//echo $listartchar;
?>
<?php
include('include/trfqueryscript.php'); ?>
<?php if (isset($articlecharacteristic)) {
foreach ($articlecharacteristic as $ac) {
$stdfromartchar = new WA_MySQLi_RS("stdfromartchar", $cmctrfdb, 1);
$stdfromartchar->setQuery("SELECT * FROM standards WHERE standards.idarticlecharacteristic='$ac'");
$stdfromartchar->execute();
$value = $stdfromartchar->getColumnVal("idstandards");
$dpicatsel = $stdfromartchar->getColumnVal("iddpicategory");
//foreach ($stds as $hobys=>$value) {
$stdcheckpresent = new WA_MySQLi_RS("stdcheckpresent", $cmctrfdb, 1);
$stdcheckpresent->setQuery("SELECT * FROM trfstandards WHERE trfstandards.idtrfdetails='$idtrf' AND trfstandards.idstandards='$value'");
$stdcheckpresent->execute();
// insert for glovces EN 420 if not present
/* if ($articletype==2) {
$stdcheckpresent420 = new WA_MySQLi_RS("stdcheckpresent420",$cmctrfdb,1);
$stdcheckpresent420->setQuery("SELECT * FROM trfstandards WHERE trfstandards.idtrfdetails='$idtrf' AND trfstandards.idstandards='129'");
$stdcheckpresent420->execute();
if (empty($stdcheckpresent420->getColumnVal("idtrfstandards"))) {
$InsertQuery = new WA_MySQLi_Query($cmctrfdb);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "trfstandards";
$InsertQuery->bindColumn("idtrfdetails", "i", "$idtrf", "WA_DEFAULT");
$InsertQuery->bindColumn("idstandards", "i", "129", "WA_DEFAULT");
$InsertQuery->bindColumn("iddpicategory", "i", "$dpicatsel", "WA_DEFAULT");
$InsertQuery->saveInSession("");
$InsertQuery->execute();
$InsertGoTo = "";
$InsertQuery->redirect($InsertGoTo);
}} */
if (empty($stdcheckpresent->getColumnVal("idtrfstandards"))) {
$InsertQuery = new WA_MySQLi_Query($cmctrfdb);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "trfstandards";
$InsertQuery->bindColumn("idtrfdetails", "i", "$idtrf", "WA_DEFAULT");
$InsertQuery->bindColumn("idstandards", "i", "$value", "WA_DEFAULT");
$InsertQuery->bindColumn("iddpicategory", "i", "$dpicatsel", "WA_DEFAULT");
$InsertQuery->saveInSession("");
$InsertQuery->execute();
$InsertGoTo = "";
$InsertQuery->redirect($InsertGoTo);
}
}
} //}
?>
<?php
if (isset($formupdtrfdetails)) {
if ($articletype == '1' or $articletype == '2' or $articletype == '4') {
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "`trf-details`";
$UpdateQuery->bindColumn("sample_description", "s", "$description", "WA_DEFAULT");
$UpdateQuery->bindColumn("measurefrom", "s", "$rangemeasuremin", "WA_DEFAULT");
$UpdateQuery->bindColumn("measureto", "s", "$rangemeasuremax", "WA_DEFAULT");
$UpdateQuery->bindColumn("model", "s", "$model", "WA_DEFAULT");
$UpdateQuery->bindColumn("idarticletype", "i", "$articletype", "WA_DEFAULT");
$UpdateQuery->bindColumn("idarticle_characteristics", "s", "$listartchar", "WA_DEFAULT");
$UpdateQuery->bindColumn("registeredmark", "s", "$registeredmark", "WA_DEFAULT");
$UpdateQuery->bindColumn("previousreportnumber", "s", "$previousreportnumber", "WA_DEFAULT");
$UpdateQuery->bindColumn("toextend", "s", "$toextend", "WA_DEFAULT");
$UpdateQuery->bindColumn("revisionfor", "s", "$revisionfor", "WA_DEFAULT");
$UpdateQuery->bindColumn("renewdate", "s", "$renewdate", "WA_DEFAULT");
$UpdateQuery->addFilter("idtrfdetails", "=", "i", "" . ($idtrf) . "");
$UpdateQuery->execute();
$UpdateGoTo = "";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo ? rel2abs($UpdateGoTo, dirname(__FILE__)) : "";
$UpdateQuery->redirect($UpdateGoTo);
$code = "3";
$InsertQuery2 = new WA_MySQLi_Query($cmctrfdb);
$InsertQuery2->Action = "insert";
$InsertQuery2->Table = "wheretrfstep";
$InsertQuery2->bindColumn("idtrf", "i", "$idtrf", "WA_DEFAULT");
$InsertQuery2->bindColumn("code", "s", "$code", "WA_DEFAULT");
$InsertQuery2->saveInSession("");
$InsertQuery2->execute();
$InsertGoTo = "";
$InsertQuery2->redirect($InsertGoTo);
} else {
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "`trf-details`";
$UpdateQuery->bindColumn("sample_description", "s", "$description", "WA_DEFAULT");
$UpdateQuery->bindColumn("measurefrom", "s", "$rangemeasuremintext", "WA_DEFAULT");
$UpdateQuery->bindColumn("measureto", "s", "$rangemeasuremaxtext", "WA_DEFAULT");
$UpdateQuery->bindColumn("model", "s", "$model", "WA_DEFAULT");
$UpdateQuery->bindColumn("idarticletype", "i", "$articletype", "WA_DEFAULT");
$UpdateQuery->bindColumn("idarticle_characteristics", "s", "$listartchar", "WA_DEFAULT");
$UpdateQuery->bindColumn("registeredmark", "s", "$registeredmark", "WA_DEFAULT");
$UpdateQuery->addFilter("idtrfdetails", "=", "i", "" . ($idtrf) . "");
$UpdateQuery->execute();
$UpdateGoTo = "";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo ? rel2abs($UpdateGoTo, dirname(__FILE__)) : "";
$UpdateQuery->redirect($UpdateGoTo);
$code = "3";
$InsertQuery2 = new WA_MySQLi_Query($cmctrfdb);
$InsertQuery2->Action = "insert";
$InsertQuery2->Table = "wheretrfstep";
$InsertQuery2->bindColumn("idtrf", "i", "$idtrf", "WA_DEFAULT");
$InsertQuery2->bindColumn("code", "s", "$code", "WA_DEFAULT");
$InsertQuery2->saveInSession("");
$InsertQuery2->execute();
$InsertGoTo = "";
$InsertQuery2->redirect($InsertGoTo);
}
}
?>
<?php
include('include/trfqueryscript.php'); ?>
<?php
$trfnumberfinal = new WA_MySQLi_RS("trfnumberfinal", $cmctrfdb, 1);
$trfnumberfinal->setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.idtrfdetails='$idtrf'");
$trfnumberfinal->execute();
$idcertn = $trfnumberfinal->getColumnVal("idcertification");
$articletype = $trfnumberfinal->getColumnVal("idarticletype");
$articlecharact = $trfnumberfinal->getColumnVal("idarticle_characteristics");
?>
<?php $idcert = $trfnumberfinal->getColumnVal("idcertification") ?>
<?php
$certname = new WA_MySQLi_RS("certname", $cmctrfdb, 1);
$certname->setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcert'");
$certname->execute(); ?>
<?php // if all the standards of articletype
// $stdcheck = new WA_MySQLi_RS("stdcheck",$cmctrfdb,0);
// $stdcheck->setQuery("SELECT * FROM standards WHERE standards.idarticletype='$articletype'");
// $stdcheck->execute();
?>
<?php // preselection based on article characteristic
$stdcheck = new WA_MySQLi_RS("stdcheck", $cmctrfdb, 0);
$stdcheck->setQuery("SELECT * FROM standards WHERE standards.idarticlecharacteristic='$articlecharact' ");
$stdcheck->execute();
$idstselect = $stdcheck->getColumnVal("idstandards");
?>
<?php // inline edit query
$idtrfdetails = $idtrf;
$row1 = mysqli_query($con, "SELECT *,trfstandards.iddpicategory as iddpicategoryid,trfstandards.idprotectioncategory as idprotectioncategoryid,trfstandards.idstandards as idstandardsid FROM trfstandards LEFT JOIN standards ON trfstandards.idstandards=standards.idstandards LEFT JOIN dpicategory ON trfstandards.iddpicategory=dpicategory.iddpicategory LEFT JOIN protectioncategory ON trfstandards.idprotectioncategory=protectioncategory.idprotectioncategory WHERE trfstandards.idtrfdetails='$idtrf'");
//$rows = mysqli_fetch_assoc($row1);
//print_r($rows);
//exit;
$idstandards = mysqli_query($con, "SELECT idstandards ,standardname FROM standards");
//query list protectioncategory
// $proteccategorylist=mysqli_query($con,"SELECT idprotectioncategory ,name_protectioncategory FROM protectioncategory");
// $idproteccategorylistRecord=array();
// while($idprotectioncategoryrow = mysqli_fetch_assoc($proteccategorylist)) {
// $idproteccategorylistRecord[$idprotectioncategoryrow['idprotectioncategory']]=utf8_encode($idprotectioncategoryrow['name_protectioncategory']);
// }
// $idprotectioncategoryJson=json_encode($idproteccategorylistRecord);
/* GET OPTIONS FOR Categoria di protezione per standard */
$idprotectioncategoryJson = json_encode(array());
$proteccategorylist = mysqli_query($con, "select s.idstandards, p.idprotectioncategory, p.name_protectioncategory
from stdprotectioncat s
left join protectioncategory p
on s.idprotectioncategory = p.idprotectioncategory
where 1");
$idproteccategorylistRecord = array();
while ($idprotectioncategoryrow = mysqli_fetch_assoc($proteccategorylist)) {
$nameprotcat = html_entity_decode($idprotectioncategoryrow['name_protectioncategory']);
$nameprotcat = iconv('UTF-8', 'windows-1252', $nameprotcat);
$idproteccategorylistRecord[$idprotectioncategoryrow['idstandards']][$idprotectioncategoryrow['idprotectioncategory']] = utf8_encode(htmlspecialchars($nameprotcat, ENT_QUOTES));
//utf8_encode(htmlspecialchars($idprotectioncategoryrow['name_protectioncategory']
}
$idprotectioncategoryperStdJson = json_encode($idproteccategorylistRecord);
/* END GET OPTIONS FOR Categoria di protezione per standard */
// //Impermeabilità
// //query list protectioncategory
// $dpicategroylist=mysqli_query($con,"SELECT iddpicategory ,value_dpicategory FROM dpicategory");
// $iddpicategorylistRecord=array();
// while($iddpicategoryrow = mysqli_fetch_assoc($dpicategroylist)) {
// $iddpicategorylistRecord[$iddpicategoryrow['iddpicategory']]=utf8_encode($iddpicategoryrow['value_dpicategory']);
// }
// $iddpicategoryJson=json_encode($iddpicategorylistRecord);
/* GET OPTIONS FOR Categoria DPI per standard */
$iddpicategoryJson = json_encode(array());
$dpicategroylist = mysqli_query($con, "select s.idstandards, d.iddpicategory, d.value_dpicategory
from stddpicategory s
left join dpicategory d
on s.iddpicategory = d.iddpicategory
where 1");
$iddpicategorylistRecord = array();
while ($iddpicategoryrow = mysqli_fetch_assoc($dpicategroylist)) {
$iddpicategorylistRecord[$iddpicategoryrow['idstandards']][$iddpicategoryrow['iddpicategory']] = utf8_encode(htmlspecialchars($iddpicategoryrow['value_dpicategory'], ENT_QUOTES));
}
$iddpicategoryperStdJson = json_encode($iddpicategorylistRecord);
/* END GET OPTIONS FOR Categoria DPI per standard */
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title><?php echo $titlepage; ?> </title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta content="CIMAC TRF Portal" name="description" />
<meta content="" name="author" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- App favicon -->
<link rel="shortcut icon" href="../images/favicon.ico">
<!--Form Wizard-->
<link href="../plugins/jquery-steps/jquery.steps.css" rel="stylesheet" type="text/css">
<!-- App css -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/jquery-ui.min.css" rel="stylesheet">
<link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/metisMenu.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/app.min.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@10.16.6/dist/sweetalert2.min.css">
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10.16.6/dist/sweetalert2.min.js"></script>
<!-- inline edit -->
<!-- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"> -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.bundle.min.js"></script>
<script src="https://kit.fontawesome.com/f13e61f9bf.js" crossorigin="anonymous"></script>
<script src="jquery.tabledit.js"></script>
<!-- submit form with button -->
<script>
function formSubmit() {
document.forms["myForm"].submit();
}
</script>
<script type="text/javascript">
$(document).ready(function() {
var articletype = <?php echo $articletype; ?>;
populate_cat_tbl();
$("#add").click(function(e) {
var table = $(this).attr('for-table'); //get the target table selector
var $tr = $(table + ">tbody>tr:last-child").clone(true, true); //clone the last row
var nextID = parseInt($tr.find("input.tabledit-identifier").val()) + 1; //get the ID and add one.
$tr.find("input.tabledit-identifier").val(nextID); //set the row identifier
$tr.find("span.tabledit-identifier").text(nextID); //set the row identifier
$(table + ">tbody").append($tr); //add the row to the table
$tr.find(".tabledit-edit-button").click(); //pretend to click the edit button
$tr.find("input:not([type=hidden]), select").val(""); //wipe out the inputs.
$(this).prop('disabled', true);
$('select[name=idprotectioncategoryid]').prepend("<option value='' selected='selected'>Please Select</option>");
$('select[name=iddpicategoryid]').prepend("<option value='' selected='selected'>Please Select</option>");
});
/*$('#example1').Tabledit({
url: 'logic-edit-delete.php',
columns: {
identifier: [0, 'id'],
editable: [[2, 'idprotectioncategory','<?php echo $idprotectioncategoryJson; ?>'], [3, 'iddpicategory','<?php echo $iddpicategoryJson; ?>']]
},
onDraw: function() {
console.log('onDraw()');
},
onSuccess: function(data, textStatus, jqXHR) {
console.log('onSuccess(data, textStatus, jqXHR)');
console.log(data);
console.log(textStatus);
console.log(jqXHR);
$("#add").prop('disabled', false);
//location.reload();
},
onFail: function(jqXHR, textStatus, errorThrown) {
console.log('onFail(jqXHR, textStatus, errorThrown)');
console.log(jqXHR);
console.log(textStatus);
console.log(errorThrown);
},
onAlways: function() {
console.log('onAlways()');
},
onAjax: function(action, serialize) {
console.log('onAjax(action, serialize)');
console.log(action);
console.log(serialize);
}
});*/
});
function populate_cat_tbl() {
// $.get('cat-table.php', {idtrf:'<?php echo $idtrf; ?>', standardcodetitle:'<?php echo $standardcodetitle ?>', protectioncategorytitle:'<?php echo $protectioncategorytitle; ?>', dpicategorytitle:'<?php echo $dpicategorytitle; ?>', pleaseselectstd:'<?php echo $pleaseselectstd; ?>'}, function(data){
// $('#cat_table_cont').html(data);
// $('#example1').Tabledit({
// url: 'logic-edit-delete.php',
// autoFocus: true,
// columns: {
// identifier: [0, 'id'],
// editable: [[2, 'idprotectioncategory','<?php echo $idprotectioncategoryJson; ?>'], [3, 'iddpicategory','<?php echo $iddpicategoryJson; ?>']]
// },
// editButton: false,
// onDraw: function() {
// // console.log('onDraw()');
// },
// onSuccess: function(data, textStatus, jqXHR) {
// // console.log('onSuccess(data, textStatus, jqXHR)');
// // console.log(data);
// // console.log(textStatus);
// // console.log(jqXHR);
// $("#add").prop('disabled', false);
// populate_cat_tbl();
// /* HIGHLIGHT TR */
// let trID = "#"+data['id'];
// let defBGColor = $(trID).css("background-color");
// let defTxtColor = $(trID).css("color");
// setTimeout(function(){
// $(trID).css({'background-color':'#228B22', 'color':'#F0F8FF'});
// $(trID).fadeOut(300, function(){ $(trID).css({'background-color':defBGColor, 'color':defTxtColor}) }).fadeIn(100);
// } ,200);
// }
// });
// });
$.ajax({
type: "GET",
url: "cat-table.php",
cache: false,
data: {
"idtrf": "<?php echo $idtrf; ?>",
"standardcodetitle": "<?php echo $standardcodetitle ?>",
"protectioncategorytitle": "<?php echo $protectioncategorytitle; ?>",
"dpicategorytitle": "<?php echo $dpicategorytitle; ?>",
"pleaseselectstd": "<?php echo $pleaseselectstd; ?>"
},
success: function(result) {
if (result != '') {
/* POPULATE TABLE */
$('#cat_table_cont').html(result);
/* INITIATE TABLEDIT */
$('#example1').Tabledit({
url: 'logic-edit-delete.php',
autoFocus: true,
columns: {
identifier: [0, 'id'],
editable: [
[2, 'idprotectioncategory', '<?php echo $idprotectioncategoryJson; ?>'],
[3, 'iddpicategory', '<?php echo $iddpicategoryJson; ?>']
]
},
editButton: false,
onSuccess: function(data, textStatus, jqXHR) {
$("#add").prop('disabled', false);
populate_cat_tbl();
/* HIGHLIGHT TR */
let trID = "#" + data['id'];
let defBGColor = $(trID).css("background-color");
let defTxtColor = $(trID).css("color");
setTimeout(function() {
$(trID).css({
'background-color': '#228B22',
'color': '#F0F8FF'
});
$(trID).fadeOut(300, function() {
$(trID).css({
'background-color': defBGColor,
'color': defTxtColor
})
}).fadeIn(100);
}, 200);
}
});
}
}
});
}
</script>
<style>
.table.user-select-none {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
</style>
</head>
<body>
<!-- Top Bar Start -->
<?php include('include/topbar.php'); ?>
<!-- Top Bar End -->
<!-- Left Sidenav -->
<?php include('include/leftsidenav.php'); ?>
<!-- end left-sidenav-->
<div class="page-wrapper">
<!-- Page Content-->
<div class="page-content">
<div class="container-fluid">
<!-- Page-Title -->
<div class="row">
<div class="col-sm-12">
<div class="page-title-box">
<div class="float-right">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="javascript:void(0);"><?php echo $titlepage; ?></a></li>
<li class="breadcrumb-item active">Starter</li>
</ol>
</div>
<h4 class="page-title"><?php echo $titlewb; ?></h4>
</div><!--end page-title-box-->
</div><!--end col-->
</div>
<div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-body">
<div class="media">
<?php include('include/appform.php'); ?>
</div><!--end media-->
</div><!--end card-body-->
</div><!--end card-->
<div id="accordion">
<div class="card">
<div class="card-2" id="headingThree">
<h5 class="mb-0">
<button class="btn btn-link collapsed" data-toggle="collapse" data-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
<?php echo $descriptionstep; ?>
</button>
</h5>
</div>
<div id="collapseThree" class="collapse" aria-labelledby="headingThree" data-parent="#accordion">
<div class="card-body">
<div class="table-responsive">
<table class="table table-success mb-0">
<thead>
<tr>
<th></th>
<th><?php echo $typearticletitle; ?></th>
<th><?php echo $descriptiontitle; ?></th>
<th><?php echo $modeltitle; ?></th>
<th><?php echo $rangemeasuremintitle; ?></th>
<th><?php echo $rangemeasuremaxtitle; ?></th>
<th><?php echo $articlecharacteristictitle; ?></th>
<th><?php echo $registeredmarktitle; ?></th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="uploadimages/<?php echo $sphotofilename; ?>" height="100" alt="" /></td>
<td><span class="badge badge-soft-primary"><?php echo $sname_articletype; ?></span></td>
<td><?php echo $sdescription; ?></td>
<td><?php echo $smodel; ?></td>
<td><?php echo $smeasuremin; ?></td>
<td><?php echo $smeasuremax; ?></td>
<td><span class="badge badge-soft-primary"><?php echo $sname_articlecharacteristic; ?></span></td>
<td><?php echo $sregisteredmark; ?></td>
</tr>
</tbody>
</table><!--end /table-->
<br>
<a href="trfdetails.php?idtrf=<?php echo $idtrf; ?>"><button type="button" class="btn btn-success waves-effect waves-light"><?php echo $edittitle; ?></button> </a>
</div><!--end /tableresponsive-->
</div>
</div>
</div>
</div>
<div class="progress mb-4">
<div class="progress-bar" role="progressbar" style="width: 50%;" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100">50%</div>
</div>
<!-- <div class="card">
<div class="card-body">
<?php include('include/alertcheck.php'); ?>
<h5><?php echo $standardlink; ?></h5>
<p class="text-muted mb-3"><?php echo $standardlink_help; ?></p>
<form class="was-validated" action="standardstep.php" method="post" name="myForm">
<?php
$wa_startindex = 0;
while (!$stdcheck->atEnd()) {
$wa_startindex = $stdcheck->Index;
?>
<?php
$stdcheck->moveNext();
}
$stdcheck->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
?>
</form>
</div>--><!--end card-->
</div><!--end col-->
<?php
$standardselectedlist = new WA_MySQLi_RS("standardselectedlist", $cmctrfdb, 0);
$standardselectedlist->setQuery("SELECT * FROM trfstandards LEFT JOIN standards ON trfstandards.idstandards=standards.idstandards WHERE trfstandards.idtrfdetails='$idtrf'");
$standardselectedlist->execute(); ?>
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<h5><?php echo $assignedstd; ?></h4>
<p class="text-muted mb-3">
<?php echo $assignedstd_help; ?>.
</p>
<div class="table-responsive">
<?php include('include/alertcheck.php'); ?>
<div id="cat_table_cont"></div>
<!--<table class="table table-striped mb-0" id="example1" style="border:1px solide red">
<tr><th style="display:none;">id</th><th><?php echo $standardcodetitle; ?></th><th><?php echo $protectioncategorytitle; ?></th><th><?php echo $dpicategorytitle; ?></th></tr>
<?php while ($rowquery = mysqli_fetch_assoc($row1)) { ?>
<tr>
<td style="display:none;"><?php echo $rowquery['idtrfstandards']; ?></td>
<td><?php echo $rowquery['standardcode']; ?></td>
<?php $nameprotcatrec = html_entity_decode($rowquery['name_protectioncategory']);
//$nameprotcatrec=utf8_encode($nameprotcatrec);
//$nameprotcatrec = iconv('UTF-8', 'windows-1252', $nameprotcatrec);
?>
<td><?php if (isset($rowquery['name_protectioncategory'])) {
echo $nameprotcatrec;
} else { ?><p style="color:red;"><?php echo $pleaseselectstd;
} ?></p></td>
<td><?php if (isset($rowquery['value_dpicategory'])) {
echo $rowquery['value_dpicategory'];
} else {
echo $pleaseselectstd;
} ?></td>
//echo $rowquery['name_protectioncategory']
</tr>
<?php } ?>
</table>-->
<?php include('include/virusquerycheck.php'); ?><br>
<?php
if (isset($_GET['error']) && $_GET['error'] == "tuttiicampidevonoesserericompilati") {
echo '<p style="color: red;">Attenzione: tutti i campi devono essere compilati.</p>';
}
?>
<?php
$conn = mysqli_connect($hostname_cmctrfdb, $username_cmctrfdb, $password_cmctrfdb, $database_cmctrfdb);
if (!$conn) {
die("Connessione al database fallita: " . mysqli_connect_error());
}
// Controllo dei campi nulli
$sql = "SELECT COUNT(*) AS num_rows FROM trfstandards WHERE idtrfdetails = $idtrf AND (idprotectioncategory IS NULL OR iddpicategory IS NULL)";
$resultcat = mysqli_query($conn, $sql);
// Controllo degli errori
if (!$resultcat) {
die("Errore nella query: " . mysqli_error($conn));
}
$row = mysqli_fetch_assoc($resultcat);
// Campi nulli trovati, torna alla pagina standardstep.php e mostra il messaggio di errore
echo '<button onclick="checkParts()" class="btn btn-success waves-effect waves-light">' . $nextsteptitle . '</button>';
if (($articletype == 1) || (!empty($virusstep))) {
echo '<script>
function checkParts() {
var isValid = true;
$("select[name=idprotectioncategory]").each(function() {
if ($(this).val() === "" || $(this).val() === "Seleziona" || $(this).parent("td").find("span").html() == "Please Select" || $(this).parent("td").find("span").html() == "Seleziona") {
isValid = false;
}
});
if (!isValid) {
Swal.fire({
icon: "warning",
title: "Attenzione/Warning",
text: "Devi selezionare la categoria di protezione / Please select Protection category!",
confirmButtonText: "Conferma/Confirm",
showCancelButton: false,
}).then((result) => {
});
} else {
Swal.fire({
icon: "warning",
title: "' . $titlealertstd . '",
text: "' . $textalertstd . '",
confirmButtonText: "' . $confirmButtonTextalertstd . '",
showCancelButton: true,
cancelButtonText: "' . $cancelButtonTextalertstdandard . '"
}).then((result) => {
if (result.isConfirmed) {
window.location.href = "additionalinfo.php?idtrf=' . $idtrf . '&codestep=3";
} else if (result.dismiss === Swal.close) {
alert("' . $alertTextstd . '");
}
});
}
}
</script>';
} else {
echo '<script>
function checkParts() {
var isValid = true;
$("select[name=idprotectioncategory]").each(function() {
if ($(this).val() === "" || $(this).val() === "Seleziona" || $(this).parent("td").find("span").html() == "Please Select" || $(this).parent("td").find("span").html() == "Seleziona") {
isValid = false;
}
});
if (!isValid) {
Swal.fire({
icon: "warning",
title: "Warning",
text: "Please select Protection category!",
confirmButtonText: "Confirm",
showCancelButton: false,
}).then((result) => {
});
} else {
Swal.fire({
icon: "warning",
title: "' . $titlealertstd . '",
text: "' . $textalertstd . '",
confirmButtonText: "' . $confirmButtonTextalertstd . '",
showCancelButton: true,
cancelButtonText: "' . $cancelButtonTextalertstdandard . '"
}).then((result) => {
if (result.isConfirmed) {
window.location.href = "addrequirements.php?idtrf=' . $idtrf . '&codestep=3";
} else if (result.dismiss === Swal.close) {
alert("' . $alertTextstd . '");
}
});
}
}
</script>';
}
?>
<button type="button" class="btn btn-dark waves-effect waves-light" onclick="history.back()"><?php echo $backstep; ?></button>
<!--end /table-->
</div><!--end /tableresponsive-->
</div><!--end card-body-->
</div><!--end card-->
</div>
</div>
<!-- end page title end breadcrumb -->
</div><!-- container -->
<!-- footer start -->
<?php include('include/footer.php'); ?>
</footer><!--end footer-->
</div>
<!-- end page content -->
</div>
<!-- end page-wrapper -->
<!-- jQuery -->
<!-- <script src="assets/js/jquery.min.js"></script> -->
<script src="assets/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/metismenu.min.js"></script>
<script src="assets/js/waves.js"></script>
<script src="assets/js/feather.min.js"></script>
<script src="assets/js/jquery.slimscroll.min.js"></script>
<script src="assets/js/jquery-ui.min.js"></script>
<script src="../plugins/jquery-steps/jquery.steps.min.js"></script>
<script src="assets/pages/jquery.form-wizard.init.js"></script>
<!-- App js -->
<script src="assets/js/app.js"></script>
<script>
function getSelectOptions(standardId, selectName, currentValue) {
let thisOptions = [];
let totalOptionsCount = 0;
if (selectName == 'iddpicategory') {
thisOptions = JSON.parse('<?php echo $iddpicategoryperStdJson; ?>'); /* GET LIST OF dpi category PER STANDARD */
} else if (selectName == 'idprotectioncategory') {
thisOptions = JSON.parse('<?php echo $idprotectioncategoryperStdJson; ?>'); /* GET LIST OF protection category PER STANDARD */
}
totalOptionsCount = Object.keys(thisOptions[standardId]).length;
$("[name='" + selectName + "']").empty(); /* CLEAR SELECT OPTIONS */
$("[name='" + selectName + "']").append('<option value=\'\'><?php echo $pleaseselectstd; ?></option>'); /* ADD EMPTY OPTION */
Object.keys(thisOptions[standardId]).forEach(function(key) {
if (totalOptionsCount == 1) {
/* IF SELECT HAS ONLY 1 OPTION, SET AS "SELECTED" */
currentValue = key;
$("[name='" + selectName + "']").empty(); /* REMOVE EMPTY OPTION */
}
/* POPULATE SELECT OPTIONS BASED ON STANDARD*/
if (currentValue == key) {
$("[name='" + selectName + "']").append('<option value=' + key + ' selected=\'selected\'>' + thisOptions[standardId][key] + '</option>');
} else {
$("[name='" + selectName + "']").append('<option value=' + key + '>' + thisOptions[standardId][key] + '</option>');
}
});
if (totalOptionsCount == 1) {
/* TRIGGER ONCHANGE EVENT */
$("[name='" + selectName + "']").change();
}
}
</script>
<script type="text/javascript">
$(document).ready(function() {
function checkProtectionCategory() {
var isValid = true;
$('select[name="idprotectioncategory"]').each(function() {
if ($(this).val() === '' || $(this).find('option:selected').text() === 'Seleziona') {
isValid = false;
}
});
return isValid;
}
$('#nextStepButton').click(function(e) {
if (!checkProtectionCategory()) {
Swal.fire({
icon: "warning",
title: "Devi selezionare una categoria di protezione",
confirmButtonText: "OK"
});
e.preventDefault();
} else {
// proceed to next step
window.location.href = "additionalinfo.php?idtrf=<?php echo $idtrf; ?>&codestep=3";
}
});
});
</script>
</body>
</html>
-481
View File
@@ -1,481 +0,0 @@
<?php
//You shall use the following exact namespaces no
//matter in whathever directory you upload your
//phpmailer files.
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
include('include/headscript.php'); ?>
<?php
// pickup the get variable
if (isset($_POST["idtrf"])) {
$idtrf = $_POST["idtrf"];
}
if (isset($_GET["idtrf"])) {
$idtrf = $_GET["idtrf"];
}
if (isset($_POST["tokensignatureon"])) {
$tokensignatureon = $_POST["tokensignatureon"];
}
if (isset($_POST["clientname"])) {
$clientname = $_POST["clientname"];
}
if (isset($_POST["datetrf"])) {
$datetrf = $_POST["datetrf"];
}
if (isset($_POST["sndrpt"])) {
$sndrpt = $_POST["sndrpt"];
} else {
$sndrpt = "N";
}
if (isset($_POST["adminconfirm"])) {
$adminconfirm = $_POST["adminconfirm"];
} else {
$adminconfirm = "N";
}
if (isset($_GET["codestep"])) {
$code = $_GET["codestep"];
$InsertQuery = new WA_MySQLi_Query($cmctrfdb);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "wheretrfstep";
$InsertQuery->bindColumn("idtrf", "i", "$idtrf", "WA_DEFAULT");
$InsertQuery->bindColumn("code", "i", "$code", "WA_DEFAULT");
$InsertQuery->saveInSession("");
$InsertQuery->execute();
$InsertGoTo = "";
$InsertQuery->redirect($InsertGoTo);
}
?>
<?php
$tokenid = $user->present()->signaturecode;
if ($tokenid != $tokensignatureon) {
header("Location: declaration.php?idtrf=$idtrf&tokenresult=ko");
} else {
// update trf details`
if (isset($_POST["formdeclaration"])) {
if ($sndrpt == 'N') {
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "`trf-details`";
$UpdateQuery->bindColumn("signedon", "s", "$datetrf", "WA_DEFAULT");
$UpdateQuery->bindColumn("revcs", "s", "N", "WA_DEFAULT");
$UpdateQuery->addFilter("idtrfdetails", "=", "i", "" . ($idtrf) . "");
$UpdateQuery->execute();
$UpdateGoTo = "";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo ? rel2abs($UpdateGoTo, dirname(__FILE__)) : "";
$UpdateQuery->redirect($UpdateGoTo);
} else {
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "`trf-details`";
$UpdateQuery->bindColumn("signedonsecondcert", "s", "$datetrf", "WA_DEFAULT");
$UpdateQuery->bindColumn("revcs", "s", "N", "WA_DEFAULT");
$UpdateQuery->addFilter("idtrfdetails", "=", "i", "" . ($idtrf) . "");
$UpdateQuery->execute();
$UpdateGoTo = "";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo ? rel2abs($UpdateGoTo, dirname(__FILE__)) : "";
$UpdateQuery->redirect($UpdateGoTo);
}
}
?>
<?php
$trfnumberfinal = new WA_MySQLi_RS("trfnumberfinal", $cmctrfdb, 1);
$trfnumberfinal->setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.idtrfdetails='$idtrf'");
$trfnumberfinal->execute();
$idcertn = $trfnumberfinal->getColumnVal("idcertification");
$idarticletype = $trfnumberfinal->getColumnVal("idarticletype");
$appformn = $trfnumberfinal->getColumnVal("trfnumber");
$ntrfmail = $trfnumberfinal->getColumnVal("trfnumber");;
$revnumb = $trfnumberfinal->getColumnVal("revtrf");
?>
<?php $idcert = $trfnumberfinal->getColumnVal("idcertification") ?>
<?php
$certname = new WA_MySQLi_RS("certname", $cmctrfdb, 1);
$certname->setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcert'");
$certname->execute(); ?>
<?php
$chemicalagentlist = new WA_MySQLi_RS("chemicalagentlist", $cmctrfdb, 0);
$chemicalagentlist->setQuery("SELECT * FROM chemicalagent ORDER BY chemicalagent.name_chemicalagent");
$chemicalagentlist->execute();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title><?php echo $titlepage; ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta content="<?php echo $ownercompanyname; ?> TRF Portal" name="description" />
<meta content="" name="author" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- App favicon -->
<link rel="shortcut icon" href="../images/favicon.ico">
<!--Form Wizard-->
<link href="../plugins/jquery-steps/jquery.steps.css" rel="stylesheet" type="text/css">
<!-- App css -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/jquery-ui.min.css" rel="stylesheet">
<link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/metisMenu.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/app.min.css" rel="stylesheet" type="text/css" />
<!-- submit form with button -->
<style>
input:invalid {
border-color: #ff0000;
background-color: #fff7e6;
}
input:focus {
background: yellow;
}
input:valid {
border-color: #66ff33;
background-color: #eeffe6;
}
select:invalid {
border-color: #ff0000;
background-color: #fff7e6;
}
select:focus {
background-color: yellow;
}
select:valid {
border-color: #66ff33;
background-color: #eeffe6;
}
</style>
<style>
body {
font-family: arial;
}
.hide {
display: none;
}
p {
font-weight: bold;
}
</style>
<script>
function formSubmit() {
document.forms["myForm"].submit();
}
</script>
<script>
function show1() {
document.getElementById('div1').style.display = 'none';
}
function show2() {
document.getElementById('div1').style.display = 'block';
}
function show3() {
document.getElementById('div3').style.display = 'none';
}
function show4() {
document.getElementById('div3').style.display = 'block';
}
function show5() {
document.getElementById('div5').style.display = 'none';
}
function show6() {
document.getElementById('div5').style.display = 'block';
}
</script>
</head>
<body>
<!-- Top Bar Start -->
<?php include('include/topbar.php'); ?>
<!-- Top Bar End -->
<!-- Left Sidenav -->
<?php include('include/leftsidenav2.php'); ?>
<!-- end left-sidenav-->
<div class="page-wrapper">
<!-- Page Content-->
<div class="page-content">
<div class="container-fluid">
<!-- Page-Title -->
<div class="row">
<div class="col-sm-12">
<div class="page-title-box">
<div class="float-right">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="javascript:void(0);"><?php echo $titlepage; ?></a></li>
<li class="breadcrumb-item active">Starter</li>
</ol>
</div>
<h4 class="page-title"><?php echo $titlewb; ?></h4>
</div><!--end page-title-box-->
</div><!--end col-->
</div>
<div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-body">
<div class="media">
<?php include('include/appform.php'); ?>
</div><!--end media-->
</div><!--end card-body-->
</div><!--end card-->
<div class="progress mb-4">
<div class="progress-bar" role="progressbar" style="width: 100%;" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">100%</div>
</div>
<!-- card for optional TRF -->
<?php //pdf creation
include('pdf-creation.php');
//if ($idcertificate==1 or $idcertificate==3 or $idcertificate==4)
//{
//include('pdf-creation2.php'); }
// attachment
$checkpdffiles = new WA_MySQLi_RS("checkpdffiles", $cmctrfdb, 1);
$checkpdffiles->setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.idtrfdetails='$idtrf'");
$checkpdffiles->execute();
$path = 'pdf';
$filename1 = $checkpdffiles->getColumnVal("pdffilename");
$file1 = $path . "/" . $filename1;
if (!empty($checkpdffiles->getColumnVal("pdffilename2"))) {
$filename2 = $checkpdffiles->getColumnVal("pdffilename2");
$file2 = $path . "/" . $filename2;
}
//Now include the following following files based
//on the correct file path. Third file is required only if you want to enable SMTP.
require 'phpmailer/src/Exception.php';
require 'phpmailer/src/PHPMailer.php';
require 'phpmailer/src/SMTP.php';
//mail to client
$mail = new PHPMailer(true);
try {
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = $mailhost; // Specify main and backup server
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = $mailusername; // SMTP username
$mail->Password = $mailpassword; // SMTP password
$mail->SMTPSecure = $mailmethod; // Enable encryption, 'ssl' also accepted
$mail->Port = $mailport;
$mmessage = "mailtrf";
include('include/mailhtml.php');
// Email body content
$trfnmbmail = $appformn . 'r' . $revnumb;
$htmlContent = $mailmessage1;
$mail->From = $fromaddresssmail;
$mail->FromName = 'CIMAC Application Form System';
$mail->addAddress($emailuser); // Add a recipient
$mail->addAttachment($file1); // Add attachments
if (!empty($checkpdffiles->getColumnVal("pdffilename2"))) {
$mail->addAttachment($file2);
} // Optional name
$mail->Subject = $appformn . 'r' . $revnumb;
$mail->Body = $htmlContent;
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if ($adminconfirm == 'N') {
$mail->send();
}
// echo 'Message has been sent';
} catch (Exception $e) {
echo "Message could not be sent CL. Mailer Error: {$mail->ErrorInfo}";
}
// mail to CS
$mail = new PHPMailer(true);
try {
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = $mailhost; // Specify main and backup server
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = $mailusername; // SMTP username
$mail->Password = $mailpassword; // SMTP password
$mail->SMTPSecure = $mailmethod; // Enable encryption, 'ssl' also accepted
$mail->Port = $mailport;
$mmessage = "mailtrf";
// Email body content
$htmlContent = $mailmessage1;
$mail->From = $fromaddresssmail;
$mail->FromName = 'CIMAC Application Form System';
if (!empty($csmail)) {
$mail->addAddress($csmail); // Aggiunge il destinatario solo se non è vuoto
}
if (!empty($csmail2)) {
$mail->addAddress($csmail2);
}
if (!empty($csmail3)) {
$mail->addAddress($csmail3);
}
if (!empty($csmailccn)) {
$mail->addBCC($csmailccn);
}
$mail->Subject = $appformn . 'r' . $revnumb;;
$mail->Body = "Ciao! E' stato inserito un nuovo ETRF N. $trfnmbmail ";
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if ($adminconfirm == 'N') {
$mail->send();
}
// echo 'Message has been sent';
} catch (Exception $e) {
echo "Message could not be sent CS. Mailer Error: {$mail->ErrorInfo}";
}
// mail REV to CS
// if rev is > 0
if ($revnumb > 0) {
//query to see the previous CS in charge
$revnumberprev = $revnumb - 1;
$trfprevrev = new WA_MySQLi_RS("trfprevrev", $cmctrfdb, 1);
$trfprevrev->setQuery("SELECT * FROM `trf-details` LEFT JOIN company ON `trf-details`.idcompany=company.idcompany WHERE `trf-details`.trfnumber='$ntrfmail' AND `trf-details`.revtrf='$revnumberprev'");
$trfprevrev->execute();
$csinchargeprev = $trfprevrev->getColumnVal("csincharge");
if ($csinchargeprev == 'ddondena') {
$mailincharge = 'd.dondena@cimac.it';
} elseif ($csinchargeprev == 'cboscaino') {
$mailincharge = 'c.boscaino@cimac.it';
} elseif ($csinchargeprev == 'solocla') {
$mailincharge = 'info@acscreativesolutions.com';
} else {
$mailincharge = 'd.dondena@cimac.it';
}
// Define array with all CS mails
$csmailall = array($csmail, $csmail3);
// Extract the recipient that matches $mailincharge
$recipientTo = $mailincharge;
$recipientsCC = array_diff($csmailall, array($recipientTo));
$mail = new PHPMailer(true);
try {
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = $mailhost; // Specify main and backup server
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = $mailusername; // SMTP username
$mail->Password = $mailpassword; // SMTP password
$mail->SMTPSecure = $mailmethod; // Enable encryption, 'ssl' also accepted
$mail->Port = $mailport;
$mmessage = "mailtrf";
// Email body content
$htmlContent = $mailmessage1;
$mail->From = $fromaddresssmail;
$mail->FromName = 'CIMAC Application Form System';
$mail->addAddress($recipientTo); // Add the recipient in "To" field
foreach ($recipientsCC as $ccRecipient) {
$mail->addCC($ccRecipient); // Add recipients in "CC" field
}
$companynamemail = $trfprevrev->getColumnVal("companyname_company");
$descart = $trfprevrev->getColumnVal("sample_description");
$mail->Subject = $appformn . 'r' . $revnumb;
if ($_SESSION['langselect'] == 'it') {
// Imposta il testo in italiano
$mail->Body = "Ciao $csinchargeprev! <br> È stato inserito un nuovo ETRF N. $trfnmbmail.<br><br>" .
"Ragione Sociale = $companynamemail<br><br>" .
"Descrizione articolo $descart.<br>";
} else if ($_SESSION['langselect'] == 'en') {
// Imposta il testo in inglese
$mail->Body = "Hi $csinchargeprev! <br> A new ETRF No. $trfnmbmail has been submitted.<br><br>" .
"Company Name = $companynamemail<br><br>" .
"Item Description $descart.<br>";
} else {
// Imposta un valore di default o gestisci l'errore
$mail->Body = "Language setting is not recognized.";
}
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if ($adminconfirm == 'N') {
$mail->send();
}
// echo 'Message has been sent';
} catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
}
// exit();
/*
//$filename = $filepathname;
$path = 'pdf';
$file1 = $path . "/" . $filename1;
$file2 = $path . "/" . $filename2;
// Recipient
$to = $emailuser;
// Sender
$from = $fromaddresssmail;
$fromName = 'CIMAC Application Form System';
// Email subject
$subject = $appformn;
// Attachment file
$file = $file1;
$mmessage="mailtrf";
include('include/mailhtml.php');
// Email body content
$htmlContent = $mailmessage1;
// Header for sender info
$headers = "From: $fromName"." <".$from.">";
// Boundary
$semi_rand = md5(time());
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
// Headers for attachment
$headers .= "\nMIME-Version: 1.0\n" . "Content-Type: multipart/mixed;\n" . " boundary=\"{$mime_boundary}\"";
// Multipart boundary
$message = "--{$mime_boundary}\n" . "Content-Type: text/html; charset=\"UTF-8\"\n" .
"Content-Transfer-Encoding: 7bit\n\n" . $htmlContent . "\n\n";
// Preparing attachment
if(!empty($file) > 0){
if(is_file($file)){
$message .= "--{$mime_boundary}\n";
$fp = @fopen($file,"rb");
$data = @fread($fp,filesize($file));
@fclose($fp);
$data = chunk_split(base64_encode($data));
$message .= "Content-Type: application/octet-stream; name=\"".basename($file)."\"\n" .
"Content-Description: ".basename($file)."\n" .
"Content-Disposition: attachment;\n" . " filename=\"".basename($file)."\"; size=".filesize($file).";\n" .
"Content-Transfer-Encoding: base64\n\n" . $data . "\n\n";
}
}
$message .= "--{$mime_boundary}--";
$returnpath = "-f" . $from;
// Send email
$mail = @mail($to, $subject, $message, $headers, $returnpath);
*/
}
?>
<div class="card">
<div class="card-body">
<h4 class="mt-0 header-title"><?php echo $sendtitle; ?></h4>
<br><br>
<p><?php echo $companyname; ?> <?php echo $sendsentence; ?></p><br>
</div><!--end card-body-->
</div><!--end card-->
</div><!--end col-->
</div>
<!-- end page title end breadcrumb -->
</div><!-- container -->
<!-- footer start -->
<?php include('include/footer.php'); ?>
</footer><!--end footer-->
</div>
<!-- end page content -->
</div>
<!-- end page-wrapper -->
<!-- jQuery -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/metismenu.min.js"></script>
<script src="assets/js/waves.js"></script>
<script src="assets/js/feather.min.js"></script>
<script src="assets/js/jquery.slimscroll.min.js"></script>
<script src="assets/js/jquery-ui.min.js"></script>
<script src="../plugins/jquery-steps/jquery.steps.min.js"></script>
<script src="assets/pages/jquery.form-wizard.init.js"></script>
<!-- App js -->
<script src="assets/js/app.js"></script>
</body>
</html>
-607
View File
@@ -1,607 +0,0 @@
<?php
include('include/headscript.php'); ?>
<?php
// pickup the get variable
if (isset($_GET["idtrf"])) {
$idtrf = $_GET["idtrf"];
}
if (isset($_GET["codestep"])) {
$code = "8";
$InsertQuery = new WA_MySQLi_Query($cmctrfdb);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "wheretrfstep";
$InsertQuery->bindColumn("idtrf", "i", "$idtrf", "WA_DEFAULT");
$InsertQuery->bindColumn("code", "i", "$code", "WA_DEFAULT");
$InsertQuery->saveInSession("");
$InsertQuery->execute();
$InsertGoTo = "";
$InsertQuery->redirect($InsertGoTo);
}
?>
<?php
$trfnumberfinal = new WA_MySQLi_RS("trfnumberfinal", $cmctrfdb, 1);
$trfnumberfinal->setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.idtrfdetails='$idtrf'");
$trfnumberfinal->execute();
$idcertn = $trfnumberfinal->getColumnVal("idcertification");
?>
<?php $idcert = $trfnumberfinal->getColumnVal("idcertification"); ?>
<?php
$certname = new WA_MySQLi_RS("certname", $cmctrfdb, 1);
$certname->setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcert'");
$certname->execute(); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>TRF <?php echo $ownercompanyname; ?> </title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta content="<?php echo $ownercompanyname; ?> TRF Portal" name="description" />
<meta content="" name="author" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- App favicon -->
<link rel="shortcut icon" href="../images/favicon.ico">
<!--Form Wizard-->
<link href="../plugins/jquery-steps/jquery.steps.css" rel="stylesheet" type="text/css">
<!-- App css -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/jquery-ui.min.css" rel="stylesheet">
<link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/metisMenu.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/app.min.css" rel="stylesheet" type="text/css" />
<!-- submit form with button -->
<script>
function formSubmit() {
document.forms["myForm"].submit();
}
</script>
<!-- upload image script -->
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script>
$(document).ready(function() {
$(".upload-doc").click(function() {
$(".form-horizontal").ajaxForm({
target: '.preview'
}).submit();
});
});
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<style>
/* Add this CSS to your styles */
.custom-file-upload {
display: inline-block;
padding: 6px 12px;
cursor: pointer;
background: #28a745;
color: white;
border-radius: 0.25rem;
margin-right: 10px;
}
.file-name-display {
border: 1px solid #ccc;
padding: 6px 12px;
display: inline-block;
width: auto;
min-width: 120px;
margin-right: 10px;
text-align: left;
}
.upload-div {
display: flex;
align-items: center;
gap: 10px;
}
</style>
</head>
<body>
<!-- Top Bar Start -->
<?php include('include/topbar.php'); ?>
<!-- Top Bar End -->
<!-- Left Sidenav -->
<?php include('include/leftsidenav.php'); ?>
<!-- end left-sidenav-->
<div class="page-wrapper">
<!-- Page Content-->
<div class="page-content">
<div class="container-fluid">
<!-- Page-Title -->
<div class="row">
<div class="col-sm-12">
<div class="page-title-box">
<div class="float-right">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="javascript:void(0);">TRF</a></li>
<li class="breadcrumb-item active">Starter</li>
</ol>
</div>
<h4 class="page-title"><?php echo $titlewb; ?></h4>
</div><!--end page-title-box-->
</div><!--end col-->
</div>
<div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-body">
<div class="media">
<?php include('include/appform.php'); ?>
</div><!--end media-->
</div><!--end card-body-->
</div><!--end card-->
<div class="progress mb-4">
<div class="progress-bar" role="progressbar" style="width: 95%;" aria-valuenow="95" aria-valuemin="0" aria-valuemax="100">95%</div>
</div>
<?php // photos
?>
<?php if (($trfnumberfinal->getColumnVal("idcertification") != '5') and ($trfnumberfinal->getColumnVal("idcertification") != '6')) { ?>
<div class="card">
<div class="card-body">
<h4 class="mt-0"><?php echo $addphotosdoc; ?> <i class="fas fa-info-circle" data-toggle="modal" data-animation="bounce" data-target=".bs-example-modal-center5"></i>
<div class="modal fade bs-example-modal-center5" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title mt-0" id="exampleModalLabel"><?php echo $m18btitle; ?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Foto frontale e laterale
</p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</h4>
<p class="text-muted mb-3"><?php echo $allowedkind; ?></p>
<table id="photoaded">
<tr>
<?php
$photoshoesside = "";
$photoshoessole = "";
if ($trfnumberfinal->getColumnVal("idarticletype") == '1') {
$photo1 = $photoshoesside;
$photo2 = $photoshoessole;
} elseif ($trfnumberfinal->getColumnVal("idarticletype") == '2') {
$photo1 = $photogloveup;
$photo2 = $photoglovebottom;
} elseif ($trfnumberfinal->getColumnVal("idarticletype") == '3') {
$photo1 = $photomasksidea;
$photo2 = $photomasksideb;
} ?>
<th><?php echo $photo1; ?></th>
<th></th>
<th><?php echo $photo2; ?></th>
</tr>
<tr>
<td>
<div class="upload-div">
<!-- File upload form -->
<form id="uploadFormphoto" enctype="multipart/form-data">
<label for="fileInput1" class="custom-file-upload"><?php echo $browsebotton; ?></label>
<div class="file-name-display" onclick="document.getElementById('fileInput1').click();"><?php echo $nofilechoosen; ?></div>
<input type="file" name="docphotoone[]" id="fileInput1" style="display: none;" onchange="updateFileName(1)">
<input type="hidden" name="idtrf" id="idtrf" value="<?php echo $trfnumberfinal->getColumnVal("idtrfdetails"); ?>">
<input type="submit" name="submit" value="UPLOAD" />
</form>
<!-- Display upload status -->
<div id="uploadStatus1"></div>
</div>
</td>
<td></td>
<td>
<div class="upload-div">
<!-- File upload form -->
<form id="uploadFormphototwo" enctype="multipart/form-data">
<label for="fileInput2" class="custom-file-upload"><?php echo $browsebotton; ?></label>
<div class="file-name-display" onclick="document.getElementById('fileInput2').click();"><?php echo $nofilechoosen; ?></div>
<input type="file" name="docphototwo[]" id="fileInput2" style="display: none;" onchange="updateFileName(2)">
<input type="hidden" name="idtrf" id="idtrf" value="<?php echo $trfnumberfinal->getColumnVal("idtrfdetails"); ?>">
<input type="submit" name="submit" value="UPLOAD" />
</form>
<!-- Display upload status -->
<div id="uploadStatus2"></div>
</div>
<script>
// Add this script to handle the filename display
function updateFileName(index) {
var input = document.getElementById('fileInput' + index);
var fileNameDisplay = document.querySelector('.upload-div #uploadStatus' + index);
fileNameDisplay.textContent = input.files[0].name || 'No file chosen';
}
</script>
</div>
</td>
</tr>
<tr>
<td id="cont_photoone">
<?php if (!empty($trfnumberfinal->getColumnVal("photoone"))) { ?>
<img src="uploaddocuments/<?php echo ($trfnumberfinal->getColumnVal("photoone")); ?>" height="200" alt="" />
<?php } ?>
</td>
<td>
</td>
<td id="cont_phototwo">
<?php if (!empty($trfnumberfinal->getColumnVal("phototwo"))) { ?>
<img src="uploaddocuments/<?php echo ($trfnumberfinal->getColumnVal("phototwo")); ?>" height="200" alt="" />
<?php } ?>
</td>
</tr>
</table>
<br>
</div><!--end card-body-->
</div><!--end card--><?php } ?>
<?php // documents
?>
<div class="card">
<div class="card-body">
<h4 class="mt-0"><?php echo $adddoctitle; ?> <i class="fas fa-info-circle" data-toggle="modal" data-animation="bounce" data-target=".bs-example-modal-center5"></i>
<div class="modal fade bs-example-modal-center5" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title mt-0" id="exampleModalLabel"><?php echo $m18btitle; ?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p><?php echo nl2br($documenthelp); ?>
</p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</h4>
<?php if ($idcert != 5) { ?>
<p class="text-muted mb-3"><?php echo $adddoctitle_help; ?></p>
<?php } else { ?>
<p class="text-muted mb-3"><?php echo $auditdocumenttitle; ?></p>
<?php } ?>
<div class="upload-div">
<!-- File upload form -->
<form id="uploadForm" enctype="multipart/form-data">
<div class="form-group row">
<label for="validationTooltip01" class="col-sm-5 col-form-label"><?php echo $filedescription; ?></label>
<div class="col-sm-7">
<input type="text" class="form-control" id="validationTooltip01" name="filedescription" placeholder="<?php echo $filedescription; ?>" required="">
</div>
</div>
<div class="form-group row">
<label class="col-sm-4 col-form-label"><?php echo $selectfileonyourpc; ?></label>
<div class="col-sm-8">
<div class="custom-file">
<input type="file" class="custom-file-input" id="fileInput" name="doc[]" onchange="document.getElementById('fileInputLabel').innerHTML = document.getElementById('fileInput').files[0].name">
<label class="custom-file-label" for="fileInput" id="fileInputLabel"><?php echo $nofilechoosen; ?></label>
</div>
</div>
</div>
<input type="hidden" name="idtrf" id="idtrf" value="<?php echo $trfnumberfinal->getColumnVal("idtrfdetails"); ?>">
<input type="submit" class="btn btn-primary" name="submit" value="UPLOAD" />
</form>
<script>
// Assicurati che questo script sia incluso dopo il form o prima della chiusura del tag body
document.getElementById('fileInput').onchange = function() {
// Verifica se un file è stato selezionato
if (this.files && this.files.length > 0) {
// Aggiorna il testo della label con il nome del file
document.getElementById('fileInputLabel').innerHTML = this.files[0].name;
} else {
// Se non è stato selezionato nessun file, mostra il testo di default
document.getElementById('fileInputLabel').innerHTML = '<?php echo $nofilechoosen; ?>';
}
};
</script>
<!-- Display upload status -->
<div id="uploadStatus"></div>
</div>
<br>
</div><!--end card-body-->
</div><!--end card-->
<div class="card" id="provacla">
<?php
$filenamelist = new WA_MySQLi_RS("filenamelist", $cmctrfdb, 0);
$filenamelist->setQuery("SELECT * FROM fileattached WHERE fileattached.idtrfdetails='$idtrf'");
$filenamelist->execute();
?>
<div class="card-body">
<h4 class="mt-0 header-title"><?php echo $addeddoctitle; ?></h4>
<p class="text-muted mb-3"><?php echo $addeddoctitle_help; ?></p>
<div class="upload-div">
<!-- File upload form -->
<div class="card-body">
<div class="table-responsive" id="docadded">
<table class="table table-striped mb-0">
<thead>
<tr>
<th><?php echo $filenametitle; ?></th>
<th><?php echo $filenamedesc; ?></th>
<th><?php echo $actiondel; ?></th>
</tr>
</thead>
<tbody id="cont_file">
<?php
$wa_startindex = 0;
while (!$filenamelist->atEnd()) {
$wa_startindex = $filenamelist->Index;
?>
<tr>
<td>
<a href="uploaddocuments/<?php echo ($filenamelist->getColumnVal("filename_fileattached")); ?>" target="_blank"><?php echo $filesent; ?></a>
</td>
<td><?php echo ($filenamelist->getColumnVal("description_fileattached")); ?></td>
<td>
<a href="deleteaddedoc.php?idtrf=<?php echo $idtrf; ?>&idadddoc=<?php echo ($filenamelist->getColumnVal("idfileattached")); ?>"><i class="fas fa-trash-alt text-danger font-16"></i></a>
</td>
</tr>
<?php
$filenamelist->moveNext();
}
$filenamelist->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
?>
</tbody>
</table><br>
<a href="trfoption.php?idtrf=<?php echo $idtrf; ?>&codestep=8"><button type="button" class="btn btn-success waves-effect waves-light"><?php echo $nextsteptitle; ?></button> </a>
<button type="button" class="btn btn-dark waves-effect waves-light" onclick="window.location.href='identificationparts.php?idtrf=<?php echo $idtrf; ?>'"><?php echo $backstep; ?></button>
<!--end /table-->
</div><!--end /tableresponsive-->
</div>
</div>
<br>
</div><!--end card-body-->
</div><!--end card-->
</div><!--end col-->
</div>
<!-- end page title end breadcrumb -->
</div><!-- container -->
<!-- footer start -->
<?php include('include/footer.php'); ?>
</footer><!--end footer-->
</div>
<!-- end page content -->
</div>
<!-- end page-wrapper -->
<script>
var match = [
"application/pdf",
"application/msword", // per i file .doc
"application/vnd.openxmlformats-officedocument.wordprocessingml.document", // per i file .docx
"image/jpg",
"image/jpeg",
"image/gif",
"application/xls",
"application/xlsx",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"application/vnd.ms-excel.sheet.macroEnabled.12",
"image/png",
"image/bmp"
];
$(document).ready(function() {
// File upload via Ajax
$("#uploadForm").on('submit', function(e) {
e.preventDefault();
$.ajax({
type: 'POST',
url: 'uploadfile.php',
data: new FormData(this),
contentType: false,
cache: false,
processData: false,
beforeSend: function() {
$('#uploadStatus').html('<img src="../images/uploading.gif"/>');
},
error: function() {
$('#uploadStatus').html('<span style="color:#EA4335;">File upload failed, please try again.<span>');
},
success: function(data) {
$('#uploadForm')[0].reset();
$('#uploadStatus').html('<span style="color:#28A74B;">File uploaded successfully.<span>');
// $('.gallery').html(data);
// $("#docadded").load(location.href + " #docadded");
// SHOW UPLOADED FILE
$('#cont_file').html(data);
}
});
});
// File type validation
$("#fileInput").change(function() {
var fileLength = this.files.length;
// var match= ["application/pdf","application/msword","image/jpg","image/gif","application/xls","application/xlsx", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"];
var i;
for (i = 0; i < fileLength; i++) {
var file = this.files[i];
var imagefile = file.type;
// if(!((imagefile==match[0]) || (imagefile==match[1]) || (imagefile==match[5]) || (imagefile==match[6]) || (imagefile==match[7]) || (imagefile==match[8]))){
// alert('Please select a valid file (PDF, word, excel).');
// $("#fileInput").val('');
// return false;
// }
if (!match.includes(imagefile)) {
alert('Please select a valid file (PDF, word, excel).');
$("#fileInput").val('');
return false;
}
}
});
});
</script>
<script>
$(document).ready(function() {
// File upload via Ajax
$("#uploadFormphoto").on('submit', function(e) {
e.preventDefault();
$.ajax({
type: 'POST',
url: 'uploadphotofile.php',
data: new FormData(this),
contentType: false,
cache: false,
processData: false,
beforeSend: function() {
$('#uploadStatus1').html('<img src="../images/uploading.gif"/>');
},
error: function() {
$('#uploadStatus1').html('<span style="color:#EA4335;">File upload failed, please try again.<span>');
},
success: function(data) {
$('#uploadFormphoto')[0].reset();
$('#uploadStatus1').html('<span style="color:#28A74B;">File uploaded successfully.<span>');
// $('.gallery').html(data);
// $("#photoaded").load(location.href + " #photoaded");
// SHOW PHOTO 1
$('#cont_photoone').html(data);
}
});
});
// File type validation
$("#fileInput1").change(function() {
var fileLength = this.files.length;
// var match= ["application/pdf","application/msword","image/jpg","image/gif","application/xls","application/xlsx", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"];
var i;
for (i = 0; i < fileLength; i++) {
var file = this.files[i];
var imagefile = file.type.toLowerCase();
if (!((imagefile == match[2]) || (imagefile == match[3]) || (imagefile == match[4]) || (imagefile == match[9]) || (imagefile == match[10]))) {
alert('Please select a valid file (jpg, jpeg, png, bmp).');
$("#fileInput1").val('');
return false;
}
}
});
});
</script>
<script>
$(document).ready(function() {
// File upload via Ajax
$("#uploadFormphototwo").on('submit', function(e) {
e.preventDefault();
$.ajax({
type: 'POST',
url: 'uploadphotofile2.php',
data: new FormData(this),
contentType: false,
cache: false,
processData: false,
beforeSend: function() {
$('#uploadStatus2').html('<img src="../images/uploading.gif"/>');
},
error: function() {
$('#uploadStatus2').html('<span style="color:#EA4335;">File upload failed, please try again.<span>');
},
success: function(data) {
$('#uploadFormphototwo')[0].reset();
$('#uploadStatus2').html('<span style="color:#28A74B;">File uploaded successfully.<span>');
// $('.gallery').html(data);
// $("#photoaded").load(location.href + " #photoaded");
// SHOW PHOTO 2
$('#cont_phototwo').html(data);
}
});
});
// File type validation
$("#fileInput2").change(function() {
var fileLength = this.files.length;
// var match= ["application/pdf","application/msword","image/jpg","image/gif","application/xls","application/xlsx", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"];
var i;
for (i = 0; i < fileLength; i++) {
var file = this.files[i];
var imagefile = file.type.toLowerCase();
if (!((imagefile == match[2]) || (imagefile == match[3]) || (imagefile == match[4]) || (imagefile == match[9]) || (imagefile == match[10]))) {
alert('Please select a valid file (jpg, jpeg, png, bmp).');
$("#fileInput2").val('');
return false;
}
}
});
});
</script>
<!-- jQuery -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/metismenu.min.js"></script>
<script src="assets/js/waves.js"></script>
<script src="assets/js/feather.min.js"></script>
<script src="assets/js/jquery.slimscroll.min.js"></script>
<script src="assets/js/jquery-ui.min.js"></script>
<script src="../plugins/jquery-steps/jquery.steps.min.js"></script>
<script src="assets/pages/jquery.form-wizard.init.js"></script>
<!-- App js -->
<script src="assets/js/app.js"></script>
</body>
</html>
-489
View File
@@ -1,489 +0,0 @@
<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/' . $_SESSION['langselect'] . '/pdflang.php');
function convertToPDFEncoding($string)
{
$decoded = html_entity_decode($string, ENT_QUOTES, 'UTF-8');
return iconv('UTF-8', 'windows-1252', $decoded);
}
//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'];
if ($trfData['revtrf']==0) {
$nappformfinaltest=$pdnappformtest.' '.$nappform;
} else {
$revnbr=$trfData['revtrf'];
$nappformfinaltest=$pdnappformtest.' '.$nappform.'R'.$revnbr;
}
if ($trfData['revtrf']==0) {
$nappformfinal=$pdnappform.' '.$nappform;
} else {
$revnbr=$trfData['revtrf'];
$nappformfinal=$pdnappform.' '.$nappform.'R'.$revnbr;
}
$nappformfinaltest = html_entity_decode($nappformfinaltest, ENT_QUOTES);
$nappformfinaltest = iconv('UTF-8', 'windows-1252//IGNORE', $nappformfinaltest);
$nappformfinal = html_entity_decode($nappformfinal, ENT_QUOTES);
$nappformfinal = iconv('UTF-8', 'windows-1252//IGNORE', $nappformfinal);
//$nappformtest=$pdnappformtest.' '.$nappform;
//$nappformfinal=$nappform;
//$nappformfinal=$nappformtest;
$_SESSION["idcertificatesession"]=$idcertificate;
$_SESSION["sndrptsession"]=$sndrpt;
$_SESSION["revisioncert"]=$certificationrevision->getColumnVal("rev");
$_SESSION["revisioncertm30"]=$certificationrevision->getColumnVal("revm30");
$_SESSION["certname"]=$certificationrevision->getColumnVal("name_certification");
$_SESSION["certname30"]=$certificationrevision->getColumnVal("m30namecert");
$daterevformat=$certificationrevision->getColumnVal("date");
$timeStamp = strtotime($daterevformat);
$_SESSION["certdate"] = date("d-m-Y", $timeStamp);
$daterevformatm30=$certificationrevision->getColumnVal("datem30");
$timeStampm30 = strtotime($daterevformatm30);
$_SESSION["certdatem30"] = date("d-m-Y", $timeStampm30);
$_SESSION["certtitle"]=$_SESSION["certname"].' rev. '.$_SESSION["revisioncert"].' del '.$_SESSION["certdate"];
$_SESSION["certtitlem30"]=$_SESSION["certname30"].' rev. '.$_SESSION["revisioncertm30"].' del '.$_SESSION["certdatem30"];
class PDF extends FPDF
{
/* CENTER IMAGE IN CELL */
const DPI = 96;
const MM_IN_INCH = 25.4;
const A4_HEIGHT = 297;
const A4_WIDTH = 210;
// tweak these values (in pixels), convert mm to px
const MAX_WIDTH = 359.05511811; /* IMG CONTAINER - WIDTH */
const MAX_HEIGHT = 226.77165354; /* IMG CONTAINER - HEIGHT */
const MAX_WIDTH_S = 264.56692913; /* IMG CONTAINER SMALL - WIDTH */
const MAX_HEIGHT_S = 158.74015748; /* IMG CONTAINER SMALL - HEIGHT */
function pixelsToMM($val) {
return $val * self::MM_IN_INCH / self::DPI;
}
function resizeToFit($imgFilename, $cellWidth, $cellHeight, $containerSize) {
list($width, $height) = getimagesize($imgFilename);
if($containerSize == 'S'){
/* SMALL CONTAINER SIZE */
$widthScale = self::MAX_WIDTH_S / $width;
$heightScale = self::MAX_HEIGHT_S / $height;
}else{
/* DEFAULT CONTAINER SIZE */
$widthScale = self::MAX_WIDTH / $width;
$heightScale = self::MAX_HEIGHT / $height;
}
$scale = min($widthScale, $heightScale);
$width_in_mm = round($this->pixelsToMM($scale * $width)); /* IMAGE WIDTH */
$height_in_mm = round($this->pixelsToMM($scale * $height)); /* IMAGE HEIGHT */
/* IF IMAGE WIDTH IS SMALLER THAN THE CELL WIDTH, STRETCH IMAGE */
if($width_in_mm < $cellWidth){
$add_w = $cellWidth - $width_in_mm;
}else{
$add_w = 0;
}
/* IF IMAGE IS IN PORTRAIT MODE, ALIGN TO CENTER */
if($width_in_mm <= ($cellWidth / 2)){
$image_x = $width_in_mm / 2;
$add_w = 0;
}else{
$image_x = 1;
}
/* IF IMAGE IS TALLER THAN CELL HEIGHT, RESIZE TO FIT */
if($height_in_mm > $cellHeight){
$height_in_mm = $cellHeight;
}
/* IF IMAGE IS WIDER THAN CELL, RESIZE TO FIT */
if($width_in_mm > $cellWidth){
$width_in_mm = $cellWidth - 2;
}
return array(
$width_in_mm,
$height_in_mm,
$add_w,
$image_x
);
}
function centreImage($img, $cellWidth, $cellHeight, $containerSize) {
list($width, $height, $add_image_width, $add_abscissa) = $this->resizeToFit($img, $cellWidth-2, $cellHeight-1, $containerSize);
// $this->Image($img, $this->GetX()+$add_abscissa, $this->GetY(), $width+$add_image_width, $height);
$this->Image($img, $this->GetX()+$add_abscissa, $this->GetY()+1, $width+$add_image_width, $height-1);
}
/* END CENTER IMAGE IN CELL */
// Page header
function Header()
{
// Logo
$this->Image('../images/cimac-logo.png',5,5,70);
$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);
if ($_SESSION["sndrptsession"]=='N' and $_SESSION["idcertificatesession"]==1 || $_SESSION["idcertificatesession"]==3 || $_SESSION["idcertificatesession"]==8 || $_SESSION["idcertificatesession"]==9) {
$this->Cell(0,35,$GLOBALS['nappformfinaltest'],0,0,"C"); } else {
$this->Cell(0,35,$GLOBALS['nappformfinal'],0,0,"C");
}
// Line break
$this->Ln(25);
}
// Page footer
function Footer()
{
// Position at 1.5 cm from bottom
$this->SetY(-45);
// 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"];
$certittlem30=$_SESSION["certtitlem30"];
if ($_SESSION["sndrptsession"]=='N' and $_SESSION["idcertificatesession"]==1 || $_SESSION["idcertificatesession"]==3 || $_SESSION["idcertificatesession"]==8 || $_SESSION["idcertificatesession"]==9) {
$this->Cell(0,10,$certittlem30.' - Pagina '.$this->PageNo().'/{nb}',0,0,'C');
$this->Image('../images/cimaclaboratories.png',10,260,190);
} else {
$this->Cell(0,10,$certittle.' - Pagina '.$this->PageNo().'/{nb}',0,0,'C');
$this->Image('../images/cimaccertifications.png',10,260,190);
}
}
//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);
$pdf->SetAutoPageBreak(true, 45);
// from here start customization based on certification required required
// certificate 5 and 6 Table: contacts auditdpi and documents
if ($idcertificate==5 || $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 ($sndrpt=='Y' and $idcertificate==8) {
include('pdfcreation/pdf8snd.php');
} elseif ($sndrpt=='N' and $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
//second pdf creation
if ($idcertificate==1 or $idcertificate==3 or $idcertificate==8 or $idcertificate==9) {
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["revisioncertm30"]=$certificationrevision->getColumnVal("revm30");
$_SESSION["certname"]=$certificationrevision->getColumnVal("name_certification");
$_SESSION["certname30"]=$certificationrevision->getColumnVal("m30namecert");
$daterevformat=$certificationrevision->getColumnVal("date");
$timeStamp = strtotime($daterevformat);
$_SESSION["certdate"] = date("d-m-Y", $timeStamp);
$daterevformatm30=$certificationrevision->getColumnVal("datem30");
$timeStampm30 = strtotime($daterevformatm30);
$_SESSION["certdatem30"] = date("d-m-Y", $timeStampm30);
$_SESSION["certtitle"]=$_SESSION["certname"].' rev. '.$_SESSION["revisioncert"].' del '.$_SESSION["certdate"];
$_SESSION["certtitlem30"]=$_SESSION["certname30"].' rev. '.$_SESSION["revisioncertm30"].' del '.$_SESSION["certdatem30"];
class PDF2 extends FPDF
{
/* CENTER IMAGE IN CELL */
const DPI = 96;
const MM_IN_INCH = 25.4;
const A4_HEIGHT = 297;
const A4_WIDTH = 210;
// tweak these values (in pixels), convert mm to px
const MAX_WIDTH = 359.05511811; /* IMG CONTAINER - WIDTH */
const MAX_HEIGHT = 226.77165354; /* IMG CONTAINER - HEIGHT */
const MAX_WIDTH_S = 264.56692913; /* IMG CONTAINER SMALL - WIDTH */
const MAX_HEIGHT_S = 158.74015748; /* IMG CONTAINER SMALL - HEIGHT */
function pixelsToMM($val) {
return $val * self::MM_IN_INCH / self::DPI;
}
function resizeToFit($imgFilename, $cellWidth, $cellHeight, $containerSize) {
list($width, $height) = getimagesize($imgFilename);
if($containerSize == 'S'){
/* SMALL CONTAINER SIZE */
$widthScale = self::MAX_WIDTH_S / $width;
$heightScale = self::MAX_HEIGHT_S / $height;
}else{
/* DEFAULT CONTAINER SIZE */
$widthScale = self::MAX_WIDTH / $width;
$heightScale = self::MAX_HEIGHT / $height;
}
$scale = min($widthScale, $heightScale);
$width_in_mm = round($this->pixelsToMM($scale * $width)); /* IMAGE WIDTH */
$height_in_mm = round($this->pixelsToMM($scale * $height)); /* IMAGE HEIGHT */
/* IF IMAGE WIDTH IS SMALLER THAN THE CELL WIDTH, STRETCH IMAGE */
if($width_in_mm < $cellWidth){
$add_w = $cellWidth - $width_in_mm;
}else{
$add_w = 0;
}
/* IF IMAGE IS IN PORTRAIT MODE, ALIGN TO CENTER */
if($width_in_mm <= ($cellWidth / 2)){
$image_x = $width_in_mm / 2;
$add_w = 0;
}else{
$image_x = 1;
}
/* IF IMAGE IS TALLER THAN CELL HEIGHT, RESIZE TO FIT */
if($height_in_mm > $cellHeight){
$height_in_mm = $cellHeight;
}
/* IF IMAGE IS WIDER THAN CELL, RESIZE TO FIT */
if($width_in_mm > $cellWidth){
$width_in_mm = $cellWidth - 2;
}
return array(
$width_in_mm,
$height_in_mm,
$add_w,
$image_x
);
}
function centreImage($img, $cellWidth, $cellHeight, $containerSize) {
list($width, $height, $add_image_width, $add_abscissa) = $this->resizeToFit($img, $cellWidth-2, $cellHeight-1, $containerSize);
// $this->Image($img, $this->GetX()+$add_abscissa, $this->GetY(), $width+$add_image_width, $height);
$this->Image($img, $this->GetX()+$add_abscissa, $this->GetY()+1, $width+$add_image_width, $height-1);
}
/* END CENTER IMAGE IN CELL */
// 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/cimaclaboratories.png',10,5,190);
// } else {
$this->Image('../images/cimac-logo.png',5,5,70);
$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,35,$GLOBALS['nappformfinal'],0,0,"C");
// Line break
$this->Ln(25);
}
// Page footer
function Footer()
{
// Position at 1.5 cm from bottom
$this->SetY(-45);
// 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');
$this->Image('../images/cimaccertifications.png',10,260,190); //}
}
//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);
$pdf->SetAutoPageBreak(true, 45);
// 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 ($sndrpt=='Y' and $idcertificate==8) {
include('pdfcreation/pdf8snd.php');
} elseif ($sndrpt=='N' and $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');
}
?>
-479
View File
@@ -1,479 +0,0 @@
<?php
//You shall use the following exact namespaces no
//matter in whathever directory you upload your
//phpmailer files.
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
include('include/headscript.php'); ?>
<?php
// pickup the get variable
if (isset($_POST["idtrf"])) {
$idtrf = $_POST["idtrf"];
}
if (isset($_GET["idtrf"])) {
$idtrf = $_GET["idtrf"];
}
if (isset($_POST["tokensignatureon"])) {
$tokensignatureon = $_POST["tokensignatureon"];
}
if (isset($_POST["clientname"])) {
$clientname = $_POST["clientname"];
}
if (isset($_POST["datetrf"])) {
$datetrf = $_POST["datetrf"];
}
if (isset($_POST["sndrpt"])) {
$sndrpt = $_POST["sndrpt"];
} else {
$sndrpt = "N";
}
if (isset($_POST["adminconfirm"])) {
$adminconfirm = $_POST["adminconfirm"];
} else {
$adminconfirm = "N";
}
if (isset($_GET["codestep"])) {
$code = $_GET["codestep"];
$InsertQuery = new WA_MySQLi_Query($cmctrfdb);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "wheretrfstep";
$InsertQuery->bindColumn("idtrf", "i", "$idtrf", "WA_DEFAULT");
$InsertQuery->bindColumn("code", "i", "$code", "WA_DEFAULT");
$InsertQuery->saveInSession("");
$InsertQuery->execute();
$InsertGoTo = "";
$InsertQuery->redirect($InsertGoTo);
}
?>
<?php
$tokenid = $user->present()->signaturecode;
if ($tokenid != $tokensignatureon) {
header("Location: declaration.php?idtrf=$idtrf&tokenresult=ko");
} else {
// update trf details`
if (isset($_POST["formdeclaration"])) {
if ($sndrpt == 'N') {
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "`trf-details`";
$UpdateQuery->bindColumn("signedon", "s", "$datetrf", "WA_DEFAULT");
$UpdateQuery->bindColumn("revcs", "s", "N", "WA_DEFAULT");
$UpdateQuery->addFilter("idtrfdetails", "=", "i", "" . ($idtrf) . "");
$UpdateQuery->execute();
$UpdateGoTo = "";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo ? rel2abs($UpdateGoTo, dirname(__FILE__)) : "";
$UpdateQuery->redirect($UpdateGoTo);
} else {
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "`trf-details`";
$UpdateQuery->bindColumn("signedonsecondcert", "s", "$datetrf", "WA_DEFAULT");
$UpdateQuery->bindColumn("revcs", "s", "N", "WA_DEFAULT");
$UpdateQuery->addFilter("idtrfdetails", "=", "i", "" . ($idtrf) . "");
$UpdateQuery->execute();
$UpdateGoTo = "";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo ? rel2abs($UpdateGoTo, dirname(__FILE__)) : "";
$UpdateQuery->redirect($UpdateGoTo);
}
}
?>
<?php
$trfnumberfinal = new WA_MySQLi_RS("trfnumberfinal", $cmctrfdb, 1);
$trfnumberfinal->setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.idtrfdetails='$idtrf'");
$trfnumberfinal->execute();
$idcertn = $trfnumberfinal->getColumnVal("idcertification");
$idarticletype = $trfnumberfinal->getColumnVal("idarticletype");
$appformn = $trfnumberfinal->getColumnVal("trfnumber");
$ntrfmail = $trfnumberfinal->getColumnVal("trfnumber");;
$revnumb = $trfnumberfinal->getColumnVal("revtrf");
?>
<?php $idcert = $trfnumberfinal->getColumnVal("idcertification") ?>
<?php
$certname = new WA_MySQLi_RS("certname", $cmctrfdb, 1);
$certname->setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcert'");
$certname->execute(); ?>
<?php
$chemicalagentlist = new WA_MySQLi_RS("chemicalagentlist", $cmctrfdb, 0);
$chemicalagentlist->setQuery("SELECT * FROM chemicalagent ORDER BY chemicalagent.name_chemicalagent");
$chemicalagentlist->execute();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>TRF <?php echo $ownercompanyname; ?> </title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta content="<?php echo $ownercompanyname; ?> TRF Portal" name="description" />
<meta content="" name="author" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- App favicon -->
<link rel="shortcut icon" href="../images/favicon.ico">
<!--Form Wizard-->
<link href="../plugins/jquery-steps/jquery.steps.css" rel="stylesheet" type="text/css">
<!-- App css -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/jquery-ui.min.css" rel="stylesheet">
<link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/metisMenu.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/app.min.css" rel="stylesheet" type="text/css" />
<!-- submit form with button -->
<style>
input:invalid {
border-color: #ff0000;
background-color: #fff7e6;
}
input:focus {
background: yellow;
}
input:valid {
border-color: #66ff33;
background-color: #eeffe6;
}
select:invalid {
border-color: #ff0000;
background-color: #fff7e6;
}
select:focus {
background-color: yellow;
}
select:valid {
border-color: #66ff33;
background-color: #eeffe6;
}
</style>
<style>
body {
font-family: arial;
}
.hide {
display: none;
}
p {
font-weight: bold;
}
</style>
<script>
function formSubmit() {
document.forms["myForm"].submit();
}
</script>
<script>
function show1() {
document.getElementById('div1').style.display = 'none';
}
function show2() {
document.getElementById('div1').style.display = 'block';
}
function show3() {
document.getElementById('div3').style.display = 'none';
}
function show4() {
document.getElementById('div3').style.display = 'block';
}
function show5() {
document.getElementById('div5').style.display = 'none';
}
function show6() {
document.getElementById('div5').style.display = 'block';
}
</script>
</head>
<body>
<!-- Top Bar Start -->
<?php include('include/topbar.php'); ?>
<!-- Top Bar End -->
<!-- Left Sidenav -->
<?php include('include/leftsidenav2.php'); ?>
<!-- end left-sidenav-->
<div class="page-wrapper">
<!-- Page Content-->
<div class="page-content">
<div class="container-fluid">
<!-- Page-Title -->
<div class="row">
<div class="col-sm-12">
<div class="page-title-box">
<div class="float-right">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="javascript:void(0);">TRF</a></li>
<li class="breadcrumb-item active">Starter</li>
</ol>
</div>
<h4 class="page-title"><?php echo $titlewb; ?></h4>
</div><!--end page-title-box-->
</div><!--end col-->
</div>
<div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-body">
<div class="media">
<?php include('include/appform.php'); ?>
</div><!--end media-->
</div><!--end card-body-->
</div><!--end card-->
<div class="progress mb-4">
<div class="progress-bar" role="progressbar" style="width: 100%;" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">100%</div>
</div>
<!-- card for optional TRF -->
<?php //pdf creation
include('pdf-creation.php');
//if ($idcertificate==1 or $idcertificate==3 or $idcertificate==4)
//{
//include('pdf-creation2.php'); }
// attachment
$checkpdffiles = new WA_MySQLi_RS("checkpdffiles", $cmctrfdb, 1);
$checkpdffiles->setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.idtrfdetails='$idtrf'");
$checkpdffiles->execute();
$path = 'pdf';
$filename1 = $checkpdffiles->getColumnVal("pdffilename");
$file1 = $path . "/" . $filename1;
if (!empty($checkpdffiles->getColumnVal("pdffilename2"))) {
$filename2 = $checkpdffiles->getColumnVal("pdffilename2");
$file2 = $path . "/" . $filename2;
}
//Now include the following following files based
//on the correct file path. Third file is required only if you want to enable SMTP.
require 'phpmailer/src/Exception.php';
require 'phpmailer/src/PHPMailer.php';
require 'phpmailer/src/SMTP.php';
//mail to client
$mail = new PHPMailer(true);
try {
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = $mailhost; // Specify main and backup server
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = $mailusername; // SMTP username
$mail->Password = $mailpassword; // SMTP password
$mail->SMTPSecure = $mailmethod; // Enable encryption, 'ssl' also accepted
$mail->Port = $mailport;
$mmessage = "mailtrf";
include('include/mailhtml.php');
// Email body content
$trfnmbmail = $appformn . 'r' . $revnumb;
$htmlContent = $mailmessage1;
$mail->From = $fromaddresssmail;
$mail->FromName = 'CIMAC Application Form System';
$mail->addAddress($emailuser); // Add a recipient
$mail->addAttachment($file1); // Add attachments
if (!empty($checkpdffiles->getColumnVal("pdffilename2"))) {
$mail->addAttachment($file2);
} // Optional name
$mail->Subject = $appformn . 'r' . $revnumb;
$mail->Body = $htmlContent;
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if ($adminconfirm == 'N') {
$mail->send();
}
// echo 'Message has been sent';
} catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
// mail to CS
$mail = new PHPMailer(true);
try {
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = $mailhost; // Specify main and backup server
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = $mailusername; // SMTP username
$mail->Password = $mailpassword; // SMTP password
$mail->SMTPSecure = $mailmethod; // Enable encryption, 'ssl' also accepted
$mail->Port = $mailport;
$mmessage = "mailtrf";
// Email body content
$htmlContent = $mailmessage1;
$mail->From = $fromaddresssmail;
$mail->FromName = 'CIMAC Application Form System';
if (!empty($csmail)) {
$mail->addAddress($csmail); // Aggiunge il destinatario solo se non è vuoto
}
if (!empty($csmail2)) {
$mail->addAddress($csmail2);
}
if (!empty($csmail3)) {
$mail->addAddress($csmail3);
}
if (!empty($csmailccn)) {
$mail->addBCC($csmailccn);
}
$mail->Subject = $appformn . 'r' . $revnumb;;
$mail->Body = "Ciao! E' stato inserito un nuovo ETRF N. $trfnmbmail ";
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if ($adminconfirm == 'N') {
$mail->send();
}
// echo 'Message has been sent';
} catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
// mail REV to CS
// if rev is > 0
if ($revnumb > 0) {
//query to see the previous CS in charge
$revnumberprev = $revnumb - 1;
$trfprevrev = new WA_MySQLi_RS("trfprevrev", $cmctrfdb, 1);
$trfprevrev->setQuery("SELECT * FROM `trf-details` LEFT JOIN company ON `trf-details`.idcompany=company.idcompany WHERE `trf-details`.trfnumber='$ntrfmail' AND `trf-details`.revtrf='$revnumberprev'");
$trfprevrev->execute();
$csinchargeprev = $trfprevrev->getColumnVal("csincharge");
if ($csinchargeprev == 'ddondena') {
$mailincharge = 'd.dondena@cimac.it';
} elseif ($csinchargeprev == 'cboscaino') {
$mailincharge = 'c.boscaino@cimac.it';
} elseif ($csinchargeprev == 'solocla') {
$mailincharge = 'info@acscreativesolutions.com';
} else {
$mailincharge = 'd.dondena@cimac.it';
}
// Define array with all CS mails
$csmailall = array($csmail, $csmail2, $csmail3);
// Extract the recipient that matches $mailincharge
$recipientTo = $mailincharge;
$recipientsCC = array_diff($csmailall, array($recipientTo));
$mail = new PHPMailer(true);
try {
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = $mailhost; // Specify main and backup server
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = $mailusername; // SMTP username
$mail->Password = $mailpassword; // SMTP password
$mail->SMTPSecure = $mailmethod; // Enable encryption, 'ssl' also accepted
$mail->Port = $mailport;
$mmessage = "mailtrf";
// Email body content
$htmlContent = $mailmessage1;
$mail->From = $fromaddresssmail;
$mail->FromName = 'CIMAC Application Form System';
$mail->addAddress($recipientTo); // Add the recipient in "To" field
foreach ($recipientsCC as $ccRecipient) {
$mail->addCC($ccRecipient); // Add recipients in "CC" field
}
$companynamemail = $trfprevrev->getColumnVal("companyname_company");
$descart = $trfprevrev->getColumnVal("sample_description");
$mail->Subject = $appformn . 'r' . $revnumb;
if ($_SESSION['langselect'] == 'it') {
// Imposta il testo in italiano
$mail->Body = "Ciao $csinchargeprev! <br> È stato inserito un nuovo ETRF N. $trfnmbmail.<br><br>" .
"Ragione Sociale = $companynamemail<br><br>" .
"Descrizione articolo $descart.<br>";
} else if ($_SESSION['langselect'] == 'en') {
// Imposta il testo in inglese
$mail->Body = "Hi $csinchargeprev! <br> A new ETRF No. $trfnmbmail has been submitted.<br><br>" .
"Company Name = $companynamemail<br><br>" .
"Item Description $descart.<br>";
} else {
// Imposta un valore di default o gestisci l'errore
$mail->Body = "Language setting is not recognized.";
}
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if ($adminconfirm == 'N') {
$mail->send();
}
// echo 'Message has been sent';
} catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
}
// exit();
/*
//$filename = $filepathname;
$path = 'pdf';
$file1 = $path . "/" . $filename1;
$file2 = $path . "/" . $filename2;
// Recipient
$to = $emailuser;
// Sender
$from = $fromaddresssmail;
$fromName = 'CIMAC Application Form System';
// Email subject
$subject = $appformn;
// Attachment file
$file = $file1;
$mmessage="mailtrf";
include('include/mailhtml.php');
// Email body content
$htmlContent = $mailmessage1;
// Header for sender info
$headers = "From: $fromName"." <".$from.">";
// Boundary
$semi_rand = md5(time());
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
// Headers for attachment
$headers .= "\nMIME-Version: 1.0\n" . "Content-Type: multipart/mixed;\n" . " boundary=\"{$mime_boundary}\"";
// Multipart boundary
$message = "--{$mime_boundary}\n" . "Content-Type: text/html; charset=\"UTF-8\"\n" .
"Content-Transfer-Encoding: 7bit\n\n" . $htmlContent . "\n\n";
// Preparing attachment
if(!empty($file) > 0){
if(is_file($file)){
$message .= "--{$mime_boundary}\n";
$fp = @fopen($file,"rb");
$data = @fread($fp,filesize($file));
@fclose($fp);
$data = chunk_split(base64_encode($data));
$message .= "Content-Type: application/octet-stream; name=\"".basename($file)."\"\n" .
"Content-Description: ".basename($file)."\n" .
"Content-Disposition: attachment;\n" . " filename=\"".basename($file)."\"; size=".filesize($file).";\n" .
"Content-Transfer-Encoding: base64\n\n" . $data . "\n\n";
}
}
$message .= "--{$mime_boundary}--";
$returnpath = "-f" . $from;
// Send email
$mail = @mail($to, $subject, $message, $headers, $returnpath);
*/
}
?>
<div class="card">
<div class="card-body">
<h4 class="mt-0 header-title"><?php echo $sendtitle; ?></h4>
<br><br>
<p><?php echo $companyname; ?> <?php echo $sendsentence; ?></p><br>
</div><!--end card-body-->
</div><!--end card-->
</div><!--end col-->
</div>
<!-- end page title end breadcrumb -->
</div><!-- container -->
<!-- footer start -->
<?php include('include/footer.php'); ?>
</footer><!--end footer-->
</div>
<!-- end page content -->
</div>
<!-- end page-wrapper -->
<!-- jQuery -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/metismenu.min.js"></script>
<script src="assets/js/waves.js"></script>
<script src="assets/js/feather.min.js"></script>
<script src="assets/js/jquery.slimscroll.min.js"></script>
<script src="assets/js/jquery-ui.min.js"></script>
<script src="../plugins/jquery-steps/jquery.steps.min.js"></script>
<script src="assets/pages/jquery.form-wizard.init.js"></script>
<!-- App js -->
<script src="assets/js/app.js"></script>
</body>
</html>
-524
View File
@@ -1,524 +0,0 @@
<?php
//You shall use the following exact namespaces no
//matter in whathever directory you upload your
//phpmailer files.
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
ob_start();
include('include/headscript.php'); ?>
<?php
if (isset($companyData["logoimage"]) && !empty($companyData["logoimage"])) {
$companylogo = $companyData["logoimage"];
$_SESSION['companylogo'] = $companylogo;
}
// pickup the get variable
if (isset($_POST["idtrf"])) {
$idtrf = $_POST["idtrf"];
}
if (isset($_GET["idtrf"])) {
$idtrf = $_GET["idtrf"];
}
if (isset($_GET["idtrftd"])) {
$idtrftd = $_GET["idtrftd"];
}
if (isset($_POST["idtrftd"])) {
$idtrftd = $_GET["idtrftd"];
}
if (isset($_GET["idtd"])) {
$idtd = $_GET["idtd"];
}
if (isset($_POST["idtd"])) {
$idtd = $_POST["idtd"];
}
if (isset($_POST["tokensignatureon"])) {
$tokensignatureon = $_POST["tokensignatureon"];
}
if (isset($_POST["clientname"])) {
$clientname = $_POST["clientname"];
}
if (isset($_POST["datetrf"])) {
$datetrf = $_POST["datetrf"];
}
if (isset($_POST["sndrpt"])) {
$sndrpt = $_POST["sndrpt"];
} else {
$sndrpt = "N";
}
if (isset($_POST["adminconfirm"])) {
$adminconfirm = $_POST["adminconfirm"];
} else {
$adminconfirm = "N";
}
?>
<?php
$tokenid = $user->present()->signaturecode;
if ($tokenid != $tokensignatureon) {
header("Location: declaration.php?idtrf=$idtrf&tokenresult=ko");
} else {
// update trf details`
if (isset($_POST["formdeclaration"])) {
if ($sndrpt == 'N') {
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "data_td";
$UpdateQuery->bindColumn("signnametd", "s", "$clientname", "WA_DEFAULT");
$UpdateQuery->bindColumn("signedontd", "s", "$datetrf", "WA_DEFAULT");
$UpdateQuery->bindColumn("statustd", "s", "Signed", "WA_DEFAULT");
$UpdateQuery->addFilter("iddata_td", "=", "i", "" . ($idtd) . "");
$UpdateQuery->execute();
$UpdateGoTo = "";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo ? rel2abs($UpdateGoTo, dirname(__FILE__)) : "";
$UpdateQuery->redirect($UpdateGoTo);
}
}
?>
<?php
$trfnumberfinal = new WA_MySQLi_RS("trfnumberfinal", $cmctrfdb, 1);
$trfnumberfinal->setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.idtrfdetails='$idtrf'");
$trfnumberfinal->execute();
$idcertn = $trfnumberfinal->getColumnVal("idcertification");
$idarticletype = $trfnumberfinal->getColumnVal("idarticletype");
$appformn = $trfnumberfinal->getColumnVal("trfnumber");
$ntrfmail = $trfnumberfinal->getColumnVal("trfnumber");;
$revnumb = $trfnumberfinal->getColumnVal("revtrf");
?>
<?php $idcert = $trfnumberfinal->getColumnVal("idcertification") ?>
<?php
// query data_td
$conn = new mysqli($servername, $username, $password, $dbname);
$sql = "SELECT * FROM data_td WHERE iddata_td = ?";
$stmt = $conn->prepare($sql);
$stmt->bind_param("i", $idtd); // "i" indica che l'id è un intero
$stmt->execute();
$result = $stmt->get_result();
$row = $result->fetch_assoc();
$statustd = $row['statustd'];
$idtrftd = $row['idtrf'];
$tdnumber = $row['tdnumber'];
$tdrev = $row['td_rev'];
$trfmod = $row['trfmod'];
$stmt->close();
$conn->close();
?>
<?php
$certname = new WA_MySQLi_RS("certname", $cmctrfdb, 1);
$certname->setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcert'");
$certname->execute(); ?>
<?php
$chemicalagentlist = new WA_MySQLi_RS("chemicalagentlist", $cmctrfdb, 0);
$chemicalagentlist->setQuery("SELECT * FROM chemicalagent ORDER BY chemicalagent.name_chemicalagent");
$chemicalagentlist->execute();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>TRF <?php echo $ownercompanyname; ?> </title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta content="<?php echo $ownercompanyname; ?> TRF Portal" name="description" />
<meta content="" name="author" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- App favicon -->
<link rel="shortcut icon" href="../images/favicon.ico">
<!--Form Wizard-->
<link href="../plugins/jquery-steps/jquery.steps.css" rel="stylesheet" type="text/css">
<!-- App css -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/jquery-ui.min.css" rel="stylesheet">
<link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/metisMenu.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/app.min.css" rel="stylesheet" type="text/css" />
<!-- submit form with button -->
<style>
input:invalid {
border-color: #ff0000;
background-color: #fff7e6;
}
input:focus {
background: yellow;
}
input:valid {
border-color: #66ff33;
background-color: #eeffe6;
}
select:invalid {
border-color: #ff0000;
background-color: #fff7e6;
}
select:focus {
background-color: yellow;
}
select:valid {
border-color: #66ff33;
background-color: #eeffe6;
}
</style>
<style>
body {
font-family: arial;
}
.hide {
display: none;
}
p {
font-weight: bold;
}
</style>
<script>
function formSubmit() {
document.forms["myForm"].submit();
}
</script>
<script>
function show1() {
document.getElementById('div1').style.display = 'none';
}
function show2() {
document.getElementById('div1').style.display = 'block';
}
function show3() {
document.getElementById('div3').style.display = 'none';
}
function show4() {
document.getElementById('div3').style.display = 'block';
}
function show5() {
document.getElementById('div5').style.display = 'none';
}
function show6() {
document.getElementById('div5').style.display = 'block';
}
</script>
</head>
<body>
<!-- Top Bar Start -->
<?php include('include/topbar.php'); ?>
<!-- Top Bar End -->
<!-- Left Sidenav -->
<?php include('include/leftsidenav2.php'); ?>
<!-- end left-sidenav-->
<div class="page-wrapper">
<!-- Page Content-->
<div class="page-content">
<div class="container-fluid">
<!-- Page-Title -->
<div class="row">
<div class="col-sm-12">
<div class="page-title-box">
<div class="float-right">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="javascript:void(0);">TRF</a></li>
<li class="breadcrumb-item active">Starter</li>
</ol>
</div>
<h4 class="page-title"><?php echo $titlewb; ?></h4>
</div><!--end page-title-box-->
</div><!--end col-->
</div>
<div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-body">
<div class="media">
<?php include('include/appformtd.php'); ?>
</div><!--end media-->
</div><!--end card-body-->
</div><!--end card-->
<div class="progress mb-4">
<div class="progress-bar" role="progressbar" style="width: 100%;" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">100%</div>
</div>
<!-- card for optional TRF -->
<?php //pdf creation
include('tf_pdfcreation.php');
if ($trfmod == 'Y') {
// Esegui la chiamata cURL per previewtrf.php
$url = "http://localhost/cmccopiaoriginale/public/previewtrf.php?idtrf=" . urlencode($idtrf);
// Recupera i cookie di sessione
$cookies = '';
foreach ($_COOKIE as $key => $value) {
$cookies .= $key . '=' . $value . '; ';
}
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 15); // Timeout leggermente più lungo
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_COOKIE, $cookies); // Invia i cookie di sessione
// Aggiungi gestione degli errori cURL
$response = curl_exec($ch);
if (curl_errno($ch)) {
$error_msg = curl_error($ch);
error_log("cURL error: " . $error_msg, 3, "../logfile.log"); // Sostituisci con il percorso del tuo file di log
} else {
// Registra la risposta per debug
error_log("cURL response: " . $response, 3, "../logfile.log"); // Sostituisci con il percorso del tuo file di log
}
curl_close($ch);
}
//if ($idcertificate==1 or $idcertificate==3 or $idcertificate==4)
//{
//include('pdf-creation2.php'); }
// attachment
$checkpdffiles = new WA_MySQLi_RS("checkpdffiles", $cmctrfdb, 1);
$checkpdffiles->setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.idtrfdetails='$idtrf'");
$checkpdffiles->execute();
$path = 'pdf';
$filename1 = $checkpdffiles->getColumnVal("pdffilename");
$file1 = $path . "/" . $filename1;
if (!empty($checkpdffiles->getColumnVal("pdffilename2"))) {
$filename2 = $checkpdffiles->getColumnVal("pdffilename2");
$file2 = $path . "/" . $filename2;
}
//Now include the following following files based
//on the correct file path. Third file is required only if you want to enable SMTP.
require 'phpmailer/src/Exception.php';
require 'phpmailer/src/PHPMailer.php';
require 'phpmailer/src/SMTP.php';
//mail to client
$mail = new PHPMailer(true);
try {
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = $mailhost; // Specify main and backup server
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = $mailusername; // SMTP username
$mail->Password = $mailpassword; // SMTP password
$mail->SMTPSecure = $mailmethod; // Enable encryption, 'ssl' also accepted
$mail->Port = $mailport;
$mmessage = "mailtrf";
include('include/mailhtml.php');
// Email body content
$trfnmbmail = $appformn . 'r' . $revnumb;
$htmlContent = $mailmessage1;
$mail->From = $fromaddresssmail;
$mail->FromName = 'CIMAC Application Form System';
$mail->addAddress($emailuser); // Add a recipient
$mail->addAttachment($file1); // Add attachments
if (!empty($checkpdffiles->getColumnVal("pdffilename2"))) {
$mail->addAttachment($file2);
} // Optional name
$mail->Subject = $appformn . 'r' . $revnumb;
$mail->Body = $htmlContent;
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if ($adminconfirm == 'N') {
// $mail->send();
}
// echo 'Message has been sent';
} catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
// mail to CS
$mail = new PHPMailer(true);
try {
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = $mailhost; // Specify main and backup server
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = $mailusername; // SMTP username
$mail->Password = $mailpassword; // SMTP password
$mail->SMTPSecure = $mailmethod; // Enable encryption, 'ssl' also accepted
$mail->Port = $mailport;
$mmessage = "mailtrf";
// Email body content
$htmlContent = $mailmessage1;
$mail->From = $fromaddresssmail;
$mail->FromName = 'CIMAC Application Form System';
if (!empty($csmail)) {
$mail->addAddress($csmail); // Aggiunge il destinatario solo se non è vuoto
}
if (!empty($csmail2)) {
$mail->addAddress($csmail2);
}
if (!empty($csmail3)) {
$mail->addAddress($csmail3);
}
if (!empty($csmailccn)) {
$mail->addBCC($csmailccn);
}
$mail->Subject = $appformn . 'r' . $revnumb;;
$mail->Body = "Ciao! E' stato inserito un nuovo ETRF N. $trfnmbmail ";
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if ($adminconfirm == 'N') {
// $mail->send();
}
// echo 'Message has been sent';
} catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
// mail REV to CS
// if rev is > 0
if ($revnumb > 0) {
//query to see the previous CS in charge
$revnumberprev = $revnumb - 1;
$trfprevrev = new WA_MySQLi_RS("trfprevrev", $cmctrfdb, 1);
$trfprevrev->setQuery("SELECT * FROM `trf-details` LEFT JOIN company ON `trf-details`.idcompany=company.idcompany WHERE `trf-details`.trfnumber='$ntrfmail' AND `trf-details`.revtrf='$revnumberprev'");
$trfprevrev->execute();
$csinchargeprev = $trfprevrev->getColumnVal("csincharge");
if ($csinchargeprev == 'ddondena') {
$mailincharge = 'd.dondena@cimac.it';
} elseif ($csinchargeprev == 'cboscaino') {
$mailincharge = 'c.boscaino@cimac.it';
} elseif ($csinchargeprev == 'solocla') {
$mailincharge = 'info@acscreativesolutions.com';
} else {
$mailincharge = 'd.dondena@cimac.it';
}
// Define array with all CS mails
$csmailall = array($csmail, $csmail2, $csmail3);
// Extract the recipient that matches $mailincharge
$recipientTo = $mailincharge;
$recipientsCC = array_diff($csmailall, array($recipientTo));
$mail = new PHPMailer(true);
try {
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = $mailhost; // Specify main and backup server
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = $mailusername; // SMTP username
$mail->Password = $mailpassword; // SMTP password
$mail->SMTPSecure = $mailmethod; // Enable encryption, 'ssl' also accepted
$mail->Port = $mailport;
$mmessage = "mailtrf";
// Email body content
$htmlContent = $mailmessage1;
$mail->From = $fromaddresssmail;
$mail->FromName = 'CIMAC Application Form System';
$mail->addAddress($recipientTo); // Add the recipient in "To" field
foreach ($recipientsCC as $ccRecipient) {
$mail->addCC($ccRecipient); // Add recipients in "CC" field
}
$companynamemail = $trfprevrev->getColumnVal("companyname_company");
$descart = $trfprevrev->getColumnVal("sample_description");
$mail->Subject = $appformn . 'r' . $revnumb;
if ($_SESSION['langselect'] == 'it') {
// Imposta il testo in italiano
$mail->Body = "Ciao $csinchargeprev! <br> È stato inserito un nuovo ETRF N. $trfnmbmail.<br><br>" .
"Ragione Sociale = $companynamemail<br><br>" .
"Descrizione articolo $descart.<br>";
} else if ($_SESSION['langselect'] == 'en') {
// Imposta il testo in inglese
$mail->Body = "Hi $csinchargeprev! <br> A new ETRF No. $trfnmbmail has been submitted.<br><br>" .
"Company Name = $companynamemail<br><br>" .
"Item Description $descart.<br>";
} else {
// Imposta un valore di default o gestisci l'errore
$mail->Body = "Language setting is not recognized.";
}
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if ($adminconfirm == 'N') {
// $mail->send();
}
// echo 'Message has been sent';
} catch (Exception $e) {
echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
}
}
// exit();
/*
//$filename = $filepathname;
$path = 'pdf';
$file1 = $path . "/" . $filename1;
$file2 = $path . "/" . $filename2;
// Recipient
$to = $emailuser;
// Sender
$from = $fromaddresssmail;
$fromName = 'CIMAC Application Form System';
// Email subject
$subject = $appformn;
// Attachment file
$file = $file1;
$mmessage="mailtrf";
include('include/mailhtml.php');
// Email body content
$htmlContent = $mailmessage1;
// Header for sender info
$headers = "From: $fromName"." <".$from.">";
// Boundary
$semi_rand = md5(time());
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
// Headers for attachment
$headers .= "\nMIME-Version: 1.0\n" . "Content-Type: multipart/mixed;\n" . " boundary=\"{$mime_boundary}\"";
// Multipart boundary
$message = "--{$mime_boundary}\n" . "Content-Type: text/html; charset=\"UTF-8\"\n" .
"Content-Transfer-Encoding: 7bit\n\n" . $htmlContent . "\n\n";
// Preparing attachment
if(!empty($file) > 0){
if(is_file($file)){
$message .= "--{$mime_boundary}\n";
$fp = @fopen($file,"rb");
$data = @fread($fp,filesize($file));
@fclose($fp);
$data = chunk_split(base64_encode($data));
$message .= "Content-Type: application/octet-stream; name=\"".basename($file)."\"\n" .
"Content-Description: ".basename($file)."\n" .
"Content-Disposition: attachment;\n" . " filename=\"".basename($file)."\"; size=".filesize($file).";\n" .
"Content-Transfer-Encoding: base64\n\n" . $data . "\n\n";
}
}
$message .= "--{$mime_boundary}--";
$returnpath = "-f" . $from;
// Send email
$mail = @mail($to, $subject, $message, $headers, $returnpath);
*/
}
?>
<div class="card">
<div class="card-body">
<h4 class="mt-0 header-title"><?php echo $sendtitle; ?></h4>
<br><br>
<p><?php echo $companyname; ?> <?php echo $sendsentence; ?></p><br>
</div><!--end card-body-->
</div><!--end card-->
</div><!--end col-->
</div>
<!-- end page title end breadcrumb -->
</div><!-- container -->
<!-- footer start -->
<?php include('include/footer.php'); ?>
</footer><!--end footer-->
</div>
<!-- end page content -->
</div>
<!-- end page-wrapper -->
<!-- jQuery -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/metismenu.min.js"></script>
<script src="assets/js/waves.js"></script>
<script src="assets/js/feather.min.js"></script>
<script src="assets/js/jquery.slimscroll.min.js"></script>
<script src="assets/js/jquery-ui.min.js"></script>
<script src="../plugins/jquery-steps/jquery.steps.min.js"></script>
<script src="assets/pages/jquery.form-wizard.init.js"></script>
<!-- App js -->
<script src="assets/js/app.js"></script>
</body>
</html>
-580
View File
@@ -1,580 +0,0 @@
<?php require_once('../Connections/cmctrfdb.php'); ?>
<?php require_once('../webassist/mysqli/rsobj.php'); ?>
<?php
include('include/headscript.php'); ?>
<?php
$archivetrflist = new WA_MySQLi_RS("archivetrflist", $cmctrfdb, 0);
$archivetrflist->setQuery("SELECT * FROM `trf-details`
LEFT JOIN auth_users ON `trf-details`.iduser=auth_users.id
LEFT JOIN article_type ON `trf-details`.idarticletype=article_type.idarticletype
LEFT JOIN certificationtype ON certificationtype.idcertificationtype=`trf-details`.idcertification
WHERE `trf-details`.idcompany='$idcompany'
AND `trf-details`.signedon <> ''
ORDER BY `trf-details`.trfnumber, `trf-details`.revtrf DESC");
$archivetrflist->execute();
?>
<?php
$drafttrf = new WA_MySQLi_RS("drafttrf", $cmctrfdb, 0);
$drafttrf->setQuery("SELECT * FROM `trf-details`
LEFT JOIN article_type ON `trf-details`.idarticletype=article_type.idarticletype
LEFT JOIN certificationtype ON certificationtype.idcertificationtype=`trf-details`.idcertification
WHERE `trf-details`.idcompany='$idcompany'
AND `trf-details`.signedon =''
AND `trf-details`.revcs != 'Y'
ORDER BY `trf-details`.trfnumber");
$drafttrf->execute();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title><?php echo $titlepage; ?> </title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta content="CIMAC TRF Portal" name="description" />
<meta content="" name="author" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- App favicon -->
<link rel="shortcut icon" href="../images/favicon.ico">
<!-- DataTables -->
<link rel="shortcut icon" type="image/png" href="/media/images/favicon.png">
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://www.datatables.net/rss.xml">
<link rel="stylesheet" type="text/css" href="/media/css/site-examples.css?_=8f7cff5ee7757412879aedf3efbfaee01">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.1/css/jquery.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/2.3.2/css/buttons.dataTables.min.css">
<style type="text/css" class="init">
</style>
<script type="text/javascript" src="/media/js/site.js?_=1d5abd169416a09a2b389885211721dd" data-domain="datatables.net" data-api="https://plausible.sprymedia.co.uk/api/event"></script>
<script src="https://media.ethicalads.io/media/client/ethicalads.min.js"></script>
<script type="text/javascript" src="/media/js/dynamic.php?comments-page=extensions%2Fbuttons%2Fexamples%2Finitialisation%2Fexport.html" async></script>
<script type="text/javascript" language="javascript" src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script type="text/javascript" language="javascript" src="https://cdn.datatables.net/1.13.1/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" language="javascript" src="https://cdn.datatables.net/buttons/2.3.2/js/dataTables.buttons.min.js"></script>
<script type="text/javascript" language="javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script type="text/javascript" language="javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
<script type="text/javascript" language="javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
<script type="text/javascript" language="javascript" src="https://cdn.datatables.net/buttons/2.3.2/js/buttons.html5.min.js"></script>
<script type="text/javascript" language="javascript" src="https://cdn.datatables.net/buttons/2.3.2/js/buttons.print.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" integrity="sha512-RqEzHvnvS1k5K5wzgp5yoWY5U6TD5EoXyj9iikETmdcy1G6dbCVa+ZmzBm7VWzmj8Ov7VwtA9x9X7VWjG8SRFg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<!--Form Wizard-->
<link href="../plugins/jquery-steps/jquery.steps.css" rel="stylesheet" type="text/css">
<!-- App css -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/jquery-ui.min.css" rel="stylesheet">
<link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/metisMenu.min.css" rel="stylesheet" type="text/css" />
<link href="assets/css/app.min.css" rel="stylesheet" type="text/css" />
<!-- submit form with button -->
<script>
function formSubmit() {
document.forms["myForm"].submit();
}
</script>
</script>
<script type="text/javascript" class="init">
$(document).ready(function() {
var table = $('#example').DataTable({
pageLength: 20,
order: [
[0, 'desc']
],
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf'
]
});
$('a.toggle-vis').on('click', function(e) {
e.preventDefault();
// Get the column API object
var column = table.column($(this).attr('data-column'));
// Toggle the visibility
column.visible(!column.visible());
});
});
</script>
<script type="text/javascript" class="init">
$(document).ready(function() {
var table = $('#readytrf').DataTable({
pageLength: 20,
order: [
[0, 'desc']
],
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf'
]
});
$('a.toggle-vis').on('click', function(e) {
e.preventDefault();
// Get the column API object
var column = table.column($(this).attr('data-column'));
// Toggle the visibility
column.visible(!column.visible());
});
});
</script>
<script>
document.getElementById('clonetrfalert').addEventListener('click', function(e) {
e.preventDefault();
if (confirm("Sei sicuro di voler andare al link clonetrf.php?")) {
window.location.href = e.target.parentNode.href;
}
});
</script>
<style>
.btn-active {
border-color: #dc3545;
color: #dc3545;
}
.btn-inactive {
border-color: #6c757d;
color: #6c757d;
}
.btn-inactive:disabled {
background-color: #e9ecef;
}
</style>
</head>
<body>
<!-- Top Bar Start -->
<!-- Top Bar Start -->
<?php include('include/topbar.php'); ?>
<!-- Top Bar End -->
<!-- Left Sidenav -->
<?php include('include/leftsidenav.php'); ?>
<!-- end left-sidenav-->
<div class="page-wrapper">
<!-- Page Content-->
<div class="page-content">
<div class="container-fluid">
<!-- Page-Title -->
<div class="row">
<div class="col-sm-12">
<div class="page-title-box">
<div class="float-right">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="javascript:void(0);">TRF</a></li>
<li class="breadcrumb-item active">Starter</li>
</ol>
</div>
<h4 class="page-title"><?php echo $titlewb; ?></h4>
</div><!--end page-title-box-->
</div><!--end col-->
</div>
<div class="row">
<div class="col-sm-12">
<!-- DRAFT TRF -->
<div class="card">
<!-- card for show requirements -->
<div class="card">
<div class="card-body">
<h4 class="mt-0 header-title"><?php echo $drafttrftitle; ?></h4>
<table id="example" class="display table table-striped table-bordered dt-responsive nowrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
<thead>
<tr>
<th>TRF N.</th>
<th>REV</th>
<th>Description</th>
<th>Cert Type</th>
<th>Article type</th>
<th>To be Sign</th>
<th><?php echo $action; ?></th>
<th></th>
</tr>
</thead>
<tbody>
<?php
$wa_startindex = 0;
while (!$drafttrf->atEnd()) {
$wa_startindex = $drafttrf->Index;
?>
<tr><?php $idtrf = $drafttrf->getColumnVal("idtrfdetails"); ?>
<td><?php echo ($drafttrf->getColumnVal("trfnumber")); ?></td>
<td><?php if (($drafttrf->getColumnVal("revtrf")) > 0) { ?>R<?php echo $drafttrf->getColumnVal("revtrf");
} ?></td>
<td><?php echo ($drafttrf->getColumnVal("sample_description")); ?></td>
<td><?php echo ($drafttrf->getColumnVal("name_certification")); ?></td>
<td>
<?php
// Assuming session_start() has been called previously if needed.
$nameField = ($_SESSION['langselect'] == 'en') ? 'name_articletypeeng' : 'name_articletype';
echo ($drafttrf->getColumnVal($nameField));
?>
</td>
<td><?php
$revcs = $drafttrf->getColumnVal("revcs");
if ($revcs == 's') { ?>
<a href="declaration.php?idtrf=<?php echo $idtrf; ?>"><button type="button" class="btn btn-success waves-effect waves-light">SIGN</button></a>
</td>
<td></td><?php } ?>
<?php if ($drafttrf->getColumnVal("idcertification") == 5 && $drafttrf->getColumnVal("revcs") != 's') { ?>
<td><a href="typeofcertificate5.php?idtrf=<?php echo $idtrf; ?>"><button type="button" class="btn btn-info waves-effect waves-light"><?php echo $proceedtrf; ?></button></a></td>
<?php } elseif ($drafttrf->getColumnVal("idcertification") == 6 && $drafttrf->getColumnVal("revcs") != 's') { ?>
<td><a href="typeofcertificate6.php?idtrf=<?php echo $idtrf; ?>"><button type="button" class="btn btn-info waves-effect waves-light"><?php echo $proceedtrf; ?></button></a></td>
<?php } elseif ($drafttrf->getColumnVal("revcs") != 's') { ?>
<td><a href="trfdetails.php?idtrf=<?php echo $idtrf; ?>"><button type="button" class="btn btn-info waves-effect waves-light"><?php echo $proceedtrf; ?></button></a></td>
<?php } ?>
<td>
<button type="button" onclick="
Swal.fire({
title: 'Sei sicuro di voler duplicare il TRF N. <?php echo $drafttrf->getColumnVal('trfnumber'); ?>?',
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Sì, duplica!',
cancelButtonText: 'No, chiudi!'
}).then((result) => {
if (result.isConfirmed) {
window.location.href='clonetrf.php?idtrf=<?php echo $drafttrf->getColumnVal('idtrfdetails'); ?>';
}
});
" class="btn btn-outline-warning waves-effect waves-light">
<i class="far fa-copy"></i>
</button>
<button type="button" onclick="
Swal.fire({
title: 'Sei sicuro di voler cancellare il Draft TRF N. <?php echo $drafttrf->getColumnVal('trfnumber'); ?>?',
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Sì, procedi!',
cancelButtonText: 'No, chiudi!'
}).then((result) => {
if (result.isConfirmed) {
window.location.href='deleteappform.php?idtrf=<?php echo $drafttrf->getColumnVal('idtrfdetails'); ?>';
}
});
" class="btn btn-outline-danger waves-effect waves-light">
<i class="fas fa-trash-alt text-danger font-16"></i>
</button>
</td>
</tr>
<?php
$drafttrf->moveNext();
}
$drafttrf->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
?>
</tbody>
</table>
<br>
</div><!--end card-body-->
</div><!--end card-->
</div><!--end col-->
<!-- COMPLETE TRF -->
<div class="card">
<!-- card for show requirements -->
<div class="card">
<div class="card-body">
<h4 class="mt-0 header-title"><?php echo $archivetrf; ?></h4>
<table id="readytrf" class="display table table-striped table-bordered dt-responsive nowrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
<thead>
<tr>
<th>TRF N.</th>
<th>REV</th>
<th>Signed On</th>
<th>Description</th>
<th>Cert Type</th>
<th>Article type</th>
<th>Insert by</th>
<th>PDF1</th>
<th>PDF2</th>
<th>ZIP</th>
<th>ACTION</th>
</tr>
</thead>
<tbody>
<?php
$wa_startindex = 0;
$last_trfnumber = null;
$last_revtrf = -1;
while (!$archivetrflist->atEnd()) {
// without signed for rev
$idtrf_nosign = $archivetrflist->getColumnVal("idtrfdetails");
$trfnosign = $archivetrflist->getColumnVal("trfnumber");
$archivetrflistnosign = new WA_MySQLi_RS("archivetrflistnosign", $cmctrfdb, 0);
$archivetrflistnosign->setQuery("SELECT MAX(revtrf) as max_revtrf FROM `trf-details` WHERE `trf-details`.trfnumber='$trfnosign'");
$archivetrflistnosign->execute();
$maxrevtrf = $archivetrflistnosign->getColumnVal("max_revtrf");
$currentrevtrf = $archivetrflist->getColumnVal("revtrf");
$current_trfnumber = $archivetrflist->getColumnVal("trfnumber");
$current_revtrf = $archivetrflist->getColumnVal("revtrf");
// Check if this is a new TRF number
if ($last_trfnumber !== $current_trfnumber) {
$last_trfnumber = $current_trfnumber;
$last_revtrf = $current_revtrf;
}
$wa_startindex = $archivetrflist->Index;
?>
<tr>
<td><?php echo ($archivetrflist->getColumnVal("trfnumber")); ?></td>
<td><?php if (($archivetrflist->getColumnVal("revtrf")) > 0) { ?>R<?php echo $archivetrflist->getColumnVal("revtrf");
} ?></td>
<td><?php echo ($archivetrflist->getColumnVal("signedon")); ?></td>
<td><?php echo ($archivetrflist->getColumnVal("sample_description"));
?></td>
<td><?php echo ($archivetrflist->getColumnVal("name_certification")); ?></td>
<td>
<?php
// Assuming session_start() has been called previously if needed.
$nameField = ($_SESSION['langselect'] == 'en') ? 'name_articletypeeng' : 'name_articletype';
echo ($archivetrflist->getColumnVal($nameField));
?>
</td>
<td><?php echo ($archivetrflist->getColumnVal("email")); ?></td>
<td><a href="pdf/<?php echo $archivetrflist->getColumnVal("pdffilename"); ?>" target="_blank"><i class="fas fa-file-pdf text-danger font-20"></i></a></td>
<td><?php if (!empty($archivetrflist->getColumnVal("pdffilename2"))) { ?><a href="pdf/<?php echo $archivetrflist->getColumnVal("pdffilename2"); ?>" target="_blank"><i class="fas fa-file-pdf text-danger font-20"></i></a><?php } ?></td>
<td><?php if (!empty($archivetrflist->getColumnVal("zipname"))) { ?><a href="uploaddocuments/zip/<?php echo $archivetrflist->getColumnVal("zipname"); ?>" target="_blank"><i class="fas fa-file-archive text-warning font-20"></i></a><?php } ?></td>
<td>
<button type="button" onclick="
Swal.fire({
title: 'Sei sicuro di voler duplicare il TRF N. <?php echo $archivetrflist->getColumnVal('trfnumber'); ?>?',
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Sì, duplica!',
cancelButtonText: 'No, chiudi!'
}).then((result) => {
if (result.isConfirmed) {
window.location.href='clonetrf.php?idtrf=<?php echo $archivetrflist->getColumnVal('idtrfdetails'); ?>';
}
});
" class="btn <?php echo ($maxrevtrf > $currentrevtrf) ? 'btn-inactive' : 'btn-outline-warning'; ?> waves-effect waves-light" <?php echo ($maxrevtrf > $currentrevtrf) ? 'disabled' : ''; ?>>
<i class="far fa-copy"></i>
</button>
<button type="button" onclick="
Swal.fire({
title: 'Sei sicuro di voler revisionare il TRF N. <?php echo $archivetrflist->getColumnVal('trfnumber'); ?>?',
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Sì, procedi!',
cancelButtonText: 'No, chiudi!'
}).then((result) => {
if (result.isConfirmed) {
window.location.href='revtrf.php?idtrf=<?php echo $archivetrflist->getColumnVal('idtrfdetails'); ?>';
}
});
" class="btn <?php echo ($maxrevtrf > $currentrevtrf) ? 'btn-inactive' : 'btn-active'; ?> waves-effect waves-light" <?php echo ($maxrevtrf > $currentrevtrf) ? 'disabled' : ''; ?>>
Rev
</button>
<?php if ((Auth::user()->hasRole('Admin')) || (Auth::user()->hasRole('CustomerService')) || (Auth::user()->hasRole('Superuser'))) : ?>
<?php
$idtrfdetailschk = $archivetrflist->getColumnVal('idtrfdetails');
$ntrfdetailschk = $archivetrflist->getColumnVal('trfnumber');
$conn = new mysqli($servername, $username, $password, $dbname);
$query = "SELECT COUNT(*) AS count FROM data_td WHERE idtrf = ?";
$stmt = $conn->prepare($query);
$stmt->bind_param("i", $idtrfdetailschk);
$stmt->execute();
$result = $stmt->get_result();
$rowcheck = $result->fetch_assoc();
if ($rowcheck['count'] < 1) {
$buttonColor = '#ff9800';
$onClick = "Swal.fire({
title: 'Sei sicuro di voler creare il Fascicolo Tecnico per il TRF N. " . $ntrfdetailschk . "?',
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Sì, procedi!',
cancelButtonText: 'No, chiudi!'
}).then((result) => {
if (result.isConfirmed) {
window.location.href='techdossier_start.php?idtrftd=" . $idtrfdetailschk . "';
}
});";
} else {
$buttonColor = '#4CAF50';
$onClick = "window.location.href='archivetd.php';";
}
?>
<button type="button" onclick="<?php echo $onClick; ?>" class="btn <?php echo ($maxrevtrf > $currentrevtrf) ? 'btn-inactive' : ''; ?>" style="border: 1px solid; color: white; background-color: <?php echo $buttonColor; ?>;" <?php echo ($maxrevtrf > $currentrevtrf) ? 'disabled' : ''; ?>>
TF
</button>
<?php endif; ?>
<button type="button" onclick="
Swal.fire({
title: 'Sei sicuro di voler cancellare il TRF N. <?php echo $archivetrflist->getColumnVal('trfnumber'); ?>?',
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Sì, procedi!',
cancelButtonText: 'No, chiudi!'
}).then((result) => {
if (result.isConfirmed) {
window.location.href='deleteappform.php?idtrf=<?php echo $archivetrflist->getColumnVal('idtrfdetails'); ?>';
}
});
" class="btn btn-outline-danger waves-effect waves-light">
<i class="fas fa-trash-alt text-danger font-16"></i>
</button>
</td>
</tr>
<?php
$archivetrflist->moveNext();
}
$archivetrflist->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
?>
</tbody>
</table>
<br>
</div><!--end card-body-->
</div><!--end card-->
</div>
</div>
<!-- end page title end breadcrumb -->
</div><!-- container -->
<!-- footer start -->
<?php include('include/footer.php'); ?>
</footer><!--end footer-->
</div>
<!-- end page content -->
</div>
<!-- end page-wrapper -->
<!-- jQuery -->
<script src="assets/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/metismenu.min.js"></script>
<script src="assets/js/waves.js"></script>
<script src="assets/js/feather.min.js"></script>
<script src="assets/js/jquery.slimscroll.min.js"></script>
<script src="assets/js/jquery-ui.min.js"></script>
<script src="../plugins/jquery-steps/jquery.steps.min.js"></script>
<script src="assets/pages/jquery.form-wizard.init.js"></script>
<!-- App js -->
<script src="assets/js/app.js"></script>
</body>
</html>
-678
View File
@@ -1,678 +0,0 @@
/*!
* Tabledit v1.2.3 (https://github.com/markcell/jQuery-Tabledit)
* Copyright (c) 2015 Celso Marques
* Licensed under MIT (https://github.com/markcell/jQuery-Tabledit/blob/master/LICENSE)
*/
/**
* @description Inline editor for HTML tables compatible with Bootstrap
* @version 1.2.3
* @author Celso Marques
*/
if (typeof jQuery === 'undefined') {
throw new Error('Tabledit requires jQuery library.');
}
(function($) {
'use strict';
$.fn.Tabledit = function(options) {
if (!this.is('table')) {
throw new Error('Tabledit only works when applied to a table.');
}
var $table = this;
var defaults = {
url: window.location.href,
inputClass: 'form-control input-sm',
toolbarClass: 'btn-toolbar',
groupClass: 'btn-group btn-group-sm',
dangerClass: 'danger',
warningClass: 'warning',
mutedClass: 'text-muted bg-light',
eventType: 'click',
rowIdentifier: 'id',
hideIdentifier: false,
autoFocus: true,
editButton: true,
deleteButton: true,
saveButton: true,
restoreButton: true,
buttons: {
edit: {
class: 'btn btn-sm btn-default',
html: '<span class="fa fa-pencil "></span>',
action: 'edit'
},
delete: {
class: 'btn btn-sm btn-default',
html: '<span class="fa fa-trash "></span>',
action: 'delete'
},
save: {
class: 'btn btn-sm btn-success',
html: 'Save'
},
restore: {
class: 'btn btn-sm btn-warning',
html: 'Restore',
action: 'restore'
},
confirm: {
class: 'btn btn-sm btn-danger',
html: 'Confirm'
}
},
onDraw: function() { return; },
onSuccess: function() { return; },
onFail: function() { return; },
onAlways: function() { return; },
onAjax: function() { return; }
};
var settings = $.extend(true, defaults, options);
var $lastEditedRow = 'undefined';
var $lastDeletedRow = 'undefined';
var $lastRestoredRow = 'undefined';
/**
* Draw Tabledit structure (identifier column, editable columns, toolbar column).
*
* @type {object}
*/
var Draw = {
columns: {
identifier: function() {
// Hide identifier column.
if (settings.hideIdentifier) {
$table.find('th:nth-child(' + parseInt(settings.columns.identifier[0]) + 1 + '), tbody td:nth-child(' + parseInt(settings.columns.identifier[0]) + 1 + ')').hide();
}
var $td = $table.find('tbody td:nth-child(' + (parseInt(settings.columns.identifier[0]) + 1) + ')');
$td.each(function() {
// Create hidden input with row identifier.
var span = '<span class="tabledit-span tabledit-identifier">' + $(this).text() + '</span>';
var input = '<input class="tabledit-input tabledit-identifier" type="hidden" name="' + settings.columns.identifier[1] + '" value="' + $(this).text() + '" disabled>';
// Add elements to table cell.
$(this).html(span + input);
// Add attribute "id" to table row.
$(this).parent('tr').attr(settings.rowIdentifier, $(this).text());
});
},
editable: function() {
for (var i = 0; i < settings.columns.editable.length; i++) {
var $td = $table.find('tbody td:nth-child(' + (parseInt(settings.columns.editable[i][0]) + 1) + ')');
$td.each(function() {
// Get text of this cell.
var text = $(this).text();
// Add pointer as cursor.
if (!settings.editButton) {
$(this).css('cursor', 'pointer');
}
if(settings.columns.editable[i][1]=='filenameaudit'){
var spantext='<a href="upload/'+$(this).text() +'" target="_blank">'+$(this).text()+' </a>';
}
else {
var spantext=$(this).text();
}
// Create span element.
var span = '<span class="tabledit-span">' + spantext + '</span>';
// Check if exists the third parameter of editable array.
if (typeof settings.columns.editable[i][2] !== 'undefined') {
// Create select element.
if(settings.columns.editable[i][2]=='checkbox'){
if (text === yessent) {
var input = '<input class="tabledit-input" type="checkbox" name="' + settings.columns.editable[i][1] + '" value="yes" checked="checked" style="display: none;" disabled>';
}
else{
var input = '<input class="tabledit-input" type="checkbox" name="' + settings.columns.editable[i][1] + '" value="yes" style="display: none;" disabled>';
}
}
else if(settings.columns.editable[i][2]=='file'){
var input = '<input class="tabledit-input file-upload" type="text" name="' + settings.columns.editable[i][1] + '" style="display: none;" value="' + $(this).text() + '" disabled><span style="display:none;" class="uploadfile" >Upload File</span>';
}
else{
var input = '<select class="tabledit-input ' + settings.inputClass + '" name="' + settings.columns.editable[i][1] + '" style="display: none;" disabled>';
// Create options for select element.
$.each(jQuery.parseJSON(settings.columns.editable[i][2]), function(index, value) {
if (text === value) {
input += '<option value="' + index + '" selected>' + value + '</option>';
} else {
input += '<option value="' + index + '">' + value + '</option>';
}
});
// Create last piece of select element.
input += '</select>';
}
} else {
// Create text input element.
var input = '<input class="tabledit-input ' + settings.inputClass + '" type="text" name="' + settings.columns.editable[i][1] + '" value="' + $(this).text() + '" style="display: none;" disabled>';
}
// Add elements and class "view" to table cell.
$(this).html(span + input);
$(this).addClass('tabledit-view-mode');
});
}
},
toolbar: function() {
if (settings.editButton || settings.deleteButton) {
var editButton = '';
var deleteButton = '';
var saveButton = '';
var restoreButton = '';
var confirmButton = '';
// Add toolbar column header if not exists.
if ($table.find('th.tabledit-toolbar-column').length === 0) {
$table.find('tr:first').append('<th class="tabledit-toolbar-column"></th>');
}
// Create edit button.
if (settings.editButton) {
editButton = '<button type="button" class="tabledit-edit-button ' + settings.buttons.edit.class + '" style="float: none;">' + settings.buttons.edit.html + '</button>';
}
// Create delete button.
if (settings.deleteButton) {
deleteButton = '<button type="button" class="tabledit-delete-button ' + settings.buttons.delete.class + '" style="float: none;">' + settings.buttons.delete.html + '</button>';
confirmButton = '<button type="button" class="tabledit-confirm-button ' + settings.buttons.confirm.class + '" style="display: none; float: none;">' + settings.buttons.confirm.html + '</button>';
}
// Create save button.
if (settings.editButton && settings.saveButton) {
saveButton = '<button type="button" class="tabledit-save-button ' + settings.buttons.save.class + '" style="display: none; float: none;">' + settings.buttons.save.html + '</button>';
}
// Create restore button.
if (settings.deleteButton && settings.restoreButton) {
restoreButton = '<button type="button" class="tabledit-restore-button ' + settings.buttons.restore.class + '" style="display: none; float: none;">' + settings.buttons.restore.html + '</button>';
}
var toolbar = '<div class="tabledit-toolbar ' + settings.toolbarClass + '" style="text-align: left;">\n\
<div class="' + settings.groupClass + '" style="float: none;">' + editButton + deleteButton + '</div>\n\
' + saveButton + '\n\
' + confirmButton + '\n\
' + restoreButton + '\n\
</div></div>';
// Add toolbar column cells.
$table.find('tr:gt(0)').append('<td style="white-space: nowrap; width: 1%;">' + toolbar + '</td>');
}
}
}
};
/**
* Change to view mode or edit mode with table td element as parameter.
*
* @type object
*/
var Mode = {
view: function(td) {
// Get table row.
var $tr = $(td).parent('tr');
// Disable identifier.
$(td).parent('tr').find('.tabledit-input.tabledit-identifier').prop('disabled', true);
// Hide and disable input element.
$(td).find('.tabledit-input').blur().hide().prop('disabled', true);
// Show span element.
$(td).find('.tabledit-span').show();
$(td).find('.uploadfile').hide();
// Add "view" class and remove "edit" class in td element.
$(td).addClass('tabledit-view-mode').removeClass('tabledit-edit-mode');
// Update toolbar buttons.
if (settings.editButton) {
$tr.find('button.tabledit-save-button').hide();
$tr.find('button.tabledit-edit-button').removeClass('active').blur();
}
},
edit: function(td) {
Delete.reset(td);
// Get table row.
var $tr = $(td).parent('tr');
// Enable identifier.
$tr.find('.tabledit-input.tabledit-identifier').prop('disabled', false);
// Hide span element.
$(td).find('.tabledit-span').hide();
$(td).find('.uploadfile').show();
// Get input element.
var $input = $(td).find('.tabledit-input');
// Enable and show input element.
$input.prop('disabled', false).show();
// Focus on input element.
if (settings.autoFocus) {
$input.focus();
}
// Add "edit" class and remove "view" class in td element.
$(td).addClass('tabledit-edit-mode').removeClass('tabledit-view-mode');
// Update toolbar buttons.
if (settings.editButton) {
$tr.find('button.tabledit-edit-button').addClass('active');
$tr.find('button.tabledit-save-button').show();
}
}
};
/**
* Available actions for edit function, with table td element as parameter or set of td elements.
*
* @type object
*/
var Edit = {
reset: function(td) {
$(td).each(function() {
// Get input element.
var $input = $(this).find('.tabledit-input');
var inputname=$input.attr('name');
// Get span text.
var text = $(this).find('.tabledit-span').text();
// Set input/select value with span text.
if ($input.is('select')) {
$input.find('option').filter(function() {
return $.trim($(this).text()) === text;
}).attr('selected', true);
}
else if($input.is(':checkbox')){
if(text==yessent){
$input.attr('checked', 'checked');
}
}
else if(inputname=='filenameaudit'){
var filename=$(this).find('.tabledit-span').text();
if(filename!=''){
$(this).find('.tabledit-span').html('<a href="upload/'+filename +'" target="_blank">'+filename+' </a>');
}
}
else {
$input.val(text);
}
// Change to view mode.
Mode.view(this);
});
},
submit: function(td) {
// Send AJAX request to server.
var ajaxResult = ajax(settings.buttons.edit.action);
if (ajaxResult === false) {
return;
}
$(td).each(function() {
// Get input element.
var $input = $(this).find('.tabledit-input');
var inputname=$input.attr('name');
// Set span text with input/select new value.
if ($input.is('select')) {
$(this).find('.tabledit-span').text($input.find('option:selected').text());
} else {
$(this).find('.tabledit-span').text($input.val());
}
if ($input.is(':checkbox')) {
if($input.prop('checked')==true){
$(this).find('.tabledit-span').text(yessent);
+717 -382
View File
File diff suppressed because it is too large Load Diff
-55
View File
@@ -1,55 +0,0 @@
<?php
// parse general TRF data
$trfdetails = mysqli_query($cmctrfdb, "SELECT * FROM `trf-details` LEFT JOIN `article_type` ON `trf-details`.idarticletype=`article_type`.idarticletype LEFT JOIN modelarticle ON `trf-details`.model=modelarticle.idmodelarticle WHERE `trf-details`.idtrfdetails='$idtrf'");
$trfData = mysqli_fetch_assoc($trfdetails);
$idcertificate=$trfData['idcertification'];
// parse identification parts data
$identparts = mysqli_query($cmctrfdb, "SELECT * FROM `identificationparts` WHERE `identificationparts`.idtrfdetails='$idtrf'");
$identpartData = mysqli_fetch_assoc($identparts);
// parse fileattached data
$fileattach = mysqli_query($cmctrfdb, "SELECT * FROM `fileattached` WHERE `fileattached`.idtrfdetails='$idtrf'");
$fileattachData = mysqli_fetch_assoc($fileattach);
// parse standards data
$stdinfo = new WA_MySQLi_RS("stdinfo",$cmctrfdb,0);
$stdinfo->setQuery("SELECT * FROM `trfstandards` LEFT JOIN `standards` ON `trfstandards`.idstandards=`standards`.idstandards LEFT JOIN protectioncategory ON `trfstandards`.idprotectioncategory=protectioncategory.idprotectioncategory LEFT JOIN dpicategory ON `trfstandards`.iddpicategory=dpicategory.iddpicategory WHERE `trfstandards`.idtrfdetails='$idtrf'");
$stdinfo->execute();
// parse add requirements data
$addreqlist = new WA_MySQLi_RS("addreqlist",$cmctrfdb,0);
$addreqlist->setQuery("SELECT * FROM trfaddrequirements LEFT JOIN additionalrequirements ON trfaddrequirements.idadditionalrequirements=additionalrequirements.idadditionalrequirements WHERE trfaddrequirements.idtrf='$idtrf'");
$addreqlist->execute();
$totreq=$addreqlist->TotalRows;
// parse chemical agent data
$cheminfo = new WA_MySQLi_RS("cheminfo",$cmctrfdb,0);
$cheminfo->setQuery("SELECT * FROM trfchemicalagent LEFT JOIN chemicalagent ON trfchemicalagent.idchemicalagent=chemicalagent.idchemicalagent WHERE trfchemicalagent.idtrf='$idtrf'");
$cheminfo->execute();
// parse certification revision
$certificationrevision = new WA_MySQLi_RS("certificationrevision",$cmctrfdb,0);
$certificationrevision->setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcertificate'");
$certificationrevision->execute();
// parse identification parts
if ($idcertificate==5 || $idcertificate==6) {
$kindcont='audit';
// parse contacts data with variable kindofcontacts
//$contactsinfo = mysqli_query($cmctrfdb, "SELECT * FROM `contacts` WHERE `contacts`.idtrf='$idtrf' WHERE contacts.kindofcontacts='kindcont'");
//$contactsinfoData = mysqli_fetch_assoc($contactsinfo);
// parse audit dpi
//$identparts = mysqli_query($cmctrfdb, "SELECT * FROM auditdpi WHERE auditdpi.idtrfdetails='$idtrf'");
//$identpartData = mysqli_fetch_assoc($identparts);
}
?>
<?php
$appformn=$pdfrequestformn." N.".$trfData['trfnumber'];
if (isset($trfData['photofilename'])) {
$image1="uploadimages/".$trfData['photofilename'];
}
//echo $appformn;
?>
@@ -1,62 +0,0 @@
<?php
// parse general TRF data
$trfdetails = mysqli_query($cmctrfdb, "SELECT * FROM `trf-details` LEFT JOIN `article_type` ON `trf-details`.idarticletype=`article_type`.idarticletype LEFT JOIN modelarticle ON `trf-details`.model=modelarticle.idmodelarticle WHERE `trf-details`.idtrfdetails='$idtrf'");
$trfData = mysqli_fetch_assoc($trfdetails);
$idcertificate=$trfData['idcertification'];
$otherclient = $trfData['otherclient'];
// parse identification parts data
$identparts = mysqli_query($cmctrfdb, "SELECT * FROM `identificationparts` WHERE `identificationparts`.idtrfdetails='$idtrf'");
$identpartData = mysqli_fetch_assoc($identparts);
// parse fileattached data
$fileattach = mysqli_query($cmctrfdb, "SELECT * FROM `fileattached` WHERE `fileattached`.idtrfdetails='$idtrf'");
$fileattachData = mysqli_fetch_assoc($fileattach);
// parse standards data
$stdinfo = new WA_MySQLi_RS("stdinfo",$cmctrfdb,0);
$stdinfo->setQuery("SELECT * FROM `trfstandards` LEFT JOIN `standards` ON `trfstandards`.idstandards=`standards`.idstandards LEFT JOIN protectioncategory ON `trfstandards`.idprotectioncategory=protectioncategory.idprotectioncategory LEFT JOIN dpicategory ON `trfstandards`.iddpicategory=dpicategory.iddpicategory WHERE `trfstandards`.idtrfdetails='$idtrf'");
$stdinfo->execute();
// parse add requirements data
$addreqlist = new WA_MySQLi_RS("addreqlist",$cmctrfdb,0);
$addreqlist->setQuery("SELECT * FROM trfaddrequirements LEFT JOIN additionalrequirements ON trfaddrequirements.idadditionalrequirements=additionalrequirements.idadditionalrequirements WHERE trfaddrequirements.idtrf='$idtrf'");
$addreqlist->execute();
$totreq=$addreqlist->TotalRows;
// parse chemical agent data
$cheminfo = new WA_MySQLi_RS("cheminfo",$cmctrfdb,0);
$cheminfo->setQuery("SELECT * FROM trfchemicalagent LEFT JOIN chemicalagent ON trfchemicalagent.idchemicalagent=chemicalagent.idchemicalagent WHERE trfchemicalagent.idtrf='$idtrf'");
$cheminfo->execute();
// parse certification revision
$certificationrevision = new WA_MySQLi_RS("certificationrevision",$cmctrfdb,0);
$certificationrevision->setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcertificate'");
$certificationrevision->execute();
// parse identification parts
if ($idcertificate==5 || $idcertificate==6) {
$kindcont='audit';
// parse contacts data with variable kindofcontacts
//$contactsinfo = mysqli_query($cmctrfdb, "SELECT * FROM `contacts` WHERE `contacts`.idtrf='$idtrf' WHERE contacts.kindofcontacts='kindcont'");
//$contactsinfoData = mysqli_fetch_assoc($contactsinfo);
// parse audit dpi
//$identparts = mysqli_query($cmctrfdb, "SELECT * FROM auditdpi WHERE auditdpi.idtrfdetails='$idtrf'");
//$identpartData = mysqli_fetch_assoc($identparts);
}
?>
<?php
//vecchio script immagini
$appformn=$pdfrequestformn." N.".$trfData['trfnumber'];
if (isset($trfData['photofilename'])) {
$image1="uploadimages/".$trfData['photofilename'];
/* 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";
}
}
//echo $appformn;
?>
-44
View File
@@ -1,44 +0,0 @@
<?php
// parse general TRF data
$trfdetails = mysqli_query($cmctrfdb, "SELECT * FROM `trf-details` LEFT JOIN article_type ON `trf-details`.idarticletype=article_type.idarticletype WHERE `trf-details`.idtrfdetails='$idtrf'");
$trfData = mysqli_fetch_assoc($trfdetails);
$idcertificate=$trfData['idcertification'];
// parse identification parts data
$identparts = mysqli_query($cmctrfdb, "SELECT * FROM `identificationparts` WHERE `identificationparts`.idtrfdetails='$idtrf'");
$identpartData = mysqli_fetch_assoc($identparts);
// parse fileattached data
$fileattach = mysqli_query($cmctrfdb, "SELECT * FROM `fileattached` WHERE `fileattached`.idtrfdetails='$idtrf'");
$fileattachData = mysqli_fetch_assoc($fileattach);
// parse standards data
$stdinfo = new WA_MySQLi_RS("stdinfo",$cmctrfdb,0);
$stdinfo->setQuery("SELECT * FROM `trfstandards` LEFT JOIN `standards` ON `trfstandards`.idstandards=`standards`.idstandards WHERE `trfstandards`.idtrfdetails='$idtrf'");
$stdinfo->execute();
// parse add requirements data
$addreqlist = new WA_MySQLi_RS("addreqlist",$cmctrfdb,0);
$addreqlist->setQuery("SELECT * FROM trfaddrequirements LEFT JOIN additionalrequirements ON trfaddrequirements.idadditionalrequirements=additionalrequirements.idadditionalrequirements WHERE trfaddrequirements.idtrf='$idtrf'");
$addreqlist->execute();
// parse chemical agent data
$cheminfo = new WA_MySQLi_RS("cheminfo",$cmctrfdb,0);
$cheminfo->setQuery("SELECT * FROM trfchemicalagent LEFT JOIN chemicalagent ON trfchemicalagent.idchemicalagent=chemicalagent.idchemicalagent WHERE trfchemicalagent.idtrf='$idtrf'");
$cheminfo->execute();
if ($idcertificate==5 || $idcertificate==6) {
$kindcont='audit';
// parse contacts data with variable kindofcontacts
//$contactsinfo = mysqli_query($cmctrfdb, "SELECT * FROM `contacts` WHERE `contacts`.idtrf='$idtrf' WHERE contacts.kindofcontacts='kindcont'");
//$contactsinfoData = mysqli_fetch_assoc($contactsinfo);
// parse audit dpi
//$identparts = mysqli_query($cmctrfdb, "SELECT * FROM auditdpi WHERE auditdpi.idtrfdetails='$idtrf'");
//$identpartData = mysqli_fetch_assoc($identparts);
}
?>
<?php
$appformn=$pdfrequestformn.$trfData['iduser']."-".$trfData['trfnumber'];
$image1="uploadimages/".$trfData['photofilename'];
//echo $appformn;
?>
+41 -8
View File
@@ -1,8 +1,41 @@
<?php
$con = mysqli_connect('localhost', 'u00wiumd4xnrd', 'ukowysga7w5x', 'dbcov4clvrmrzn');
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
?>
<?php
/*
|--------------------------------------------------------------------------
| Load Composer and .env
|--------------------------------------------------------------------------
| This file is inside: cmccopiaoriginale/public/
| vendor and .env are inside: cmccopiaoriginale/
*/
require_once __DIR__ . '/../vendor/autoload.php';
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/../');
$dotenv->safeLoad();
/*
|--------------------------------------------------------------------------
| Database configuration from .env
|--------------------------------------------------------------------------
*/
$host = $_ENV['DB_HOST'] ?? getenv('DB_HOST') ?? 'localhost';
$username = $_ENV['DB_USERNAME'] ?? getenv('DB_USERNAME') ?? '';
$password = $_ENV['DB_PASSWORD'] ?? getenv('DB_PASSWORD') ?? '';
$database = $_ENV['DB_DATABASE'] ?? getenv('DB_DATABASE') ?? '';
/*
|--------------------------------------------------------------------------
| MySQLi connection
|--------------------------------------------------------------------------
*/
$con = mysqli_connect($host, $username, $password, $database);
// Check connection
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
exit;
}
mysqli_set_charset($con, "utf8mb4");
+39 -7
View File
@@ -1,7 +1,39 @@
<?php
//dependent dropdown in php Database Connection
$conn = new mysqli('localhost', 'u00wiumd4xnrd', 'ukowysga7w5x', 'dbcov4clvrmrzn');
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
?>
<?php
/*
|--------------------------------------------------------------------------
| Load Composer and .env
|--------------------------------------------------------------------------
| This file is inside: cmccopiaoriginale/public/
| vendor and .env are inside: cmccopiaoriginale/
*/
require_once __DIR__ . '/../vendor/autoload.php';
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/../');
$dotenv->safeLoad();
/*
|--------------------------------------------------------------------------
| Database configuration from .env
|--------------------------------------------------------------------------
*/
$host = $_ENV['DB_HOST'] ?? getenv('DB_HOST') ?? 'localhost';
$username = $_ENV['DB_USERNAME'] ?? getenv('DB_USERNAME') ?? '';
$password = $_ENV['DB_PASSWORD'] ?? getenv('DB_PASSWORD') ?? '';
$database = $_ENV['DB_DATABASE'] ?? getenv('DB_DATABASE') ?? '';
/*
|--------------------------------------------------------------------------
| MySQLi connection
|--------------------------------------------------------------------------
*/
$conn = new mysqli($host, $username, $password, $database);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$conn->set_charset("utf8mb4");
-84
View File
@@ -1,84 +0,0 @@
<?php
Class Dropdown
{
private $host = 'localhost';
private $username = 'u00wiumd4xnrd';
private $password = 'ukowysga7w5x';
private $dbname = 'dbcov4clvrmrzn';
private $connection;
//establish connection
public function __construct()
{
try
{
$this->connection = new mysqli($this->host, $this->username, $this->password, $this->dbname);
}
catch (Exception $e)
{
echo "Connection error " . $e->getMessage();
}
}
//fetch all country records from database
public function fetchCountry()
{
$data = null;
$query = "SELECT * FROM article_type ORDER BY article_type.name_articletype";
if ($sql = $this->connection->query($query))
{
while ($rows = mysqli_fetch_assoc($sql))
{
$data[] = $rows;
}
}
return $data;
}
//fetch model records from database depend upon country id
public function fetchModel($idarticletype)
{
$data = null;
$query = "SELECT * FROM modelarticle WHERE idarticletype='".$idarticletype."' ";
if ($sql = $this->connection->query($query))
{
while ($rows = mysqli_fetch_assoc($sql))
{
$data[] = $rows;
}
}
return $data;
}
//fetch Charact records from database depend on article type
public function fetchCharact($idarticletype)
{
$data = null;
$query = "SELECT * FROM article_characteristic WHERE idarticletype='".$idarticletype."' ";
if ($sql = $this->connection->query($query))
{
while ($rows = mysqli_fetch_assoc($sql))
{
$data[] = $rows;
}
}
return $data;
}
}
?>
+73 -58
View File
@@ -1,96 +1,111 @@
<?php
<?php
Class Dropdown
class Dropdown
{
private $host = 'localhost';
private $username = 'u00wiumd4xnrd';
private $password = 'ukowysga7w5x';
private $dbname = 'dbcov4clvrmrzn';
private $host;
private $username;
private $password;
private $dbname;
private $connection;
//establish connection
// Establish connection
public function __construct()
{
try
{
$this->connection = new mysqli($this->host, $this->username, $this->password, $this->dbname);
}
catch (Exception $e)
{
/*
|--------------------------------------------------------------------------
| Load Composer and .env
|--------------------------------------------------------------------------
| This file is inside: cmccopiaoriginale/public/ddown/
| vendor and .env are inside: cmccopiaoriginale/
*/
require_once __DIR__ . '/../../vendor/autoload.php';
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/../../');
$dotenv->safeLoad();
$this->host = $_ENV['DB_HOST'] ?? getenv('DB_HOST') ?? 'localhost';
$this->username = $_ENV['DB_USERNAME'] ?? getenv('DB_USERNAME') ?? '';
$this->password = $_ENV['DB_PASSWORD'] ?? getenv('DB_PASSWORD') ?? '';
$this->dbname = $_ENV['DB_DATABASE'] ?? getenv('DB_DATABASE') ?? '';
try {
$this->connection = new mysqli(
$this->host,
$this->username,
$this->password,
$this->dbname
);
if ($this->connection->connect_error) {
throw new Exception($this->connection->connect_error);
}
$this->connection->set_charset("utf8mb4");
} catch (Exception $e) {
echo "Connection error " . $e->getMessage();
}
}
//fetch all country records from database
// Fetch all article type records from database
public function fetchCountry()
{
$data = null;
$query = "SELECT * FROM article_type ORDER BY article_type.name_articletype";
if ($sql = $this->connection->query($query))
{
while ($rows = mysqli_fetch_assoc($sql))
{
if ($sql = $this->connection->query($query)) {
while ($rows = mysqli_fetch_assoc($sql)) {
$data[] = $rows;
}
}
return $data;
}
//fetch model records from database depend upon country id
// Fetch model records from database depending on article type id
public function fetchModel($idarticletype)
{
$data = null;
$query = "SELECT * FROM modelarticle WHERE idarticletype='".$idarticletype."' ";
$idarticletype = (int)$idarticletype;
if ($sql = $this->connection->query($query))
{
while ($rows = mysqli_fetch_assoc($sql))
{
$query = "SELECT * FROM modelarticle WHERE idarticletype = $idarticletype";
if ($sql = $this->connection->query($query)) {
while ($rows = mysqli_fetch_assoc($sql)) {
$data[] = $rows;
}
}
return $data;
}
//fetch Charact records from database depend on article type
public function fetchCharact($idarticletype)
{
$data = null;
$idarticletype = (int)$idarticletype;
// Fetch characteristic records from database depending on article type
public function fetchCharact($idarticletype)
{
$data = null;
$query = "
SELECT DISTINCT
ac.*
FROM article_characteristic ac
INNER JOIN standards s
ON s.idarticlecharacteristic = ac.idarticlecharacteristic
AND s.idarticletype = ac.idarticletype
WHERE ac.idarticletype = $idarticletype
AND s.active = 'Y'
ORDER BY ac.name_articlecharacteristic
";
$idarticletype = (int)$idarticletype;
if ($sql = $this->connection->query($query))
{
while ($rows = mysqli_fetch_assoc($sql))
{
$data[] = $rows;
}
}
$query = "
SELECT DISTINCT
ac.*
FROM article_characteristic ac
INNER JOIN standards s
ON s.idarticlecharacteristic = ac.idarticlecharacteristic
AND s.idarticletype = ac.idarticletype
WHERE ac.idarticletype = $idarticletype
AND s.active = 'Y'
ORDER BY ac.name_articlecharacteristic
";
return $data;
if ($sql = $this->connection->query($query)) {
while ($rows = mysqli_fetch_assoc($sql)) {
$data[] = $rows;
}
}
return $data;
}
}
}
?>
-84
View File
@@ -1,84 +0,0 @@
<?php
Class Dropdown
{
private $host = 'localhost';
private $username = 'u00wiumd4xnrd';
private $password = 'ukowysga7w5x';
private $dbname = 'dbcov4clvrmrzn';
private $connection;
//establish connection
public function __construct()
{
try
{
$this->connection = new mysqli($this->host, $this->username, $this->password, $this->dbname);
}
catch (Exception $e)
{
echo "Connection error " . $e->getMessage();
}
}
//fetch all country records from database
public function fetchCountry()
{
$data = null;
$query = "SELECT * FROM article_type ORDER BY article_type.name_articletype";
if ($sql = $this->connection->query($query))
{
while ($rows = mysqli_fetch_assoc($sql))
{
$data[] = $rows;
}
}
return $data;
}
//fetch model records from database depend upon country id
public function fetchModel($idarticletype)
{
$data = null;
$query = "SELECT * FROM modelarticle WHERE idarticletype='".$idarticletype."' ";
if ($sql = $this->connection->query($query))
{
while ($rows = mysqli_fetch_assoc($sql))
{
$data[] = $rows;
}
}
return $data;
}
//fetch Charact records from database depend on article type
public function fetchCharact($idarticletype)
{
$data = null;
$query = "SELECT * FROM article_characteristic WHERE idarticletype='".$idarticletype."' ";
if ($sql = $this->connection->query($query))
{
while ($rows = mysqli_fetch_assoc($sql))
{
$data[] = $rows;
}
}
return $data;
}
}
?>
-65
View File
@@ -1,65 +0,0 @@
<?php
if (isset($idtrf)) {
include('include/checkstepfile.php');
include('include/chemicalsquerycheck.php');
}
?>
<div class="left-sidenav">
<ul class="metismenu left-sidenav-menu">
<li>
<a href="dashboard.php"><i class="ti-bar-chart"></i><span><?php echo $dashboard; ?></span></a>
</li>
<li>
<?php if (isset($codelist)) { ?>
<a href=""><i class="ti-angle-double-down"></i><span><?php echo $trfinprogress; ?></span></a>
<ul class="nav-second-level mm-collapse mm-show" style="">
<!-- end seven line trf -->
<!-- seveeightn line trf -->
<li>
<a href="adddocument2.php?idtrf=<?php echo $idtrf; ?>" style="color:green"><i class="fas fa-check-circle" style="color:green"></i><?php echo $uploaddocsteptitle; ?> </a>
</li>
<!-- end eight line trf -->
</ul><?php } ?>
</li>
<li>
<a href="archivetrf.php"><i class="fas fa-history"></i><span><?php echo $historicaltrf; ?></span></a>
</li>
<li>
<a href="index.php"><i class="ti-help"></i><span><?php echo $helptitle; ?></span></a>
</li>
<li>
<a href="index.php"><i class="fas fa-users"></i><span><?php echo $contactus; ?></span></a>
</li>
<?php if ((Auth::user()->hasRole('Admin')) OR (Auth::user()->hasRole('User'))): ?>
<li>
<a href="javascript: void(0);"><i class="ti-lock"></i><span>Admin Area</span><span class="menu-arrow"><i class="mdi mdi-chevron-right"></i></span></a>
<ul class="nav-second-level mm-collapse" aria-expanded="false">
<li class="nav-item"><a class="nav-link" href="admin-dashboard.php"><i class="fas fa-cogs"></i>Admin Panel</a></li>
<li class="nav-item"><a class="nav-link" href="cstrf.php"><i class="fas fa-archive"></i>CS TRF Board</a></li>
<li class="nav-item"><a class="nav-link" href="others/icons-fontawesome.html"><i class="ti-control-record"></i>Template</a></li>
</ul>
</li>
<?php endif; ?>
</ul>
</div>
@@ -1,36 +0,0 @@
<?php
$globalsett = new WA_MySQLi_RS("globalsett",$cmctrfdb,1);
$globalsett->setQuery("SELECT * FROM optionportal WHERE optionportal.idoptionportal='1'");
$globalsett->execute();
?>
<?php
$linkglobal="https://www.cimac.it/modulo_certificazione/";
$fromaddresssmail=$globalsett->getColumnVal("fromaddressmail");
$mailhost=$globalsett->getColumnVal("mailhost"); // Specify main and backup server // Enable SMTP authentication
$mailusername=$globalsett->getColumnVal("mailusername"); // SMTP username
$mailpassword=$globalsett->getColumnVal("mailpassword"); // SMTP password
$mailmethod=$globalsett->getColumnVal("mailmethod"); // Enable encryption, 'ssl' also accepted
$mailport=$globalsett->getColumnVal("mailport");
$csmail=$globalsett->getColumnVal("csmail");
$csmail2=$globalsett->getColumnVal("csmail2");
$csmail3=$globalsett->getColumnVal("csmail3");
$csmailccn="info@scattoviaggiando.com";
$undermanteinance=$globalsett->getColumnVal("undermanteinance");
?>
<?php /*
$linkglobal="http://localhost/cmc-frontend-authorize/";
$fromaddresssmail="info@acscreativesolutions.com";
$mailhost="premium88.web-hosting.com"; // Specify main and backup server // Enable SMTP authentication
$mailusername="info@acscreativesolutions.com"; // SMTP username
$mailpassword="!NuovaZelanda2020"; // SMTP password
$mailmethod="tls"; // Enable encryption, 'ssl' also accepted
$mailport="587";
$csmail="info@acscreativesolutions.com";
$csmail2="info@claudiosironi.com";
$csmail3="info@acscreativesolutions.com";
$csmailccn="info@scattoviaggiando.com";
$undermanteinance="no"; /*
?>
-67
View File
@@ -1,67 +0,0 @@
<?php
$todaytms=time();
$namefilezip=$idtrf.'-'.$todaytms.".zip";
$namefilezippath="uploaddocuments/zip/".$idtrf.'-'.$todaytms.".zip";
$zipnamefile=$namefilezip;
// change path ... name for link on pdf with website address
$namefilezippathpdf=$linkglobal."public/uploaddocuments/zip/".$idtrf.'-'.$todaytms.".zip";
$documentlist = new WA_MySQLi_RS("documentlist",$cmctrfdb,0);
$documentlist->setQuery("SELECT * FROM fileattached WHERE fileattached.idtrfdetails='$idtrf'");
$documentlist->execute();
$photolist = new WA_MySQLi_RS("photolist",$cmctrfdb,0);
$photolist->setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.idtrfdetails='$idtrf'");
$photolist->execute();
if (!empty($documentlist->getColumnVal("idfileattached"))) {
$zip = new ZipArchive;
if ($zip->open($namefilezippath, ZipArchive::CREATE) === TRUE)
{
// Add files to the zip file
$wa_startindex = 0;
while(!$documentlist->atEnd()) {
$wa_startindex = $documentlist->Index;
$newdocname=$documentlist->getColumnVal("filename_fileattached");
$pathnewdocname="uploaddocuments/".$newdocname;
$zip->addFile($pathnewdocname, $newdocname);
$documentlist->moveNext();
}
$documentlist->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
// add photos to zip
if (!empty($photolist->getColumnVal("photofilename"))) {
$newdocname=$photolist->getColumnVal("photofilename");
$pathnewdocname="uploaddocuments/".$newdocname;
$zip->addFile($pathnewdocname, $newdocname);
}
if (!empty($photolist->getColumnVal("photoone"))) {
$newdocname=$photolist->getColumnVal("photoone");
$pathnewdocname="uploaddocuments/".$newdocname;
$zip->addFile($pathnewdocname, $newdocname);
}
if (!empty($photolist->getColumnVal("phototwo"))) {
$newdocname=$photolist->getColumnVal("phototwo");
$pathnewdocname="uploaddocuments/".$newdocname;
$zip->addFile($pathnewdocname, $newdocname);
}
// All files are added, so close the zip file.
$zip->close();
}
}
?>
-93
View File
@@ -1,93 +0,0 @@
<div class="topbar">
<!-- LOGO -->
<div class="topbar-left"> <a href="dashboard.php" class="logo"> <span> <img src="../images/CIMAC-logo-white-1024x259-1.png" alt="logo-small" class="logo-sm"> </span> <span>
<!-- <img src="../images/CIMAC-logo-white-1024x259-1.png" alt="logo-large" class="logo-lg logo-light">
<img src="../images/CIMAC-logo-white-1024x259-1.png" alt="logo-large" class="logo-lg"> -->
</span> </a> </div>
<!--end logo-->
<!-- Navbar -->
<?php
// Inizializza le variabili prima di qualsiasi output HTML
$currentLangName = "English"; // Valore di default
$currentLangFlag = "en.png"; // Valore di default
// Se la sessione ha già una lingua selezionata, aggiorna le variabili
if (isset($_SESSION['langselect'])) {
// Cicla attraverso le lingue per trovare quella attiva
while (!$languageselection->atEnd()) {
$currentLangAcronym = $languageselection->getColumnVal("acronym_languages");
if ($_SESSION['langselect'] == $currentLangAcronym) {
$currentLangName = $languageselection->getColumnVal("name_languages");
$currentLangFlag = $languageselection->getColumnVal("flag_languages");
break; // Uscire dal ciclo una volta trovata la lingua attiva
}
$languageselection->moveNext();
}
$languageselection->moveFirst(); // Resettare il recordset
}
?>
<nav class="navbar-custom">
<ul class="list-unstyled topbar-nav float-right mb-0">
<li class="hidden-sm">
<a class="nav-link dropdown-toggle waves-effect waves-light" data-toggle="dropdown" href="javascript: void(0);" role="button"
aria-haspopup="false" aria-expanded="false">
<?php echo $currentLangName; ?>
<img src="assets/images/flags/<?php echo $currentLangFlag; ?>" class="ml-2" height="16" alt=""/>
<i class="mdi mdi-chevron-down"></i>
</a>
<div class="dropdown-menu dropdown-menu-right">
<?php
while (!$languageselection->atEnd()) {
$currentLangAcronym = $languageselection->getColumnVal("acronym_languages");
$isActive = (isset($_SESSION['langselect']) && $_SESSION['langselect'] == $currentLangAcronym) ? 'active' : '';
// Il link punta direttamente a dashboard.php con il parametro di selezione della lingua
$href = 'dashboard.php?languageselect=' . $currentLangAcronym;
?>
<a class="dropdown-item <?php echo $isActive; ?>" href="<?php echo $href; ?>">
<span> <?php echo $languageselection->getColumnVal("name_languages"); ?></span>
<img src="assets/images/flags/<?php echo $languageselection->getColumnVal("flag_languages"); ?>" alt="" class="ml-2 float-right" height="14"/>
</a>
<?php
$languageselection->moveNext();
}
$languageselection->moveFirst(); // Reset del recordset per un altro uso futuro
?>
</div>
</li>
<li class="dropdown">
<a class="nav-link dropdown-toggle waves-effect waves-light nav-user" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false"> <img src="upload/users/<?php echo $avatarname; ?>" alt="profile-user" class="rounded-circle" /> <span class="ml-1 nav-user-name hidden-sm"><?php echo $nameuser; ?> <i class="mdi mdi-chevron-down"></i></span> </a>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item" href="profile"><i class="ti-user text-muted mr-2"></i> <?php echo $profile; ?></a>
<a class="dropdown-item" href="companyprofile.php"><i class="ti-wallet text-muted mr-2"></i> <?php echo $mycompany; ?></a>
<a class="dropdown-item" href="signaturetok.php"><i class="ti-wallet text-muted mr-2"></i> <?php echo $signaturetokentitle; ?></a>
<a class="dropdown-item" href="newusercolleague2.php"><i class="ti-wallet text-muted mr-2"></i> Aggiungi Utente</a>
<a class="dropdown-item" href="#"><i class="ti-settings text-muted mr-2"></i> <?php echo $settings; ?></a>
<div class="dropdown-divider mb-0"></div>
<a class="dropdown-item" href="logout"><i class="ti-power-off text-muted mr-2"></i> <?php echo $logoutst; ?></a> </div>
</li>
</ul>
<!--end topbar-nav-->
<ul class="list-unstyled topbar-nav mb-0">
<li>
<button class="nav-link button-menu-mobile waves-effect waves-light"> <i class="ti-menu nav-icon"></i> </button>
</li>
<li class="hide-phone app-search">
<form role="search" class="">
<input type="text" id="AllCompo" placeholder="Search..." class="form-control">
<a href=""><i class="fas fa-search"></i></a>
</form>
</li>
</ul>
</nav>
<!-- end navbar-->
</div>
-61
View File
@@ -1,61 +0,0 @@
<?php if($idarticletype=="1") { ?>
<?php include('languages/it/shoesnamepart.php'); ?>
<!-- Image Map Generated by http://www.image-map.net/ -->
<img src="../images/calzatura.png" usemap="#map" width="1153" height="684">
<map name="map">
<area target="" alt="<?php echo $twos; ?>" title="<?php echo $twos; ?>" coords="286,177,292,239,286,288,318,338,344,383,324,392,264,306,255,296,252,248,245,211,236,201,256,184" shape="poly"
onclick="setInputVal('descriptionpartvalue', '<?php echo $twos; ?>')" href="javascript:void(0)">
<area target="" alt="<?php echo $threes; ?>" title="<?php echo $threes; ?>" coords="192,192,202,307,284,416,263,453,297,476,346,426,256,297,242,211" shape="poly" onclick="setInputVal('descriptionpartvalue', '<?php echo $threes; ?>')" href="javascript:void(0)">
<area target="" alt="<?php echo $fours; ?>" title="<?php echo $fours; ?>" coords="331,393,349,383,380,422,466,459,454,490,397,509,380,532,365,564,263,530,211,493,170,457,161,449,161,421,219,433,264,455,291,478,345,431" shape="poly" onclick="setInputVal('descriptionpartvalue', '<?php echo $fours; ?>')" href="javascript:void(0)">
<area target="" alt="<?php echo $fives; ?>" title="<?php echo $fives; ?>" coords="370,565,398,509,455,491,472,461,507,476,517,494,517,530,496,555,438,570,407,568" shape="poly" onclick="setInputVal('descriptionpartvalue', '<?php echo $fives; ?>')" href="javascript:void(0)">
<area target="" alt="<?php echo $fives; ?>" title="<?php echo $fives; ?>" coords="121,213,191,244,202,310,285,414,262,451,202,429,156,419,161,339,123,298,112,277" shape="poly" onclick="setInputVal('descriptionpartvalue', '<?php echo $sevens; ?>')" href="javascript:void(0)">
<area target="" alt="<?php echo $sevens; ?>" title="<?php echo $sevens; ?>" coords="81,395,90,342,112,284,153,330,159,353,156,416,155,449,99,412" shape="poly" onclick="setInputVal('descriptionpartvalue', '<?php echo $eights; ?>')" href="javascript:void(0)">
<area target="" alt="<?php echo $eights; ?>" title="<?php echo $eights; ?>" coords="75,405,79,445,128,483,153,493,163,480,181,488,244,547,335,586,408,601,485,589,508,577,527,556,523,536,505,553,473,569,433,572,379,572,339,567,277,545" shape="poly" onclick="setInputVal('descriptionpartvalue', '<?php echo $nines; ?>')" href="javascript:void(0)">
<area target="" alt="<?php echo $tens; ?>" title="<?php echo $tens; ?>" coords="180,495,169,577,201,586,201,512" shape="poly" onclick="setInputVal('descriptionpartvalue', '<?php echo $tens; ?>')" href="javascript:void(0)">
<area target="" alt="<?php echo $twelves; ?>" title="<?php echo $twelves; ?>" coords="798,439,882,466,941,486,987,512,1010,527,1003,496,968,476,904,449,865,421,853,407,811,417" shape="poly" onclick="setInputVal('descriptionpartvalue', '<?php echo $twelves; ?>')" href="javascript:void(0)">
<area target="" alt="<?php echo $thirteens; ?>" title="<?php echo $thirteens; ?>" coords="1026,412,996,490,1015,523,1076,435" shape="poly" onclick="setInputVal('descriptionpartvalue', '<?php echo $thirteens; ?>')" href="javascript:void(0)">
<area target="" alt="<?php echo $ones; ?>" title="<?php echo $ones; ?>" coords="115,185,115,210,189,240,189,189,229,200,270,174,265,168,199,164,173,161,125,173" shape="poly" onclick="setInputVal('descriptionpartvalue', '<?php echo $ones; ?>')" href="javascript:void(0)">
<area target="" alt="<?php echo $fourteens; ?>" title="<?php echo $fourteens; ?>" coords="1005,558,920,544,802,507,730,463,677,430,616,396,620,384,679,418,753,465,857,511" shape="poly" onclick="setInputVal('descriptionpartvalue', '<?php echo $fourteens; ?>')" href="javascript:void(0)">
<area target="" alt="<?php echo $fifteens; ?>" title="<?php echo $fifteens; ?>" coords="797,479,719,430,636,376,618,369,644,363,698,387,745,413,811,445,912,475,976,510,1009,532,986,537,914,523,870,510" shape="poly" onclick="setInputVal('descriptionpartvalue', '<?php echo $fifteens; ?>')" href="javascript:void(0)">
<area target="" alt="<?php echo $sixteens; ?>" title="<?php echo $sixteens; ?>" coords="729,468,698,570,750,582,765,489" shape="poly" onclick="setInputVal('descriptionpartvalue', '<?php echo $sixteens; ?>')" href="javascript:void(0)">
<area target="" alt="<?php echo $seventeens; ?>" title="<?php echo $seventeens; ?>" coords="520,318,519,349,601,353,612,353,617,323" shape="poly" onclick="setInputVal('descriptionpartvalue', '<?php echo $seventeens; ?>')" href="javascript:void(0)">
<area target="" alt="<?php echo $nineteens; ?>" title="<?php echo $nineteens; ?>" coords="633,215,629,295,661,303,705,344,708,380,744,407,795,434,846,406,791,346,765,291,764,243,761,208,668,205" shape="poly" onclick="setInputVal('descriptionpartvalue', '<?php echo $nineteens; ?>')" href="javascript:void(0)">
<area target="" alt="<?php echo $eighteens; ?>" title="<?php echo $eighteens; ?>" coords="628,301,614,355,644,354,683,366,707,379,700,340,661,302,642,299,653,300" shape="poly" onclick="setInputVal('descriptionpartvalue', '<?php echo $eighteens; ?>')" href="javascript:void(0)">
<area target="" alt="<?php echo $twentys; ?>" title="<?php echo $twentys; ?>" coords="976,100,921,167,923,204,966,204,1000,160,1017,119" shape="poly" onclick="setInputVal('descriptionpartvalue', '<?php echo $twentys; ?>')" href="javascript:void(0)">
<area target="" alt="<?php echo $ones; ?>" title="<?php echo $ones; ?>" coords="647,171,654,186,636,208,703,201,765,205,781,173,723,164" shape="poly" onclick="setInputVal('descriptionpartvalue', '<?php echo $ones; ?>')" href="javascript:void(0)">
<area target="" alt="<?php echo $sixs; ?>" title="<?php echo $sixs; ?>" coords="18,192,14,239,114,259,114,218" shape="poly" onclick="setInputVal('descriptionpartvalue', '<?php echo $sixs; ?>')" href="javascript:void(0)">
</map>
<?php } ?>
<?php if($idarticletype=="2") { ?>
<?php include('languages/it/glovesnamepart.php'); ?>
<img src="../images/glove.png" usemap="#map" width="1042" height="596">
<map name="map">
<area target="" alt="<?php echo $oneg; ?>" title="<?php echo $oneg; ?>" coords="49,222,148,293" shape="rect" onclick="setInputVal('descriptionpartvalue', '<?php echo $oneg; ?>')" href="javascript:void(0)">
<area target="" alt="<?php echo $twog; ?>" title="<?php echo $twog; ?>" coords="1031,320,930,384" shape="rect" onclick="setInputVal('descriptionpartvalue', '<?php echo $twog; ?>')" href="javascript:void(0)">
<area target="" alt="<?php echo $threeg; ?>" title="<?php echo $threeg; ?>" coords="644,260,837,349" shape="rect" onclick="setInputVal('descriptionpartvalue', '<?php echo $threeg; ?>')" href="javascript:void(0)">
<area target="" alt="<?php echo $fourg; ?>" title="<?php echo $fourg; ?>" coords="518,445,776,520" shape="rect" onclick="setInputVal('descriptionpartvalue', '<?php echo $fourg; ?>')" href="javascript:void(0)">
</map>
<?php } ?>
<?php if($idarticletype=="3") { ?>
<?php include('languages/it/semimask.php'); ?>
<img src="../images/semimask.png" usemap="#map" width="889" height="799">
<map name="map">
<!-- #$-:Image map file created by GIMP Image Map plug-in -->
<!-- #$-:GIMP Image Map plug-in by Maurits Rijk -->
<!-- #$-:Please do not edit lines starting with "#$" -->
<!-- #$VERSION:2.3 -->
<!-- #$AUTHOR:info -->
<area shape="rect" coords="418,33,852,86" alt="<?php echo $onem; ?>" title="<?php echo $onem; ?>" onclick="setInputVal('descriptionpartvalue', '<?php echo $onem; ?>')" href="javascript:void(0)" />
<area shape="rect" coords="624,190,848,247" alt="<?php echo $twom; ?>" title="<?php echo $twom; ?>" onclick="setInputVal('descriptionpartvalue', '<?php echo $twom; ?>')" href="javascript:void(0)" />
<area shape="rect" coords="664,490,824,701" alt="<?php echo $threem; ?>" title="<?php echo $threem; ?>" onclick="setInputVal('descriptionpartvalue', '<?php echo $threem; ?>')" href="javascript:void(0)" />
<area shape="poly" coords="233,64,237,117,418,119,419,92,397,71,232,65,234,66" alt="<?php echo $fourm; ?>" title="<?php echo $fourm; ?>" onclick="setInputVal('descriptionpartvalue', '<?php echo $fourm; ?>')" href="javascript:void(0)" />
<area shape="rect" coords="55,559,264,620" alt="<?php echo $fivem; ?>" title="<?php echo $fivem; ?>" onclick="setInputVal('descriptionpartvalue', '<?php echo $fivem; ?>')" href="javascript:void(0)" />
<area shape="rect" coords="90,702,641,775" alt="<?php echo $sixm; ?>" title="<?php echo $sixm; ?>" onclick="setInputVal('descriptionpartvalue', '<?php echo $sixm; ?>')" href="javascript:void(0)" />
</map>
<?php } ?>
-151
View File
@@ -1,151 +0,0 @@
<?php
ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
ini_set('buffer_output', 1);
//error_reporting(E_ALL | E_STRICT);
// This should be equal to: PATH_TO_VANGUARD_FOLDER/extra/auth.php
include('../extra/auth.php');
//require_once __DIR__ . '/extra/auth.php';
// Here we just check if user is not
// logged in, and in that case we redirect
// the user to vanguard login page.
if (! Auth::check()) {
redirectTo('login');
}
$user = Auth::user();
$iduserlogin=$user->present()->id;
$nameuser=$user->present()->name;
$emailuser=$user->present()->email;
$idcompany=$user->present()->idcompany;
$langid=$user->present()->langid;
$privacyacc=$user->present()->privacyaccepted;
$loginusername=$user->present()->username;
$roleuser=$user->present()->role_id;
//$user = "1";
//$iduserlogin="1";
//$idcompany="1";
//$companyname="Company Name";
//$nameuser="Claudio";
//$emailuser="info@acscreativesolutions.com";
?>
<?php require_once('../Connections/cmctrfdb.php'); ?>
<?php require_once('../webassist/mysqli/rsobj.php'); ?>
<?php // require_once('@@RSObjectPath@@'); ?>
<?php require_once('../webassist/mysqli/queryobj.php'); ?>
<?php // require_once("../webassist/form_validations/wavt_scripts_php.php"); ?>
<?php include('generalsettings.php'); ?>
<?php
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
if (!isset($_SESSION["idowneruser"])) {
$_SESSION["iduserlogin"]=$iduserlogin;
}
$iduserlog=$_SESSION["iduserlogin"];
$_SESSION["nameuser"]=$nameuser;
$_SESSION["emailuser"]=$emailuser;
if (!isset($_SESSION["tempcode"])) {
$timestampnow=time();
$temporarycode=$iduserlog."-".$timestampnow;
$_SESSION["tempcode"]=$temporarycode;
$tempcode=$_SESSION["tempcode"];
} else { $tempcode=$_SESSION["tempcode"]; }
?>
<?php
// if undermanteinance
if ($undermanteinance == "yes" && $roleuser != 1 && $roleuser != 4 && $roleuser != 5) {
header("Location: undermanteinance.php");
exit();
}
?>
<?php
//check privacy policy accepted
if (empty($privacyacc)) {
header("location: privacyaccept.php");
die();
}
?>
<?php
if (isset($_GET['info'])) {
$infobox=$_GET['info'];
$_SESSION["infobox"]=$infobox;
}
if (isset($_SESSION["infobox"])) {
$infobox=$_SESSION["infobox"];
}
?>
<?php include('languages/it/general.php');
include('languages/it/questionaire.php');
?>
<!-- query languages -->
<?php
$langselect = new WA_MySQLi_RS("langselect",$cmctrfdb,1);
$langselect->setQuery("SELECT * FROM languages WHERE languages.idlanguages='$langid'");
$langselect->execute();
$lang=$langselect->getColumnVal("acronym_languages");
?>
<?php
$languageselection = new WA_MySQLi_RS("languageselection",$cmctrfdb,0);
$languageselection->setQuery("SELECT * FROM languages WHERE languages.active_languages='Y' ORDER BY languages.name_languages");
$languageselection->execute();
?>
<?php
$avat = new WA_MySQLi_RS("avat",$cmctrfdb,0);
$avat->setQuery("SELECT avatar,id FROM auth_users WHERE auth_users.id='$iduserlogin'");
$avat->execute();
$avatarname=$avat->getColumnVal("avatar");
?>
<?php
//$companydetails = new WA_MySQLi_RS("companydetails",$cmctrfdb,1);
//$companydetails->setQuery("SELECT * FROM company WHERE company.idcompany='1'");
//$companydetails->execute();
if (!isset($idcompany)) {
$InsertQuery = new WA_MySQLi_Query($cmctrfdb);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "company";
$InsertQuery->bindColumn("companyname_company", "s", "-", "WA_DEFAULT");
$InsertQuery->saveInSession("");
$InsertQuery->execute();
$InsertGoTo = "";
$InsertQuery->redirect($InsertGoTo);
$lastcompany = new WA_MySQLi_RS("lastcompany",$cmctrfdb,1);
$lastcompany->setQuery("SELECT * FROM company ORDER BY company.idcompany DESC");
$lastcompany->execute();
$lastcompanyid=$lastcompany->getColumnVal("idcompany");
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "auth_users";
$UpdateQuery->bindColumn("idcompany", "i", "$lastcompanyid", "WA_DEFAULT");
$UpdateQuery->addFilter("id", "=", "i", "".($iduserlogin) ."");
$UpdateQuery->execute();
$UpdateGoTo = "";
$companyData["edited"]='N';
}
if (isset($idcompany)) {
$companydetails = mysqli_query($cmctrfdb, "SELECT * FROM company LEFT JOIN countries ON company.country_company=countries.idcountries WHERE company.idcompany='$idcompany'");
$companyData = mysqli_fetch_assoc($companydetails);
$companyname=$companyData["companyname_company"];
//echo $companyData["companyname_company"];
}
//include('securitycheck.php');
?>
<?php
//check company profile filled
if ($companyData["edited"]!="Y") {
header("location: companyprofile.php");
die();
}
?>
-12
View File
@@ -1,12 +0,0 @@
<?php
if (isset($_SESSION["alertstd"])) {
if ($_SESSION["alertstd"]=='YES') { ?>
<div class="alert alert-outline-warning alert-warning-shadow mb-0 alert-dismissible fade show" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true"><i class="mdi mdi-close"></i></span>
</button>
<strong><?php echo $stderrorfill; ?></strong>
</div>
<?php }} ?>
-114
View File
@@ -1,114 +0,0 @@
<?php
ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
ini_set('buffer_output', 1);
//error_reporting(E_ALL | E_STRICT);
// This should be equal to: PATH_TO_VANGUARD_FOLDER/extra/auth.php
include('../extra/auth.php');
//require_once __DIR__ . '/extra/auth.php';
// Here we just check if user is not
// logged in, and in that case we redirect
// the user to vanguard login page.
if (! Auth::check()) {
redirectTo('login');
}
$user = Auth::user();
$iduserlogin=$user->present()->id;
$nameuser=$user->present()->name;
$emailuser=$user->present()->email;
$idcompany=$user->present()->idcompany;
$langid=$user->present()->langid;
$privacyacc=$user->present()->privacyaccepted;
//$user = "1";
//$iduserlogin="1";
//$idcompany="1";
//$companyname="Company Name";
//$nameuser="Claudio";
//$emailuser="info@acscreativesolutions.com";
?>
<?php include('generalsettings.php'); ?>
<?php
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
if (!isset($_SESSION["idowneruser"])) {
$_SESSION["iduserlogin"]=$iduserlogin;
}
$iduserlog=$_SESSION["iduserlogin"];
$_SESSION["nameuser"]=$nameuser;
$_SESSION["emailuser"]=$emailuser;
if (!isset($_SESSION["tempcode"])) {
$timestampnow=time();
$temporarycode=$iduserlog."-".$timestampnow;
$_SESSION["tempcode"]=$temporarycode;
$tempcode=$_SESSION["tempcode"];
} else { $tempcode=$_SESSION["tempcode"]; }
?>
<?php
//check privacy policy accepted
if (empty($privacyacc)) {
header("location: privacyaccept.php");
die();
}
?>
<?php
if (isset($_GET['info'])) {
$infobox=$_GET['info'];
$_SESSION["infobox"]=$infobox;
}
if (isset($_SESSION["infobox"])) {
$infobox=$_SESSION["infobox"];
}
?>
<?php require_once('../Connections/cmctrfdb.php'); ?>
<?php require_once('../webassist/mysqli/rsobj.php'); ?>
<?php // require_once('@@RSObjectPath@@'); ?>
<?php require_once('../webassist/mysqli/queryobj.php'); ?>
<?php // require_once("../webassist/form_validations/wavt_scripts_php.php"); ?>
<?php include('languages/it/general.php');
include('languages/it/questionaire.php');
?>
<!-- query languages -->
<?php
$langselect = new WA_MySQLi_RS("langselect",$cmctrfdb,1);
$langselect->setQuery("SELECT * FROM languages WHERE languages.idlanguages='$langid'");
$langselect->execute();
$lang=$langselect->getColumnVal("acronym_languages");
?>
<?php
$languageselection = new WA_MySQLi_RS("languageselection",$cmctrfdb,0);
$languageselection->setQuery("SELECT * FROM languages WHERE languages.active_languages='Y' ORDER BY languages.name_languages");
$languageselection->execute();
?>
<?php
$avat = new WA_MySQLi_RS("avat",$cmctrfdb,0);
$avat->setQuery("SELECT avatar,id FROM auth_users WHERE auth_users.id='$iduserlogin'");
$avat->execute();
$avatarname=$avat->getColumnVal("avatar");
?>
<?php
//$companydetails = new WA_MySQLi_RS("companydetails",$cmctrfdb,1);
//$companydetails->setQuery("SELECT * FROM company WHERE company.idcompany='1'");
//$companydetails->execute();
if (isset($idcompany)) {
$companydetails = mysqli_query($cmctrfdb, "SELECT * FROM company LEFT JOIN countries ON company.country_company=countries.idcountries WHERE company.idcompany='$idcompany'");
$companyData = mysqli_fetch_assoc($companydetails);
//echo $companyData["companyname_company"];
}
//include('securitycheck.php');
?>
<?php
//check company profile filled
if ($companyData["edited"]!="Y") {
header("location: companyprofile.php");
die();
}
?>
-192
View File
@@ -1,192 +0,0 @@
<?php
if (isset($idtrf)) {
include('include/checkstepfile.php');
include('include/chemicalsquerycheck.php');
}
?>
<div class="left-sidenav">
<ul class="metismenu left-sidenav-menu">
<?php if ((Auth::user()->hasRole('Admin')) || (Auth::user()->hasRole('User')) || (Auth::user()->hasRole('Superuser'))): ?>
<li>
<a href="dashboard.php"><i class="ti-bar-chart"></i><span><?php echo $dashboard; ?></span></a>
</li>
<li>
<?php if (isset($codelist)) { ?>
<a href=""><i class="ti-angle-double-down"></i><span><?php echo $trfinprogress; ?></span></a>
<ul class="nav-second-level mm-collapse mm-show" style="">
<!-- first line trf -->
<?php if (in_array(1,$stepscertif))
{ ?>
<?php if (in_array(1,$codelist))
{ ?>
<li>
<a href="" style="color:green"><i class="fas fa-check-circle" style="color:green"></i><?php echo $certificationtitle; ?> </a>
</li> <?php } else { ?>
<li>
<a style="color:darkorange"><i class="fas fa-times-circle" style="color:darkorange"></i><?php echo $certificationtitle; ?> </a>
</li>
<?php }}?>
<!-- end first line trf -->
<!-- second line trf -->
<?php if (in_array(2,$stepscertif))
{ ?>
<?php if (in_array(2,$codelist))
{ ?>
<li>
<a href="trfdetails.php?idtrf=<?php echo $idtrf; ?>" style="color:green"><i class="fas fa-check-circle" style="color:green"></i><?php echo $descriptionsteptitle; ?> </a>
</li> <?php } else { ?>
<li>
<a style="color:darkorange"><i class="fas fa-times-circle" style="color:darkorange"></i><?php echo $descriptionsteptitle; ?> </a>
</li>
<?php }}?>
<!-- end second line trf -->
<!-- third line trf -->
<?php if (in_array(3,$stepscertif))
{ ?>
<?php if (in_array(3,$codelist))
{ ?>
<li>
<a href="standardstep.php?idtrf=<?php echo $idtrf; ?>" style="color:green"><i class="fas fa-check-circle" style="color:green"></i><?php echo $standardsteptitle; ?> </a>
</li> <?php } else { ?>
<li>
<a style="color:darkorange"><i class="fas fa-times-circle" style="color:darkorange"></i><?php echo $standardsteptitle; ?> </a>
</li>
<?php }}?>
<!-- end third line trf -->
<!-- fourth line trf -->
<?php if (in_array(4,$stepscertif))
{ ?>
<?php if (in_array(4,$codelist))
{ ?>
<li>
<a href="additionalinfo.php?idtrf=<?php echo $idtrf; ?>" style="color:green"><i class="fas fa-check-circle" style="color:green"></i><?php echo $additionalinfosteptitle; ?> </a>
</li> <?php } else { ?>
<li>
<a style="color:darkorange"><i class="fas fa-times-circle" style="color:darkorange"></i><?php echo $additionalinfosteptitle; ?> </a>
</li>
<?php }}?>
<!-- end fourth line trf -->
<!-- first five trf -->
<?php if (in_array(5,$stepscertif))
{ ?>
<?php if (in_array(5,$codelist))
{ ?>
<li>
<a href="addrequirements.php?idtrf=<?php echo $idtrf; ?>" style="color:green"><i class="fas fa-check-circle" style="color:green"></i><?php echo $addrequirementssteptitle; ?> </a>
</li> <?php } else { ?>
<li>
<a style="color:darkorange"><i class="fas fa-times-circle" style="color:darkorange"></i><?php echo $addrequirementssteptitle; ?> </a>
</li>
<?php }}?>
<!-- end five line trf -->
<!-- six line trf -->
<?php if (isset($chemicalstep) && ($chemicalstep=="Y")) { ?>
<?php if (in_array(6,$codelist))
{ ?>
<li>
<a href="chemicalagent.php?idtrf=<?php echo $idtrf; ?>" style="color:green"><i class="fas fa-check-circle" style="color:green"></i><?php echo $chemicalagentsteptitle; ?> </a>
</li> <?php } else { ?>
<li>
<a style="color:darkorange"><i class="fas fa-times-circle" style="color:darkorange"></i><?php echo $chemicalagentsteptitle; ?> </a>
</li>
<?php }} else {?>
<?php } ?>
<!-- end six line trf -->
<!-- seven line trf -->
<?php if (in_array(7,$stepscertif))
{ ?>
<?php if (in_array(7,$codelist))
{ ?>
<li>
<a href="identificationparts.php?idtrf=<?php echo $idtrf; ?>" style="color:green"><i class="fas fa-check-circle" style="color:green"></i><?php echo $identificationpartssteptitle; ?> </a>
</li> <?php } else { ?>
<li>
<a style="color:darkorange"><i class="fas fa-times-circle" style="color:darkorange"></i><?php echo $identificationpartssteptitle; ?> </a>
</li>
<?php }}?>
<!-- end seven line trf -->
<!-- seveeightn line trf -->
<?php if (in_array(8,$stepscertif))
{ ?>
<?php if (in_array(8,$codelist))
{ ?>
<li>
<a href="adddocument.php?idtrf=<?php echo $idtrf; ?>" style="color:green"><i class="fas fa-check-circle" style="color:green"></i><?php echo $uploaddocsteptitle; ?> </a>
</li> <?php } else { ?>
<li>
<a style="color:darkorange"><i class="fas fa-times-circle" style="color:darkorange"></i><?php echo $uploaddocsteptitle; ?> </a>
</li>
<?php }}?>
<!-- end eight line trf -->
<?php if (in_array(9,$stepscertif))
{ ?>
<?php if (in_array(9,$codelist))
{ ?>
<li>
<a href="trfoption.php?idtrf=<?php echo $idtrf; ?>" style="color:green"><i class="fas fa-check-circle" style="color:green"></i><?php echo $addparameterstitle; ?> </a>
</li> <?php } else { ?>
<li>
<a style="color:darkorange"><i class="fas fa-times-circle" style="color:darkorange"></i><?php echo $addparameterstitle; ?> </a>
</li>
<?php }}?>
</ul><?php } ?>
</li>
<li>
<a href="archivetrf.php"><i class="fas fa-history"></i><span><?php echo $historicaltrf; ?></span></a>
</li>
<li>
<a href="https://www.cimac.it/contatti/" target="_blank"><i class="ti-help"></i><span><?php echo $helptitle; ?></span></a>
</li>
<li>
<a href="https://www.cimac.it/contatti/" target="_blank"><i class="fas fa-users"></i><span><?php echo $contactus; ?></span></a>
</li>
<?php endif; ?>
<?php if ((Auth::user()->hasRole('Admin')) || (Auth::user()->hasRole('Superuser'))): ?>
<li>
<a href="javascript: void(0);"><i class="ti-lock"></i><span>Admin Area</span><span class="menu-arrow"><i class="mdi mdi-chevron-right"></i></span></a>
<ul class="nav-second-level mm-collapse" aria-expanded="false">
<li class="nav-item"><a class="nav-link" href="admin-dashboard.php"><i class="fas fa-cogs"></i>Admin Panel</a></li>
<li class="nav-item"><a class="nav-link" href="repositoryupload.php"><i class="fas fa-archive"></i>Files Download</a></li>
<li class="nav-item"><a class="nav-link" href="cstrf.php"><i class="fas fa-archive"></i>CS TRF Board</a></li>
</ul>
</li>
<?php endif; ?>
<?php if (Auth::user()->hasRole('CustomerService')): ?>
<li>
<li class="nav-item"><a class="nav-link" href="cstrf.php"><i class="fas fa-archive"></i>CS TRF Board</a></li>
</ul>
</li>
<?php endif; ?>
<?php if (Auth::user()->hasRole('Admin')): ?>
<li>
<li class="nav-item"><a class="nav-link" href="others/icons-fontawesome.html"><i class="ti-control-record"></i>Template</a></li>
</ul>
</li>
<?php endif; ?>
</ul>
</div>
File diff suppressed because it is too large Load Diff
-124
View File
@@ -1,124 +0,0 @@
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL | E_STRICT);
// This should be equal to: PATH_TO_VANGUARD_FOLDER/extra/auth.php
include('../extra/auth.php');
//require_once __DIR__ . '/extra/auth.php';
// Here we just check if user is not
// logged in, and in that case we redirect
// the user to vanguard login page.
if (! Auth::check()) {
redirectTo('login');
}
$user = Auth::user();
$iduserlogin=$user->present()->id;
$nameuser=$user->present()->name;
$emailuser=$user->present()->email;
$idcompany=$user->present()->idcompany;
$langid=$user->present()->langid;
$privacyacc=$user->present()->privacyaccepted;
$loginusername=$user->present()->username;
$roleuser=$user->present()->role_id;
//$user = "1";
//$iduserlogin="1";
//$idcompany="1";
$companyname="Company Name";
//$nameuser="Claudio";
//$emailuser="info@acscreativesolutions.com";
?>
<?php require_once('../Connections/cmctrfdb.php'); ?>
<?php require_once('../webassist/mysqli/rsobj.php'); ?>
<?php // require_once('@@RSObjectPath@@'); ?>
<?php require_once('../webassist/mysqli/queryobj.php'); ?>
<?php // require_once("../webassist/form_validations/wavt_scripts_php.php"); ?>
<?php include('generalsettings.php'); ?>
<?php
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
if (!isset($_SESSION["idowneruser"])) {
$_SESSION["iduserlogin"]=$iduserlogin;
}
$iduserlog=$_SESSION["iduserlogin"];
$_SESSION["nameuser"]=$nameuser;
$_SESSION["emailuser"]=$emailuser;
if (!isset($_SESSION["tempcode"])) {
$timestampnow=time();
$temporarycode=$iduserlog."-".$timestampnow;
$_SESSION["tempcode"]=$temporarycode;
$tempcode=$_SESSION["tempcode"];
} else { $tempcode=$_SESSION["tempcode"]; }
?>
<?php
if (isset($_GET['info'])) {
$infobox=$_GET['info'];
$_SESSION["infobox"]=$infobox;
}
if (isset($_SESSION["infobox"])) {
$infobox=$_SESSION["infobox"];
}
?>
<?php include('languages/it/general.php');
include('languages/it/questionaire.php');
?>
<!-- query languages -->
<?php
$langselect = new WA_MySQLi_RS("langselect",$cmctrfdb,1);
$langselect->setQuery("SELECT * FROM languages WHERE languages.idlanguages='$langid'");
$langselect->execute();
$lang=$langselect->getColumnVal("acronym_languages");
?>
<?php
$languageselection = new WA_MySQLi_RS("languageselection",$cmctrfdb,0);
$languageselection->setQuery("SELECT * FROM languages WHERE languages.active_languages='Y' ORDER BY languages.name_languages");
$languageselection->execute();
?>
<?php
$avat = new WA_MySQLi_RS("avat",$cmctrfdb,0);
$avat->setQuery("SELECT avatar,id FROM auth_users WHERE auth_users.id='$iduserlogin'");
$avat->execute();
$avatarname=$avat->getColumnVal("avatar");
?>
<?php
//$companydetails = new WA_MySQLi_RS("companydetails",$cmctrfdb,1);
//$companydetails->setQuery("SELECT * FROM company WHERE company.idcompany='1'");
//$companydetails->execute();
if (isset($idcompany)) {
$companydetails = mysqli_query($cmctrfdb, "SELECT * FROM company WHERE company.idcompany='$idcompany'");
$companyData = mysqli_fetch_assoc($companydetails);
//echo $companyData["companyname_company"];
}
//include('securitycheck.php');
?>
-159
View File
@@ -1,159 +0,0 @@
<?php if (isset($_GET['idcertificate'])) {
$idcertificate=$_GET['idcertificate']; ?>
<?php if ($idcertificate=="2") { ?>
<div id="alertcertification" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><?php echo $certificatealertm15c; ?></h5>
<button type="button" class="close" data-dismiss="modal">&times;</button>
</div>
<div class="modal-body">
<div class="alert alert-warning border-0" role="alert">
<strong><?php echo $certificatealertmesm15c; ?></strong>
</div>
<div class="alert alert-link border-0" role="alert">
<strong><?php echo $certificatealertmesm15ca; ?></strong><br>
<strong><?php echo $certificatealertmesm15cb; ?></strong>
</div>
<button type="submit" class="btn btn-success" data-dismiss="modal"><?php echo $confirmalert; ?></button>
<a href="typeofcertificate.php?varcertificate=0"><button type="submit" class="btn btn-danger"><?php echo $unconfirmalert; ?></button></a>
</div>
</div>
</div>
</div><?php } ?>
<?php if ($idcertificate=="3") { ?>
<div id="alertcertification" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><?php echo $certificatealertm15bm30s; ?></h5>
<button type="button" class="close" data-dismiss="modal">&times;</button>
</div>
<div class="modal-body">
<div class="alert alert-warning border-0" role="alert">
<strong><?php echo $certificatealertmesm15bm30s; ?></strong>
</div>
<div class="alert alert-link border-0" role="alert">
<strong><?php echo $certificatealertmesm15bm30sa; ?></strong><br>
<strong><?php echo $certificatealertmesm15bm30sb; ?></strong><br>
<strong><?php echo $certificatealertmesm15bm30sc; ?></strong><br>
<strong><?php echo $certificatealertmesm15bm30sd; ?></strong><br>
<strong><?php echo $certificatealertmesm15bm30se; ?></strong><br>
</div>
<a href=""><button type="submit" class="btn btn-success" data-dismiss="modal"><?php echo $confirmalert; ?></button></a>
<a href="typeofcertificate.php?varcertificate=0><button type="submit" class="btn btn-danger"><?php echo $unconfirmalert; ?></button></a>
</div>
</div>
</div>
</div><?php } ?>
<!-- M15A M30S -->
<?php if ($idcertificate=="4") { ?>
<div id="alertcertification" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><?php echo $certificatealertm15bm30s; ?></h5>
<button type="button" class="close" data-dismiss="modal">&times;</button>
</div>
<div class="modal-body">
<div class="alert alert-warning border-0" role="alert">
<strong><?php echo $certificatealertmesm15am30s; ?></strong>
</div>
<div class="alert alert-link border-0" role="alert">
</div>
<button type="submit" class="btn btn-success" data-dismiss="modal"><?php echo $confirmalert; ?></button>
<a href="typeofcertificate.php?varcertificate=0"><button type="submit" class="btn btn-danger"><?php echo $unconfirmalert; ?></button></a>
</div>
</div>
</div>
</div><?php } ?>
<!-- M18A -->
<?php if ($idcertificate=="5") { ?>
<div id="alertcertification" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><?php echo $certificatealertm18a; ?></h5>
<button type="button" class="close" data-dismiss="modal">&times;</button>
</div>
<div class="modal-body">
<div class="alert alert-warning border-0" role="alert">
<strong><?php echo $certificatealertmesm18a; ?></strong>
</div>
<div class="alert alert-link border-0" role="alert">
</div>
<button type="submit" class="btn btn-success" data-dismiss="modal"><?php echo $confirmalert; ?></button>
<a href="typeofcertificate.php?varcertificate=0"><button type="submit" class="btn btn-danger"><?php echo $unconfirmalert; ?></button></a>
</div>
</div>
</div>
</div><?php } ?>
<?php if ($idcertificate=="6") { ?>
<div id="alertcertification" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><?php echo $certificatealertm18a; ?></h5>
<button type="button" class="close" data-dismiss="modal">&times;</button>
</div>
<div class="modal-body">
<div class="alert alert-warning border-0" role="alert">
<strong><?php echo $certificatealertmesm18a; ?></strong>
</div>
<div class="alert alert-link border-0" role="alert">
</div>
<button type="submit" class="btn btn-success" data-dismiss="modal"><?php echo $confirmalert; ?></button>
<a href="typeofcertificate.php?varcertificate=0"><button type="submit" class="btn btn-danger"><?php echo $unconfirmalert; ?></button></a>
</div>
</div>
</div>
</div><?php } ?>
<?php if ($idcertificate=="md") { ?>
<div id="alertcertification" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><?php echo $certificateforclient; ?></h5>
<button type="button" class="close" data-dismiss="modal">&times;</button>
</div>
<div class="modal-body">
<div class="alert alert-warning border-0" role="alert">
<strong><?php echo $certificateforclientquestion; ?></strong>
</div>
<div class="alert alert-link border-0" role="alert">
<?php echo $intermiedateclient; ?>
</div>
<button type="submit" class="btn btn-success" data-dismiss="modal"><?php echo $confirmalert; ?></button>
<a href="typeofcertificate.php?varcertificate=0"><button type="submit" class="btn btn-danger"><?php echo $unconfirmalert; ?></button></a>
</div>
</div>
</div>
</div><?php } ?>
<?php } ?>
-4
View File
@@ -1,4 +0,0 @@
<div class="media-body align-self-center">
<h4 class="mt-0 header-title"><?php echo $certificationrequired; ?><?php echo $etrfcodetitle; ?> <?php echo($trfnumberfinal->getColumnVal("iduser")); ?>-<?php echo($trfnumberfinal->getColumnVal("trfnumber")); ?></h4>
</div><!--end media-body-->
-301
View File
@@ -1,301 +0,0 @@
<?php
$titlewb = "Reserved Area";
$mytrf = "My Requests";
$settings = "Settings";
$logoutst = "Logout";
$profile = "My Profile";
$yes = "Yes";
$no = "No";
$welcomeuser = "Hello ";
$welcome_help = "Here you can manage your new requests and consult those already entered";
$controlpanel = "How can I help you?";
$newtrf = "I have PPE to certify";
$newtrfforclient = "I have PPE to certify for a Client";
$trfinprogress = "TRF Status";
$historicaltrf = "Request History";
$helpdocument = "Download Area";
$trfinserted = "Inserted Requests";
$confirmcertificate = "Confirm";
$errorform = "Required Field";
$descriptiontitle = "Article code/Trade name";
$modeltitle = "Model";
$rangemeasuretitle = "Range of sizes";
$rangemeasuremintitle = "Size from";
$rangemeasuremaxtitle = "to Size";
$choosefile = "Choose the file...";
$samplecheck = "Describe your model";
$samplecheck_help = "";
$etrfcodetitle = "No.";
$tempcodetitle = "Your temporary identification code is ";
$photouploadtitle = "Upload photo";
$typearticletitle = "I need to certify";
$articlecharacteristictitle = "Type of PPE";
$nothingselect = "None";
$pleaseselect = "Select";
$certificationrequired = "Application Form No. ";
$standardlink = "Select the applicable standards (you can make multiple choices)";
$standardlink_help = "";
$assignedstd = "Based on the previous selections, these are the standards that will be applied. Select protection category and PPE category";
$assignedstd_help = "Selected Standards";
$stdnmb = "Standard";
$stdname = "Title";
$protectioncat = "Protection category";
$dpicat = "PPE category";
$action = "Action";
$actiondel = "Delete";
$nextsteptitle = "Confirm";
$additionalinfotitle = "Additional information";
$additionalinfotitle_help = "";
$virusprottitle = "Does the article protect from viruses?";
$esdtitle = "ESD footwear";
$orthopedictitle = "Orthopedic footwear";
$slippingtitle = "Slip resistance";
$autoclavabletitle = "Autoclavable";
$additionalreqtitle = "Additional protection requirements";
$additionalreqtitle_help = "In this section, you can indicate any additional protection requirements. It is always possible to change your choices before confirming.";
$pippo = "Hello Claudio";
$additionalreqtitleselected = "Selected additional requirements";
$additionalreqtitleselected_help = "";
$addreqtitle = "Additional requirement";
$chemagenttitle = "Chemical substances";
$chemagenttitle_help = "In this section, you must indicate the chemical substances you want to include in the certificate. It is always possible to change your choices before confirming.";
$addchemselected = "Selected chemical agents";
$addchemselected_help = "";
$addchemtitle = "Substance";
$newtest = "New";
$newtest_help = "Fill in the fields below to describe the part and then click save";
$newtesttitle = "Select the part";
$newtesttitle_help = "Fill in all the fields and proceed for all parts";
$oldcmctest = "Already tested by CIMAC";
$trdparttest = "Tested by another laboratory";
$descriptionpart = "Part";
$articlepart = "Article";
$colorpart = "Color";
$numbertrfusertitle = "Your requests";
$numbertrfcompanytitle = "Your company's requests";
$partsnumbertitle = "Parts and components already entered";
$addpartbutton = "Confirm and add part";
$cmctesttitle = "Part already tested by Cimac";
$cmctesttitle_help = "Pay attention fill this section only if the Test Report date is less than 5 years old, otherwise you should choose New part.";
$reportnumbercmctitle = "Test Report Number";
$datereporttitle = "Test Report Date";
$trdlabparttitle = "Tested by another laboratory";
$trdlabparttitle_help = "Pay attention fill this section only if the Test Report is accredited and is less than 5 years old, otherwise you should choose New part.";
$reprtonumbertrdlabtitle = "Test Report Number";
$trddatereporttitle = "Test Report Date";
$kindpart = "";
$descriptionpartlist = "Description";
$articlepartlist = "Article";
$colorpartlist = "Color";
$reportlist = "Test Report No.";
$datereportlist = "Test Report Date";
$assignedparts = "Summary of parts";
$alertdate = "The Test Report is over 5 years old so you must choose New component";
$selectfileonyourpc = "Select the file";
$filedescription = "File description";
$filenametitle = "Open";
$filenamedesc = "Description";
$confirmdeleteline = "Are you sure you want to delete the part?";
$dashboard = "Main menu";
$helptitle = "Support";
$contactus = "Contact Us";
$admincp = "Admin";
$addstandardtitle = "Confirm";
$addtitle = "Add";
$assignedparts_help = "In this section you can see the parts you have entered. You can always change your choices before confirming.";
$adddoctitle = "Attach any test reports issued by other laboratories and, if available, technical file, information note and/or artwork";
$adddoctitle_help = "Attach the following documents necessary for certification, if already available: technical file, information note and/or artwork";
$addeddoctitle = "Attached Documents";
$addeddoctitle_help = "Here you can delete the stored file";
$descriptionstep = "Article Description";
$edittitle = "Edit section";
$descriptionsteptitle = "Description";
$additionalinfosteptitle = "Additional Info";
$standardsteptitle = "Tests";
$addrequirementssteptitle = "Add. Requirements";
$chemicalagentsteptitle = "Chemical Agents";
$identificationpartssteptitle = "Parts";
$uploaddocsteptitle = "Documents";
$identificationparttitle = "Describe the parts and components of your model";
$identificationparttitle_help = "";
$notificatedorganismtitle = "Notified Body that issued the certificate";
$selectfilecertificate = "If the Notified Body is not CIMAC attach the certificate";
$chooseimage = "Do you have a photo? You can upload it here";
$uploadph = "Upload";
$registeredmarktitle = "Registered Mark";
$reportoftitle = "Report addressed to:";
$addparameterstitle = "-----";
$addparameterstitle_help = "";
$reportheadertitle = "I address the test report to:";
$certificateheadertitle = "I address the certificate to:";
$languagereporttitle = "In what language should we issue the test report?";
$languagecertificatetitle = "In what language should we issue the certificate?";
$invoiceheadertitle = "We invoice our services to: ";
$offeranddocumentitle = "We send the offer and documents to: ";
$surveillancetitle = "I intend to submit this model for surveillance ";
$modtitle = "Confirm";
$italianlang = "Italian";
$englishlang = "English";
$itaenglang = "Italian-English";
$otherlang = "Other";
$whoreportto = "";
$tometitle = "My company ";
$toothertitle = "Another company";
$asabovecontact = "As above";
$sendofferanddocument = "Who do we send the offer and documents to?";
$surveillancetitle = "I intend to submit this model for surveillance (at CIMAC)";
$modulec2 = "Module C2";
$moduled = "Module D";
$newtestparthelp = "<b>Description:</b> enter a brief description of the part (e.g., full grain leather thickness 1.8/2.0 mm / 100% polyester mesh fabric, etc.) \r\n
<b>Article:</b> enter the code you use internally to identify the part, for example the one you report in the bill of materials (e.g., UPPER001, LINING_AA, PALM_1, etc.) \r\n
The article code of the component must be unique and must correspond to that of the test report \r\n
<b>Material:</b> Specify the nature of the material, any thickness, areal weight, etc. \r\n
<b>Color:</b> insert the color or colors of the part \r\n";
$documenthelp = "If you are a new client insert the last chamber of commerce view \r\n
If you are already a client insert the last chamber of commerce view in case of changes and/or updates";
$insertdatacontact = "Insert data";
$modifydatacontact = "Modify the data if the audit is at another address or a different company";
$samplestoredtitle = "Do you have samples manufactured by each producer declared in the technical file in stock? \n\r <b>Attention: remember to keep them for the audit!</b>";
$samplestoredtitlenew = "Are they in stock?";
$manufacturernameaudit = "Manufacturer Names";
$manufacturernameaudit_help = "Enter the names of the manufacturers of the samples available in stock";
$manufacturernameaudit_help2 = "<b>Attention: remember to keep them for the audit!</b>";
$manufnametitle = "Manufacturer Name";
$manufnametitleselected = "Entered manufacturer names";
$surveillancedoption = "Is this the first time you request Module D surveillance for this model?";
$surveillancedoption1 = "I am requesting an initial Module D certification";
$surveillancedoption2 = "I am requesting the annual surveillance of the Module D certification";
$surveillancedoption3 = "I am requesting the renewal of the Module D certification";
$surveillancedoption4 = "I am requesting the extension of the Module D certification";
$declarationsent1 = "1) that I have not submitted a similar application to other Notified Bodies and that the technical documentation relating to the PPE has not been subject to a previous refusal with other Notified Bodies;";
$declarationsent2 = "2) that the information communicated and the documents produced are respectively true and authentic and commits to indemnify and hold A.N.C.I. Servizi S.r.l. a Socio Unico harmless from any liability, damage, or claim that may arise from the communication and transmission by the Manufacturer of untrue, inauthentic and/or deceitful information and documents.";
$declarationsent3 = "3) in the case of market launch, that I have not yet placed the PPE on the market.";
$declarationtitle = "DECLARATIONS";
$declarationtitle_help = "";
$companydeclaration = " declares and warrants";
$datettitle = "Date";
$clientnametitle = "Client Name";
$signedbytitle = "Signed by:";
$archivetrf = "Application Form Archive";
$ntrf = "Application Form Number";
$pdftitle = "PDF";
$firsrecordtitle = "First";
$previousrecordtitle = "Previous";
$nextrecordtitle = "Next";
$lastrecordtitle = "Last";
$mycompany = "Company";
$updateformtitle = "Update";
$telephonetitlecompany = "Company Phone";
$emailtitlecompany = "Company Email";
$telephonetitlecontact = "Contact Phone";
$emailtitlecontact = "Contact Email";
$companyprofiletitle = "Company Details";
$backstep = "Go Back";
$searchsentence = "To search for past articles write the first letters and select";
$drafttrftitle = "Draft TRF";
$proceedtrf = "Complete Application Form";
$pleaseselectstd = "Please Select";
$certificatenumbertitle = "Certificate Number";
$issuebycimactitle = "Issued by CIMAC?";
$moduleselectiontitle = "Type of Surveillance";
$addlineaudit = "Add New PPE";
$filenameaudit = "Document";
$auditdpilistcreate = "In this section, list all the PPE subject to audit and sampling";
$nosent = "No";
$yessent = "Yes";
$filesent = "File";
$suppliernametitle = "Manufacturer";
$addsup = "Add";
$dpireportnumbertitle = "PPE Certificate Number";
$filestitle = "Files";
$closewindow = "Return to Main Window - Close";
$notauthorizesentence = "You are not authorized to access this page! If you think this is an error, please contact the system administrator";
$stderrorfill = "Please remember to select the Protection Category and the PPE category - Thank you";
$newpartlist = "New Component";
$cmcpartlist = "Component already tested by CIMAC";
$trdpartlist = "Component already tested by another Laboratory";
$activetitle = "Active";
$inactivetitle = "Inactive";
$selecttitlepartform = "Select";
$selecttitlepart = "New Part";
$whichkindofpart = "Select whether the part is new or already tested";
$insertauditdpi = "Insert";
$copycontactfrom = "You can copy the registration from:";
$edictcontacttitle = "Edit Registration";
$anagraficaaudit = "Audit";
$anagraficainvoice = "Invoice Header";
$anagraficatest = "Report Header";
$anagraficacertificate = "Certificate Header";
$anagraficamycompany = "My Company";
$anagraficacompany = "Company";
$anagraficaaddress = "Address";
$anagraficacity = "City";
$signaturetokentitle = "Signature Token";
$tokensuccess = "Token successfully updated! An email has been sent to you with the assigned token";
$inserttokensign = "Enter the signature token (6 digits)";
$tokenwhere = "If you can't find the signature token check your email or click here";
$firmdeclaration = "By clicking Confirm, the application form will be definitively sent to our servers, without the possibility of modification. In case of doubts or errors contact us for support";
$sendtitle = "Application Form Successfully Sent!";
$sendsentence = "Your Application Form has been successfully sent, you will soon receive an email with the summary PDF";
$uncorrecttokentitle = "Attention, the token you entered is not correct! Try entering it again or reset the token by following the instructions below";
$standardcodetitle = "Standard";
$protectioncategorytitle = "Protection Category";
$dpicategorytitle = "PPE Category";
$otherlangtitle = "If you select other please specify which language here";
$dpistorealert = "Warning during the audit the PPE must be available in stock for sampling";
$articlealert = "The article code of the component must be unique and must correspond to that of the test report";
$m15dtitle = "Module B Renewal Request";
$m15dm30Stitle_help = "I have modified a model already certified according to Regulation (EU) 2016/425 and need to renew the certificate.";
$m15dm30Stitle = "";
$descriptionitem = "Description";
$extracetitle = "Extra CE";
$companyupdatetitle = "Before proceeding, you need to fill in or update the company details! Thank you";
$extracetitleline = "Indicate European Community Representative (if present)";
$certification2list = "Attention: you have the following TRFs ready for the issuance of the second module.";
$proceedmodule2 = "Proceed";
$secondmoduletitle = "Confirm sending of second module";
$certukca = "UKCA Certification";
$photoshoesside = "Side Photo";
$photoshoessole = "Sole View Photo";
$photogloveup = "Palm View Glove Photo";
$photoglovebottom = "Back View Glove Photo";
$photomask = "Half Mask Photo";
$pdnappform = "Conformity Assessment Application No.";
$pdnappformtest = "Test Request Form for Conformity Assessment No.";
$citytitle = 'City';
$statement = "By the signature below, the manufacturer declares and guarantees the following:
1) that no similar application has been submitted to other Notified Bodies and that the technical documentation relating to the PPE has not been previously rejected by other Notified Bodies;
2) that the information communicated and the documents produced are true and authentic respectively and undertakes to indemnify and hold harmless A.N.C.I. Servizi S.r.l. a socio unico from any liability, damage, or claim that may arise from the Manufacturer's communication and transmission of untrue, inauthentic, and/or false information and documents.";
$statementnocert = "By the signature below, the manufacturer declares and guarantees:
that the information communicated and the documents produced are true and authentic respectively and undertakes to indemnify and hold harmless A.N.C.I. Servizi S.r.l. a socio unico from any liability, damage, or claim that may arise from the Manufacturer's communication and transmission of untrue, inauthentic, and/or false information and documents.";
$addstatement = "For the PPE subject to this application, the Intermediary authorizes the Manufacturer to use its own test reports";
$nameclienttocertificate = "Customer registration for which I want to certify";
$photomasksidea = "Side A";
$photomasksideb = "Side B";
$titlealertstd = "Attention!";
$textalertstd = "Have you filled in the protection category and PPE category for all the standards?";
$confirmButtonTextalertstd = "Yes, let's proceed";
$cancelButtonTextalertstd = "Add missing categories";
$alertTextstd = "Add the missing parts";
$confirmButtonTextalertparts = "Proceed anyway";
$cancelButtonTextalertparts = "Add missing parts";
$alertTextparts ="Add missing parts";
$partsnotfound="These parts are not found:";
$addphotosdoc="Add photos";
$allowedkind="(allowed type: jpg, jpeg e png)";
$clonealert = "Are you sure you want to duplicate TRF N.";
$clonealertconfirm = "Yes, duplicate!";
$clonealertcancel = "No, close!!";
$revalert = "Are you sure you want to review TRF N.";
$revalertconfirm = "Yes, review!";
$revalertcancel = "No, close!!";
$browsebotton="Browse";
$nofilechoosen="No file chosen";
$sendtosign="Send to Sign";
$notokenneeded = "Attention: for sending to another person within the same company for signature, it is not necessary to enter the token.";
$sentforsignview = "The completed TRF will be displayed in the account of the second person under the menu item TRFs pending signature.";
?>
-149
View File
@@ -1,149 +0,0 @@
<?php
$titlewb="Area Riservata";
$mytrf="Le mie richieste";
$settings="Impostazioni";
$logoutst="Logout";
$profile="Il mio Profilo";
$yes="";
$no="No";
$welcomeuser="Ciao ";
$welcome_help="Qui puoi gestire le tue nuove richieste e consultare quelle già inserite";
$controlpanel="Come posso aiutarti?";
$newtrf="Ho un DPI da certificare";
$newtrfforclient="Ho un DPI da certificare per un mio Cliente";
$trfinprogress="TRF Status";
$historicaltrf="Storico Richieste";
$helpdocument="Area download";
$trfinserted="Richieste inserite";
$confirmcertificate="Conferma";
$errorform="Campo Richiesto";
$descriptiontitle="Codice articolo/Nome commerciale";
$modeltitle="Modello";
$rangemeasuretitle="Gamma Misure";
$rangemeasuremintitle="Misura da";
$rangemeasuremaxtitle="a Misura";
$choosefile="Scegli il file...";
$samplecheck="Descrivi il tuo modello";
$samplecheck_help="";
$etrfcodetitle="N.";
$tempcodetitle="Il tuo codice identificativo temporaneo è ";
$photouploadtitle="Carica la foto";
$typearticletitle="Devo certificare";
$articlecharacteristictitle="Tipo di DPI";
$nothingselect="Nessuna";
$pleaseselect="Seleziona";
$certificationrequired="Application Form: ";
$standardlink="Seleziona le norme applicabili (puoi fare una scelta multipla)";
$standardlink_help="";
$assignedstd="In questa sezione devi indicare il livello di protezione e, dove richiesto, la Categoria del DPI. È sempre possibile modificare le tue scelte prima di confermare.";
$assignedstd_help="Norme selezionate";
$stdnmb="Norma";
$stdname="Titolo";
$protectioncat="Categoria Protezione";
$dpicat="Categoria DPI";
$action="Azione";
$nextsteptitle="Conferma";
$additionalinfotitle="Informazioni Aggiuntive";
$additionalinfotitle_help="";
$virusprottitle="L'articolo protegge da virus?";
$esdtitle="Calzatura ESD";
$orthopedictitle="Calzatura Ortopedica";
$slippingtitle="Resistenza allo scivolamento";
$autoclavabletitle="Autoclavabile";
$additionalreqtitle="Requisiti di protezione addizionali";
$additionalreqtitle_help="In questa sezione puoi indicare eventuali requisiti di protezione addizionali. È sempre possibile modificare le tue scelte prima di confermare.";
$pippo="Ciao Claudio";
$additionalreqtitleselected="Requisiti Addizionali selezionati";
$additionalreqtitleselected_help="";
$addreqtitle="Requisito Addizionale";
$chemagenttitle="Sostanze chimiche";
$chemagenttitle_help="In questa sezione devi indicare le sostanze chimiche che vuoi inserire nel certificato. È sempre possibile modificare le tue scelte prima di confermare.";
$addchemselected="Agenti Chimici Selezionati";
$addchemselected_help="";
$addchemtitle="Sostanza";
$newtest="Nuova";
$newtest_help="Compila di seguito i campi per descrivere la parte e poi clicca su memorizza";
$newtesttitle="Seleziona la parte";
$newtesttitle_help="Compila tutti i campi e prosegui per tutte le parti ";
$oldcmctest="Già testata da CIMAC";
$trdparttest="Testata da altro laboratorio";
$descriptionpart="Descrizione";
$articlepart="Articolo";
$colorpart="Colore";
$numbertrfusertitle="Le tue richieste";
$numbertrfcompanytitle="Le richieste della tua azienda";
$partsnumbertitle="Parti e componenti già inserite";
$addpartbutton="Conferma e aggiungi parte";
$cmctesttitle="Parte già testata da Cimac";
$cmctesttitle_help="Attenzione compila questa sezione solo se la data del Rapporto di Prova ha meno di 5 anni, altrimenti devi scegliere Nuova parte.";
$reportnumbercmctitle="Numero Rapporto di Prova";
$datereporttitle="Data Rapporto di Prova";
$trdlabparttitle="Testata da altro laboratorio";
$trdlabparttitle_help="Attenzione compila questa sezione solo se il Rapporto di Prova è accreditato e ha meno di 5 anni, altrimenti devi scegliere Nuova parte.";
$reprtonumbertrdlabtitle="Numero Rapporto di Prova";
$trddatereporttitle="Data Rapporto di Prova";
$kindpart="";
$descriptionpartlist="Descrizione";
$articlepartlist="Articolo";
$colorpartlist="Colore";
$reportlist="N. Rapporto di Prova";
$datereportlist="Data Rapporto di Prova";
$assignedparts="Riepilogo parti";
$alertdate="Il Rapporto di Prova ha più di 5 anni quindi devi scegliere Nuova parte";
$selectfileonyourpc="Seleziona il file";
$filedescription="Descrizione del file";
$filenametitle="Nome del File";
$filenamedesc="Descrizione";
$confirmdeleteline="Sei sicuro di voler cancellare la parte?";
$dashboard="Menu principale";
$helptitle="Supporto";
$contactus="Contattaci";
$admincp="Admin";
$addstandardtitle="Conferma";
$addtitle="Aggiungi";
$assignedparts_help="In questa sezione puoi vedere le parti che hai inserito.È sempre possibile modificare le tue scelte prima di confermare.";
$adddoctitle="Allega Documenti";
$adddoctitle_help="Allega i seguenti documenti necessari alla certificazione, se già disponibili: fascicolo tecnico, nota informativa e/o artwork";
$addeddoctitle="Documenti Allegati";
$addeddoctitle_help="Di seguito puoi modificare la descrizione od eliminare il file memorizzato";
$descriptionstep="Descrizione Articolo";
$edittitle="Modifica Sezione";
$descriptionsteptitle="Descrizione";
$additionalinfosteptitle="Info aggiuntive";
$standardsteptitle="Tests";
$addrequirementssteptitle="Requisiti Agg.";
$chemicalagentsteptitle="Agenti Chimici";
$identificationpartssteptitle="Parti";
$uploaddocsteptitle="Documenti";
$identificationparttitle="Descrivi le parti e le componenti del tuo modello";
$identificationparttitle_help="";
$notificatedorganismtitle="Organismo Notificato che ha emesso lattestato";
$selectfilecertificate="Se l'Organismo Notificato non è CIMAC allega l'attestato";
$chooseimage="Hai una foto? Puoi inserirla qui";
$uploadph="Carica";
$registeredmarktitle="Marchio Registrato";
$reportoftitle="Report Intestato a:";
$addparameterstitle="-----";
$addparameterstitle_help="";
$reportheadertitle="Intesto il Rapporto di Prova a:";
$insertdatacontact="Inserisci i dati dell'altra persona/società";
$certificateheadertitle="Intesto il certificato a:";
$languagereporttitle="In che lingua emettiamo il Rapporto di Prova?";
$languagecertificatetitle="In che lingua emettiamo il certificato?";
$invoiceheadertitle="Fatturiamo i nostri servizi a: ";
$offeranddocumentitle="Inviamo lofferta e i documenti a: ";
$surveillancetitle="Intendo sottoporre questo modello a sorveglianza ";
$modtitle="Conferma";
$italianlang="Italiano";
$englishlang="Inglese";
$itaenglang="Italiano-Inglese";
$otherlang="Altro";
$whoreportto="";
$tometitle="A me ";
$toothertitle="Ad un'altra persona ";
$asabovecontact="Come sopra";
$sendofferanddocument="Invio l'offerta e i documenti a: ";
$surveillancetitle="Intendo sottoporre questo modello a sorveglianza (presso CIMAC)";
$modulec2="Modulo C2";
$moduled="Modulo D";
?>
-80
View File
@@ -1,80 +0,0 @@
<?php
$kindcertificatetitle="Nuova Richiesta";
$certificationtitle="Certificazione";
$typeofcertificate_question="";
$typeofcertificate_help="Segui questo percorso guidato e crea la tua domanda di certificazione";
$questionm16m30s="Hai un nuovo DPI da certificare?";
$questionm16m30s_help="";
$questionm16n30s_b="È la variante di un modello già certificato?";
$certificatem16m30s="Perfetto, continuiamo!";
$certificatem16m30s_help="";
$certificatem16m30sb="Perfetto, continuiamo!";
$certificatem16m30sb_help="";
$certificatem16m30svar="È la variante di un modello già certificato?";
$multiplecertificate="Come posso aiutarti?";
$multiplecertificate_help="-----";
$options="Ho bisogno di:";
$adjustcertificate="Adeguare la certificazione da Direttiva a Regolamento ";
$revisecertificate="Revisionare un modello già certificato ";
$extendcertificate="Estendere la certificazione ad un mio cliente ";
$surveillancemodulec="Chiedere la sorveglianza Modulo C2 ";
$surveillancemoduled="Chiedere la sorveglianza Modulo D ";
$m18btitle="Help";
$m18btitle_help="Ho un modello con certificato UE del tipo Modulo B in corso di validità e devo chiedere la sorveglianza Modulo D.";
$m18atitle="Help";
$m18atitle_help="Ho un modello con certificato UE del tipo Modulo B in corso di validità e devo chiedere la sorveglianza Modulo C2.";
$m15am30stitle="Help";
$m15am30stitle_help="Ho un modello già certificato secondo Regolamento (UE) 2016/425 e devo certificarlo anche per un mio Cliente.";
$m15Bm30Stitle="Help";
$m15Bm30Stitle_help="Ho modificato un modello già certificato secondo Regolamento (UE) 2016/425 e devo aggiornare il certificato.";
$m15ctitle="Help";
$m15ctitle_help="Ho un modello già certificato secondo la Direttiva 89/686/CEE e devo aggiornarlo al Regolamento (UE) 2016/425.";
$previosurepnumbertitle="Inserisci il numero di certificato UE del tipo modulo B";
$prevcertificatehelp="";
$certificatem15c="Perfetto, continuiamo!";
$certificatem15c_help="";
$certificatem15bm30s="Perfetto, continuiamo!";
$certificatem15bm30s_help="";
$certificatem15am30s="Perfetto, continuiamo!";
$certificatem15am30s_help="";
$certificatem18a="Perfetto, continuiamo!";
$certificatem18a_help="";
$certificatem18b="Perfetto, continuiamo!";
$certificatem18b_help="";
$alertm15c="Questa procedura può essere attuata solo entro il 20 aprile 2023 se:\r\n 1) il modello è totalmente identico a quello dellattestato secondo Direttiva;\r\n 2) le norme di riferimento indicate nellattestato sono ancora in stato di validità.";
$certificatealertm15c="Attenzione";
$certificatealertmesm15c="Questa procedura può essere attuata solo entro il 20 aprile 2023 se:";
$certificatealertmesm15ca="1) il modello è totalmente identico a quello dellattestato secondo Direttiva;";
$certificatealertmesm15cb="2) le norme di riferimento indicate nellattestato sono ancora in stato di validità.";
$confirmalert="Conferma";
$unconfirmalert="Annulla";
$alertm15c="Questa procedura può essere attuata solo entro il 20 aprile 2023 se:\r\n 1) il modello è totalmente identico a quello dellattestato secondo Direttiva;\r\n 2) le norme di riferimento indicate nellattestato sono ancora in stato di validità.";
$certificatealertm15bm30s="Attenzione";
$certificatealertmesm15bm30s="Questa procedura può essere richiesta solo se:";
$certificatealertmesm15bm30sa="1) Il certificato UE del tipo Modulo B da revisionare è stato emesso da CIMAC.";
$certificatealertmesm15bm30sb="2) Calzature: le modifiche non riguardano la suola.";
$certificatealertmesm15bm30sc="3) Guanti non monouso: hai variato il nome, il colore e/o lo spessore. Per altre modifiche contattaci.";
$certificatealertmesm15bm30sd="4) Guanti monouso: hai variato il nome e/o il colore. Per altre modifiche contattaci.";
$certificatealertmesm15bm30se="5) Semimaschere: hai variato il nome e/o il colore. Per altre modifiche contattaci.";
$certificatealertm15am30s="Attenzione";
$certificatealertmesm15am30s="Questa procedura può essere richiesta solo se il modello è certificato secondo Regolamento (UE) 2016/425 e sono stati eseguiti tutti i test previsti.";
$certificatealertm18a="Attenzione";
$certificatealertmesm18a="Questa procedura può essere richiesta solo se il modello è un DPI di Categoria III con certificato UE del tipo Modulo B in corso di validità.";
$certificateforclient="Attenzione";
$certificateforclientquestion="Vuoi essere lintermediario per il tuo Cliente?";
$intermiedateclient="l'Intermediario è la persona di riferimento per tutte le comunicazioni con CIMAC.";
$insertintermediatecontact="Inserisci i dati del tuo Cliente che sarà il Fabbricante del modello ";
$companynametitle="Ragione Sociale";
$companyaddresstitle="Indirizzo";
$captitle="CAP";
$citytitle="Città";
$pivatitle="Partita Iva";
$countrytitle="Nazione";
$telephonetitle="Telefono";
$emailtitle="Email";
$contactnametitle="Nome Contatto";
$contactsurnametitle="Cognome Contatto";
$submitcontactformtitle="Conferma";
$submitclientname="Annulla";
$fabbricantehelp="Fabbricante: qualsiasi persona fisica o giuridica che fabbrica un DPI o che lo fa progettare o fabbricare, e lo commercializza con il proprio nome o marchio commerciale.";
?>
-305
View File
@@ -1,305 +0,0 @@
<?php
$titlewb="Area riservata";
$mytrf="Le mie richieste";
$settings="Impostazioni";
$logoutst="Logout";
$profile="Il mio profilo";
$yes="";
$no="No";
$welcomeuser="Ciao ";
$welcome_help="Qui puoi gestire le tue nuove richieste e consultare quelle già inserite";
$controlpanel="Come posso aiutarti?";
$newtrf="Ho un DPI da certificare";
$newtrfforclient="Ho un DPI da certificare per un mio Cliente";
$trfinprogress="TRF Status";
$historicaltrf="Storico Richieste";
$helpdocument="Area download";
$trfinserted="Richieste inserite";
$confirmcertificate="Conferma";
$errorform="Campo Richiesto";
$descriptiontitle="Codice articolo/Nome commerciale";
$modeltitle="Modello";
$rangemeasuretitle="Gamma misure";
$rangemeasuremintitle="Misura da";
$rangemeasuremaxtitle="a Misura";
$choosefile="Scegli il file...";
$samplecheck="Descrivi il tuo modello";
$samplecheck_help="";
$etrfcodetitle="N.";
$tempcodetitle="Il tuo codice identificativo temporaneo è ";
$photouploadtitle="Carica la foto";
$typearticletitle="Devo certificare";
$articlecharacteristictitle="Tipo di DPI";
$nothingselect="Nessuna";
$pleaseselect="Seleziona";
$certificationrequired="Application Form n. ";
$standardlink="Seleziona le norme applicabili (puoi fare una scelta multipla)";
$standardlink_help="";
$assignedstd="In base alle selezioni precedenti, questi sono gli standards che veranno applicati. Seleziona categoria di protezione e categoria DPI";
$assignedstd_help="Norme selezionate";
$stdnmb="Norma";
$stdname="Titolo";
$protectioncat="Categoria protezione";
$dpicat="Categoria DPI";
$action="Azione";
$actiondel="Elimina";
$nextsteptitle="Conferma";
$additionalinfotitle="Informazioni aggiuntive";
$additionalinfotitle_help="";
$virusprottitle="L'articolo protegge da virus?";
$esdtitle="Calzatura ESD";
$orthopedictitle="Calzatura ortopedica";
$slippingtitle="Resistenza allo scivolamento";
$autoclavabletitle="Autoclavabile";
$additionalreqtitle="Requisiti di protezione addizionali";
$additionalreqtitle_help="In questa sezione puoi indicare eventuali requisiti di protezione addizionali. È sempre possibile modificare le tue scelte prima di confermare.";
$pippo="Ciao Claudio";
$additionalreqtitleselected="Requisiti addizionali selezionati";
$additionalreqtitleselected_help="";
$addreqtitle="Requisito addizionale";
$chemagenttitle="Sostanze chimiche";
$chemagenttitle_help="In questa sezione devi indicare le sostanze chimiche che vuoi inserire nel certificato. È sempre possibile modificare le tue scelte prima di confermare.";
$addchemselected="Agenti chimici selezionati";
$addchemselected_help="";
$addchemtitle="Sostanza";
$newtest="Nuova";
$newtest_help="Compila di seguito i campi per descrivere la parte e poi clicca su memorizza";
$newtesttitle="Seleziona la parte";
$newtesttitle_help="Compila tutti i campi e prosegui per tutte le parti ";
$oldcmctest="Già testata da CIMAC";
$trdparttest="Testata da altro laboratorio";
$descriptionpart="Parte";
$articlepart="Articolo";
$colorpart="Colore";
$numbertrfusertitle="Le tue richieste";
$numbertrfcompanytitle="Le richieste della tua azienda";
$partsnumbertitle="Parti e componenti già inserite";
$addpartbutton="Conferma e aggiungi parte";
$cmctesttitle="Parte già testata da Cimac";
$cmctesttitle_help="Attenzione compila questa sezione solo se la data del Rapporto di Prova ha meno di 5 anni, altrimenti devi scegliere Nuova parte.";
$reportnumbercmctitle="Numero Rapporto di Prova";
$datereporttitle="Data Rapporto di Prova";
$trdlabparttitle="Testata da altro laboratorio";
$trdlabparttitle_help="Attenzione compila questa sezione solo se il Rapporto di Prova è accreditato e ha meno di 5 anni, altrimenti devi scegliere Nuova parte.";
$reprtonumbertrdlabtitle="Numero Rapporto di Prova";
$trddatereporttitle="Data Rapporto di Prova";
$kindpart="";
$descriptionpartlist="Descrizione";
$articlepartlist="Articolo";
$colorpartlist="Colore";
$reportlist="N. Rapporto di Prova";
$datereportlist="Data Rapporto di Prova";
$assignedparts="Riepilogo parti";
$alertdate="Il Rapporto di Prova ha più di 5 anni quindi devi scegliere Componente nuovo";
$selectfileonyourpc="Seleziona il file";
$filedescription="Descrizione del file";
$filenametitle="Apri";
$filenamedesc="Descrizione";
$confirmdeleteline="Sei sicuro di voler cancellare la parte?";
$dashboard="Menu principale";
$helptitle="Supporto";
$contactus="Contattaci";
$admincp="Admin";
$addstandardtitle="Conferma";
$addtitle="Aggiungi";
$assignedparts_help="In questa sezione puoi vedere le parti che hai inserito.È sempre possibile modificare le tue scelte prima di confermare.";
$adddoctitle="Allega gli eventuali test report se emessi da altro laboratorio e, se già disponibili, fascicolo tecnico, nota informativa e/o artwork";
$adddoctitle_help="Allega i seguenti documenti necessari alla certificazione, se già disponibili: fascicolo tecnico, nota informativa e/o artwork";
$addeddoctitle="Documenti allegati";
$addeddoctitle_help="Di seguito puoi eliminare il file memorizzato";
$descriptionstep="Descrizione articolo";
$edittitle="Modifica sezione";
$descriptionsteptitle="Descrizione";
$additionalinfosteptitle="Info aggiuntive";
$standardsteptitle="Tests";
$addrequirementssteptitle="Requisiti agg.";
$chemicalagentsteptitle="Agenti chimici";
$identificationpartssteptitle="Parti";
$uploaddocsteptitle="Documenti";
$identificationparttitle="Descrivi le parti e le componenti del tuo modello";
$identificationparttitle_help="";
$notificatedorganismtitle="Organismo Notificato che ha emesso lattestato";
$selectfilecertificate="Se l'Organismo Notificato non è CIMAC allega l'attestato";
$chooseimage="Hai una foto? Puoi inserirla qui";
$uploadph="Carica";
$registeredmarktitle="Marchio registrato";
$reportoftitle="Report intestato a:";
$addparameterstitle="-----";
$addparameterstitle_help="";
$reportheadertitle="Intesto il rapporto di prova a:";
$certificateheadertitle="Intesto il certificato a:";
$languagereporttitle="In che lingua emettiamo il rapporto di prova?";
$languagecertificatetitle="In che lingua emettiamo il certificato?";
$invoiceheadertitle="Fatturiamo i nostri servizi a: ";
$offeranddocumentitle="Inviamo lofferta e i documenti a: ";
$surveillancetitle="Intendo sottoporre questo modello a sorveglianza ";
$modtitle="Conferma";
$italianlang="Italiano";
$englishlang="Inglese";
$itaenglang="Italiano-Inglese";
$otherlang="Altro";
$whoreportto="";
$tometitle="La mia azienda ";
$toothertitle="Un'altra azienda";
$asabovecontact="Come sopra";
$sendofferanddocument="A chi inviamo lofferta e i documenti? ";
$surveillancetitle="Intendo sottoporre questo modello a sorveglianza (presso CIMAC)";
$modulec2="Modulo C2";
$moduled="Modulo D";
$newtestparthelp="<b>Descrizione:</b> inserisci una breve descrizione della parte (ad es. cuoio fiore spessore 1,8/2,0 mm / tessuto rete 100% poliestere, ecc.) \r\n
<b>Articolo:</b> inserire il codice che utilizzi internamente per identificare la parte, ad esempio quello che riporti nella distinta base (ad es. TOMAIO001, FOD_AA, PALMO_1, ecc.) \r\n
Il codice articolo del componente deve essere univoco e deve corrispondere a quello del test report \r\n
<b>Materiale:</b> Specificare natura del materiale, eventuale spessore, massa areica, ecc. \r\n
<b>Colore:</b> inserisci il colore o i colori della parte \r\n
";
$documenthelp="Se sei nuovo cliente inserisci ultima visura camerale \r\n
Se sei già cliente inserisci ultima visura camerale in caso di modifiche e/o aggiornamenti";
$insertdatacontact="Inserisci i dati";
$modifydatacontact="Modifica i dati, se l'audit è presso un altro indirizzo o un'altra azienda";
$samplestoredtitle="Hai a magazzino campioni fabbricati da ogni produttore dichiarato nel fascicolo tecnico? \n\r <b>Attenzione: ricorda di conservarli per laudit!</b>";
$samplestoredtitlenew="Sono a Magazzino?";
$manufacturernameaudit="Nomi Produttori";
$manufacturernameaudit_help="Inserisci il nome dei produttori dei campioni disponibili a magazzino";
$manufacturernameaudit_help2="<b>Attenzione: ricorda di conservarli per laudit!</b>";
$manufnametitle="Nome Produttore";
$manufnametitleselected="Nomi produttori inseriti";
$surveillancedoption="È la prima volta che chiedi la sorveglianza Modulo D per questo modello?";
$surveillancedoption1="Chiedo una certificazione Modulo D iniziale";
$surveillancedoption2="Chiedo la sorveglianza annuale della certificazione Modulo D";
$surveillancedoption3="Chiedo il rinnovo della certificazione Modulo D";
$surveillancedoption4="Chiedo lestensione della certificazione Modulo D";
$declarationsent1="1) di non avere presentato analoga domanda presso altri Organismi Notificati e che la documentazione tecnica relativa al DPI non è stata oggetto di un precedente rifiuto presso altri Organismi Notificati;";
$declarationsent2="2) che le informazioni comunicate e i documenti prodotti sono rispettivamente vere e autentici e si impegna a manlevare e a tenere indenne A.N.C.I. Servizi S.r.l. a Socio Unico da qualsivoglia responsabilità, danno, o pretesa che dovesse derivare a questultima in conseguenza della comunicazione e trasmissione, da parte del Fabbricante, di informazioni e documenti non veritieri, non autentici e/o mendaci.";
$declarationsent3="3) nel caso di immissione sul mercato, di non avere ancora immesso sul mercato il DPI.";
$declarationtitle="DICHIARAZIONI";
$declarationtitle_help="";
$companydeclaration=" dichiara e garantisce";
$datettitle="Data";
$clientnametitle="Nome cliente";
$signedbytitle="Firmato da:";
$archivetrf="Archivio Aplication Form";
$ntrf="N. Application Form";
$pdftitle="PDF";
$firsrecordtitle="Primo";
$previousrecordtitle="Precedente";
$nextrecordtitle="Prossimo";
$lastrecordtitle="Ultimo";
$mycompany="Azienda";
$updateformtitle="Aggiorna";
$telephonetitlecompany="Telefono aziendale";
$emailtitlecompany="Email aziendale";
$telephonetitlecontact="Telefono contatto";
$emailtitlecontact="Email contatto";
$companyprofiletitle="Dettagli azienda";
$backstep="Torna indietro";
$searchsentence="Per ricercare articoli del passato scrivi le prime lettere e seleziona";
$drafttrftitle="Draft TRF";
$proceedtrf="Completa Application Form";
$pleaseselectstd="Seleziona";
$certificatenumbertitle="N. certificato";
$issuebycimactitle="Emesso da CIMAC?";
$moduleselectiontitle="Tipologia sorveglianza";
$addlineaudit="Aggiungi nuovo DPI";
$filenameaudit="Documento";
$auditdpilistcreate="In questa sezione elenca tutti i DPI oggetto di audit e campionamento";
$nosent="No";
$yessent="";
$filesent="File";
$suppliernametitle="Produttore";
$addsup="Agg";
$dpireportnumbertitle="DPI N. certificato";
$filestitle="Files";
$closewindow="Torna alla finestra principale - Chiudi";
$notauthorizesentence="Non sei autorizzato ad accedere a questa pagina! Se pensi sia un errore ti preghiamo di contattare l'amministratore del sistema";
$stderrorfill="Per favore ricordati di selezionare la Protection Category e la DPI category - Grazie";
$newpartlist="Componente nuovo";
$cmcpartlist="Componente già testato da CIMAC";
$trdpartlist="Componente già testato da altro Laboratorio";
$activetitle="Attivo";
$inactivetitle="Inattivo";
$selecttitlepartform="Seleziona";
$selecttitlepart="Parte nuova";
$whichkindofpart="Seleziona se la parte è nuova o già testata";
$insertauditdpi="Inserisci";
$copycontactfrom="Puoi copiare l'anagrafica da:";
$edictcontacttitle="Modifica anagrafica";
$edictcontacttitle="Modifica anagrafica";
$anagraficaaudit="Audit";
$anagraficainvoice="Intesta fattura";
$anagraficatest="Intesta report";
$anagraficacertificate="Intesta certificato";
$anagraficamycompany="La mia azienda";
$anagraficacompany="Azienda";
$anagraficaaddress="Indirizzo";
$anagraficacity="Città";
$signaturetokentitle="Token per la firma";
$tokensuccess="Token aggiornato con successo! Ti è stata inviata una mail con il token a te assegnato";
$inserttokensign="Inserisci il token per la firma (6 cifre)";
$tokenwhere="Se non trovi il token firma controlla la tua mail o clicca qui";
$firmdeclaration="Cliccando su Conferma l'application form verrà definitivamente inviato nei nostri server, senza la possibilità di modifica. In caso di dubbi o errori contattaci per supporto";
$sendtitle="Application Form Inviato con successo!";
$sendsentence="Il tuo Application Form è stato inviato con successo, riceverai a breve una mail con il pdf riepilogativo";
$uncorrecttokentitle="Attenzione, il token da te inserito non è corretto! Riprova ad inserirlo o resetta il token seguendo le istruzioni sotto riportate";
$standardcodetitle="Standard";
$protectioncategorytitle="Categoria di protezione";
$dpicategorytitle="Categoria DPI";
$otherlangtitle="Se selezioni altro specifica qua in quale lingua";
$dpistorealert="Attenzione durante laudit il DPI deve essere disponibile a magazzino per il campionamento";
$articlealert="Il codice articolo del componente deve essere univoco e deve corrispondere a quello del test report";
$m15dtitle="Domanda di rinnovo Modulo B ";
$m15dm30Stitle_help="Ho modificato un modello già certificato secondo Regolamento (UE) 2016/425 e devo rinnovare il certificato.";
$m15dm30Stitle="";
$descriptionitem="Descrizione";
$extracetitle="Extra CE";
$companyupdatetitle="Prima di procedere è necessario compilare o aggiornare i dati aziendali! Grazie";
$extracetitleline="Indicare Rappresentante Comunità Europea (se presente)";
$certification2list="Attenzione: hai i seguenti TRF pronti per l'emissione del secondo modulo.";
$proceedmodule2="Procedi";
$secondmoduletitle="Conferma invio secondo modulo";
$certukca="Certificazione UKCA";
$photoshoesside="Foto di lato";
$photoshoessole="Foto vista suola";
$photogloveup="Foto guanti vista Palmo";
$photoglovebottom="Foto guanti vista dorso";
$photomask="Foto semimaschera";
$pdnappform="Domanda di valutazione della conformità n.";
$pdnappformtest="Modulo richiesta test per valutazione della conformità n.";
$citytitle='Città';
$statement="Con la firma apposta di seguito, il fabbricante dichiara e garantisce quanto segue:
1) di non avere presentato analoga domanda presso altri Organismi Notificati e che la documentazione tecnica relativa al DPI non è stata oggetto di un precedente rifiuto presso altri Organismi Notificati;
2) che le informazioni comunicate e i documenti prodotti sono rispettivamente vere e autentici e si impegna a manlevare e a tenere indenne A.N.C.I. Servizi S.r.l. a socio unico da qualsivoglia responsabilità, danno, o pretesa che dovesse derivare a questultima in conseguenza della comunicazione e trasmissione, da parte del Fabbricante, di informazioni e documenti non veritieri, non autentici e/o mendaci.
";
$statementnocert="Con la firma apposta di seguito, il fabbricante dichiara e garantisce:
che le informazioni comunicate e i documenti prodotti sono rispettivamente vere e autentici e si impegna a manlevare e a tenere indenne A.N.C.I. Servizi S.r.l. a socio unico da qualsivoglia responsabilità, danno, o pretesa che dovesse derivare a questultima in conseguenza della comunicazione e trasmissione, da parte del Fabbricante, di informazioni e documenti non veritieri, non autentici e/o mendaci.
";
$addstatement="Per il DPI oggetto della presente domanda, l'Intermediario autorizza il Fabbricante ad utilizzare i propri rapporti di prova";
$nameclienttocertificate="Anagrafica cliente per cui voglio certificare";
$photomasksidea="Lato A";
$photomasksideb="Lato B";
//alerts
$titlealertstd = "Attenzione!";
$textalertstd = "Hai compilato la categoria di protezione e categoria DPI per tutti gli standards?";
$confirmButtonTextalertstd = "Sì, proseguiamo";
$cancelButtonTextalertstd = "Aggiungi le categorie mancanti";
$alertTextstd ="Aggiungi le parti mancanti";
$confirmButtonTextalertparts = "Prosegui comunque";
$cancelButtonTextalertparts = "Aggiungi parti mancanti";
$alertTextparts ="Aggiungi le parti mancanti";
$partsnotfound="Le seguenti parti non sono state trovate:";
$addphotosdoc="Aggiungi le foto";
$allowedkind="(formati ammessi jpg, jpeg e png)";
$clonealert="Sei sicuro di voler duplicare il TRF N.";
$clonealertconfirm="Sì, duplica!";
$clonealertcancel="No, chiudi!!";
$revalert="Sei sicuro di voler revisionare il TRF N.";
$revalertconfirm="Sì, revisiona!";
$revalertcancel="No, chiudi!!";
$browsebotton="Sfoglia";
$nofilechoosen="Nessun file selezionato";
$sendtosign="Invia in firma";
$notokenneeded="Attenzione: per l'invio in firma ad un'altra persona della stessa azienda non è necessario inserire il token";
$sentforsignview="Il TRF compilato verrà visualizzato nell'account della seconda persona sotto la voce del menù TRF in attesa di firma";
?>
-145
View File
@@ -1,145 +0,0 @@
<?php
$titlewb="Area Riservata";
$mytrf="Le mie richieste";
$settings="Impostazioni";
$logoutst="Logout";
$profile="Il mio Profilo";
$yes="";
$no="No";
$welcomeuser="Bentornato/a ";
$welcome_help="Da questo Pannello di Controllo potrai interagire col sistema TRF di Cimac e vedere le tue statistiche di utilizzo";
$controlpanel="Pannello di Controllo";
$newtrf="Nuova richiesta per te";
$newtrfforclient="Nuova richiesta per un tuo Cliente";
$trfinprogress="TRF Status";
$historicaltrf="Storico Richieste ";
$helpdocument="Area download (ad es. REG01, V091A, certificato accreditamento ISO 17065 + allegato)";
$trfinserted="Richieste inserite";
$confirmcertificate="Conferma la certificazione";
$errorform="Campo Richiesto";
$descriptiontitle="Codice articolo/Nome commerciale";
$modeltitle="Modello";
$rangemeasuretitle="Gamma Misure";
$rangemeasuremintitle="Misura da";
$rangemeasuremaxtitle="a Misura";
$choosefile="Scegli il file...";
$samplecheck="Descrivi il tuo modello";
$samplecheck_help="";
$etrfcodetitle="N.";
$tempcodetitle="Il tuo codice identificativo temporaneo è ";
$photouploadtitle="Carica la foto";
$typearticletitle="Devo certificare";
$articlecharacteristictitle="Tipo di DPI";
$nothingselect="Nessuna";
$pleaseselect="Seleziona";
$certificationrequired="Application Form: ";
$standardlink="Seleziona le norme applicabili (puoi fare una scelta multipla)";
$standardlink_help="";
$assignedstd="In questa sezione devi indicare il livello di protezione e, dove richiesto, la Categoria del DPI. È sempre possibile modificare le tue scelte prima di confermare.";
$assignedstd_help="Norme selezionate";
$stdnmb="Norma";
$stdname="Titolo";
$protectioncat="Categoria Protezione";
$dpicat="Categoria DPI";
$action="Azione";
$nextsteptitle="Conferma";
$additionalinfotitle="Informazioni Aggiuntive";
$additionalinfotitle_help="";
$virusprottitle="L'articolo protegge da virus?";
$esdtitle="Calzatura ESD";
$orthopedictitle="Calzatura Ortopedica";
$slippingtitle="Resistenza allo scivolamento";
$autoclavabletitle="Autoclavabile";
$additionalreqtitle="Requisiti di protezione addizionali";
$additionalreqtitle_help="In questa sezione puoi indicare eventuali requisiti di protezione addizionali. È sempre possibile modificare le tue scelte prima di confermare.";
$pippo="Ciao Claudio";
$additionalreqtitleselected="Requisiti Addizionali selezionati";
$additionalreqtitleselected_help="";
$addreqtitle="Requisito Addizionale";
$chemagenttitle="Sostanze chimiche";
$chemagenttitle_help="In questa sezione devi indicare le sostanze chimiche che vuoi inserire nel certificato. È sempre possibile modificare le tue scelte prima di confermare.";
$addchemselected="Agenti Chimici Selezionati";
$addchemselected_help="";
$addchemtitle="Sostanza";
$newtest="Nuova";
$newtest_help="Compila di seguito i campi per descrivere la parte e poi clicca su memorizza";
$newtesttitle="Seleziona la parte";
$newtesttitle_help="Compila tutti i campi e prosegui per tutte le parti ";
$oldcmctest="Già testata da CIMAC";
$trdparttest="Testata da altro laboratorio";
$descriptionpart="Descrizione";
$articlepart="Articolo";
$colorpart="Colore";
$numbertrfusertitle="Trf Inseriti da te";
$numbertrfcompanytitle="TRF inseriti dalla tua azienda";
$partsnumbertitle="Numero parti totali inserite";
$addpartbutton="Conferma e aggiungi parte";
$cmctesttitle="Parte già testata da Cimac";
$cmctesttitle_help="Attenzione compila questa sezione solo se la data del Test Report ha meno di 5 anni, altrimenti devi scegliere Nuova parte.";
$reportnumbercmctitle="Numero test report";
$datereporttitle="Data test report ";
$trdlabparttitle="Testata da altro laboratorio";
$trdlabparttitle_help="con Attenzione compila questa sezione solo se il Test Report è accreditato e ha meno di 5 anni, altrimenti devi scegliere su Nuova parte.";
$reprtonumbertrdlabtitle="Numero test report";
$trddatereporttitle="Data test report ";
$kindpart="";
$descriptionpartlist="Descrizione";
$articlepartlist="Articolo";
$colorpartlist="Colore";
$reportlist="N. Rapporto";
$datereportlist="Data Rapporto";
$assignedparts="Riepilogo parti";
$alertdate="Il Test Report ha più di 5 anni quindi devi scegliere Nuova parte";
$selectfileonyourpc="Seleziona il file";
$filedescription="Descrizione del file";
$filenametitle="Nome del File";
$filenamedesc="Descrizione";
$confirmdeleteline="Sei sicuro di voler cancellare la parte?";
$dashboard="Pannello di Controllo";
$helptitle="Supporto";
$contactus="Contattaci";
$admincp="Admin";
$addstandardtitle="Aggiungi Norma";
$addtitle="Aggiungi";
$assignedparts_help="In questa sezione puoi vedere le parti che hai inserito.È sempre possibile modificare le tue scelte prima di confermare.";
$adddoctitle="Allega Documenti";
$adddoctitle_help="In questa sezione devi allegare i documenti necessari alla certificazione";
$addeddoctitle="Documenti Allegati";
$addeddoctitle_help="Di seguito puoi modificare la descrizione od eliminare il file memorizzato";
$descriptionstep="Descrizione Articolo";
$edittitle="Modifica Sezione";
$descriptionsteptitle="Descrizione";
$additionalinfosteptitle="Info aggiuntive";
$standardsteptitle="Tests";
$addrequirementssteptitle="Requisiti Agg.";
$chemicalagentsteptitle="Agenti Chimici";
$identificationpartssteptitle="Parti";
$uploaddocsteptitle="Documenti";
$identificationparttitle="Descrivi le parti e le componenti del tuo modello";
$identificationparttitle_help="";
$notificatedorganismtitle="nome Organismo Notificato che ha rilasciato lattestato";
$selectfilecertificate="Se l'Organismo Notificato non è Cimac per favore carica qua l'attestato dell'altro ente";
$chooseimage="Hai una foto? Puoi inserirla qui";
$uploadph="Carica";
$registeredmarktitle="Marchio Registrato";
$reportoftitle="Report Intestato a:";
$addparameterstitle="Opzioni TRF";
$addparameterstitle_help="";
$reportheadertitle="Intesto il report a:";
$insertdatacontact="Inserisci i dati dell'altra persona/società";
$certificateheadertitle="Intesto il certificato a:";
$languagereporttitle="In che lingua emettiamo i Test Report?";
$languagecertificatetitle="In che lingua emettiamo il certificato?";
$invoiceheadertitle="Fatturiamo i nostri servizi a: ";
$offeranddocumentitle="Invio lofferta e i documenti a: ";
$surveillancetitle="Intendo sottoporre questo modello a sorveglianza ";
$modtitle="Modifica";
$italianlang="Italiano";
$englishlang="Inglese";
$itaenglang="Italiano-Inglese";
$otherlang="Altro";
$whoreportto="";
$tometitle="A me ";
$toothertitle="Ad un'altra persona";
?>
-80
View File
@@ -1,80 +0,0 @@
<?php
$kindcertificatetitle="Nuova Richiesta";
$certificationtitle="Certificazione";
$typeofcertificate_question="";
$typeofcertificate_help="Segui questo percorso guidato che ti aiuterà in pochi minuti a compilare in modo corretto il nostro Application Form";
$questionm16m30s="Hai un modello nuovo da certificare?";
$questionm16m30s_help="";
$questionm16n30s_b="È la variante di un modello già certificato?";
$certificatem16m30s="Perfetto! La certificazione richiesta è la M16 + M30S";
$certificatem16m30s_help="";
$certificatem16m30sb="Perfetto! La certificazione richiesta è la M16 + M30S per un articolo Variante!";
$certificatem16m30sb_help="";
$certificatem16m30svar="È la variante di un modello già certificato?";
$multiplecertificate="Cosa vuoi fare?";
$multiplecertificate_help="Se hai bisogno di un aiuto o più info clicca sul punto di domanda a destra dell'opzione";
$options="Opzioni";
$adjustcertificate="Adeguare la certificazione da direttiva a regolamento ";
$revisecertificate="Revisionare un modello già certificato ";
$extendcertificate="Estendere la tua certificazione ad un mio cliente ";
$surveillancemodulec="Chiedere la sorveglianza Modulo C2 ";
$surveillancemoduled="Chiedere la sorveglianza al Modulo D ";
$m18btitle="Certificazione M18B";
$m18btitle_help="Chiedere la sorveglianza al Modulo D: ho un modello con certificato UE del tipo Modulo B in corso di validità e devo chiedere la sorveglianza Modulo D del Sistema Qualità.";
$m18atitle="Certificazione M18A";
$m18atitle_help="Chiedere la sorveglianza al Modulo C2: ho un modello con certificato UE del tipo Modulo B in corso di validità e devo chiedere la sorveglianza Modulo C2 della produzione.";
$m15am30stitle="Certificazione M15A + M30S";
$m15am30stitle_help="Estendere la tua certificazione ad un tuo cliente: ho un modello già certificato secondo Regolamento (UE) 2016/425 e devo certificarlo a nome di un mio Cliente.";
$m15Bm30Stitle="Certificazione M15B + M30S";
$m15Bm30Stitle_help="Revisionare un modello già certificato: ho un modello già certificato secondo Regolamento (UE) 2016/425 e devo apportare delle modifiche.";
$m15ctitle="Certificazione M15C";
$m15ctitle_help="Adeguare la certificazione da direttiva a regolamento: ho un modello già certificato secondo la Direttiva 89/686/CEE che devo aggiornare al Regolamento (UE) 2016/425.";
$previosurepnumbertitle="Numero certificato";
$prevcertificatehelp="";
$certificatem15c="(M15C) Perfetto! Inserisci il numero di attestato di certificazione CE";
$certificatem15c_help="";
$certificatem15bm30s="(M15B + M30S) Perfetto! Inserisci il numero di certificato UE del tipo Modulo B da revisionare";
$certificatem15bm30s_help="";
$certificatem15am30s="Perfetto! La certificazione richiesta è la M15A + M30S";
$certificatem15am30s_help="";
$certificatem18a="Perfetto! La certificazione richiesta è la M18A";
$certificatem18a_help="";
$certificatem18b="Perfetto! La certificazione richiesta è la M18B";
$certificatem18b_help="";
$alertm15c="Attenzione: questa procedura può essere attuata entro e non oltre il 20 aprile 2023 se:\r\n 1) il modello è totalmente identico a quello dellattestato secondo Direttiva;\r\n 2) le norme di riferimento indicate nellattestato sono ancora in stato di validità.";
$certificatealertm15c="Certificazione M15C";
$certificatealertmesm15c="Attenzione: questa procedura può essere attuata entro e non oltre il 20 aprile 2023 se:";
$certificatealertmesm15ca="1) il modello è totalmente identico a quello dellattestato secondo Direttiva;";
$certificatealertmesm15cb="2) le norme di riferimento indicate nellattestato sono ancora in stato di validità.";
$confirmalert="Conferma";
$unconfirmalert="Annulla";
$alertm15c="Attenzione: questa procedura può essere attuata entro e non oltre il 20 aprile 2023 se:\r\n 1) il modello è totalmente identico a quello dellattestato secondo Direttiva;\r\n 2) le norme di riferimento indicate nellattestato sono ancora in stato di validità.";
$certificatealertm15bm30s="Certificazione M15B + M30S";
$certificatealertmesm15bm30s="Attenzione: questa procedura può essere richiesta solo se:";
$certificatealertmesm15bm30sa="1) Il certificato UE del tipo Modulo B da revisionare è stato emesso da CIMAC.";
$certificatealertmesm15bm30sb="2) Calzature: le modifiche non riguardano la suola.";
$certificatealertmesm15bm30sc="3) Guanti non monouso: hai variato il nome, il colore, lo spessore. Per altre modifiche contattaci.";
$certificatealertmesm15bm30sd="4) Guanti monouso: hai variato il nome o il colore. Per altre modifiche contattaci.";
$certificatealertmesm15bm30se="5) Semimaschere: hai variato il nome o il colore. Per altre modifiche contattaci.";
$certificatealertm15am30s="Certificazione M15A + M30S";
$certificatealertmesm15am30s="Attenzione: questa procedura può essere richiesta solo se il modello è certificato secondo Regolamento (UE) 2016/425 e sono stati eseguiti tutti i test necessari.";
$certificatealertm18a="Certificazione M18A";
$certificatealertmesm18a="Attenzione: questa procedura può essere richiesta solo se il modello è un DPI di Categoria III con certificato UE del tipo Modulo B in corso di validità.";
$certificateforclient="Intermediario";
$certificateforclientquestion="Vuoi essere lintermediario per il tuo Cliente?";
$intermiedateclient="Intermediario: persona di contatto per le comunicazioni con CIMAC.";
$insertintermediatecontact="Inserisci i dati del tuo Cliente che risulterà Fabbricante del modello ";
$companynametitle="Ragione Sociale";
$companyaddresstitle="Indirizzo";
$captitle="CAP";
$citytitle="Città";
$pivatitle="Partita Iva";
$countrytitle="Nazione";
$telephonetitle="Telefono";
$emailtitle="Email";
$contactnametitle="Nome Contatto";
$contactsurnametitle="Cognome Contatto";
$submitcontactformtitle="Inserisci";
$submitclientname="Sono io il fabbricante";
$fabbricantehelp="Fabbricante: qualsiasi persona fisica o giuridica che fabbrica un DPI o che lo fa progettare o fabbricare, e lo commercializza con il proprio nome o marchio commerciale.";
?>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 695 KiB

-77
View File
@@ -1,77 +0,0 @@
<?php // pdf creation for certification 1
$pdf->SetFont('Arial','',7);
$firstsent=html_entity_decode("Ai sensi e per gli effetti dell art. 5 del REG 01 Regolamento per la valutazione della conformità dei Dispositivi di Protezione Individuale");
$firstsent = iconv('UTF-8', 'windows-1252', $firstsent);
$secondsent=utf8_decode('secondo il Regolamento (UE) 2016/425 disponibile sul nostro sito web www.cimac.it');
//$thirdsent=utf8_decode('For the purposes of Article 6 of the REG 01 "Regulation for the assessment of the conformity of Personal Protective Equipment ');
//$foursent=utf8_decode('according to Regulation (EU) 2016/425" available on our website www.cimac.it');
$pdf->Cell(0,0,$firstsent,0,1);
$pdf->Cell(0,9,$secondsent,0,1);
//$pdf->Cell(0,0,$thirdsent,0,1);
//$pdf->Cell(0,9,$foursent,0,1);
//description table
include('pdfcreation/descriptiontable.php');
$pdf->Ln();
// standards table
include('pdfcreation/standardstable.php');
$pdf->Ln();
// additionalinfo
//include('pdfcreation/m30table.php');
$pdf->Ln();
// additionalinfo requirements
include('pdfcreation/addreqtable.php');
$pdf->Ln();
// additionalinfo
include('pdfcreation/addinfotable.php');
$pdf->Ln();
// chem table
include('pdfcreation/chemtable.php');
$pdf->Ln();
//trf option
include('pdfcreation/trfoption.php');
$pdf->Ln();
//trf option
include('pdfcreation/fileattached.php');
$pdf->Ln();
$pdf->Ln();
//header report contact
//include('pdfcreation/headerreporttable.php');
//$pdf->Ln();
//header certificate contact
include('pdfcreation/headercertificatetable.php');
$pdf->Ln();
//invoice contact
include('pdfcreation/invoicecontacttable.php');
$pdf->Ln();
// parts table
//include('pdfcreation/partstable.php');
//$pdf->Ln();
//Sign datatable
include('pdfcreation/signdatatable.php');
$pdf->Ln();
?>
-82
View File
@@ -1,82 +0,0 @@
<?php // pdf creation for certification 1
$pdf->SetFont('Arial','',7);
$firstsent=html_entity_decode('Ai sensi e per gli effetti dellart. 7 del REG 01 Regolamento per la valutazione della conformità dei Dispositivi di Protezione Individuale');
$firstsent = iconv('UTF-8', 'windows-1252', $firstsent);
$secondsent=utf8_decode('secondo il Regolamento (UE) 2016/425 disponibile sul nostro sito web www.cimac.it');
//$thirdsent=utf8_decode('For the purposes of Article 6 of the REG 01 "Regulation for the assessment of the conformity of Personal Protective Equipment ');
//$foursent=utf8_decode('according to Regulation (EU) 2016/425" available on our website www.cimac.it');
$pdf->Cell(0,0,$firstsent,0,1);
$pdf->Cell(0,9,$secondsent,0,1);
//$pdf->Cell(0,0,$thirdsent,0,1);
//$pdf->Cell(0,9,$foursent,0,1);
//description table
include('pdfcreation/descriptiontable.php');
$pdf->Ln();
//typecert 3 info
include('pdfcreation/type3table.php');
$pdf->Ln();
// standards table
include('pdfcreation/standardstable.php');
$pdf->Ln();
// additionalinfo
include('pdfcreation/m30table.php');
$pdf->Ln();
// additionalinfo requirements
include('pdfcreation/addreqtable.php');
$pdf->Ln();
// additionalinfo
include('pdfcreation/addinfotable.php');
$pdf->Ln();
// chem table
include('pdfcreation/chemtable.php');
$pdf->Ln();
//trf option
include('pdfcreation/trfoption.php');
$pdf->Ln();
//trf option
include('pdfcreation/fileattached.php');
$pdf->Ln();
$pdf->Ln();
//header report contact
//include('pdfcreation/headerreporttable.php');
//$pdf->Ln();
//header certificate contact
include('pdfcreation/headercertificatetable.php');
$pdf->Ln();
//invoice contact
include('pdfcreation/invoicecontacttable.php');
$pdf->Ln();
// parts table
//include('pdfcreation/partstable.php');
//$pdf->Ln();
//Sign datatable
include('pdfcreation/signdatatable.php');
$pdf->Ln();
?>
-76
View File
@@ -1,76 +0,0 @@
<?php // pdf creation for certification 1
$pdf->SetFont('Arial','',7);
$firstsent=html_entity_decode('Ai sensi e per gli effetti dellart. 6 del REG 01 Regolamento per la valutazione della conformità dei Dispositivi di Protezione Individuale');
$firstsent = iconv('UTF-8', 'windows-1252', $firstsent);
$secondsent=utf8_decode('secondo il Regolamento (UE) 2016/425 disponibile sul nostro sito web www.cimac.it');
//$thirdsent=utf8_decode('For the purposes of Article 6 of the REG 01 "Regulation for the assessment of the conformity of Personal Protective Equipment ');
//$foursent=utf8_decode('according to Regulation (EU) 2016/425" available on our website www.cimac.it');
$pdf->Cell(0,0,$firstsent,0,1);
$pdf->Cell(0,9,$secondsent,0,1);
//$pdf->Cell(0,0,$thirdsent,0,1);
//$pdf->Cell(0,9,$foursent,0,1);
//description table
include('pdfcreation/descriptiontable.php');
$pdf->Ln();
//typecert 3 info
include('pdfcreation/type4table.php');
$pdf->Ln();
// standards table
include('pdfcreation/standardstable.php');
$pdf->Ln();
// additionalinfo
include('pdfcreation/m30table.php');
$pdf->Ln();
// additionalinfo requirements
include('pdfcreation/addreqtable.php');
$pdf->Ln();
// additionalinfo
include('pdfcreation/addinfotable.php');
$pdf->Ln();
// chem table
include('pdfcreation/chemtable.php');
$pdf->Ln();
//trf option
include('pdfcreation/trfoption.php');
$pdf->Ln();
//trf option
include('pdfcreation/fileattached.php');
$pdf->Ln();
$pdf->Ln();
//header report contact
//include('pdfcreation/headerreporttable.php');
//$pdf->Ln();
//header certificate contact
include('pdfcreation/headercertificatetable.php');
$pdf->Ln();
//invoice contact
include('pdfcreation/invoicecontacttable.php');
$pdf->Ln();
//Sign datatable
include('pdfcreation/signdatatable.php');
$pdf->Ln();
?>
-82
View File
@@ -1,82 +0,0 @@
<?php // pdf creation for certification 1
$pdf->SetFont('Arial','',7);
$firstsent=html_entity_decode('Ai sensi e per gli effetti dellart. 12 del REG 01 Regolamento per la valutazione della conformità dei Dispositivi di Protezione Individuale');
$firstsent = iconv('UTF-8', 'windows-1252', $firstsent);
$secondsent=utf8_decode('secondo il Regolamento (UE) 2016/425 disponibile sul nostro sito web www.cimac.it');
//$thirdsent=utf8_decode('For the purposes of Article 12 of the REG 01 "Regulation for the assessment of the conformity of Personal Protective Equipment ');
//$foursent=utf8_decode('according to Regulation (EU) 2016/425" available on our website www.cimac.it');
$pdf->Cell(0,0,$firstsent,0,1);
$pdf->Cell(0,9,$secondsent,0,1);
//$pdf->Cell(0,0,$thirdsent,0,1);
//$pdf->Cell(0,9,$foursent,0,1);
//description table
include('pdfcreation/descriptiontable.php');
$pdf->Ln();
//typecert 3 info
include('pdfcreation/type8table.php');
$pdf->Ln();
// standards table
include('pdfcreation/standardstable.php');
$pdf->Ln();
// additionalinfo
include('pdfcreation/m30table.php');
$pdf->Ln();
// additionalinfo requirements
include('pdfcreation/addreqtable.php');
$pdf->Ln();
// additionalinfo
include('pdfcreation/addinfotable.php');
$pdf->Ln();
// chem table
include('pdfcreation/chemtable.php');
$pdf->Ln();
//trf option
include('pdfcreation/trfoption.php');
$pdf->Ln();
//trf option
include('pdfcreation/fileattached.php');
$pdf->Ln();
$pdf->Ln();
//header report contact
//include('pdfcreation/headerreporttable.php');
//$pdf->Ln();
//header certificate contact
include('pdfcreation/headercertificatetable.php');
$pdf->Ln();
//invoice contact
include('pdfcreation/invoicecontacttable.php');
$pdf->Ln();
// parts table
//include('pdfcreation/partstable.php');
//$pdf->Ln();
//Sign datatable
include('pdfcreation/signdatatable.php');
$pdf->Ln();
?>
@@ -1,73 +0,0 @@
<?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();
}
?>
-82
View File
@@ -1,82 +0,0 @@
<?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();
?>
@@ -1,8 +0,0 @@
<?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();
?>
@@ -1,78 +0,0 @@
<?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();
}
?>
@@ -1,99 +0,0 @@
<?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();
}
@@ -1,57 +0,0 @@
<?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();
}
?>
@@ -1,130 +0,0 @@
<?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();
}
?>
@@ -1,132 +0,0 @@
<?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();
}
?>
-94
View File
@@ -1,94 +0,0 @@
<?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();
?>
-76
View File
@@ -1,76 +0,0 @@
<?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);
}}
?>
@@ -1,50 +0,0 @@
<?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("");
} 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("");
} 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 } ?>
-56
View File
@@ -1,56 +0,0 @@
<?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();
?>
@@ -1,29 +0,0 @@
<?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();
}
?>
@@ -1,129 +0,0 @@
<?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();
}
?>
@@ -1,129 +0,0 @@
<?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();
}
?>
@@ -1,26 +0,0 @@
<?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();
?>
@@ -1,27 +0,0 @@
<?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();
?>
-60
View File
@@ -1,60 +0,0 @@
<?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();
?>
-55
View File
@@ -1,55 +0,0 @@
<?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();
?>
@@ -1,28 +0,0 @@
<?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;
-188
View File
@@ -1,188 +0,0 @@
<?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(); */
?>
-54
View File
@@ -1,54 +0,0 @@
<?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();
?>
-79
View File
@@ -1,79 +0,0 @@
<?php // pdf creation for certification 1
$pdf->SetFont('Arial','',7);
$firstsent=html_entity_decode('Ai sensi e per gli effetti dellart. 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();
?>
-52
View File
@@ -1,52 +0,0 @@
<?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;
+17 -20
View File
@@ -1,16 +1,16 @@
<?php
// dump db and backup folder yogasoul... placed into claudiosironi.com ... folder of backup = tempzip in the main ideezeur folder
//dump database
/*
// dump db and backup folder yogasoul... placed into claudiosironi.com ... folder of backup = tempzip in the main ideezeur folder
//dump database
/*
ini_set('memory_limit', '-1');
// Database configuration
$host = "localhost";
$username = "u00wiumd4xnrd";
$password = "ukowysga7w5x";
$database_name = "dbcov4clvrmrzn";
$username = "xxxx";
$password = "xxxx";
$database_name = "xxxx";
// Get connection object and set the charset
$conn = mysqli_connect($host, $username, $password, $database_name);
@@ -77,8 +77,8 @@ foreach ($tables as $table) {
} */
?>
<?
// archive into ZIP the folder
<?
// archive into ZIP the folder
ignore_user_abort(true);
set_time_limit(3600);
@@ -86,36 +86,33 @@ set_time_limit(3600);
$main_path = '../modulo_certificazione';
$zip_file = '../tempbck//cimac.tar';
if (file_exists($main_path) && is_dir($main_path))
{
if (file_exists($main_path) && is_dir($main_path)) {
$zip = new ZipArchive();
if (file_exists($zip_file)) {
unlink($zip_file); // truncate ZIP
}
if ($zip->open($zip_file, ZIPARCHIVE::CREATE)!==TRUE) {
if ($zip->open($zip_file, ZIPARCHIVE::CREATE) !== TRUE) {
die("cannot open <$zip_file>\n");
}
$files = 0;
$paths = array($main_path);
while (list(, $path) = each($paths))
{
foreach (glob($path.'/*') as $p)
{
while (list(, $path) = each($paths)) {
foreach (glob($path . '/*') as $p) {
if (is_dir($p)) {
$paths[] = $p;
} else {
$zip->addFile($p);
$files++;
echo $p."<br>\n";
echo $p . "<br>\n";
}
}
}
echo 'Total files: '.$files;
echo 'Total files: ' . $files;
$zip->close();
}
}
?>