From d8dc15ac48ff165b1e0b03a354b01880b631bc83 Mon Sep 17 00:00:00 2001 From: Claudio Date: Mon, 17 Feb 2025 14:26:18 +0100 Subject: [PATCH] start to change layout --- public/identificationparts.php | 4 +- public/languages/en/general.php | 6 + public/languages/it/general.php | 8 + public/revtrf.php | 20 ++- public/signaturetok.php | 290 +++++++++++++++----------------- 5 files changed, 169 insertions(+), 159 deletions(-) diff --git a/public/identificationparts.php b/public/identificationparts.php index a06a239..a704afb 100644 --- a/public/identificationparts.php +++ b/public/identificationparts.php @@ -690,8 +690,8 @@ $partids[] = '0'; if (missingMandatoryParts.length > 0) { Swal.fire({ icon: "error", - title: "Parti Obbligatorie Mancanti", - text: "Le seguenti parti sono obbligatorie e devono essere inserite: " + missingMandatoryParts.join(", "), + title: "Parti Obbligatorie Mancanti/Missing Mandatory Parts", + text: "Le seguenti parti sono obbligatorie e devono essere inserite/The following parts are mandatory and must be included: " + missingMandatoryParts.join(", "), confirmButtonText: "OK" }); } else if (missingParts.length > 0) { diff --git a/public/languages/en/general.php b/public/languages/en/general.php index 94635ac..d51f890 100644 --- a/public/languages/en/general.php +++ b/public/languages/en/general.php @@ -348,3 +348,9 @@ $uploadButtonTitle = "Upload"; $companyLogoAltTitle = "Company Logo"; $respsign = "Send to Sign to another colleagues of the same company"; $adduserundersamecompany = "Add User"; +$signaturetext = '
+The signature token is used to confirm the submission of the application form.

+The token is a fixed 6-digit numeric code that will be randomly generated by our system and sent via email to your registered address.

+The token will remain valid until you regenerate it on this page.

+To reset the signature token CLICK HERE.

+The token will be generated and sent to the email address: ' . $emailuser . '

'; diff --git a/public/languages/it/general.php b/public/languages/it/general.php index e8e7f9f..54682cd 100644 --- a/public/languages/it/general.php +++ b/public/languages/it/general.php @@ -352,3 +352,11 @@ $uploadButtonTitle = "Carica"; $companyLogoAltTitle = "Logo Aziendale"; $respsign = "Invia a collega della stessa azienda per Firma"; $adduserundersamecompany = "Aggiungi utente"; +$signaturetext = '
+ +Il token per la firma servirà per confermare l\'invio dell\'application form.

+Il token è un codice numerico fisso di 6 cifre che verrà generato casualmente dai nostri sistemi e inviato via mail all\'indirizzo da te registrato.

+Il token sarà valido finchè non sarai tu a rigenerarlo da questa pagina.

+Per re-impostare il signature token CLICCA QUI.

+Il token verrà generato e inviato via mail all\'indirizzo: ' . $emailuser . '

+'; diff --git a/public/revtrf.php b/public/revtrf.php index 7d6bb3c..377a8ba 100644 --- a/public/revtrf.php +++ b/public/revtrf.php @@ -252,8 +252,6 @@ while ($row = mysqli_fetch_assoc($result)) { ?> $value) { + $row[$key] = mysqli_real_escape_string($conn, $value); + } + + // Preparo la query di inserimento $columns = implode(", ", array_keys($row)); - $values = "'" . implode("', '", array_values($row)) . "'"; + $values = "'" . implode("', '", array_values($row)) . "'"; $sql_insert = "INSERT INTO identificationparts ($columns) VALUES ($values)"; + + // Eseguo la query if ($conn->query($sql_insert) === TRUE) { - echo "Nuova riga inserita con successo identificationparts"; + echo "Nuova riga inserita con successo in identificationparts"; } else { echo "Errore nell'inserimento della nuova riga: " . $conn->error; } } ?> + +include('include/headscript.php'); ?> Action = "update"; - $UpdateQuery->Table = "company"; - $UpdateQuery->bindColumn("companyname_company", "s", "".((isset($_POST["companyname_company"]))?$_POST["companyname_company"]:"") ."", "WA_DEFAULT"); - $UpdateQuery->bindColumn("address_company", "s", "".((isset($_POST["companyaddress"]))?$_POST["companyaddress"]:"") ."", "WA_DEFAULT"); - $UpdateQuery->bindColumn("city_company", "s", "".((isset($_POST["city"]))?$_POST["city"]:"") ."", "WA_DEFAULT"); - $UpdateQuery->bindColumn("zip_company", "s", "".((isset($_POST["cap"]))?$_POST["cap"]:"") ."", "WA_DEFAULT"); - $UpdateQuery->bindColumn("country_company", "s", "".((isset($_POST["country"]))?$_POST["country"]:"") ."", "WA_DEFAULT"); - $UpdateQuery->bindColumn("piva_company", "s", "".((isset($_POST["piva"]))?$_POST["piva"]:"") ."", "WA_DEFAULT"); - $UpdateQuery->bindColumn("telephone_company", "s", "".((isset($_POST["telephone"]))?$_POST["telephone"]:"") ."", "WA_DEFAULT"); - $UpdateQuery->bindColumn("email_company", "s", "".((isset($_POST["email"]))?$_POST["email"]:"") ."", "WA_DEFAULT"); - $UpdateQuery->bindColumn("maincontactname_company", "s", "".((isset($_POST["contactname"]))?$_POST["contactname"]:"") ."", "WA_DEFAULT"); - $UpdateQuery->bindColumn("maincontactsurname_company", "s", "".((isset($_POST["contactsurname"]))?$_POST["contactsurname"]:"") ."", "WA_DEFAULT"); - $UpdateQuery->bindColumn("maincontactmail_company", "s", "".((isset($_POST["emailmain"]))?$_POST["emailmain"]:"") ."", "WA_DEFAULT"); - $UpdateQuery->bindColumn("maincontactphone_company", "s", "".((isset($_POST["telephonemain"]))?$_POST["telephonemain"]:"") ."", "WA_DEFAULT"); - $UpdateQuery->addFilter("idcompany", "=", "i", "".($idcompany) .""); - $UpdateQuery->execute(); - $UpdateGoTo = ""; - if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo?rel2abs($UpdateGoTo,dirname(__FILE__)):""; - $UpdateQuery->redirect($UpdateGoTo); +if ($formname == "Y") { + $UpdateQuery = new WA_MySQLi_Query($cmctrfdb); + $UpdateQuery->Action = "update"; + $UpdateQuery->Table = "company"; + $UpdateQuery->bindColumn("companyname_company", "s", "" . ((isset($_POST["companyname_company"])) ? $_POST["companyname_company"] : "") . "", "WA_DEFAULT"); + $UpdateQuery->bindColumn("address_company", "s", "" . ((isset($_POST["companyaddress"])) ? $_POST["companyaddress"] : "") . "", "WA_DEFAULT"); + $UpdateQuery->bindColumn("city_company", "s", "" . ((isset($_POST["city"])) ? $_POST["city"] : "") . "", "WA_DEFAULT"); + $UpdateQuery->bindColumn("zip_company", "s", "" . ((isset($_POST["cap"])) ? $_POST["cap"] : "") . "", "WA_DEFAULT"); + $UpdateQuery->bindColumn("country_company", "s", "" . ((isset($_POST["country"])) ? $_POST["country"] : "") . "", "WA_DEFAULT"); + $UpdateQuery->bindColumn("piva_company", "s", "" . ((isset($_POST["piva"])) ? $_POST["piva"] : "") . "", "WA_DEFAULT"); + $UpdateQuery->bindColumn("telephone_company", "s", "" . ((isset($_POST["telephone"])) ? $_POST["telephone"] : "") . "", "WA_DEFAULT"); + $UpdateQuery->bindColumn("email_company", "s", "" . ((isset($_POST["email"])) ? $_POST["email"] : "") . "", "WA_DEFAULT"); + $UpdateQuery->bindColumn("maincontactname_company", "s", "" . ((isset($_POST["contactname"])) ? $_POST["contactname"] : "") . "", "WA_DEFAULT"); + $UpdateQuery->bindColumn("maincontactsurname_company", "s", "" . ((isset($_POST["contactsurname"])) ? $_POST["contactsurname"] : "") . "", "WA_DEFAULT"); + $UpdateQuery->bindColumn("maincontactmail_company", "s", "" . ((isset($_POST["emailmain"])) ? $_POST["emailmain"] : "") . "", "WA_DEFAULT"); + $UpdateQuery->bindColumn("maincontactphone_company", "s", "" . ((isset($_POST["telephonemain"])) ? $_POST["telephonemain"] : "") . "", "WA_DEFAULT"); + $UpdateQuery->addFilter("idcompany", "=", "i", "" . ($idcompany) . ""); + $UpdateQuery->execute(); + $UpdateGoTo = ""; + if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo ? rel2abs($UpdateGoTo, dirname(__FILE__)) : ""; + $UpdateQuery->redirect($UpdateGoTo); } $companydetails = mysqli_query($cmctrfdb, "SELECT * FROM company WHERE company.idcompany='$idcompany'"); $companyData = mysqli_fetch_assoc($companydetails); @@ -41,145 +41,135 @@ $companyData = mysqli_fetch_assoc($companydetails); - + - - TRF CIMAC - - - - + + TRF CIMAC + + + + - - - - - + + - - - - - - + + - - - + + + + + + + + + + - - - - - - - - - + - - - + + + + + + + + + + + -
- -
+
+ +
+ +
+ +
+
+
+
+ +
+

+
+
+
+
+
+ + + + + +
+ + + +
+
+

+ + +
+ + + + present()->signaturecode; + + include('include/mailmessage.php'); + ?> + + + + + + + + + +
+ + +
+ + + -
- -
-
-
-
- -
-

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

- - -
- - - -present()->signaturecode; - -include('include/mailmessage.php'); -?> - - - -

- -Il token è un codice numerico fisso di 6 cifre che verrà generato casualmente dai nostri sistemi e inviato via mail all'indirizzo da te registrato.

- -Il token sarà valido finchè non sarai tu a rigenerarlo da questa pagina.

- -Per re-impostare il signature token CLICCA QUI.

- -Il token verrà generato e inviato via mail all' indirizzo:

- - - - - -
- - -
- - - - -
-
- -
- - + +
+ + -
+
- + @@ -190,13 +180,13 @@ Il token verrà generato e inviato via mail all' indirizzo: - - + + - - + + \ No newline at end of file