diff --git a/public/bck030522jquery.tabledit.js b/public/bck030522jquery.tabledit.js deleted file mode 100644 index bb09d66..0000000 --- a/public/bck030522jquery.tabledit.js +++ /dev/null @@ -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: '', - action: 'edit' - }, - delete: { - class: 'btn btn-sm btn-default', - html: '', - 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 = '' + $(this).text() + ''; - var input = ''; - - // 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=''+$(this).text()+' '; - } - else { - var spantext=$(this).text(); - } - // Create span element. - var span = '' + spantext + ''; - - // 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 = ''; - - } - else{ - var input = ''; - - } - - } - else if(settings.columns.editable[i][2]=='file'){ - var input = ''; - - } - else{ - - - var input = ''; - } - } else { - // Create text input element. - var input = ''; - } - - // 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(''); - } - - // Create edit button. - if (settings.editButton) { - editButton = ''; - } - - // Create delete button. - if (settings.deleteButton) { - deleteButton = ''; - confirmButton = ''; - } - - // Create save button. - if (settings.editButton && settings.saveButton) { - saveButton = ''; - } - - // Create restore button. - if (settings.deleteButton && settings.restoreButton) { - restoreButton = ''; - } - - var toolbar = '
\n\ -
' + editButton + deleteButton + '
\n\ - ' + saveButton + '\n\ - ' + confirmButton + '\n\ - ' + restoreButton + '\n\ -
'; - - // Add toolbar column cells. - $table.find('tr:gt(0)').append('' + toolbar + ''); - } - } - } - }; - - /** - * 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(''+filename+' '); - } - - - } - 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); - } - - } - else if(inputname=='filenameaudit'){ - console.log('file type'); - var filename=$(this).find('.tabledit-span').text(); - if(filename!=''){ - $(this).find('.tabledit-span').html(''+filename+' '); - } - - - } - else { - $(this).find('.tabledit-span').text($input.val()); - } - - // Change to view mode. - Mode.view(this); - }); - - // Set last edited column and row. - $lastEditedRow = $(td).parent('tr'); - } - }; - - /** - * Available actions for delete function, with button as parameter. - * - * @type object - */ - var Delete = { - reset: function(td) { - // Reset delete button to initial status. - $table.find('.tabledit-confirm-button').hide(); - // Remove "active" class in delete button. - $table.find('.tabledit-delete-button').removeClass('active').blur(); - }, - submit: function(td) { - Delete.reset(td); - // Enable identifier hidden input. - $(td).parent('tr').find('input.tabledit-identifier').attr('disabled', false); - // Send AJAX request to server. - var ajaxResult = ajax(settings.buttons.delete.action); - // Disable identifier hidden input. - $(td).parents('tr').find('input.tabledit-identifier').attr('disabled', true); - - if (ajaxResult === false) { - return; - } - - // Add class "deleted" to row. - $(td).parent('tr').addClass('tabledit-deleted-row'); - // Hide table row. - $(td).parent('tr').addClass(settings.mutedClass).find('.tabledit-toolbar button:not(.tabledit-restore-button)').attr('disabled', true); - // Show restore button. - $(td).find('.tabledit-restore-button').show(); - // Set last deleted row. - $lastDeletedRow = $(td).parent('tr'); - }, - confirm: function(td) { - // Reset all cells in edit mode. - $table.find('td.tabledit-edit-mode').each(function() { - Edit.reset(this); - }); - // Add "active" class in delete button. - $(td).find('.tabledit-delete-button').addClass('active'); - // Show confirm button. - $(td).find('.tabledit-confirm-button').show(); - }, - restore: function(td) { - // Enable identifier hidden input. - $(td).parent('tr').find('input.tabledit-identifier').attr('disabled', false); - // Send AJAX request to server. - var ajaxResult = ajax(settings.buttons.restore.action); - // Disable identifier hidden input. - $(td).parents('tr').find('input.tabledit-identifier').attr('disabled', true); - - if (ajaxResult === false) { - return; - } - - // Remove class "deleted" to row. - $(td).parent('tr').removeClass('tabledit-deleted-row'); - // Hide table row. - $(td).parent('tr').removeClass(settings.mutedClass).find('.tabledit-toolbar button').attr('disabled', false); - // Hide restore button. - $(td).find('.tabledit-restore-button').hide(); - // Set last restored row. - $lastRestoredRow = $(td).parent('tr'); - } - }; - - /** - * Send AJAX request to server. - * - * @param {string} action - */ - function ajax(action) - { - var serialize = $table.find('.tabledit-input').serialize() + '&action=' + action; - - var result = settings.onAjax(action, serialize); - - if (result === false) { - return false; - } - - var jqXHR = $.post(settings.url, serialize, function(data, textStatus, jqXHR) { - if (action === settings.buttons.edit.action) { - $lastEditedRow.removeClass(settings.dangerClass).addClass(settings.warningClass); - setTimeout(function() { - //$lastEditedRow.removeClass(settings.warningClass); - $table.find('tr.' + settings.warningClass).removeClass(settings.warningClass); - }, 1400); - } - - settings.onSuccess(data, textStatus, jqXHR); - }, 'json'); - - jqXHR.fail(function(jqXHR, textStatus, errorThrown) { - if (action === settings.buttons.delete.action) { - $lastDeletedRow.removeClass(settings.mutedClass).addClass(settings.dangerClass); - $lastDeletedRow.find('.tabledit-toolbar button').attr('disabled', false); - $lastDeletedRow.find('.tabledit-toolbar .tabledit-restore-button').hide(); - } else if (action === settings.buttons.edit.action) { - $lastEditedRow.addClass(settings.dangerClass); - } - - settings.onFail(jqXHR, textStatus, errorThrown); - }); - - jqXHR.always(function() { - settings.onAlways(); - }); - - return jqXHR; - } - - Draw.columns.identifier(); - Draw.columns.editable(); - Draw.columns.toolbar(); - - settings.onDraw(); - - if (settings.deleteButton) { - /** - * Delete one row. - * - * @param {object} event - */ - $table.on('click', 'button.tabledit-delete-button', function(event) { - if (event.handled !== true) { - event.preventDefault(); - - // Get current state before reset to view mode. - var activated = $(this).hasClass('active'); - - var $td = $(this).parents('td'); - - Delete.reset($td); - - if (!activated) { - Delete.confirm($td); - } - - event.handled = true; - } - }); - - /** - * Delete one row (confirm). - * - * @param {object} event - */ - $table.on('click', 'button.tabledit-confirm-button', function(event) { - if (event.handled !== true) { - event.preventDefault(); - - var $td = $(this).parents('td'); - - Delete.submit($td); - setTimeout(function() { - $td.parent('tr').remove(); - }, 3000); - event.handled = true; - } - }); - } - - if (settings.restoreButton) { - /** - * Restore one row. - * - * @param {object} event - */ - $table.on('click', 'button.tabledit-restore-button', function(event) { - if (event.handled !== true) { - event.preventDefault(); - - Delete.restore($(this).parents('td')); - - event.handled = true; - } - }); - } - - if (settings.editButton) { - /** - * Activate edit mode on all columns. - * - * @param {object} event - */ - $table.on('click', 'button.tabledit-edit-button', function(event) { - - if (event.handled !== true) { - event.preventDefault(); - - var $button = $(this); - - // Get current state before reset to view mode. - var activated = $button.hasClass('active'); - - // Change to view mode columns that are in edit mode. - Edit.reset($table.find('td.tabledit-edit-mode')); - - if (!activated) { - // Change to edit mode for all columns in reverse way. - $($button.parents('tr').find('td.tabledit-view-mode').get().reverse()).each(function() { - Mode.edit(this); - }); - } - - event.handled = true; - } - }); - - /** - * Save edited row. - * - * @param {object} event - */ - $table.on('click', 'button.tabledit-save-button', function(event) { - if (event.handled !== true) { - event.preventDefault(); - - // Submit and update all columns. - Edit.submit($(this).parents('tr').find('td.tabledit-edit-mode')); - - event.handled = true; - } - }); - } else { - /** - * Change to edit mode on table td element. - * - * @param {object} event - */ - $table.on(settings.eventType, 'tr:not(.tabledit-deleted-row) td.tabledit-view-mode', function(event) { - if (event.handled !== true) { - event.preventDefault(); - - // Reset all td's in edit mode. - Edit.reset($table.find('td.tabledit-edit-mode')); - - // Change to edit mode. - Mode.edit(this); - - event.handled = true; - } - }); - - /** - * Change event when input is a select element. - */ - $table.on('change', 'select.tabledit-input:visible', function() { - if (event.handled !== true) { - // Submit and update the column. - Edit.submit($(this).parent('td')); - - event.handled = true; - } - }); - - /** - * Click event on document element. - * - * @param {object} event - */ - $(document).on('click', function(event) { - var $editMode = $table.find('.tabledit-edit-mode'); - // Reset visible edit mode column. - if (!$editMode.is(event.target) && $editMode.has(event.target).length === 0) { - Edit.reset($table.find('.tabledit-input:visible').parent('td')); - } - }); - } - - /** - * Keyup event on document element. - * - * @param {object} event - */ - $(document).on('keyup', function(event) { - // Get input element with focus or confirmation button. - var $input = $table.find('.tabledit-input:visible'); - var $button = $table.find('.tabledit-confirm-button'); - - if ($input.length > 0) { - var $td = $input.parents('td'); - } else if ($button.length > 0) { - var $td = $button.parents('td'); - } else { - return; - } - - // Key? - switch (event.keyCode) { - case 9: // Tab. - if (!settings.editButton) { - Edit.submit($td); - Mode.edit($td.closest('td').next()); - } - break; - case 13: // Enter. - Edit.submit($td); - break; - case 27: // Escape. - Edit.reset($td); - Delete.reset($td); - break; - } - }); - - return this; - }; -}(jQuery)); \ No newline at end of file diff --git a/public/bck0305jquery.tabledit.js b/public/bck0305jquery.tabledit.js deleted file mode 100644 index bd52878..0000000 --- a/public/bck0305jquery.tabledit.js +++ /dev/null @@ -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: '', - action: 'edit' - }, - delete: { - class: 'btn btn-sm btn-default', - html: '', - 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 = '' + $(this).text() + ''; - var input = ''; - - // 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=''+$(this).text()+' '; - } - else { - var spantext=$(this).text(); - } - // Create span element. - var span = '' + spantext + ''; - - // 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 = ''; - - } - else{ - var input = ''; - - } - - } - else if(settings.columns.editable[i][2]=='file'){ - var input = ''; - - } - else{ - - - var input = ''; - } - } else { - // Create text input element. - var input = ''; - } - - // 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(''); - } - - // Create edit button. - if (settings.editButton) { - editButton = ''; - } - - // Create delete button. - if (settings.deleteButton) { - deleteButton = ''; - confirmButton = ''; - } - - // Create save button. - if (settings.editButton && settings.saveButton) { - saveButton = ''; - } - - // Create restore button. - if (settings.deleteButton && settings.restoreButton) { - restoreButton = ''; - } - - var toolbar = '
\n\ -
' + editButton + deleteButton + '
\n\ - ' + saveButton + '\n\ - ' + confirmButton + '\n\ - ' + restoreButton + '\n\ -
'; - - // Add toolbar column cells. - $table.find('tr:gt(0)').append('' + toolbar + ''); - } - } - } - }; - - /** - * 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(''+filename+' '); - } - - - } - 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')); - if($(this).parents('tr').find('input[type=checkbox]').prop('checked')==true) - { - $(this).find('.badge_btn').text(activebadge); - $(this).find('.badge_btn').removeClass('btn-secondary'); - $(this).find('.badge_btn').addClass('btn-primary'); - } - else{ - $(this).find('.badge_btn').text(inactivebadge); - $(this).find('.badge_btn').removeClass('btn-primary'); - $(this).find('.badge_btn').addClass('btn-secondary'); - } - } - - else if(inputname=='filenameaudit'){ - console.log('file type'); - var filename=$(this).find('.tabledit-span').text(); - if(filename!=''){ - $(this).find('.tabledit-span').html(''+filename+' '); - } - - - } - else { - $(this).find('.tabledit-span').text($input.val()); - } - - // Change to view mode. - Mode.view(this); - }); - - // Set last edited column and row. - $lastEditedRow = $(td).parent('tr'); - } - }; - - /** - * Available actions for delete function, with button as parameter. - * - * @type object - */ - var Delete = { - reset: function(td) { - // Reset delete button to initial status. - $table.find('.tabledit-confirm-button').hide(); - // Remove "active" class in delete button. - $table.find('.tabledit-delete-button').removeClass('active').blur(); - }, - submit: function(td) { - Delete.reset(td); - // Enable identifier hidden input. - $(td).parent('tr').find('input.tabledit-identifier').attr('disabled', false); - // Send AJAX request to server. - var ajaxResult = ajax(settings.buttons.delete.action); - // Disable identifier hidden input. - $(td).parents('tr').find('input.tabledit-identifier').attr('disabled', true); - - if (ajaxResult === false) { - return; - } - - // Add class "deleted" to row. - $(td).parent('tr').addClass('tabledit-deleted-row'); - // Hide table row. - $(td).parent('tr').addClass(settings.mutedClass).find('.tabledit-toolbar button:not(.tabledit-restore-button)').attr('disabled', true); - // Show restore button. - $(td).find('.tabledit-restore-button').show(); - // Set last deleted row. - $lastDeletedRow = $(td).parent('tr'); - }, - confirm: function(td) { - // Reset all cells in edit mode. - $table.find('td.tabledit-edit-mode').each(function() { - Edit.reset(this); - }); - // Add "active" class in delete button. - $(td).find('.tabledit-delete-button').addClass('active'); - // Show confirm button. - $(td).find('.tabledit-confirm-button').show(); - }, - restore: function(td) { - // Enable identifier hidden input. - $(td).parent('tr').find('input.tabledit-identifier').attr('disabled', false); - // Send AJAX request to server. - var ajaxResult = ajax(settings.buttons.restore.action); - // Disable identifier hidden input. - $(td).parents('tr').find('input.tabledit-identifier').attr('disabled', true); - - if (ajaxResult === false) { - return; - } - - // Remove class "deleted" to row. - $(td).parent('tr').removeClass('tabledit-deleted-row'); - // Hide table row. - $(td).parent('tr').removeClass(settings.mutedClass).find('.tabledit-toolbar button').attr('disabled', false); - // Hide restore button. - $(td).find('.tabledit-restore-button').hide(); - // Set last restored row. - $lastRestoredRow = $(td).parent('tr'); - } - }; - - /** - * Send AJAX request to server. - * - * @param {string} action - */ - function ajax(action) - { - var serialize = $table.find('.tabledit-input').serialize() + '&action=' + action; - - var result = settings.onAjax(action, serialize); - - if (result === false) { - return false; - } - - var jqXHR = $.post(settings.url, serialize, function(data, textStatus, jqXHR) { - if (action === settings.buttons.edit.action) { - $lastEditedRow.removeClass(settings.dangerClass).addClass(settings.warningClass); - setTimeout(function() { - //$lastEditedRow.removeClass(settings.warningClass); - $table.find('tr.' + settings.warningClass).removeClass(settings.warningClass); - }, 1400); - } - - settings.onSuccess(data, textStatus, jqXHR); - }, 'json'); - - jqXHR.fail(function(jqXHR, textStatus, errorThrown) { - if (action === settings.buttons.delete.action) { - $lastDeletedRow.removeClass(settings.mutedClass).addClass(settings.dangerClass); - $lastDeletedRow.find('.tabledit-toolbar button').attr('disabled', false); - $lastDeletedRow.find('.tabledit-toolbar .tabledit-restore-button').hide(); - } else if (action === settings.buttons.edit.action) { - $lastEditedRow.addClass(settings.dangerClass); - } - - settings.onFail(jqXHR, textStatus, errorThrown); - }); - - jqXHR.always(function() { - settings.onAlways(); - }); - - return jqXHR; - } - - Draw.columns.identifier(); - Draw.columns.editable(); - Draw.columns.toolbar(); - - settings.onDraw(); - - if (settings.deleteButton) { - /** - * Delete one row. - * - * @param {object} event - */ - $table.on('click', 'button.tabledit-delete-button', function(event) { - if (event.handled !== true) { - event.preventDefault(); - - // Get current state before reset to view mode. - var activated = $(this).hasClass('active'); - - var $td = $(this).parents('td'); - - Delete.reset($td); - - if (!activated) { - Delete.confirm($td); - } - - event.handled = true; - } - }); - - /** - * Delete one row (confirm). - * - * @param {object} event - */ - $table.on('click', 'button.tabledit-confirm-button', function(event) { - if (event.handled !== true) { - event.preventDefault(); - - var $td = $(this).parents('td'); - - Delete.submit($td); - setTimeout(function() { - $td.parent('tr').remove(); - }, 3000); - event.handled = true; - } - }); - } - - if (settings.restoreButton) { - /** - * Restore one row. - * - * @param {object} event - */ - $table.on('click', 'button.tabledit-restore-button', function(event) { - if (event.handled !== true) { - event.preventDefault(); - - Delete.restore($(this).parents('td')); - - event.handled = true; - } - }); - } - - if (settings.editButton) { - /** - * Activate edit mode on all columns. - * - * @param {object} event - */ - $table.on('click', 'button.tabledit-edit-button', function(event) { - - if (event.handled !== true) { - event.preventDefault(); - - var $button = $(this); - - // Get current state before reset to view mode. - var activated = $button.hasClass('active'); - - // Change to view mode columns that are in edit mode. - Edit.reset($table.find('td.tabledit-edit-mode')); - - if (!activated) { - // Change to edit mode for all columns in reverse way. - $($button.parents('tr').find('td.tabledit-view-mode').get().reverse()).each(function() { - Mode.edit(this); - }); - } - - event.handled = true; - } - }); - - /** - * Save edited row. - * - * @param {object} event - */ - $table.on('click', 'button.tabledit-save-button', function(event) { - if (event.handled !== true) { - event.preventDefault(); - - // Submit and update all columns. - Edit.submit($(this).parents('tr').find('td.tabledit-edit-mode')); - - event.handled = true; - } - }); - } else { - /** - * Change to edit mode on table td element. - * - * @param {object} event - */ - $table.on(settings.eventType, 'tr:not(.tabledit-deleted-row) td.tabledit-view-mode', function(event) { - if (event.handled !== true) { - event.preventDefault(); - - // Reset all td's in edit mode. - Edit.reset($table.find('td.tabledit-edit-mode')); - - // Change to edit mode. - Mode.edit(this); - - event.handled = true; - } - }); - - /** - * Change event when input is a select element. - */ - $table.on('change', 'select.tabledit-input:visible', function() { - if (event.handled !== true) { - // Submit and update the column. - Edit.submit($(this).parent('td')); - - event.handled = true; - } - }); - - /** - * Click event on document element. - * - * @param {object} event - */ - $(document).on('click', function(event) { - var $editMode = $table.find('.tabledit-edit-mode'); - // Reset visible edit mode column. - if (!$editMode.is(event.target) && $editMode.has(event.target).length === 0) { - Edit.reset($table.find('.tabledit-input:visible').parent('td')); - } - }); - } - - /** - * Keyup event on document element. - * - * @param {object} event - */ - $(document).on('keyup', function(event) { - // Get input element with focus or confirmation button. - var $input = $table.find('.tabledit-input:visible'); - var $button = $table.find('.tabledit-confirm-button'); - - if ($input.length > 0) { - var $td = $input.parents('td'); - } else if ($button.length > 0) { - var $td = $button.parents('td'); - } else { - return; - } - - // Key? - switch (event.keyCode) { - case 9: // Tab. - if (!settings.editButton) { - Edit.submit($td); - Mode.edit($td.closest('td').next()); - } - break; - case 13: // Enter. - Edit.submit($td); - break; - case 27: // Escape. - Edit.reset($td); - Delete.reset($td); - break; - } - }); - - return this; - }; -}(jQuery)); \ No newline at end of file diff --git a/public/bck050924trfdetails.php b/public/bck050924trfdetails.php deleted file mode 100644 index ea18b93..0000000 --- a/public/bck050924trfdetails.php +++ /dev/null @@ -1,1101 +0,0 @@ - - - - -fetchCountry(); - -?> -setQuery("SELECT * FROM `trf-details` ORDER BY `trf-details`.trfnumber DESC LIMIT 1"); -$lasttrfnumber->execute(); ?> -getColumnVal("trfnumber"); -$nextnumber = $lastnumber + 1; -?> -setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.tempcode='$tempcode'"); - $tempcodesearch->execute(); -} -?> -Action = "update"; - $UpdateQuery->Table = "`trf-details`"; - $UpdateQuery->bindColumn("previousreportnumber", "s", "$previousrepnumber", "WA_DEFAULT"); - $UpdateQuery->bindColumn("notificatedorganismname", "s", "$notificatedorganismname", "WA_DEFAULT"); - $UpdateQuery->addFilter("idtrfdetails", "=", "i", "" . ($idtrf) . ""); - $UpdateQuery->execute(); - $UpdateGoTo = ""; - if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo ? rel2abs($UpdateGoTo, dirname(__FILE__)) : ""; - $UpdateQuery->redirect($UpdateGoTo); -} -?> -Action = "update"; - $UpdateQuery->Table = "`trf-details`"; - $UpdateQuery->bindColumn("previousreportnumber", "s", "$previousrepnumber", "WA_DEFAULT"); - $UpdateQuery->bindColumn("revisionfor", "s", "$revwhy", "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("previousreportnumber", "s", "$previousrepnumber", "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); - } -} -?> -Action = "update"; - $UpdateQuery->Table = "`trf-details`"; - $UpdateQuery->bindColumn("previousreportnumber", "s", "$previousrepnumber", "WA_DEFAULT"); - $UpdateQuery->bindColumn("toextend", "s", "$toextend", "WA_DEFAULT"); - $UpdateQuery->addFilter("idtrfdetails", "=", "i", "" . ($idtrf) . ""); - $UpdateQuery->execute(); - $UpdateGoTo = ""; - if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo ? rel2abs($UpdateGoTo, dirname(__FILE__)) : ""; - $UpdateQuery->redirect($UpdateGoTo); -} -?> -getColumnVal("idtrfdetails"))) { - $InsertQuery = new WA_MySQLi_Query($cmctrfdb); - $InsertQuery->Action = "insert"; - $InsertQuery->Table = "`trf-details`"; - $InsertQuery->bindColumn("trfnumber", "i", "$nextnumber", "WA_DEFAULT"); - $InsertQuery->bindColumn("idcompany", "i", "$idcompany", "WA_DEFAULT"); - $InsertQuery->bindColumn("iduser", "i", "$iduserlogin", "WA_DEFAULT"); - $InsertQuery->bindColumn("idcertification", "i", "$certtype", "WA_DEFAULT"); - $InsertQuery->bindColumn("previousreportnumber", "s", "$previousrepnumber", "WA_DEFAULT"); - $InsertQuery->bindColumn("tempcode", "s", "$tempcode", "WA_DEFAULT"); - $InsertQuery->bindColumn("notificatedorganismname", "s", "$notificatedorganismname", "WA_DEFAULT"); - $InsertQuery->saveInSession(""); - $InsertQuery->execute(); - $InsertGoTo = ""; - $InsertQuery->redirect($InsertGoTo); - - $tempcodesearch2 = new WA_MySQLi_RS("tempcodesearch", $cmctrfdb, 1); - $tempcodesearch2->setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.tempcode='$tempcode'"); - $tempcodesearch2->execute(); - - $idtrf = $tempcodesearch2->getColumnVal("idtrfdetails"); - - $code = "1"; - $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); - - $code = "2"; - $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); - - $UpdateQuery = new WA_MySQLi_Query($cmctrfdb); - $UpdateQuery->Action = "update"; - $UpdateQuery->Table = "contacts"; - $UpdateQuery->bindColumn("idtrf", "i", "$idtrf", "WA_DEFAULT"); - $UpdateQuery->addFilter("tempcode", "=", "s", "" . ($tempcode) . ""); - $UpdateQuery->execute(); - $UpdateGoTo = ""; - if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo ? rel2abs($UpdateGoTo, dirname(__FILE__)) : ""; - $UpdateQuery->redirect($UpdateGoTo); - - //include('uploadfilecertificate.php'); - } -} -?> -setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.tempcode='$tempcode'"); - $trfnumberfinal->execute(); - $idtrf = $trfnumberfinal->getColumnVal("idtrfdetails"); - $idcertn = $trfnumberfinal->getColumnVal("idcertification"); -} else { - $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"); -} -?> -setQuery("SELECT * FROM article_type ORDER BY article_type.name_articletype"); -$typearticleselect->execute(); ?> -setQuery("SELECT * FROM article_characteristic ORDER BY article_characteristic.name_articlecharacteristic"); -$charactarticle->execute(); ?> -getColumnVal("idcertification") ?> -setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcert'"); -$certname->execute(); ?> -setQuery("SELECT * FROM modelarticle ORDER BY modelarticle.namemodelarticle"); -$modelarticlelist->execute(); -?> - - - - - - - - <?php echo $titlepage; ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
- -
-
-
-
- -
-

-
-
-
-
-
-
-
-
- - - -
- -
-
- -
-
30%
-
- - getColumnVal("otherclient") == 'Y') { ?> -
-
- - - -

- - setQuery("SELECT * FROM contacts WHERE contacts.idtrf='$idtrf' AND contacts.kindofcontacts='$kindcont'"); - $certcontactdata->execute(); - ?> - - - - - - - - - - - - - - - - - - -
getColumnVal("companyname")); ?>getColumnVal("address")); ?>getColumnVal("city")); ?>

- - ', '_blank', 'location=yes,height=500,width=850,scrollbars=yes,status=yes');"> -
-
- - -
-
- - - -
-
-

-

- - -
- -
- - -
- -
- - - "> - -

- - -
- -
- - - - - -
- -
- -
- - -
- -
- - - -
- - - -
- - " required=""> - -
- -
- - -
- -
- - -
-
- -
;"> -
- -
- getColumnVal("idarticletype"), array(3))) ? "required" : "" ?> placeholder="" value=""> -
-
- getColumnVal("idarticletype"), array(3))) ? "required" : "" ?> placeholder="" value=""> -
-
-
- -
;"> -
- -
- getColumnVal("idarticletype"), array(3))) ? "required" : ""; ?> placeholder="" value=""> -
-
- getColumnVal("idarticletype"), array(3))) ? "required" : ""; ?> placeholder="" value=""> -
-
-
- -
- - -
- - -
-
- -
- - - - -
- - - -
- - "> - -
- -
- - - -
- - - -
- - getColumnVal("previousreportnumber")); - } ?>"> - -
- -
- - -
- - - -
- - getColumnVal("toextend")); - } ?>"> - -
- -
- - - - - -
- - - -
- - getColumnVal("revisionfor")); - } ?>"> - -
- -
- - - - - -
- - - -
- - getColumnVal("renewdate")); - } ?>"> - -
- -
- - - - - "> - -

- - -
-
-
- - - - - -
-
- - -
- - - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/bck060525sendtd.php b/public/bck060525sendtd.php deleted file mode 100644 index dc201c9..0000000 --- a/public/bck060525sendtd.php +++ /dev/null @@ -1,360 +0,0 @@ - - -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); - } - } - -?> - 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"); - ?> - getColumnVal("idcertification") ?> - 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(); - ?> - setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcert'"); - $certname->execute(); ?> - setQuery("SELECT * FROM chemicalagent ORDER BY chemicalagent.name_chemicalagent"); - $chemicalagentlist->execute(); - - ?> - - - - - - TRF <?php echo $ownercompanyname; ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
- -
-
-
-
- -
-

-
-
-
-
-
-
-
-
- -
-
-
-
-
100%
-
- - $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}"; - } - } - ?> -
-
-

-

-


-
-
-
-
- -
- - - -
- -
- - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/bck1609additionalinfo.php b/public/bck1609additionalinfo.php deleted file mode 100644 index 49bd94e..0000000 --- a/public/bck1609additionalinfo.php +++ /dev/null @@ -1,246 +0,0 @@ - -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); - } -?> - 0) { - // Campi nulli trovati, torna alla pagina standardstep.php e mostra il messaggio di errore - header("Location: standardstep.php?idtrf=$idtrf&error=tuttiicampidevonoesserericompilati"); - exit; -} */ -?> -setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.idtrfdetails='$idtrf'"); -$trfnumberfinal->execute(); -?> -getColumnVal("idcertification"); -$idtrf=$trfnumberfinal->getColumnVal("idtrfdetails"); -?> -getColumnVal("idcertification") ?> -setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcert'"); -$certname->execute(); -?> - - - - - TRF CIMAC - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
- -
-
-
-
- -
-

-

-
- -
- -
-
-
-
-
-
- - -
- -
- -
- -
-
60%
-
- - getColumnVal("idarticletype")=="2") { ?> -
-
-

-

-

-

-
-
-
- getColumnVal("virusprotection")=='Y') { echo "checked"; } ?>> - -
-
- - -
-
- - - - -
- -
- - - - getColumnVal("idarticletype")=="1") { ?> -
-
-

-

-

-

-
-
- -
- - -
-
-
-
- getColumnVal("shoesorthopedic")=='Y') { echo "checked"; } ?>> - -
-
- getColumnVal("autoclavable")=='Y') { echo "checked"; } ?>> - -
-
- getColumnVal("esd")=='Y') { echo "checked"; } ?>> - -
- -
- - - -
-
- - - - -
- -
- - -
- -
- -
- -
- - - - - -
- - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/bck1609addrequirements.php b/public/bck1609addrequirements.php deleted file mode 100644 index ba97fb7..0000000 --- a/public/bck1609addrequirements.php +++ /dev/null @@ -1,404 +0,0 @@ - - -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); - } -?> - 0) { - // Campi nulli trovati, torna alla pagina standardstep.php e mostra il messaggio di errore - header("Location: standardstep.php?idtrf=$idtrf&error=tuttiicampidevonoesserericompilati"); - exit; -}*/ -?> -setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.idtrfdetails='$idtrf'"); -$trfnumberfinal->execute(); -$idcertn=$trfnumberfinal->getColumnVal("idcertification"); -$idstandards=$trfnumberfinal->getColumnVal("idstandards"); -$idarticletype=$trfnumberfinal->getColumnVal("idarticletype"); -?> -setQuery("SELECT * FROM trfstandards WHERE trfstandards.idtrfdetails='$idtrf'"); -$standardlistsel->execute(); -?> - -atEnd()) { - $wa_startindex = $standardlistsel->Index; -?> -getColumnVal("idstandards"); -$arraystd[]=$idstandards; - -?> - -moveNext(); -} -$standardlistsel->moveFirst(); //return RS to first record -unset($wa_startindex); -unset($wa_repeatcount); -$array2std=implode("','",$arraystd); -$array3std="'".$array2std."'"; -?> - - -getColumnVal("idcertification") ?> -setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcert'"); -$certname->execute();?> -setQuery("SELECT * FROM additionalrequirements WHERE additionalrequirements.idarticletype='$idarticletype' ORDER BY additionalrequirements.name_additionalrequirements"); -//$addreqlist->execute();?> - -setQuery("SELECT DISTINCT stdreqlist.idadditionalrequirements, additionalrequirements." . $additionalRequirementsField . " FROM stdreqlist LEFT JOIN additionalrequirements ON stdreqlist.idadditionalrequirements=additionalrequirements.idadditionalrequirements WHERE stdreqlist.idstandards IN ($array3std)"); -$addreqlist->execute(); - -?> -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); -} -?> -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); -}} -?> -setQuery("SELECT * FROM trfaddrequirements LEFT JOIN additionalrequirements ON trfaddrequirements.idadditionalrequirements=additionalrequirements.idadditionalrequirements WHERE trfaddrequirements.idtrf='$idtrf'"); -$addreqselectedlist->execute();?> - - - - - - - TRF CIMAC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
-
-
-
- -
-

-
-
-
-
-
-
-
-
- - -
- -
-
- -
-
70%
-
- - -
-
-

-

-
-
- getColumnVal("name_additionalrequirements"); - $varnamelang=$colvarname.$lang; - $varhelplang="additionalrequirements_".$lang; - ?> -
- -
-
- - - - - - "> - -

- - -
- - -
- - -
-
-

-

- - - - - - - - - - - - atEnd()) { - $wa_startindex = $addreqselectedlist->Index; -?> - - - - - moveNext(); -} -$addreqselectedlist->moveFirst(); //return RS to first record -unset($wa_startindex); -unset($wa_repeatcount); -?> - - - -
- getColumnVal($nameField)); - ?> - - - &idtrf="> -
- - - - - - - - -
- - -
- - - - -
-
- - - -
- - - -
- -
- - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/bck170326standardstep.php b/public/bck170326standardstep.php deleted file mode 100644 index 8c646d8..0000000 --- a/public/bck170326standardstep.php +++ /dev/null @@ -1,890 +0,0 @@ - - - - - - -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); - } - } -} //} - - -?> -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); - } -} -?> - -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"); -?> -getColumnVal("idcertification") ?> -setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcert'"); -$certname->execute(); ?> -setQuery("SELECT * FROM standards WHERE standards.idarticletype='$articletype'"); -// $stdcheck->execute(); -?> -setQuery("SELECT * FROM standards WHERE standards.idarticlecharacteristic='$articlecharact' "); -$stdcheck->execute(); -$idstselect = $stdcheck->getColumnVal("idstandards"); -?> - - - - - - - <?php echo $titlepage; ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
-
-
-
- -
-

-
-
-
-
-
-
-
-
- - -
- -
- - -
-
-
-
-
- -
-
-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - -
- -
- -
-
-
- - - -
-
50%
-
- - - - - - -
- setQuery("SELECT * FROM trfstandards LEFT JOIN standards ON trfstandards.idstandards=standards.idstandards WHERE trfstandards.idtrfdetails='$idtrf'"); - $standardselectedlist->execute(); ?> - - - - -
-
-
- -
-

- . -

- -
- - -
- - - -
- Attenzione: tutti i campi devono essere compilati.

'; - } - ?> - ' . $nextsteptitle . ''; - - if (($articletype == 1) || (!empty($virusstep))) { - echo ''; - } else { - echo ''; - } - - ?> - - - -
-
-
-
- -
- - - -
- - - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/bck230125sendtrf.php b/public/bck230125sendtrf.php deleted file mode 100644 index 1a909a1..0000000 --- a/public/bck230125sendtrf.php +++ /dev/null @@ -1,481 +0,0 @@ - -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); -} - -?> -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); - } - } - -?> - 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"); - ?> - getColumnVal("idcertification") ?> - setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcert'"); - $certname->execute(); ?> - setQuery("SELECT * FROM chemicalagent ORDER BY chemicalagent.name_chemicalagent"); - $chemicalagentlist->execute(); - - ?> - - - - - - <?php echo $titlepage; ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
- -
-
-
-
- -
-

-
-
-
-
-
-
-
-
- -
-
-
-
-
100%
-
- - 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!
È stato inserito un nuovo ETRF N. $trfnmbmail.

" . - "Ragione Sociale = $companynamemail

" . - "Descrizione articolo $descart.
"; - } else if ($_SESSION['langselect'] == 'en') { - // Imposta il testo in inglese - $mail->Body = "Hi $csinchargeprev!
A new ETRF No. $trfnmbmail has been submitted.

" . - "Company Name = $companynamemail

" . - "Item Description $descart.
"; - } 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); -*/ - } - ?> -
-
-

-

-


-
-
-
-
- -
- - - -
- -
- - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/bck23072024adddocument.php b/public/bck23072024adddocument.php deleted file mode 100644 index 52a0a5f..0000000 --- a/public/bck23072024adddocument.php +++ /dev/null @@ -1,607 +0,0 @@ - -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); -} -?> -setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.idtrfdetails='$idtrf'"); -$trfnumberfinal->execute(); -$idcertn = $trfnumberfinal->getColumnVal("idcertification"); -?> -getColumnVal("idcertification"); ?> -setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcert'"); -$certname->execute(); ?> - - - - - - TRF <?php echo $ownercompanyname; ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
- -
-
-
-
- -
-

-
-
-
-
-
-
-
-
- - - -
- -
-
- -
-
95%
-
- - - - - getColumnVal("idcertification") != '5') and ($trfnumberfinal->getColumnVal("idcertification") != '6')) { ?> -
-
-

- -

- -

- - - - - 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; - } ?> - - - - - - - - - - - - - - -
-
- -
- -
- - "> - -
- -
-
-
-
- -
- -
- - "> - -
- -
-
- - - -
- getColumnVal("photoone"))) { ?> - " height="200" alt="" /> - - - - - - getColumnVal("phototwo"))) { ?> - - " height="200" alt="" /> - - -
- -
- -
-
- - - - -
-
-

- -

- -

- -

- - - -
- -
-
- -
- -
-
- -
- -
-
- - -
-
-
- - "> - -
- - - - - -
- -
- -
- -
-
- - -
- - setQuery("SELECT * FROM fileattached WHERE fileattached.idtrfdetails='$idtrf'"); - $filenamelist->execute(); - ?> -
-

-

- - -
- -
- - - -
- - - - - - - - - - - - - atEnd()) { - $wa_startindex = $filenamelist->Index; - ?> - - - - - - - moveNext(); - } - $filenamelist->moveFirst(); //return RS to first record - unset($wa_startindex); - unset($wa_repeatcount); - ?> - - - -
- " target="_blank"> - getColumnVal("description_fileattached")); ?> - - "> -

- - - - - -
-
- - -
- -
- -
-
- - - - -
-
- - -
- - - -
- -
- - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/bck23072024pdf-creation.php b/public/bck23072024pdf-creation.php deleted file mode 100644 index d60b91b..0000000 --- a/public/bck23072024pdf-creation.php +++ /dev/null @@ -1,489 +0,0 @@ - - - - - - -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'); - -?> -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'); - } -?> \ No newline at end of file diff --git a/public/bck23072024sendtrf.php b/public/bck23072024sendtrf.php deleted file mode 100644 index 31969a9..0000000 --- a/public/bck23072024sendtrf.php +++ /dev/null @@ -1,479 +0,0 @@ - -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); -} - -?> -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); - } - } - -?> - 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"); - ?> - getColumnVal("idcertification") ?> - setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcert'"); - $certname->execute(); ?> - setQuery("SELECT * FROM chemicalagent ORDER BY chemicalagent.name_chemicalagent"); - $chemicalagentlist->execute(); - - ?> - - - - - - TRF <?php echo $ownercompanyname; ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
- -
-
-
-
- -
-

-
-
-
-
-
-
-
-
- -
-
-
-
-
100%
-
- - 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!
È stato inserito un nuovo ETRF N. $trfnmbmail.

" . - "Ragione Sociale = $companynamemail

" . - "Descrizione articolo $descart.
"; - } else if ($_SESSION['langselect'] == 'en') { - // Imposta il testo in inglese - $mail->Body = "Hi $csinchargeprev!
A new ETRF No. $trfnmbmail has been submitted.

" . - "Company Name = $companynamemail

" . - "Item Description $descart.
"; - } 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); -*/ - } - ?> -
-
-

-

-


-
-
-
-
- -
- - - -
- -
- - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/bck240724sendtd.php b/public/bck240724sendtd.php deleted file mode 100644 index 27d5d4d..0000000 --- a/public/bck240724sendtd.php +++ /dev/null @@ -1,524 +0,0 @@ - - -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); - } - } - -?> - 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"); - ?> - getColumnVal("idcertification") ?> - 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(); - ?> - setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcert'"); - $certname->execute(); ?> - setQuery("SELECT * FROM chemicalagent ORDER BY chemicalagent.name_chemicalagent"); - $chemicalagentlist->execute(); - - ?> - - - - - - TRF <?php echo $ownercompanyname; ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
- -
-
-
-
- -
-

-
-
-
-
-
-
-
-
- -
-
-
-
-
100%
-
- - $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!
È stato inserito un nuovo ETRF N. $trfnmbmail.

" . - "Ragione Sociale = $companynamemail

" . - "Descrizione articolo $descart.
"; - } else if ($_SESSION['langselect'] == 'en') { - // Imposta il testo in inglese - $mail->Body = "Hi $csinchargeprev!
A new ETRF No. $trfnmbmail has been submitted.

" . - "Company Name = $companynamemail

" . - "Item Description $descart.
"; - } 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); -*/ - } - ?> -
-
-

-

-


-
-
-
-
- -
- - - -
- -
- - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/bck29072024archivetrf.php b/public/bck29072024archivetrf.php deleted file mode 100644 index 908a917..0000000 --- a/public/bck29072024archivetrf.php +++ /dev/null @@ -1,580 +0,0 @@ - - - -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(); - -?> - - - -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(); -?> - - - - - - <?php echo $titlepage; ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
-
-
-
- -
-

-
-
-
-
-
- - - - - -
- - - -
-
-

- - - - - - - - - - - - - - - - - - atEnd()) { - $wa_startindex = $drafttrf->Index; - ?> - getColumnVal("idtrfdetails"); ?> - - - - - - - - - - - getColumnVal("idcertification") == 5 && $drafttrf->getColumnVal("revcs") != 's') { ?> - - - - getColumnVal("idcertification") == 6 && $drafttrf->getColumnVal("revcs") != 's') { ?> - - - - - getColumnVal("revcs") != 's') { ?> - - - - - - - - moveNext(); - } - $drafttrf->moveFirst(); //return RS to first record - unset($wa_startindex); - unset($wa_repeatcount); - ?> - -
TRF N.REVDescriptionCert TypeArticle typeTo be Sign
getColumnVal("trfnumber")); ?>getColumnVal("revtrf")) > 0) { ?>RgetColumnVal("revtrf"); - } ?>getColumnVal("sample_description")); ?>getColumnVal("name_certification")); ?> - getColumnVal($nameField)); - ?> - getColumnVal("revcs"); - if ($revcs == 's') { ?> - - - - - - -
- - -
- - - - -
- - -
- - - - -
- - - -
- - - -
-
-

- - - - - - - - - - - - - - - - - - - - - - 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; - ?> - - - - - - - - - - - - - - - - - - - moveNext(); - } - $archivetrflist->moveFirst(); //return RS to first record - unset($wa_startindex); - unset($wa_repeatcount); - ?> - -
TRF N.REVSigned OnDescriptionCert TypeArticle typeInsert byPDF1PDF2ZIPACTION
getColumnVal("trfnumber")); ?>getColumnVal("revtrf")) > 0) { ?>RgetColumnVal("revtrf"); - } ?>getColumnVal("signedon")); ?>getColumnVal("sample_description")); - - ?>getColumnVal("name_certification")); ?> - getColumnVal($nameField)); - ?> - getColumnVal("email")); ?>" target="_blank">getColumnVal("pdffilename2"))) { ?>" target="_blank">getColumnVal("zipname"))) { ?>" target="_blank"> - - - - - hasRole('Admin')) || (Auth::user()->hasRole('CustomerService')) || (Auth::user()->hasRole('Superuser'))) : ?> - 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';"; - } - ?> - - - - - - -
-
- - - - -
- - -
- - - - -
-
- - - -
- - - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/bck2jquery.tabledit.js b/public/bck2jquery.tabledit.js deleted file mode 100644 index bb09d66..0000000 --- a/public/bck2jquery.tabledit.js +++ /dev/null @@ -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: '', - action: 'edit' - }, - delete: { - class: 'btn btn-sm btn-default', - html: '', - 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 = '' + $(this).text() + ''; - var input = ''; - - // 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=''+$(this).text()+' '; - } - else { - var spantext=$(this).text(); - } - // Create span element. - var span = '' + spantext + ''; - - // 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 = ''; - - } - else{ - var input = ''; - - } - - } - else if(settings.columns.editable[i][2]=='file'){ - var input = ''; - - } - else{ - - - var input = ''; - } - } else { - // Create text input element. - var input = ''; - } - - // 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(''); - } - - // Create edit button. - if (settings.editButton) { - editButton = ''; - } - - // Create delete button. - if (settings.deleteButton) { - deleteButton = ''; - confirmButton = ''; - } - - // Create save button. - if (settings.editButton && settings.saveButton) { - saveButton = ''; - } - - // Create restore button. - if (settings.deleteButton && settings.restoreButton) { - restoreButton = ''; - } - - var toolbar = '
\n\ -
' + editButton + deleteButton + '
\n\ - ' + saveButton + '\n\ - ' + confirmButton + '\n\ - ' + restoreButton + '\n\ -
'; - - // Add toolbar column cells. - $table.find('tr:gt(0)').append('' + toolbar + ''); - } - } - } - }; - - /** - * 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(''+filename+' '); - } - - - } - 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); - } - - } - else if(inputname=='filenameaudit'){ - console.log('file type'); - var filename=$(this).find('.tabledit-span').text(); - if(filename!=''){ - $(this).find('.tabledit-span').html(''+filename+' '); - } - - - } - else { - $(this).find('.tabledit-span').text($input.val()); - } - - // Change to view mode. - Mode.view(this); - }); - - // Set last edited column and row. - $lastEditedRow = $(td).parent('tr'); - } - }; - - /** - * Available actions for delete function, with button as parameter. - * - * @type object - */ - var Delete = { - reset: function(td) { - // Reset delete button to initial status. - $table.find('.tabledit-confirm-button').hide(); - // Remove "active" class in delete button. - $table.find('.tabledit-delete-button').removeClass('active').blur(); - }, - submit: function(td) { - Delete.reset(td); - // Enable identifier hidden input. - $(td).parent('tr').find('input.tabledit-identifier').attr('disabled', false); - // Send AJAX request to server. - var ajaxResult = ajax(settings.buttons.delete.action); - // Disable identifier hidden input. - $(td).parents('tr').find('input.tabledit-identifier').attr('disabled', true); - - if (ajaxResult === false) { - return; - } - - // Add class "deleted" to row. - $(td).parent('tr').addClass('tabledit-deleted-row'); - // Hide table row. - $(td).parent('tr').addClass(settings.mutedClass).find('.tabledit-toolbar button:not(.tabledit-restore-button)').attr('disabled', true); - // Show restore button. - $(td).find('.tabledit-restore-button').show(); - // Set last deleted row. - $lastDeletedRow = $(td).parent('tr'); - }, - confirm: function(td) { - // Reset all cells in edit mode. - $table.find('td.tabledit-edit-mode').each(function() { - Edit.reset(this); - }); - // Add "active" class in delete button. - $(td).find('.tabledit-delete-button').addClass('active'); - // Show confirm button. - $(td).find('.tabledit-confirm-button').show(); - }, - restore: function(td) { - // Enable identifier hidden input. - $(td).parent('tr').find('input.tabledit-identifier').attr('disabled', false); - // Send AJAX request to server. - var ajaxResult = ajax(settings.buttons.restore.action); - // Disable identifier hidden input. - $(td).parents('tr').find('input.tabledit-identifier').attr('disabled', true); - - if (ajaxResult === false) { - return; - } - - // Remove class "deleted" to row. - $(td).parent('tr').removeClass('tabledit-deleted-row'); - // Hide table row. - $(td).parent('tr').removeClass(settings.mutedClass).find('.tabledit-toolbar button').attr('disabled', false); - // Hide restore button. - $(td).find('.tabledit-restore-button').hide(); - // Set last restored row. - $lastRestoredRow = $(td).parent('tr'); - } - }; - - /** - * Send AJAX request to server. - * - * @param {string} action - */ - function ajax(action) - { - var serialize = $table.find('.tabledit-input').serialize() + '&action=' + action; - - var result = settings.onAjax(action, serialize); - - if (result === false) { - return false; - } - - var jqXHR = $.post(settings.url, serialize, function(data, textStatus, jqXHR) { - if (action === settings.buttons.edit.action) { - $lastEditedRow.removeClass(settings.dangerClass).addClass(settings.warningClass); - setTimeout(function() { - //$lastEditedRow.removeClass(settings.warningClass); - $table.find('tr.' + settings.warningClass).removeClass(settings.warningClass); - }, 1400); - } - - settings.onSuccess(data, textStatus, jqXHR); - }, 'json'); - - jqXHR.fail(function(jqXHR, textStatus, errorThrown) { - if (action === settings.buttons.delete.action) { - $lastDeletedRow.removeClass(settings.mutedClass).addClass(settings.dangerClass); - $lastDeletedRow.find('.tabledit-toolbar button').attr('disabled', false); - $lastDeletedRow.find('.tabledit-toolbar .tabledit-restore-button').hide(); - } else if (action === settings.buttons.edit.action) { - $lastEditedRow.addClass(settings.dangerClass); - } - - settings.onFail(jqXHR, textStatus, errorThrown); - }); - - jqXHR.always(function() { - settings.onAlways(); - }); - - return jqXHR; - } - - Draw.columns.identifier(); - Draw.columns.editable(); - Draw.columns.toolbar(); - - settings.onDraw(); - - if (settings.deleteButton) { - /** - * Delete one row. - * - * @param {object} event - */ - $table.on('click', 'button.tabledit-delete-button', function(event) { - if (event.handled !== true) { - event.preventDefault(); - - // Get current state before reset to view mode. - var activated = $(this).hasClass('active'); - - var $td = $(this).parents('td'); - - Delete.reset($td); - - if (!activated) { - Delete.confirm($td); - } - - event.handled = true; - } - }); - - /** - * Delete one row (confirm). - * - * @param {object} event - */ - $table.on('click', 'button.tabledit-confirm-button', function(event) { - if (event.handled !== true) { - event.preventDefault(); - - var $td = $(this).parents('td'); - - Delete.submit($td); - setTimeout(function() { - $td.parent('tr').remove(); - }, 3000); - event.handled = true; - } - }); - } - - if (settings.restoreButton) { - /** - * Restore one row. - * - * @param {object} event - */ - $table.on('click', 'button.tabledit-restore-button', function(event) { - if (event.handled !== true) { - event.preventDefault(); - - Delete.restore($(this).parents('td')); - - event.handled = true; - } - }); - } - - if (settings.editButton) { - /** - * Activate edit mode on all columns. - * - * @param {object} event - */ - $table.on('click', 'button.tabledit-edit-button', function(event) { - - if (event.handled !== true) { - event.preventDefault(); - - var $button = $(this); - - // Get current state before reset to view mode. - var activated = $button.hasClass('active'); - - // Change to view mode columns that are in edit mode. - Edit.reset($table.find('td.tabledit-edit-mode')); - - if (!activated) { - // Change to edit mode for all columns in reverse way. - $($button.parents('tr').find('td.tabledit-view-mode').get().reverse()).each(function() { - Mode.edit(this); - }); - } - - event.handled = true; - } - }); - - /** - * Save edited row. - * - * @param {object} event - */ - $table.on('click', 'button.tabledit-save-button', function(event) { - if (event.handled !== true) { - event.preventDefault(); - - // Submit and update all columns. - Edit.submit($(this).parents('tr').find('td.tabledit-edit-mode')); - - event.handled = true; - } - }); - } else { - /** - * Change to edit mode on table td element. - * - * @param {object} event - */ - $table.on(settings.eventType, 'tr:not(.tabledit-deleted-row) td.tabledit-view-mode', function(event) { - if (event.handled !== true) { - event.preventDefault(); - - // Reset all td's in edit mode. - Edit.reset($table.find('td.tabledit-edit-mode')); - - // Change to edit mode. - Mode.edit(this); - - event.handled = true; - } - }); - - /** - * Change event when input is a select element. - */ - $table.on('change', 'select.tabledit-input:visible', function() { - if (event.handled !== true) { - // Submit and update the column. - Edit.submit($(this).parent('td')); - - event.handled = true; - } - }); - - /** - * Click event on document element. - * - * @param {object} event - */ - $(document).on('click', function(event) { - var $editMode = $table.find('.tabledit-edit-mode'); - // Reset visible edit mode column. - if (!$editMode.is(event.target) && $editMode.has(event.target).length === 0) { - Edit.reset($table.find('.tabledit-input:visible').parent('td')); - } - }); - } - - /** - * Keyup event on document element. - * - * @param {object} event - */ - $(document).on('keyup', function(event) { - // Get input element with focus or confirmation button. - var $input = $table.find('.tabledit-input:visible'); - var $button = $table.find('.tabledit-confirm-button'); - - if ($input.length > 0) { - var $td = $input.parents('td'); - } else if ($button.length > 0) { - var $td = $button.parents('td'); - } else { - return; - } - - // Key? - switch (event.keyCode) { - case 9: // Tab. - if (!settings.editButton) { - Edit.submit($td); - Mode.edit($td.closest('td').next()); - } - break; - case 13: // Enter. - Edit.submit($td); - break; - case 27: // Escape. - Edit.reset($td); - Delete.reset($td); - break; - } - }); - - return this; - }; -}(jQuery)); \ No newline at end of file diff --git a/public/clonetrf2.php b/public/clonetrf2.php index 22a9bce..0144341 100644 --- a/public/clonetrf2.php +++ b/public/clonetrf2.php @@ -1,382 +1,717 @@ -setQuery("SELECT * FROM `trf-details` ORDER BY `trf-details`.trfnumber DESC LIMIT 1"); -$lasttrfnumber->execute(); - -// Variabili per la modifica dei campi -$lastnumber=$lasttrfnumber->getColumnVal("trfnumber"); -$nexttrfnumber=$lastnumber+1; -$datein=date('Y-m-d'); -$tempcode=time(); -$idtrf=$_GET["idtrf"]; -$trfoldnumber=$lastnumber; - ?> -connect_error) { - die("Connessione fallita: " . $conn->connect_error); -} - -// Selezionare la riga da duplicare -$sql_select = "SELECT * FROM `trf-details` WHERE `trf-details`.idtrfdetails = '$idtrf'"; -$result_select = $conn->query($sql_select); - - $row = $result_select->fetch_assoc(); - - // Creare una copia dell'array con tutte le colonne invariate - $new_row = $row; - unset($new_row['idtrfdetails']); - unset($new_row['pdffilename']); - unset($new_row['pdffilename2']); - unset($new_row['csgo']); - unset($new_row['csincharge']); - unset($new_row['datecsincharge']); - unset($new_row['signedon']); - unset($new_row['signedonsecondcert']); - - // Modificare solo le colonne necessarie - $new_row['idtrfdetails'] = null; - $new_row['pdffilename'] = null; - $new_row['pdffilename2'] = null; - $new_row['csgo'] = null; - $new_row['csincharge'] = null; - $new_row['datecsincharge'] = null; - $new_row['signedon'] = null; - $new_row['signedonsecondcert'] = null; - $new_row['trfnumber'] = $nexttrfnumber; - $new_row['iduser'] = $iduserlogin; - $new_row['dateintrf'] = $datein; - $new_row['tempcode'] = $tempcode; - - // Inserire la nuova riga nella tabella trf-details - $columns = implode(", ", array_keys($new_row)); - $values = "'" . implode("', '", array_values($new_row)) . "'"; - $sql_insert = "INSERT INTO `trf-details` ($columns) VALUES ($values)"; - if ($conn->query($sql_insert) === TRUE) { - echo "Nuova riga inserita con successo TRF-Details"; - } else { - echo "Errore nell'inserimento della nuova riga: " . $conn->error; - } -?> -setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.trfnumber='$nexttrfnumber'"); -$newidtrf->execute(); -$newidtrfnumber=$newidtrf->getColumnVal("idtrfdetails"); -?> - -query($sql_insert) === TRUE) { - echo "Nuova riga inserita con successo AuditDPI"; - } else { - echo "Errore nell'inserimento della nuova riga: " . $conn->error; - } - -} -?> - -query($sql_insert) === TRUE) { - echo "Nuova riga inserita con successo Auditmanufacturer"; - } else { - echo "Errore nell'inserimento della nuova riga: " . $conn->error; - } - -} -?> - -query($sql_insert) === TRUE) { - echo "Nuova riga inserita con successo contacts"; - } else { - echo "Errore nell'inserimento della nuova riga: " . $conn->error; - } - -} -?> - -query($sql_insert) === TRUE) { - echo "Nuova riga inserita con successo fileattached"; - } else { - echo "Errore nell'inserimento della nuova riga: " . $conn->error; - } - -} -?> - -query($sql_insert) === TRUE) { - echo "Nuova riga inserita con successo identificationparts"; - } else { - echo "Errore nell'inserimento della nuova riga: " . $conn->error; - } - -} -?> - -query($sql_insert) === TRUE) { - echo "Nuova riga inserita con successo trfaddrequirements"; - } else { - echo "Errore nell'inserimento della nuova riga: " . $conn->error; - } - -} -?> - -query($sql_insert) === TRUE) { - echo "Nuova riga inserita con successo trfchemicalagent"; - } else { - echo "Errore nell'inserimento della nuova riga: " . $conn->error; - } - -} -?> - -query($sql_insert) === TRUE) { - echo "Nuova riga inserita con successo trfstandards"; - } else { - echo "Errore nell'inserimento della nuova riga: " . $conn->error; - } - -} -?> - -query($sql_insert) === TRUE) { - echo "Nuova riga inserita con successo wheretrfstep"; - } else { - echo "Errore nell'inserimento della nuova riga: " . $conn->error; - } - -} -?> - - +setQuery("SELECT * FROM `trf-details` ORDER BY `trf-details`.trfnumber DESC LIMIT 1"); + +$lasttrfnumber->execute(); + + + +// Variabili per la modifica dei campi + +$lastnumber = $lasttrfnumber->getColumnVal("trfnumber"); + +$nexttrfnumber = $lastnumber + 1; + +$datein = date('Y-m-d'); + +$tempcode = time(); + +$idtrf = $_GET["idtrf"]; + +$trfoldnumber = $lastnumber; + +?> + +safeLoad(); + +$servername = $_ENV['DB_HOST'] ?? getenv('DB_HOST') ?? 'localhost'; +$username = $_ENV['DB_USERNAME'] ?? getenv('DB_USERNAME') ?? ''; +$password = $_ENV['DB_PASSWORD'] ?? getenv('DB_PASSWORD') ?? ''; +$dbname = $_ENV['DB_DATABASE'] ?? getenv('DB_DATABASE') ?? ''; + +$conn = new mysqli($servername, $username, $password, $dbname); + +if ($conn->connect_error) { + die("Connessione fallita: " . $conn->connect_error); +} + +$conn->set_charset("utf8mb4"); + + + +// Selezionare la riga da duplicare + +$sql_select = "SELECT * FROM `trf-details` WHERE `trf-details`.idtrfdetails = '$idtrf'"; + +$result_select = $conn->query($sql_select); + + + +$row = $result_select->fetch_assoc(); + + + +// Creare una copia dell'array con tutte le colonne invariate + +$new_row = $row; + +unset($new_row['idtrfdetails']); + +unset($new_row['pdffilename']); + +unset($new_row['pdffilename2']); + +unset($new_row['csgo']); + +unset($new_row['csincharge']); + +unset($new_row['datecsincharge']); + +unset($new_row['signedon']); + +unset($new_row['signedonsecondcert']); + + + +// Modificare solo le colonne necessarie + +$new_row['idtrfdetails'] = null; + +$new_row['pdffilename'] = null; + +$new_row['pdffilename2'] = null; + +$new_row['csgo'] = null; + +$new_row['csincharge'] = null; + +$new_row['datecsincharge'] = null; + +$new_row['signedon'] = null; + +$new_row['signedonsecondcert'] = null; + +$new_row['trfnumber'] = $nexttrfnumber; + +$new_row['iduser'] = $iduserlogin; + +$new_row['dateintrf'] = $datein; + +$new_row['tempcode'] = $tempcode; + + + +// Inserire la nuova riga nella tabella trf-details + +$columns = implode(", ", array_keys($new_row)); + +$values = "'" . implode("', '", array_values($new_row)) . "'"; + +$sql_insert = "INSERT INTO `trf-details` ($columns) VALUES ($values)"; + +if ($conn->query($sql_insert) === TRUE) { + + echo "Nuova riga inserita con successo TRF-Details"; +} else { + + echo "Errore nell'inserimento della nuova riga: " . $conn->error; +} + +?> + +setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.trfnumber='$nexttrfnumber'"); + +$newidtrf->execute(); + +$newidtrfnumber = $newidtrf->getColumnVal("idtrfdetails"); + +?> + + + +query($sql_insert) === TRUE) { + + echo "Nuova riga inserita con successo AuditDPI"; + } else { + + echo "Errore nell'inserimento della nuova riga: " . $conn->error; + } +} + +?> + + + +query($sql_insert) === TRUE) { + + echo "Nuova riga inserita con successo Auditmanufacturer"; + } else { + + echo "Errore nell'inserimento della nuova riga: " . $conn->error; + } +} + +?> + + + +query($sql_insert) === TRUE) { + + echo "Nuova riga inserita con successo contacts"; + } else { + + echo "Errore nell'inserimento della nuova riga: " . $conn->error; + } +} + +?> + + + +query($sql_insert) === TRUE) { + + echo "Nuova riga inserita con successo fileattached"; + } else { + + echo "Errore nell'inserimento della nuova riga: " . $conn->error; + } +} + +?> + + + +query($sql_insert) === TRUE) { + + echo "Nuova riga inserita con successo identificationparts"; + } else { + + echo "Errore nell'inserimento della nuova riga: " . $conn->error; + } +} + +?> + + + +query($sql_insert) === TRUE) { + + echo "Nuova riga inserita con successo trfaddrequirements"; + } else { + + echo "Errore nell'inserimento della nuova riga: " . $conn->error; + } +} + +?> + + + +query($sql_insert) === TRUE) { + + echo "Nuova riga inserita con successo trfchemicalagent"; + } else { + + echo "Errore nell'inserimento della nuova riga: " . $conn->error; + } +} + +?> + + + +query($sql_insert) === TRUE) { + + echo "Nuova riga inserita con successo trfstandards"; + } else { + + echo "Errore nell'inserimento della nuova riga: " . $conn->error; + } +} + +?> + + + +query($sql_insert) === TRUE) { + + echo "Nuova riga inserita con successo wheretrfstep"; + } else { + + echo "Errore nell'inserimento della nuova riga: " . $conn->error; + } +} + +?> + + + + + diff --git a/public/datarecover/bck100823parsedata.php b/public/datarecover/bck100823parsedata.php deleted file mode 100644 index 8a3e58c..0000000 --- a/public/datarecover/bck100823parsedata.php +++ /dev/null @@ -1,55 +0,0 @@ -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); -} -?> - diff --git a/public/datarecover/bck23072024parsedata.php b/public/datarecover/bck23072024parsedata.php deleted file mode 100644 index ea7799b..0000000 --- a/public/datarecover/bck23072024parsedata.php +++ /dev/null @@ -1,62 +0,0 @@ -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); -} -?> - IMG_JPEG){ - /* IF NOT JPEG, USE DEFAULT IMAGE INSTEAD*/ - $image1="uploadimages/notav.jpg"; - } - - } -//echo $appformn; - - - - - -?> \ No newline at end of file diff --git a/public/datarecover/bckparsedata.php b/public/datarecover/bckparsedata.php deleted file mode 100644 index de57513..0000000 --- a/public/datarecover/bckparsedata.php +++ /dev/null @@ -1,44 +0,0 @@ - -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); -} -?> - diff --git a/public/db-connect.php b/public/db-connect.php index 9d85eb1..e15ffc9 100644 --- a/public/db-connect.php +++ b/public/db-connect.php @@ -1,8 +1,41 @@ - \ No newline at end of file +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"); diff --git a/public/db.php b/public/db.php index e4a242c..297ee22 100644 --- a/public/db.php +++ b/public/db.php @@ -1,7 +1,39 @@ -connect_error) { -die("Connection failed: " . $conn->connect_error); -} -?> \ No newline at end of file +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"); diff --git a/public/ddown/bckdropdown.php b/public/ddown/bckdropdown.php deleted file mode 100644 index 7d6bce4..0000000 --- a/public/ddown/bckdropdown.php +++ /dev/null @@ -1,84 +0,0 @@ -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; - } - -} - - ?> \ No newline at end of file diff --git a/public/ddown/dropdown.php b/public/ddown/dropdown.php index 17213be..8f78c80 100644 --- a/public/ddown/dropdown.php +++ b/public/ddown/dropdown.php @@ -1,96 +1,111 @@ -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; + } } - -} - - ?> \ No newline at end of file diff --git a/public/ddown/dropdownbackup.php b/public/ddown/dropdownbackup.php deleted file mode 100644 index dda6d9a..0000000 --- a/public/ddown/dropdownbackup.php +++ /dev/null @@ -1,84 +0,0 @@ -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; - } - -} - - ?> \ No newline at end of file diff --git a/public/include/bck020324leftsidenav2.php b/public/include/bck020324leftsidenav2.php deleted file mode 100644 index 4847ba1..0000000 --- a/public/include/bck020324leftsidenav2.php +++ /dev/null @@ -1,65 +0,0 @@ - -
- -
\ No newline at end of file diff --git a/public/include/bck040723generalsettings.php b/public/include/bck040723generalsettings.php deleted file mode 100644 index 9a6214a..0000000 --- a/public/include/bck040723generalsettings.php +++ /dev/null @@ -1,36 +0,0 @@ -setQuery("SELECT * FROM optionportal WHERE optionportal.idoptionportal='1'"); -$globalsett->execute(); -?> - -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"); -?> - - - \ No newline at end of file diff --git a/public/include/bck040723zipcreation.php b/public/include/bck040723zipcreation.php deleted file mode 100644 index f8f10ae..0000000 --- a/public/include/bck040723zipcreation.php +++ /dev/null @@ -1,67 +0,0 @@ - -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(); -} -} -?> \ No newline at end of file diff --git a/public/include/bck060324topbar.php b/public/include/bck060324topbar.php deleted file mode 100644 index 3ae5d75..0000000 --- a/public/include/bck060324topbar.php +++ /dev/null @@ -1,93 +0,0 @@ - -
- - -
- - -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 -} -?> - - - -
diff --git a/public/include/bck130922maparticle.php b/public/include/bck130922maparticle.php deleted file mode 100644 index 35c9feb..0000000 --- a/public/include/bck130922maparticle.php +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - <?php echo $twos; ?> - <?php echo $threes; ?> - <?php echo $fours; ?> - <?php echo $fives; ?> - <?php echo $fives; ?> - <?php echo $sevens; ?> - <?php echo $eights; ?> - <?php echo $tens; ?> - <?php echo $twelves; ?> - <?php echo $thirteens; ?> - <?php echo $ones; ?> - <?php echo $fourteens; ?> - <?php echo $fifteens; ?> - <?php echo $sixteens; ?> - <?php echo $seventeens; ?> - <?php echo $nineteens; ?> - <?php echo $eighteens; ?> - <?php echo $twentys; ?> - <?php echo $ones; ?> - <?php echo $sixs; ?> - - - - - - - - - - <?php echo $oneg; ?> - <?php echo $twog; ?> - <?php echo $threeg; ?> - <?php echo $fourg; ?> - - - - - - - - - - - - -<?php echo $onem; ?> -<?php echo $twom; ?> -<?php echo $threem; ?> -<?php echo $fourm; ?> -<?php echo $fivem; ?> -<?php echo $sixm; ?> - - \ No newline at end of file diff --git a/public/include/bck140523headscript.php b/public/include/bck140523headscript.php deleted file mode 100644 index 73ac0c2..0000000 --- a/public/include/bck140523headscript.php +++ /dev/null @@ -1,151 +0,0 @@ -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"; -?> - - - - - - - - - - - - - -setQuery("SELECT * FROM languages WHERE languages.idlanguages='$langid'"); -$langselect->execute(); -$lang=$langselect->getColumnVal("acronym_languages"); -?> -setQuery("SELECT * FROM languages WHERE languages.active_languages='Y' ORDER BY languages.name_languages"); -$languageselection->execute(); -?> -setQuery("SELECT avatar,id FROM auth_users WHERE auth_users.id='$iduserlogin'"); -$avat->execute(); -$avatarname=$avat->getColumnVal("avatar"); -?> -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'); -?> - - - - - diff --git a/public/include/bck2009alertcheck.php b/public/include/bck2009alertcheck.php deleted file mode 100644 index 117f7ed..0000000 --- a/public/include/bck2009alertcheck.php +++ /dev/null @@ -1,12 +0,0 @@ - - - - - \ No newline at end of file diff --git a/public/include/bck2112headscript.php b/public/include/bck2112headscript.php deleted file mode 100644 index 68b4f6f..0000000 --- a/public/include/bck2112headscript.php +++ /dev/null @@ -1,114 +0,0 @@ -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"; -?> - - - - - - - - - - - -setQuery("SELECT * FROM languages WHERE languages.idlanguages='$langid'"); -$langselect->execute(); -$lang=$langselect->getColumnVal("acronym_languages"); -?> -setQuery("SELECT * FROM languages WHERE languages.active_languages='Y' ORDER BY languages.name_languages"); -$languageselection->execute(); -?> -setQuery("SELECT avatar,id FROM auth_users WHERE auth_users.id='$iduserlogin'"); -$avat->execute(); -$avatarname=$avat->getColumnVal("avatar"); -?> -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'); -?> - - - - - diff --git a/public/include/bck230224leftsidenav.php b/public/include/bck230224leftsidenav.php deleted file mode 100644 index f758383..0000000 --- a/public/include/bck230224leftsidenav.php +++ /dev/null @@ -1,192 +0,0 @@ - -
- - - - hasRole('Admin')): ?> -
  • - -
  • - - - - - - - - - - - -
    \ No newline at end of file diff --git a/public/include/bck240724mailhtml.php b/public/include/bck240724mailhtml.php deleted file mode 100644 index 26be80f..0000000 --- a/public/include/bck240724mailhtml.php +++ /dev/null @@ -1,1598 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -'; - - -} elseif($mmessage=="mailtoken") { - - - -//mail message token - - - - - -$mailmessagetoken=' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -'; - -} ?> \ No newline at end of file diff --git a/public/include/bck250924headscript2.php b/public/include/bck250924headscript2.php deleted file mode 100644 index 6c37714..0000000 --- a/public/include/bck250924headscript2.php +++ /dev/null @@ -1,124 +0,0 @@ - -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"; - - - -?> - - - - - - - - - - - - - - - - - - -setQuery("SELECT * FROM languages WHERE languages.idlanguages='$langid'"); -$langselect->execute(); -$lang=$langselect->getColumnVal("acronym_languages"); -?> -setQuery("SELECT * FROM languages WHERE languages.active_languages='Y' ORDER BY languages.name_languages"); -$languageselection->execute(); - - -?> -setQuery("SELECT avatar,id FROM auth_users WHERE auth_users.id='$iduserlogin'"); -$avat->execute(); -$avatarname=$avat->getColumnVal("avatar"); - -?> -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'); - -?> - - - - diff --git a/public/include/bckalertcert.php b/public/include/bckalertcert.php deleted file mode 100644 index 855e8fc..0000000 --- a/public/include/bckalertcert.php +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/include/bckappform.php b/public/include/bckappform.php deleted file mode 100644 index b0a0347..0000000 --- a/public/include/bckappform.php +++ /dev/null @@ -1,4 +0,0 @@ -
    -

    getColumnVal("iduser")); ?>-getColumnVal("trfnumber")); ?>

    - -
    \ No newline at end of file diff --git a/public/languages/en/bckgeneral.php b/public/languages/en/bckgeneral.php deleted file mode 100644 index 546d9f2..0000000 --- a/public/languages/en/bckgeneral.php +++ /dev/null @@ -1,301 +0,0 @@ -Description: 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 -Article: 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 -Material: Specify the nature of the material, any thickness, areal weight, etc. \r\n -Color: 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 Attention: remember to keep them for the audit!"; -$samplestoredtitlenew = "Are they in stock?"; -$manufacturernameaudit = "Manufacturer Names"; -$manufacturernameaudit_help = "Enter the names of the manufacturers of the samples available in stock"; -$manufacturernameaudit_help2 = "Attention: remember to keep them for the audit!"; -$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."; -?> \ No newline at end of file diff --git a/public/languages/it/bck2general.php b/public/languages/it/bck2general.php deleted file mode 100644 index 5cc02d0..0000000 --- a/public/languages/it/bck2general.php +++ /dev/null @@ -1,149 +0,0 @@ - \ No newline at end of file diff --git a/public/languages/it/bck2questionaire.php b/public/languages/it/bck2questionaire.php deleted file mode 100644 index 281ef3c..0000000 --- a/public/languages/it/bck2questionaire.php +++ /dev/null @@ -1,80 +0,0 @@ - \ No newline at end of file diff --git a/public/languages/it/bckgeneral (2).php b/public/languages/it/bckgeneral (2).php deleted file mode 100644 index 3b24389..0000000 --- a/public/languages/it/bckgeneral (2).php +++ /dev/null @@ -1,305 +0,0 @@ -Descrizione: inserisci una breve descrizione della parte (ad es. cuoio fiore spessore 1,8/2,0 mm / tessuto rete 100% poliestere, ecc.) \r\n -Articolo: 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 -Materiale: Specificare natura del materiale, eventuale spessore, massa areica, ecc. \r\n -Colore: 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 Attenzione: ricorda di conservarli per l’audit!"; -$samplestoredtitlenew="Sono a Magazzino?"; -$manufacturernameaudit="Nomi Produttori"; -$manufacturernameaudit_help="Inserisci il nome dei produttori dei campioni disponibili a magazzino"; -$manufacturernameaudit_help2="Attenzione: ricorda di conservarli per l’audit!"; -$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 l’estensione 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 quest’ultima 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="Sì"; -$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 l’audit 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 quest’ultima 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 quest’ultima 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"; -?> \ No newline at end of file diff --git a/public/languages/it/bckgeneral.php b/public/languages/it/bckgeneral.php deleted file mode 100644 index d5cf6ab..0000000 --- a/public/languages/it/bckgeneral.php +++ /dev/null @@ -1,145 +0,0 @@ - \ No newline at end of file diff --git a/public/languages/it/bckquestionaire.php b/public/languages/it/bckquestionaire.php deleted file mode 100644 index 5dfe9df..0000000 --- a/public/languages/it/bckquestionaire.php +++ /dev/null @@ -1,80 +0,0 @@ - \ No newline at end of file diff --git a/public/logos/1710258082_bcklogo-light-transformed.png b/public/logos/1710258082_bcklogo-light-transformed.png deleted file mode 100644 index c87cd51..0000000 Binary files a/public/logos/1710258082_bcklogo-light-transformed.png and /dev/null differ diff --git a/public/pdfcreation/bck/pdf1snd.php b/public/pdfcreation/bck/pdf1snd.php deleted file mode 100644 index 224a50d..0000000 --- a/public/pdfcreation/bck/pdf1snd.php +++ /dev/null @@ -1,77 +0,0 @@ -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(); - -?> \ No newline at end of file diff --git a/public/pdfcreation/bck/pdf3snd.php b/public/pdfcreation/bck/pdf3snd.php deleted file mode 100644 index 9ac6b31..0000000 --- a/public/pdfcreation/bck/pdf3snd.php +++ /dev/null @@ -1,82 +0,0 @@ -SetFont('Arial','',7); -$firstsent=html_entity_decode('Ai sensi e per gli effetti dell’art. 7 del REG 01 Regolamento per la valutazione della conformità dei Dispositivi di Protezione Individuale'); -$firstsent = iconv('UTF-8', 'windows-1252', $firstsent); -$secondsent=utf8_decode('secondo il Regolamento (UE) 2016/425 disponibile sul nostro sito web www.cimac.it'); -//$thirdsent=utf8_decode('For the purposes of Article 6 of the REG 01 "Regulation for the assessment of the conformity of Personal Protective Equipment '); -//$foursent=utf8_decode('according to Regulation (EU) 2016/425" available on our website www.cimac.it'); -$pdf->Cell(0,0,$firstsent,0,1); -$pdf->Cell(0,9,$secondsent,0,1); -//$pdf->Cell(0,0,$thirdsent,0,1); -//$pdf->Cell(0,9,$foursent,0,1); - //description table -include('pdfcreation/descriptiontable.php'); - -$pdf->Ln(); - - //typecert 3 info -include('pdfcreation/type3table.php'); - -$pdf->Ln(); - -// standards table -include('pdfcreation/standardstable.php'); - -$pdf->Ln(); - -// additionalinfo -include('pdfcreation/m30table.php'); - -$pdf->Ln(); -// additionalinfo requirements -include('pdfcreation/addreqtable.php'); - -$pdf->Ln(); - -// additionalinfo -include('pdfcreation/addinfotable.php'); - - - -$pdf->Ln(); - - // chem table -include('pdfcreation/chemtable.php'); - -$pdf->Ln(); - - //trf option -include('pdfcreation/trfoption.php'); - -$pdf->Ln(); - - //trf option -include('pdfcreation/fileattached.php'); - -$pdf->Ln(); -$pdf->Ln(); - //header report contact -//include('pdfcreation/headerreporttable.php'); - -//$pdf->Ln(); - - //header certificate contact -include('pdfcreation/headercertificatetable.php'); - -$pdf->Ln(); - //invoice contact -include('pdfcreation/invoicecontacttable.php'); - -$pdf->Ln(); - -// parts table -//include('pdfcreation/partstable.php'); - -//$pdf->Ln(); - //Sign datatable -include('pdfcreation/signdatatable.php'); - -$pdf->Ln(); - -?> \ No newline at end of file diff --git a/public/pdfcreation/bck/pdf4snd.php b/public/pdfcreation/bck/pdf4snd.php deleted file mode 100644 index 61cf86e..0000000 --- a/public/pdfcreation/bck/pdf4snd.php +++ /dev/null @@ -1,76 +0,0 @@ -SetFont('Arial','',7); -$firstsent=html_entity_decode('Ai sensi e per gli effetti dell’art. 6 del REG 01 Regolamento per la valutazione della conformità dei Dispositivi di Protezione Individuale'); -$firstsent = iconv('UTF-8', 'windows-1252', $firstsent); -$secondsent=utf8_decode('secondo il Regolamento (UE) 2016/425 disponibile sul nostro sito web www.cimac.it'); -//$thirdsent=utf8_decode('For the purposes of Article 6 of the REG 01 "Regulation for the assessment of the conformity of Personal Protective Equipment '); -//$foursent=utf8_decode('according to Regulation (EU) 2016/425" available on our website www.cimac.it'); -$pdf->Cell(0,0,$firstsent,0,1); -$pdf->Cell(0,9,$secondsent,0,1); -//$pdf->Cell(0,0,$thirdsent,0,1); -//$pdf->Cell(0,9,$foursent,0,1); - //description table -include('pdfcreation/descriptiontable.php'); - -$pdf->Ln(); - - //typecert 3 info -include('pdfcreation/type4table.php'); - -$pdf->Ln(); - -// standards table -include('pdfcreation/standardstable.php'); - -$pdf->Ln(); - -// additionalinfo -include('pdfcreation/m30table.php'); - -$pdf->Ln(); -// additionalinfo requirements -include('pdfcreation/addreqtable.php'); - -$pdf->Ln(); - -// additionalinfo -include('pdfcreation/addinfotable.php'); - -$pdf->Ln(); - - - // chem table -include('pdfcreation/chemtable.php'); - -$pdf->Ln(); - - //trf option -include('pdfcreation/trfoption.php'); - -$pdf->Ln(); - - //trf option -include('pdfcreation/fileattached.php'); - -$pdf->Ln(); -$pdf->Ln(); - //header report contact -//include('pdfcreation/headerreporttable.php'); - -//$pdf->Ln(); - - //header certificate contact -include('pdfcreation/headercertificatetable.php'); - -$pdf->Ln(); - //invoice contact -include('pdfcreation/invoicecontacttable.php'); - -$pdf->Ln(); - //Sign datatable -include('pdfcreation/signdatatable.php'); - -$pdf->Ln(); - -?> \ No newline at end of file diff --git a/public/pdfcreation/bck/pdf8snd.php b/public/pdfcreation/bck/pdf8snd.php deleted file mode 100644 index 115691b..0000000 --- a/public/pdfcreation/bck/pdf8snd.php +++ /dev/null @@ -1,82 +0,0 @@ -SetFont('Arial','',7); -$firstsent=html_entity_decode('Ai sensi e per gli effetti dell’art. 12 del REG 01 Regolamento per la valutazione della conformità dei Dispositivi di Protezione Individuale'); -$firstsent = iconv('UTF-8', 'windows-1252', $firstsent); -$secondsent=utf8_decode('secondo il Regolamento (UE) 2016/425 disponibile sul nostro sito web www.cimac.it'); -//$thirdsent=utf8_decode('For the purposes of Article 12 of the REG 01 "Regulation for the assessment of the conformity of Personal Protective Equipment '); -//$foursent=utf8_decode('according to Regulation (EU) 2016/425" available on our website www.cimac.it'); -$pdf->Cell(0,0,$firstsent,0,1); -$pdf->Cell(0,9,$secondsent,0,1); -//$pdf->Cell(0,0,$thirdsent,0,1); -//$pdf->Cell(0,9,$foursent,0,1); - //description table -include('pdfcreation/descriptiontable.php'); - -$pdf->Ln(); - - //typecert 3 info -include('pdfcreation/type8table.php'); - -$pdf->Ln(); - -// standards table -include('pdfcreation/standardstable.php'); -$pdf->Ln(); -// additionalinfo -include('pdfcreation/m30table.php'); - - - -$pdf->Ln(); -// additionalinfo requirements -include('pdfcreation/addreqtable.php'); - -$pdf->Ln(); - -// additionalinfo -include('pdfcreation/addinfotable.php'); - - - -$pdf->Ln(); - - // chem table -include('pdfcreation/chemtable.php'); - -$pdf->Ln(); - - //trf option -include('pdfcreation/trfoption.php'); - -$pdf->Ln(); - - //trf option -include('pdfcreation/fileattached.php'); - -$pdf->Ln(); -$pdf->Ln(); - //header report contact -//include('pdfcreation/headerreporttable.php'); - -//$pdf->Ln(); - - //header certificate contact -include('pdfcreation/headercertificatetable.php'); - -$pdf->Ln(); - //invoice contact -include('pdfcreation/invoicecontacttable.php'); - -$pdf->Ln(); - -// parts table -//include('pdfcreation/partstable.php'); - -//$pdf->Ln(); - //Sign datatable -include('pdfcreation/signdatatable.php'); - -$pdf->Ln(); - -?> \ No newline at end of file diff --git a/public/pdfcreation/bck020324descriptiontablenocert.php b/public/pdfcreation/bck020324descriptiontablenocert.php deleted file mode 100644 index b0c6af9..0000000 --- a/public/pdfcreation/bck020324descriptiontablenocert.php +++ /dev/null @@ -1,73 +0,0 @@ -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(); -} - -?> \ No newline at end of file diff --git a/public/pdfcreation/bck0509pdf1.php b/public/pdfcreation/bck0509pdf1.php deleted file mode 100644 index 9e62c3a..0000000 --- a/public/pdfcreation/bck0509pdf1.php +++ /dev/null @@ -1,82 +0,0 @@ -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(); - -?> \ No newline at end of file diff --git a/public/pdfcreation/bck060324type8table.php b/public/pdfcreation/bck060324type8table.php deleted file mode 100644 index 607e12d..0000000 --- a/public/pdfcreation/bck060324type8table.php +++ /dev/null @@ -1,8 +0,0 @@ -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(); -?> \ No newline at end of file diff --git a/public/pdfcreation/bck080424descriptiontable.php b/public/pdfcreation/bck080424descriptiontable.php deleted file mode 100644 index 30bc410..0000000 --- a/public/pdfcreation/bck080424descriptiontable.php +++ /dev/null @@ -1,78 +0,0 @@ -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(); -} - -?> \ No newline at end of file diff --git a/public/pdfcreation/bck080424descriptiontablenocert.php b/public/pdfcreation/bck080424descriptiontablenocert.php deleted file mode 100644 index 1b0df16..0000000 --- a/public/pdfcreation/bck080424descriptiontablenocert.php +++ /dev/null @@ -1,99 +0,0 @@ -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(); -} diff --git a/public/pdfcreation/bck100823addreqtable.php b/public/pdfcreation/bck100823addreqtable.php deleted file mode 100644 index a5a634a..0000000 --- a/public/pdfcreation/bck100823addreqtable.php +++ /dev/null @@ -1,57 +0,0 @@ -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(); - - } - -?> \ No newline at end of file diff --git a/public/pdfcreation/bck100823descriptiontable.php b/public/pdfcreation/bck100823descriptiontable.php deleted file mode 100644 index be8b82c..0000000 --- a/public/pdfcreation/bck100823descriptiontable.php +++ /dev/null @@ -1,130 +0,0 @@ - - -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(); - -} - - - - - - - -?> - diff --git a/public/pdfcreation/bck100823descriptiontablenocert.php b/public/pdfcreation/bck100823descriptiontablenocert.php deleted file mode 100644 index e94eb80..0000000 --- a/public/pdfcreation/bck100823descriptiontablenocert.php +++ /dev/null @@ -1,132 +0,0 @@ - - -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(); - -} - - - - - - - -?> - diff --git a/public/pdfcreation/bck100823m30table.php b/public/pdfcreation/bck100823m30table.php deleted file mode 100644 index ff190aa..0000000 --- a/public/pdfcreation/bck100823m30table.php +++ /dev/null @@ -1,94 +0,0 @@ -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(); - -?> \ No newline at end of file diff --git a/public/pdfcreation/bck100823pdfoutput.php b/public/pdfcreation/bck100823pdfoutput.php deleted file mode 100644 index 5371e5f..0000000 --- a/public/pdfcreation/bck100823pdfoutput.php +++ /dev/null @@ -1,76 +0,0 @@ -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); - - -}} - ?> \ No newline at end of file diff --git a/public/pdfcreation/bck1609addinfotable.php b/public/pdfcreation/bck1609addinfotable.php deleted file mode 100644 index 1a455a1..0000000 --- a/public/pdfcreation/bck1609addinfotable.php +++ /dev/null @@ -1,50 +0,0 @@ - -SetFont('', 'B', '10'); - - - $pdf->Cell(190, 6, $otherifopdf, 1, 0, 'C'); - - $pdf->Ln(); - $pdf->SetFont('', '', '8'); - - $sizerec = 47.5; - $pdf->Cell($sizerec, 6, $slippingpdf, 1, 0, 'L', TRUE); - - $pdf->Cell($sizerec, 6, $trfData['slipping'], 1, 0, 'L', TRUE); - $pdf->Cell($sizerec, 6, $orthopedicpdf, 1, 0, 'L', TRUE); - if ($trfData['shoesorthopedic'] == 'Y') { - $orthresult = utf8_decode("Sì"); - } else { - $orthresult = "No"; - } - $pdf->Cell($sizerec, 6, $orthresult, 1, 0, 'L', TRUE); - $pdf->Ln(); - $pdf->Cell($sizerec, 6, $autoclavpdf, 1, 0, 'L', TRUE); - if ($trfData['autoclavable'] == 'Y') { - $autoclresult = utf8_decode("Sì"); - } else { - $autoclresult = "No"; - } - $pdf->Cell($sizerec, 6, $autoclresult, 1, 0, 'L', TRUE); - $pdf->Cell($sizerec, 6, $esdpdf, 1, 0, 'L', TRUE); - if ($trfData['esd'] == 'Y') { - $esdresult = utf8_decode($yespdf); - } else { - $esdresult = $nopdf; - } - $pdf->Cell($sizerec, 6, $esdresult, 1, 0, 'L', TRUE); - $pdf->Ln(); - $pdf->Cell($sizerec, 6, $ukcapdf, 1, 0, 'L', TRUE); - if ($trfData['ukcacert'] == 'Y') { - $ukcacert = utf8_decode($yespdf); - } else { - $ukcacert = $nopdf; - } - $pdf->Cell($sizerec, 6, $ukcacert, 1, 0, 'L', TRUE); - $pdf->Cell($sizerec, 6, '', 1, 0, 'L', TRUE); - $pdf->Cell($sizerec, 6, '', 1, 0, 'L', TRUE); - $pdf->Ln(); -?> - \ No newline at end of file diff --git a/public/pdfcreation/bck201123m30table.php b/public/pdfcreation/bck201123m30table.php deleted file mode 100644 index 9ce077c..0000000 --- a/public/pdfcreation/bck201123m30table.php +++ /dev/null @@ -1,56 +0,0 @@ -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(); -?> \ No newline at end of file diff --git a/public/pdfcreation/bck220723addreqtable.php b/public/pdfcreation/bck220723addreqtable.php deleted file mode 100644 index 8a36081..0000000 --- a/public/pdfcreation/bck220723addreqtable.php +++ /dev/null @@ -1,29 +0,0 @@ -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(); - } -?> \ No newline at end of file diff --git a/public/pdfcreation/bck220723descriptiontable.php b/public/pdfcreation/bck220723descriptiontable.php deleted file mode 100644 index d9470ed..0000000 --- a/public/pdfcreation/bck220723descriptiontable.php +++ /dev/null @@ -1,129 +0,0 @@ - - -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(); - -} - - - - - - - -?> - diff --git a/public/pdfcreation/bck220723descriptiontablenocert.php b/public/pdfcreation/bck220723descriptiontablenocert.php deleted file mode 100644 index a275485..0000000 --- a/public/pdfcreation/bck220723descriptiontablenocert.php +++ /dev/null @@ -1,129 +0,0 @@ - - -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(); - -} - - - - - - - -?> - diff --git a/public/pdfcreation/bck230224signdatatable.php b/public/pdfcreation/bck230224signdatatable.php deleted file mode 100644 index 0c29b7c..0000000 --- a/public/pdfcreation/bck230224signdatatable.php +++ /dev/null @@ -1,26 +0,0 @@ -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(); -?> \ No newline at end of file diff --git a/public/pdfcreation/bck230224signdatatablenocert.php b/public/pdfcreation/bck230224signdatatablenocert.php deleted file mode 100644 index b456d87..0000000 --- a/public/pdfcreation/bck230224signdatatablenocert.php +++ /dev/null @@ -1,27 +0,0 @@ - -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(); - -?> diff --git a/public/pdfcreation/bck23072024pdf1.php b/public/pdfcreation/bck23072024pdf1.php deleted file mode 100644 index 2e329e4..0000000 --- a/public/pdfcreation/bck23072024pdf1.php +++ /dev/null @@ -1,60 +0,0 @@ -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(); -?> \ No newline at end of file diff --git a/public/pdfcreation/bck23072024pdf1snd.php b/public/pdfcreation/bck23072024pdf1snd.php deleted file mode 100644 index a46e66d..0000000 --- a/public/pdfcreation/bck23072024pdf1snd.php +++ /dev/null @@ -1,55 +0,0 @@ -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(); -?> \ No newline at end of file diff --git a/public/pdfcreation/bck260324signdatatable.php b/public/pdfcreation/bck260324signdatatable.php deleted file mode 100644 index 3d20f77..0000000 --- a/public/pdfcreation/bck260324signdatatable.php +++ /dev/null @@ -1,28 +0,0 @@ -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; diff --git a/public/pdfcreation/bck300124partstable.php b/public/pdfcreation/bck300124partstable.php deleted file mode 100644 index daba03d..0000000 --- a/public/pdfcreation/bck300124partstable.php +++ /dev/null @@ -1,188 +0,0 @@ -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(); */ -?> \ No newline at end of file diff --git a/public/pdfcreation/bckpdf4 (2).php b/public/pdfcreation/bckpdf4 (2).php deleted file mode 100644 index d53d886..0000000 --- a/public/pdfcreation/bckpdf4 (2).php +++ /dev/null @@ -1,54 +0,0 @@ -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(); -?> \ No newline at end of file diff --git a/public/pdfcreation/bckpdf4.php b/public/pdfcreation/bckpdf4.php deleted file mode 100644 index 6253591..0000000 --- a/public/pdfcreation/bckpdf4.php +++ /dev/null @@ -1,79 +0,0 @@ -SetFont('Arial','',7); -$firstsent=html_entity_decode('Ai sensi e per gli effetti dell’art. 6 del REG 01 Regolamento per la valutazione della conformità dei Dispositivi di Protezione Individuale'); -$firstsent = iconv('UTF-8', 'windows-1252', $firstsent); -$secondsent=utf8_decode('secondo il Regolamento (UE) 2016/425 disponibile sul nostro sito web www.cimac.it'); -//$thirdsent=utf8_decode('For the purposes of Article 6 of the REG 01 "Regulation for the assessment of the conformity of Personal Protective Equipment '); -//$foursent=utf8_decode('according to Regulation (EU) 2016/425" available on our website www.cimac.it'); - -// nota di testa -//$pdf->Cell(0,0,$firstsent,0,1); -//$pdf->Cell(0,9,$secondsent,0,1); -//$pdf->Cell(0,0,$thirdsent,0,1); -//$pdf->Cell(0,9,$foursent,0,1); - - //description table -include('pdfcreation/descriptiontablenocert.php'); - -$pdf->Ln(); - - //typecert 3 info -include('pdfcreation/type4table.php'); - -$pdf->Ln(); - -// standards table -include('pdfcreation/standardstable.php'); - -$pdf->Ln(); - -// additionalinfo -include('pdfcreation/m30table.php'); - -$pdf->Ln(); -// additionalinfo requirements -include('pdfcreation/addreqtable.php'); - -$pdf->Ln(); - -// additionalinfo -include('pdfcreation/addinfotable.php'); - -$pdf->Ln(); - - - // chem table -include('pdfcreation/chemtable.php'); - -$pdf->Ln(); - - //trf option -include('pdfcreation/trfoptionnocert.php'); - -$pdf->Ln(); - - //trf option -include('pdfcreation/fileattached.php'); - -$pdf->Ln(); -$pdf->Ln(); - //header report contact -include('pdfcreation/headerreporttable.php'); - -$pdf->Ln(); - - //header certificate contact -//include('pdfcreation/headercertificatetable.php'); - -//$pdf->Ln(); - //invoice contact -include('pdfcreation/invoicecontacttable.php'); - -$pdf->Ln(); - //Sign datatable -include('pdfcreation/signdatatablenocert.php'); - -$pdf->Ln(); - -?> \ No newline at end of file diff --git a/public/pdfcreation/bcksigndatatable.php b/public/pdfcreation/bcksigndatatable.php deleted file mode 100644 index 9bfa980..0000000 --- a/public/pdfcreation/bcksigndatatable.php +++ /dev/null @@ -1,52 +0,0 @@ -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; diff --git a/scripttool/zipfolder.php b/scripttool/zipfolder.php index 41f953a..acccae5 100644 --- a/scripttool/zipfolder.php +++ b/scripttool/zipfolder.php @@ -1,16 +1,16 @@ -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."
    \n"; + echo $p . "
    \n"; } } } - echo 'Total files: '.$files; + echo 'Total files: ' . $files; $zip->close(); -} +} ?>