added field for td and hide show identification parts
This commit is contained in:
parent
fa44531778
commit
449bcc3153
@ -246,29 +246,60 @@ while ($row = mysqli_fetch_assoc($result)) {
|
|||||||
// Connessione al database
|
// Connessione al database
|
||||||
$conn = mysqli_connect($servername, $username, $password, $dbname);
|
$conn = mysqli_connect($servername, $username, $password, $dbname);
|
||||||
|
|
||||||
|
// Imposta la codifica UTF-8 per gestire correttamente i caratteri speciali
|
||||||
|
$conn->set_charset("utf8mb4");
|
||||||
|
if ($conn->connect_error) {
|
||||||
|
die("Connessione fallita: " . $conn->connect_error);
|
||||||
|
}
|
||||||
|
|
||||||
// Query per selezionare le righe da duplicare
|
// Query per selezionare le righe da duplicare
|
||||||
$query = "SELECT * FROM identificationparts WHERE idtrfdetails = '$idtrf'";
|
$query = "SELECT * FROM identificationparts WHERE idtrfdetails = '$idtrf'";
|
||||||
$result = mysqli_query($conn, $query);
|
$result = mysqli_query($conn, $query);
|
||||||
|
|
||||||
// Ciclo attraverso i risultati e duplico le righe
|
// Ciclo attraverso i risultati e duplico le righe
|
||||||
while ($row = mysqli_fetch_assoc($result)) {
|
while ($row = mysqli_fetch_assoc($result)) {
|
||||||
|
// Imposto il valore di idtrfdetails con il nuovo ID
|
||||||
// Imposto il valore di idtrfdetails come 250
|
|
||||||
$row['idtrfdetails'] = $newidtrfnumber;
|
$row['idtrfdetails'] = $newidtrfnumber;
|
||||||
|
|
||||||
// Lascio identificationparts nullo
|
// Lascio identificationparts nullo (sarà generato automaticamente)
|
||||||
unset($row['ididentificationparts']);
|
unset($row['ididentificationparts']);
|
||||||
|
|
||||||
// Query per duplicare la riga
|
// Controllo la lunghezza di article_identificationparts (limite 250 caratteri)
|
||||||
$columns = implode(", ", array_keys($row));
|
if (isset($row['article_identificationparts']) && mb_strlen($row['article_identificationparts'], 'UTF-8') > 250) {
|
||||||
$values = "'" . implode("', '", array_values($row)) . "'";
|
$row['article_identificationparts'] = mb_substr($row['article_identificationparts'], 0, 250, 'UTF-8');
|
||||||
$sql_insert = "INSERT INTO identificationparts ($columns) VALUES ($values)";
|
echo "Attenzione: article_identificationparts troncato a 250 caratteri.";
|
||||||
if ($conn->query($sql_insert) === TRUE) {
|
|
||||||
echo "Nuova riga inserita con successo identificationparts";
|
|
||||||
} else {
|
|
||||||
echo "Errore nell'inserimento della nuova riga: " . $conn->error;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Preparo la query con prepared statements
|
||||||
|
$columns = implode(", ", array_keys($row));
|
||||||
|
$placeholders = implode(", ", array_fill(0, count($row), "?"));
|
||||||
|
$sql_insert = "INSERT INTO identificationparts ($columns) VALUES ($placeholders)";
|
||||||
|
|
||||||
|
// Preparo lo statement
|
||||||
|
$stmt = $conn->prepare($sql_insert);
|
||||||
|
if ($stmt === false) {
|
||||||
|
echo "Errore nella preparazione della query: " . $conn->error;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Creo un array di valori e determino i tipi per il bind
|
||||||
|
$values = array_values($row);
|
||||||
|
$types = str_repeat("s", count($values)); // Tratto tutto come stringa per semplicità, puoi ottimizzare i tipi se necessario
|
||||||
|
$stmt->bind_param($types, ...$values);
|
||||||
|
|
||||||
|
// Eseguo l'inserimento
|
||||||
|
if ($stmt->execute()) {
|
||||||
|
echo "Nuova riga inserita con successo in identificationparts";
|
||||||
|
} else {
|
||||||
|
echo "Errore nell'inserimento della nuova riga in identificationparts: " . $stmt->error;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Chiudo lo statement
|
||||||
|
$stmt->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Chiudo la connessione
|
||||||
|
$conn->close();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@ -1,30 +1,55 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once '../Connections/cmctrfdb.php'; // Assumi che questo sia il tuo file di configurazione del database
|
require_once '../Connections/cmctrfdb.php';
|
||||||
|
|
||||||
if (isset($_GET['id']) && is_numeric($_GET['id'])) {
|
// Verifica se l'ID e idcompany sono presenti
|
||||||
$id = $_GET['id'];
|
if (isset($_GET['id']) && is_numeric($_GET['id']) && isset($_GET['idcompany']) && is_numeric($_GET['idcompany'])) {
|
||||||
|
$id = intval($_GET['id']);
|
||||||
|
$idcompany = intval($_GET['idcompany']);
|
||||||
$conn = new mysqli($servername, $username, $password, $dbname);
|
$conn = new mysqli($servername, $username, $password, $dbname);
|
||||||
// Recupera il nome del file prima di cancellare il record
|
|
||||||
$query = "SELECT filenamelogo FROM logo_td WHERE idlogo_td = ?";
|
if ($conn->connect_error) {
|
||||||
$stmt = $conn->prepare($query);
|
die("Connessione al database fallita: " . $conn->connect_error);
|
||||||
$stmt->bind_param("i", $id);
|
|
||||||
$stmt->execute();
|
|
||||||
$result = $stmt->get_result();
|
|
||||||
if ($row = $result->fetch_assoc()) {
|
|
||||||
$fileToDelete = "logos/" . $row['filenamelogo'];
|
|
||||||
// Cancellazione del file dal server
|
|
||||||
if (file_exists($fileToDelete)) {
|
|
||||||
unlink($fileToDelete);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cancellazione del record dal database
|
// Recupera il nome del file per eliminarlo
|
||||||
$query = "DELETE FROM logo_td WHERE idlogo_td = ?";
|
$query = "SELECT filenamelogo FROM logo_td WHERE idlogo_td = ? AND idcompany = ?";
|
||||||
$stmt = $conn->prepare($query);
|
$stmt = $conn->prepare($query);
|
||||||
$stmt->bind_param("i", $id);
|
$stmt->bind_param("ii", $id, $idcompany);
|
||||||
|
$stmt->execute();
|
||||||
|
$result = $stmt->get_result();
|
||||||
|
|
||||||
|
if ($row = $result->fetch_assoc()) {
|
||||||
|
$filePath = 'logos/' . $row['filenamelogo'];
|
||||||
|
if (file_exists($filePath)) {
|
||||||
|
unlink($filePath); // Elimina il file fisico
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo "Errore: logo non trovato o non autorizzato.";
|
||||||
|
$stmt->close();
|
||||||
|
$conn->close();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
$stmt->close();
|
||||||
|
|
||||||
|
// Esegui la cancellazione dal database
|
||||||
|
$query = "DELETE FROM logo_td WHERE idlogo_td = ? AND idcompany = ?";
|
||||||
|
$stmt = $conn->prepare($query);
|
||||||
|
$stmt->bind_param("ii", $id, $idcompany);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
|
|
||||||
header("Location: logoPopup.php"); // Reindirizza indietro alla pagina dei loghi
|
if ($stmt->affected_rows > 0) {
|
||||||
|
// Cancellazione riuscita
|
||||||
|
} else {
|
||||||
|
echo "Errore durante la cancellazione del logo.";
|
||||||
|
}
|
||||||
|
|
||||||
|
$stmt->close();
|
||||||
|
$conn->close();
|
||||||
|
|
||||||
|
// Reindirizza indietro con idcompany
|
||||||
|
header("Location: logopopup.php?idcompany=$idcompany");
|
||||||
|
exit;
|
||||||
} else {
|
} else {
|
||||||
echo "Operazione non valida.";
|
echo "Errore: parametri mancanti o non validi.";
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -129,6 +129,7 @@ if ($addpart == "Y") {
|
|||||||
$InsertQuery->bindColumn("arttypeid", "i", "$arttypeid", "WA_DEFAULT");
|
$InsertQuery->bindColumn("arttypeid", "i", "$arttypeid", "WA_DEFAULT");
|
||||||
$InsertQuery->bindColumn("useridn", "i", "$useridn", "WA_DEFAULT");
|
$InsertQuery->bindColumn("useridn", "i", "$useridn", "WA_DEFAULT");
|
||||||
$InsertQuery->bindColumn("companyidn", "i", "$companyidn", "WA_DEFAULT");
|
$InsertQuery->bindColumn("companyidn", "i", "$companyidn", "WA_DEFAULT");
|
||||||
|
$InsertQuery->bindColumn("hide", "s", "N", "WA_DEFAULT"); // Imposta hide a 'N' per default
|
||||||
$InsertQuery->saveInSession("");
|
$InsertQuery->saveInSession("");
|
||||||
$InsertQuery->execute();
|
$InsertQuery->execute();
|
||||||
$InsertGoTo = "";
|
$InsertGoTo = "";
|
||||||
@ -304,15 +305,24 @@ $partids[] = '0';
|
|||||||
} ?>
|
} ?>
|
||||||
<!-- div new parts -->
|
<!-- div new parts -->
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="col-md-4 mb-3">
|
<div class="col-md-8 mb-3 d-flex align-items-end">
|
||||||
<label for="validationServer01"><?php echo $whichkindofpart; ?></label>
|
<div class="mr-4" style="min-width: 200px;">
|
||||||
<select class="form-control" name="kindoftest" id="combo">
|
<label for="validationServer01"><?php echo $whichkindofpart; ?></label>
|
||||||
<option value="new"><?php echo $newpartlist; ?></option>
|
<select class="form-control" name="kindoftest" id="combo">
|
||||||
<option value="cmc"><?php echo $cmctesttitle; ?></option>
|
<option value="new"><?php echo $newpartlist; ?></option>
|
||||||
<option value="trd"><?php echo $trdpartlist; ?></option>
|
<option value="cmc"><?php echo $cmctesttitle; ?></option>
|
||||||
</select>
|
<option value="trd"><?php echo $trdpartlist; ?></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex align-items-center">
|
||||||
|
<label for="showHiddenParts" class="mb-0 mr-2">
|
||||||
|
Mostra parti nascoste ricerca / Show SearchHidden Parts
|
||||||
|
</label>
|
||||||
|
<input type="checkbox" id="showHiddenParts" name="showHiddenParts">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="col-md-4 mb-3">
|
<div class="col-md-4 mb-3">
|
||||||
<label for="validationServer01"><?php echo $reportnumbercmctitle; ?></label>
|
<label for="validationServer01"><?php echo $reportnumbercmctitle; ?></label>
|
||||||
|
|||||||
@ -55,3 +55,5 @@ $nrep = "Report No.";
|
|||||||
$daterep = "Date";
|
$daterep = "Date";
|
||||||
$toreview = "Send for Review";
|
$toreview = "Send for Review";
|
||||||
$toreviewhelp = "The Technical File will be sent to Cimac for document review";
|
$toreviewhelp = "The Technical File will be sent to Cimac for document review";
|
||||||
|
$techapplied = "Any technical specifications applied (other than harmonised standards)";
|
||||||
|
$corrtdcertified = "Matching with already certified PPE";
|
||||||
|
|||||||
@ -55,3 +55,5 @@ $nrep = "N. Rapporto";
|
|||||||
$daterep = "Date";
|
$daterep = "Date";
|
||||||
$toreview = "Invia in Revisione";
|
$toreview = "Invia in Revisione";
|
||||||
$toreviewhelp = "Il Fascicolo tecnico verrà inviato a Cimac per la revisione documentale";
|
$toreviewhelp = "Il Fascicolo tecnico verrà inviato a Cimac per la revisione documentale";
|
||||||
|
$techapplied = "Eventuali specifiche tecniche applicate (diverse dalle norme armonizzate)";
|
||||||
|
$corrtdcertified = "Corrispondenza DPI già certificati:";
|
||||||
|
|||||||
@ -6,47 +6,52 @@ ini_set('display_errors', TRUE);
|
|||||||
ini_set('display_startup_errors', TRUE);
|
ini_set('display_startup_errors', TRUE);
|
||||||
include 'include/headscript.php';
|
include 'include/headscript.php';
|
||||||
include('languages/' . $_SESSION['langselect'] . '/tdgen.php');
|
include('languages/' . $_SESSION['langselect'] . '/tdgen.php');
|
||||||
?>
|
|
||||||
<?php
|
// Recupera idcompany
|
||||||
// Controlla se il form è stato inviato
|
if (isset($_POST['idcompany'])) {
|
||||||
|
$idcompany = intval($_POST['idcompany']);
|
||||||
|
} elseif (isset($_GET['idcompany'])) {
|
||||||
|
$idcompany = intval($_GET['idcompany']);
|
||||||
|
} else {
|
||||||
|
die("Errore: idcompany non specificato.");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Gestione del submit (solo INSERT)
|
||||||
if (isset($_POST['submit'])) {
|
if (isset($_POST['submit'])) {
|
||||||
$description = $_POST['descriptionlogo']; // Assumi che la validazione dell'input sia già stata fatta
|
$description = $_POST['descriptionlogo'];
|
||||||
$targetDir = "logos/"; // Assicurati che questa directory esista e sia scrivibile
|
$targetDir = "logos/";
|
||||||
|
|
||||||
$file = $_FILES['logofile'];
|
$file = $_FILES['logofile'];
|
||||||
$fileName = $file['name'];
|
$fileName = $file['name'];
|
||||||
$fileTmpName = $file['tmp_name'];
|
$fileTmpName = $file['tmp_name'];
|
||||||
$fileError = $file['error'];
|
$fileError = $file['error'];
|
||||||
|
$fileExt = strtolower(pathinfo($fileName, PATHINFO_EXTENSION));
|
||||||
|
|
||||||
// Estrai l'estensione del file
|
if ($fileError === 0 && in_array($fileExt, ['png', 'jpg', 'jpeg'])) {
|
||||||
$exploded = explode('.', $fileName);
|
$newFileName = $idcompany . "_" . time() . "." . $fileExt;
|
||||||
$fileExt = strtolower(end($exploded));
|
|
||||||
|
|
||||||
// Controlla se non ci sono errori e se il file è un PNG o JPG
|
|
||||||
if ($fileError === 0 && ($fileExt === 'png' || $fileExt === 'jpg' || $fileExt === 'jpeg')) {
|
|
||||||
$newFileName = $idcompany . "_" . time() . "." . $fileExt; // Rinomina il file
|
|
||||||
$fileDestination = $targetDir . $newFileName;
|
$fileDestination = $targetDir . $newFileName;
|
||||||
|
|
||||||
$conn = new mysqli($servername, $username, $password, $dbname);
|
$conn = new mysqli($servername, $username, $password, $dbname);
|
||||||
// Sposta il file nella directory definitiva
|
|
||||||
if (move_uploaded_file($fileTmpName, $fileDestination)) {
|
if (move_uploaded_file($fileTmpName, $fileDestination)) {
|
||||||
// Qui esegui l'inserimento nel database
|
|
||||||
$sql = "INSERT INTO logo_td (descriptionlogo, filenamelogo, idcompany) VALUES (?, ?, ?)";
|
$sql = "INSERT INTO logo_td (descriptionlogo, filenamelogo, idcompany) VALUES (?, ?, ?)";
|
||||||
$stmt = $conn->prepare($sql);
|
$stmt = $conn->prepare($sql);
|
||||||
|
|
||||||
if ($stmt) {
|
if ($stmt) {
|
||||||
|
|
||||||
$stmt->bind_param("ssi", $description, $newFileName, $idcompany);
|
$stmt->bind_param("ssi", $description, $newFileName, $idcompany);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
|
$stmt->close();
|
||||||
} else {
|
} else {
|
||||||
echo "Errore durante l'inserimento nel database.";
|
echo "Errore durante l'inserimento nel database.";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
echo "C'è stato un errore nel caricamento del file.";
|
echo "Errore nel caricamento del file.";
|
||||||
}
|
}
|
||||||
|
$conn->close();
|
||||||
} else {
|
} else {
|
||||||
echo "Sono ammessi solo file PNG e JPG.";
|
echo "Sono ammessi solo file PNG e JPG.";
|
||||||
}
|
}
|
||||||
|
// Reindirizza per evitare reinvii
|
||||||
|
header("Location: logopopup.php?idcompany=$idcompany");
|
||||||
|
exit();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@ -59,7 +64,6 @@ if (isset($_POST['submit'])) {
|
|||||||
<title>Aggiungi Logo</title>
|
<title>Aggiungi Logo</title>
|
||||||
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
|
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
|
||||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" rel="stylesheet">
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" rel="stylesheet">
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.drag-area {
|
.drag-area {
|
||||||
border: 2px dashed #ccc;
|
border: 2px dashed #ccc;
|
||||||
@ -85,24 +89,25 @@ if (isset($_POST['submit'])) {
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="container mt-5">
|
<div class="container mt-5">
|
||||||
<button onclick="closeAndRefresh()">Chiudi e Aggiorna</button>
|
<button type="button" class="btn btn-secondary" onclick="closeAndRefresh()">Chiudi e Aggiorna</button>
|
||||||
<h3 style="display: inline-block;">Aggiungi Logo</h3>
|
<h3>Aggiungi Logo</h3>
|
||||||
|
|
||||||
<form id="uploadLogoForm" action="logopopup.php" method="post" enctype="multipart/form-data">
|
<form id="uploadLogoForm" action="logopopup.php?idcompany=<?php echo $idcompany; ?>" method="post" enctype="multipart/form-data">
|
||||||
|
<input type="hidden" name="idcompany" value="<?php echo $idcompany; ?>">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="logoDescription">Descrizione Logo:</label>
|
<label for="logoDescription">Descrizione Logo:</label>
|
||||||
<input type="text" class="form-control" id="logoDescription" name="descriptionlogo" required>
|
<input type="text" class="form-control" id="logoDescription" name="descriptionlogo" required>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
<div class="drag-area" id="drag-area">
|
<label for="logoFile">File Logo:</label>
|
||||||
<p>Trascina qui il file o clicca per selezionare</p>
|
<div class="drag-area" id="drag-area">
|
||||||
|
<p>Trascina qui il file o clicca per selezionare</p>
|
||||||
|
</div>
|
||||||
|
<div class="custom-file mb-3">
|
||||||
|
<input type="file" class="custom-file-input" id="logoFile" name="logofile" accept=".png,.jpg,.jpeg" required>
|
||||||
|
<label class="custom-file-label" for="logoFile">Scegli file</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="custom-file mb-3">
|
|
||||||
<input type="file" class="custom-file-input" id="logoFile" name="logofile" accept=".png, .jpg, .jpeg" required hidden>
|
|
||||||
<label class="custom-file-label" for="logoFile">Scegli file</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button type="submit" class="btn btn-primary" name="submit">Carica Logo</button>
|
<button type="submit" class="btn btn-primary" name="submit">Carica Logo</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -121,7 +126,7 @@ if (isset($_POST['submit'])) {
|
|||||||
$conn = new mysqli($servername, $username, $password, $dbname);
|
$conn = new mysqli($servername, $username, $password, $dbname);
|
||||||
$query = "SELECT idlogo_td, descriptionlogo, filenamelogo FROM logo_td WHERE idcompany = ?";
|
$query = "SELECT idlogo_td, descriptionlogo, filenamelogo FROM logo_td WHERE idcompany = ?";
|
||||||
$stmt = $conn->prepare($query);
|
$stmt = $conn->prepare($query);
|
||||||
$stmt->bind_param("i", $idcompany); // Assumi che $idcompany sia già definita e pulita
|
$stmt->bind_param("i", $idcompany);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
$result = $stmt->get_result();
|
$result = $stmt->get_result();
|
||||||
|
|
||||||
@ -129,9 +134,13 @@ if (isset($_POST['submit'])) {
|
|||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo "<td>" . htmlspecialchars($row['descriptionlogo']) . "</td>";
|
echo "<td>" . htmlspecialchars($row['descriptionlogo']) . "</td>";
|
||||||
echo "<td><img src='logos/" . htmlspecialchars($row['filenamelogo']) . "' alt='Logo' style='width: 50px;'></td>";
|
echo "<td><img src='logos/" . htmlspecialchars($row['filenamelogo']) . "' alt='Logo' style='width: 50px;'></td>";
|
||||||
echo "<td><a href='deleteLogo.php?id=" . $row['idlogo_td'] . "' onclick='return confirm(\"Sei sicuro di voler cancellare questo logo?\");'><i class='fas fa-trash-alt' style='color: red;'></i></a></td>";
|
echo "<td>";
|
||||||
|
echo "<a href='deletelogo.php?id=" . $row['idlogo_td'] . "&idcompany=$idcompany' onclick='return confirm(\"Sei sicuro di voler cancellare questo logo?\");'><i class='fas fa-trash-alt' style='color: red;'></i></a>";
|
||||||
|
echo "</td>";
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
}
|
}
|
||||||
|
$stmt->close();
|
||||||
|
$conn->close();
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -141,7 +150,6 @@ if (isset($_POST['submit'])) {
|
|||||||
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.2/dist/umd/popper.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.2/dist/umd/popper.min.js"></script>
|
||||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
// Mostra il nome del file nel campo custom file di Bootstrap quando selezionato
|
|
||||||
$(".custom-file-input").on("change", function() {
|
$(".custom-file-input").on("change", function() {
|
||||||
var fileName = $(this).val().split("\\").pop();
|
var fileName = $(this).val().split("\\").pop();
|
||||||
$(this).siblings(".custom-file-label").addClass("selected").html(fileName);
|
$(this).siblings(".custom-file-label").addClass("selected").html(fileName);
|
||||||
@ -150,7 +158,6 @@ if (isset($_POST['submit'])) {
|
|||||||
var dragArea = document.getElementById('drag-area');
|
var dragArea = document.getElementById('drag-area');
|
||||||
var input = document.getElementById('logoFile');
|
var input = document.getElementById('logoFile');
|
||||||
|
|
||||||
// Highlight drag area
|
|
||||||
['dragenter', 'dragover'].forEach(eventName => {
|
['dragenter', 'dragover'].forEach(eventName => {
|
||||||
dragArea.addEventListener(eventName, (e) => {
|
dragArea.addEventListener(eventName, (e) => {
|
||||||
preventDefaults(e);
|
preventDefaults(e);
|
||||||
@ -158,7 +165,6 @@ if (isset($_POST['submit'])) {
|
|||||||
}, false);
|
}, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Unhighlight drag area
|
|
||||||
['dragleave', 'drop'].forEach(eventName => {
|
['dragleave', 'drop'].forEach(eventName => {
|
||||||
dragArea.addEventListener(eventName, (e) => {
|
dragArea.addEventListener(eventName, (e) => {
|
||||||
preventDefaults(e);
|
preventDefaults(e);
|
||||||
@ -166,7 +172,6 @@ if (isset($_POST['submit'])) {
|
|||||||
}, false);
|
}, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Handle drop
|
|
||||||
dragArea.addEventListener('drop', (e) => {
|
dragArea.addEventListener('drop', (e) => {
|
||||||
preventDefaults(e);
|
preventDefaults(e);
|
||||||
let dt = e.dataTransfer;
|
let dt = e.dataTransfer;
|
||||||
@ -180,10 +185,8 @@ if (isset($_POST['submit'])) {
|
|||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Click on drag area to open file dialog
|
|
||||||
dragArea.addEventListener('click', () => input.click());
|
dragArea.addEventListener('click', () => input.click());
|
||||||
</script>
|
|
||||||
<script>
|
|
||||||
function closeAndRefresh() {
|
function closeAndRefresh() {
|
||||||
if (window.opener && !window.opener.closed) {
|
if (window.opener && !window.opener.closed) {
|
||||||
window.opener.updateSelectDropdown();
|
window.opener.updateSelectDropdown();
|
||||||
@ -191,7 +194,6 @@ if (isset($_POST['submit'])) {
|
|||||||
window.close();
|
window.close();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
BIN
public/logos/1_1747749980.jpg
Normal file
BIN
public/logos/1_1747749980.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 81 KiB |
@ -12,6 +12,8 @@ $idcompany = $_SESSION["compid"];
|
|||||||
if (isset($_POST['articlepartvalue'])) {
|
if (isset($_POST['articlepartvalue'])) {
|
||||||
// Recupera e decodifica il valore inviato
|
// Recupera e decodifica il valore inviato
|
||||||
$Name = urldecode($_POST['articlepartvalue']);
|
$Name = urldecode($_POST['articlepartvalue']);
|
||||||
|
// Verifica se l'utente vuole mostrare le parti nascoste
|
||||||
|
$showHidden = isset($_POST['showHidden']) && $_POST['showHidden'] === 'true' ? true : false;
|
||||||
|
|
||||||
// Prepara la query con prepared statement
|
// Prepara la query con prepared statement
|
||||||
$Query = "SELECT
|
$Query = "SELECT
|
||||||
@ -29,6 +31,7 @@ if (isset($_POST['articlepartvalue'])) {
|
|||||||
MAX(identificationparts.kindoftest) AS kindoftest,
|
MAX(identificationparts.kindoftest) AS kindoftest,
|
||||||
MAX(identificationparts.partsidnumber) AS partsidnumber,
|
MAX(identificationparts.partsidnumber) AS partsidnumber,
|
||||||
MAX(identificationparts.arttypeid) AS arttypeid,
|
MAX(identificationparts.arttypeid) AS arttypeid,
|
||||||
|
MAX(identificationparts.hide) AS hide,
|
||||||
MAX(`trf-details`.idtrfdetails) AS idtrfdetails,
|
MAX(`trf-details`.idtrfdetails) AS idtrfdetails,
|
||||||
`trf-details`.idcompany
|
`trf-details`.idcompany
|
||||||
FROM
|
FROM
|
||||||
@ -40,11 +43,12 @@ if (isset($_POST['articlepartvalue'])) {
|
|||||||
WHERE
|
WHERE
|
||||||
identificationparts.article_identificationparts LIKE ?
|
identificationparts.article_identificationparts LIKE ?
|
||||||
AND `trf-details`.idcompany = ?
|
AND `trf-details`.idcompany = ?
|
||||||
|
" . ($showHidden ? "" : "AND identificationparts.hide = 'N'") . "
|
||||||
GROUP BY
|
GROUP BY
|
||||||
identificationparts.article_identificationparts,
|
identificationparts.article_identificationparts,
|
||||||
identificationparts.description_identificationparts,
|
identificationparts.description_identificationparts,
|
||||||
identificationparts.material_identificationparts
|
identificationparts.material_identificationparts
|
||||||
LIMIT 15";
|
LIMIT 30";
|
||||||
|
|
||||||
// Prepara lo statement
|
// Prepara lo statement
|
||||||
$stmt = $conn->prepare($Query);
|
$stmt = $conn->prepare($Query);
|
||||||
@ -72,19 +76,19 @@ if (isset($_POST['articlepartvalue'])) {
|
|||||||
// Alterna il colore di sfondo
|
// Alterna il colore di sfondo
|
||||||
$bgcolor = ($bgcolor == "#f2f2f2") ? "#e6f7ff" : "#f2f2f2";
|
$bgcolor = ($bgcolor == "#f2f2f2") ? "#e6f7ff" : "#f2f2f2";
|
||||||
?>
|
?>
|
||||||
<li onclick='fill(
|
<li style="cursor: pointer; background-color: <?php echo $bgcolor; ?>; border: 1px solid #ccc; border-radius: 5px; padding: 10px; margin-bottom: 5px; position: relative;">
|
||||||
<?php echo json_encode($Result['article_identificationparts'], JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); ?>,
|
<span onclick='fill(
|
||||||
<?php echo json_encode($Result['material_identificationparts'], JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); ?>,
|
<?php echo json_encode($Result['article_identificationparts'], JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); ?>,
|
||||||
<?php echo json_encode($Result['color_identificationparts'], JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); ?>,
|
<?php echo json_encode($Result['material_identificationparts'], JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); ?>,
|
||||||
<?php echo json_encode($Result['description_identificationparts'], JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); ?>,
|
<?php echo json_encode($Result['color_identificationparts'], JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); ?>,
|
||||||
<?php echo json_encode($Result['partsidnumber'], JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); ?>,
|
<?php echo json_encode($Result['description_identificationparts'], JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); ?>,
|
||||||
<?php echo json_encode($Result['arttypeid'], JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); ?>,
|
<?php echo json_encode($Result['partsidnumber'], JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); ?>,
|
||||||
<?php echo json_encode($Result['cmcreportnumber_identificationparts'], JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); ?>,
|
<?php echo json_encode($Result['arttypeid'], JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); ?>,
|
||||||
<?php echo json_encode($Result['cmcreportdate_identificationparts'], JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); ?>,
|
<?php echo json_encode($Result['cmcreportnumber_identificationparts'], JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); ?>,
|
||||||
<?php echo json_encode($Result['reportof'], JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); ?>,
|
<?php echo json_encode($Result['cmcreportdate_identificationparts'], JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); ?>,
|
||||||
<?php echo json_encode($Result['kindoftest'], JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); ?>
|
<?php echo json_encode($Result['reportof'], JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); ?>,
|
||||||
)' style="cursor: pointer; background-color: <?php echo $bgcolor; ?>; border: 1px solid #ccc; border-radius: 5px; padding: 10px; margin-bottom: 5px;">
|
<?php echo json_encode($Result['kindoftest'], JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); ?>
|
||||||
<span style="text-decoration: none; color: #333;">
|
)' style="text-decoration: none; color: #333; display: block;">
|
||||||
<?php echo htmlspecialchars($Result['article_identificationparts'], ENT_QUOTES, 'UTF-8'); ?> -
|
<?php echo htmlspecialchars($Result['article_identificationparts'], ENT_QUOTES, 'UTF-8'); ?> -
|
||||||
<?php echo htmlspecialchars($Result['material_identificationparts'], ENT_QUOTES, 'UTF-8'); ?> -
|
<?php echo htmlspecialchars($Result['material_identificationparts'], ENT_QUOTES, 'UTF-8'); ?> -
|
||||||
<?php echo htmlspecialchars($Result['color_identificationparts'], ENT_QUOTES, 'UTF-8'); ?> -
|
<?php echo htmlspecialchars($Result['color_identificationparts'], ENT_QUOTES, 'UTF-8'); ?> -
|
||||||
@ -96,6 +100,10 @@ if (isset($_POST['articlepartvalue'])) {
|
|||||||
- Date: <?php echo htmlspecialchars($Result['cmcreportdate_identificationparts'], ENT_QUOTES, 'UTF-8'); ?>
|
- Date: <?php echo htmlspecialchars($Result['cmcreportdate_identificationparts'], ENT_QUOTES, 'UTF-8'); ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</span>
|
</span>
|
||||||
|
<button id="toggle-btn-<?php echo $Result['id']; ?>" onclick="toggleHide(<?php echo $Result['id']; ?>, '<?php echo $Result['hide'] === 'N' ? 'Y' : 'N'; ?>', this)"
|
||||||
|
style="position: absolute; right: 10px; top: 50%; transform: translateY(-50%); padding: 2px 5px; border: none; background: none; cursor: pointer;">
|
||||||
|
<i class="fas <?php echo $Result['hide'] === 'N' ? 'fa-eye' : 'fa-eye-slash'; ?>" style="color: <?php echo $Result['hide'] === 'N' ? 'green' : 'red'; ?>;"></i>
|
||||||
|
</button>
|
||||||
</li>
|
</li>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@ -104,3 +112,4 @@ if (isset($_POST['articlepartvalue'])) {
|
|||||||
// Chiudi lo statement e la connessione
|
// Chiudi lo statement e la connessione
|
||||||
$stmt->close();
|
$stmt->close();
|
||||||
}
|
}
|
||||||
|
?>
|
||||||
@ -11,7 +11,6 @@ function fill(
|
|||||||
reportof,
|
reportof,
|
||||||
kindtest
|
kindtest
|
||||||
) {
|
) {
|
||||||
//Assigning values to corresponding input fields in "search.php" file.
|
|
||||||
$('#articlepartvalue').val(article)
|
$('#articlepartvalue').val(article)
|
||||||
$('#materialpartvalue').val(material)
|
$('#materialpartvalue').val(material)
|
||||||
$('#colorvalue').val(color)
|
$('#colorvalue').val(color)
|
||||||
@ -22,29 +21,56 @@ function fill(
|
|||||||
$('#cmcdatereport').val(cmcreportdate)
|
$('#cmcdatereport').val(cmcreportdate)
|
||||||
$('#reportof').val(reportof)
|
$('#reportof').val(reportof)
|
||||||
$('#combo').val(kindtest).change()
|
$('#combo').val(kindtest).change()
|
||||||
|
|
||||||
//Hiding "display" div in "search.php" file.
|
|
||||||
$('#display').hide()
|
$('#display').hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toggleHide(id, newHide, button) {
|
||||||
|
// Cambia l'icona e il colore immediatamente
|
||||||
|
const $button = $(button)
|
||||||
|
const $icon = $button.find('i')
|
||||||
|
$icon
|
||||||
|
.removeClass('fa-eye fa-eye-slash')
|
||||||
|
.addClass(newHide === 'Y' ? 'fa-eye-slash' : 'fa-eye')
|
||||||
|
.css('color', newHide === 'Y' ? 'red' : 'green') // Cambia il colore
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: 'searchengine/togglehide.php',
|
||||||
|
data: {
|
||||||
|
ididentificationparts: id,
|
||||||
|
hide: newHide,
|
||||||
|
},
|
||||||
|
success: function (response) {
|
||||||
|
// Aggiorna la ricerca per riflettere il cambiamento
|
||||||
|
performSearch()
|
||||||
|
},
|
||||||
|
error: function (xhr, status, error) {
|
||||||
|
console.log('Errore AJAX: ' + status + ' - ' + error)
|
||||||
|
// Ripristina l'icona e il colore originale in caso di errore
|
||||||
|
$icon
|
||||||
|
.removeClass('fa-eye fa-eye-slash')
|
||||||
|
.addClass(newHide === 'Y' ? 'fa-eye' : 'fa-eye-slash')
|
||||||
|
.css('color', newHide === 'Y' ? 'green' : 'red')
|
||||||
|
$('#display').html("Errore durante l'aggiornamento. Riprova.")
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
//On pressing a key on "Search box" in "search.php" file. This function will be called.
|
// Funzione per eseguire la ricerca
|
||||||
$('#articlepartvalue').keyup(function () {
|
function performSearch() {
|
||||||
//Assigning search box value to javascript variable named as "name".
|
|
||||||
var name = $('#articlepartvalue').val()
|
var name = $('#articlepartvalue').val()
|
||||||
//Validating, if "name" is empty.
|
var showHidden = $('#showHiddenParts').is(':checked')
|
||||||
|
|
||||||
if (name == '') {
|
if (name == '') {
|
||||||
//Assigning empty value to "display" div in "search.php" file.
|
|
||||||
$('#display').html('')
|
$('#display').html('')
|
||||||
}
|
} else {
|
||||||
//If name is not empty.
|
|
||||||
else {
|
|
||||||
//AJAX is called.
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: 'searchengine/ajaxsearch.php',
|
url: 'searchengine/ajaxsearch.php',
|
||||||
data: {
|
data: {
|
||||||
articlepartvalue: encodeURIComponent(name), // Codifica il valore
|
articlepartvalue: encodeURIComponent(name),
|
||||||
|
showHidden: showHidden,
|
||||||
},
|
},
|
||||||
success: function (html) {
|
success: function (html) {
|
||||||
$('#display').html(html).show()
|
$('#display').html(html).show()
|
||||||
@ -55,5 +81,15 @@ $(document).ready(function () {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Esegui la ricerca quando l'utente digita nel campo
|
||||||
|
$('#articlepartvalue').keyup(function () {
|
||||||
|
performSearch()
|
||||||
|
})
|
||||||
|
|
||||||
|
// Esegui la ricerca quando l'utente cambia il checkbox
|
||||||
|
$('#showHiddenParts').change(function () {
|
||||||
|
performSearch()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
25
public/searchengine/togglehide.php
Normal file
25
public/searchengine/togglehide.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
if (session_status() == PHP_SESSION_NONE) {
|
||||||
|
session_start();
|
||||||
|
}
|
||||||
|
|
||||||
|
include "../db.php";
|
||||||
|
|
||||||
|
if (isset($_POST['ididentificationparts']) && isset($_POST['hide'])) {
|
||||||
|
$ididentificationparts = $_POST['ididentificationparts'];
|
||||||
|
$newHide = $_POST['hide'];
|
||||||
|
|
||||||
|
$stmt = $conn->prepare("UPDATE identificationparts SET hide = ? WHERE ididentificationparts = ?");
|
||||||
|
$stmt->bind_param("si", $newHide, $ididentificationparts);
|
||||||
|
|
||||||
|
if ($stmt->execute()) {
|
||||||
|
echo "Stato aggiornato con successo";
|
||||||
|
} else {
|
||||||
|
echo "Errore: " . $stmt->error;
|
||||||
|
}
|
||||||
|
|
||||||
|
$stmt->close();
|
||||||
|
$conn->close();
|
||||||
|
} else {
|
||||||
|
echo "Parametri mancanti";
|
||||||
|
}
|
||||||
BIN
public/tdpdf/113TF-Rev.0-1747813931.pdf
Normal file
BIN
public/tdpdf/113TF-Rev.0-1747813931.pdf
Normal file
Binary file not shown.
BIN
public/tdpdf/988TF-Rev.0-1747754678.pdf
Normal file
BIN
public/tdpdf/988TF-Rev.0-1747754678.pdf
Normal file
Binary file not shown.
BIN
public/tdpdf/988TF-Rev.0-1747754860.pdf
Normal file
BIN
public/tdpdf/988TF-Rev.0-1747754860.pdf
Normal file
Binary file not shown.
@ -488,9 +488,12 @@ $conn->close();
|
|||||||
<input type="text" class="form-control data-field" placeholder="<?php echo $obsoldate; ?>" data-column="obsolescencedeadline" id="obsolescencedeadline" required name="obsolescencedeadline" value="<?php echo isset($rowtd['obsolescencedeadline']) ? htmlspecialchars($rowtd['obsolescencedeadline'], ENT_QUOTES, 'UTF-8') : ''; ?>">
|
<input type="text" class="form-control data-field" placeholder="<?php echo $obsoldate; ?>" data-column="obsolescencedeadline" id="obsolescencedeadline" required name="obsolescencedeadline" value="<?php echo isset($rowtd['obsolescencedeadline']) ? htmlspecialchars($rowtd['obsolescencedeadline'], ENT_QUOTES, 'UTF-8') : ''; ?>">
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
<label class="my-3"><?php echo $techapplied; ?></label>
|
||||||
|
<input type="text" class="form-control data-field" placeholder="<?php echo $techapplied; ?>" data-column="techspecificationapplied" id="techspecificationapplied" required name="techspecificationapplied" value="<?php echo isset($rowtd['techspecificationapplied']) ? htmlspecialchars($rowtd['techspecificationapplied'], ENT_QUOTES, 'UTF-8') : ''; ?>">
|
||||||
|
<br>
|
||||||
|
|
||||||
<label class="my-3">Corrispondenza DPI già certificati:</label>
|
<label class="my-3"><?php echo $corrtdcertified; ?></label>
|
||||||
<input type="text" class="form-control data-field" placeholder="Corrispondenza DPI già certificati:" data-column="dpialreadycerttificate" id="dpialreadycerttificate" name="dpialreadycerttificate" value="<?php echo isset($rowtd['dpialreadycerttificate']) ? htmlspecialchars($rowtd['dpialreadycerttificate'], ENT_QUOTES, 'UTF-8') : ''; ?>">
|
<input type="text" class="form-control data-field" placeholder="<?php echo $corrtdcertified; ?>" data-column="dpialreadycerttificate" id="dpialreadycerttificate" name="dpialreadycerttificate" value="<?php echo isset($rowtd['dpialreadycerttificate']) ? htmlspecialchars($rowtd['dpialreadycerttificate'], ENT_QUOTES, 'UTF-8') : ''; ?>">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -992,7 +995,8 @@ $conn->close();
|
|||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
function openPopup() {
|
function openPopup() {
|
||||||
var popupUrl = 'logopopup.php'; // Sostituisci con il percorso della tua pagina per l'aggiunta dei loghi
|
var idcompany = '<?php echo $idcompany; ?>';
|
||||||
|
var popupUrl = 'logopopup.php?idcompany=' + encodeURIComponent(idcompany);
|
||||||
var popupWidth = 800;
|
var popupWidth = 800;
|
||||||
var popupHeight = 700;
|
var popupHeight = 700;
|
||||||
var popupLeft = (screen.width - popupWidth) / 2;
|
var popupLeft = (screen.width - popupWidth) / 2;
|
||||||
|
|||||||
@ -48,11 +48,24 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||||||
|
|
||||||
// Lista dei campi da sanificare e controllare se sono piene
|
// Lista dei campi da sanificare e controllare se sono piene
|
||||||
$fields = [
|
$fields = [
|
||||||
'productionplace_same', 'classificationshoes', 'destinationuseppe',
|
'productionplace_same',
|
||||||
'manufacutringprocess', 'ppeageing', 'obsolescencedeadline',
|
'classificationshoes',
|
||||||
'localisationppemarking', 'manufacturerlogoid', 'sizeexamplecemark',
|
'destinationuseppe',
|
||||||
'monthyearprod', 'serialbatchnumber', 'standarduse', 'symbolsaddreq',
|
'manufacutringprocess',
|
||||||
'proddescription', 'packaging', 'declarconformity', 'webaddress'
|
'ppeageing',
|
||||||
|
'obsolescencedeadline',
|
||||||
|
'localisationppemarking',
|
||||||
|
'manufacturerlogoid',
|
||||||
|
'sizeexamplecemark',
|
||||||
|
'monthyearprod',
|
||||||
|
'serialbatchnumber',
|
||||||
|
'standarduse',
|
||||||
|
'symbolsaddreq',
|
||||||
|
'proddescription',
|
||||||
|
'packaging',
|
||||||
|
'declarconformity',
|
||||||
|
'webaddress',
|
||||||
|
'techspecificationapplied'
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($fields as $field) {
|
foreach ($fields as $field) {
|
||||||
@ -201,6 +214,13 @@ $virusprot = $tdquery->getColumnVal("virusprotection");
|
|||||||
$idarttype = $tdquery->getColumnVal("idarticletype");
|
$idarttype = $tdquery->getColumnVal("idarticletype");
|
||||||
|
|
||||||
|
|
||||||
|
$slippingtext = $tdquery->getColumnVal("slipping") === 'Y' ? 'Sì' : ($tdquery->getColumnVal("slipping") === '' ? 'No' : $tdquery->getColumnVal("slipping"));
|
||||||
|
$autoclavabletext = $tdquery->getColumnVal("autoclavable") === 'Y' ? 'Sì' : ($tdquery->getColumnVal("autoclavable") === '' ? 'No' : $tdquery->getColumnVal("autoclavable"));
|
||||||
|
$ukcatext = $tdquery->getColumnVal("ukca") === 'Y' ? 'Sì' : ($tdquery->getColumnVal("ukca") === '' ? 'No' : $tdquery->getColumnVal("ukca"));
|
||||||
|
$esdtext = $tdquery->getColumnVal("esd") === 'Y' ? 'Sì' : ($tdquery->getColumnVal("esd") === '' ? 'No' : $tdquery->getColumnVal("esd"));
|
||||||
|
$shoesorthopedictext = $tdquery->getColumnVal("shoesorthopedic") === 'Y' ? 'Sì' : ($tdquery->getColumnVal("shoesorthopedic") === '' ? 'No' : $tdquery->getColumnVal("shoesorthopedic"));
|
||||||
|
$shoesorthopedicmodtext = $tdquery->getColumnVal("shoesorthopedicmod") === 'Y' ? 'Sì' : ($tdquery->getColumnVal("shoesorthopedicmod") === '' ? 'No' : $tdquery->getColumnVal("shoesorthopedicmod"));
|
||||||
|
|
||||||
$conn = new mysqli($servername, $username, $password, $dbname);
|
$conn = new mysqli($servername, $username, $password, $dbname);
|
||||||
|
|
||||||
|
|
||||||
@ -562,6 +582,7 @@ $destppe = $row['destinationuseppe'];
|
|||||||
$manprocess = $row['manufacutringprocess'];
|
$manprocess = $row['manufacutringprocess'];
|
||||||
$ppeage = $row['ppeageing'];
|
$ppeage = $row['ppeageing'];
|
||||||
$obsol = $row['obsolescencedeadline'];
|
$obsol = $row['obsolescencedeadline'];
|
||||||
|
$techspec = $row['techspecificationapplied'];
|
||||||
if ($ppeage == 'Y') {
|
if ($ppeage == 'Y') {
|
||||||
$ppeagetext = 'Sì';
|
$ppeagetext = 'Sì';
|
||||||
} else {
|
} else {
|
||||||
@ -612,11 +633,20 @@ $html .= <<<HTML
|
|||||||
<td class="first-column">DPI soggetto ad invecchiamento</td>
|
<td class="first-column">DPI soggetto ad invecchiamento</td>
|
||||||
<td class="header-data">{$ppeagetext}</td>
|
<td class="header-data">{$ppeagetext}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="first-column">{$obsoldate}</td>
|
||||||
|
<td class="header-data">{$obsol}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="first-column">{$techapplied}</td>
|
||||||
|
<td class="header-data">{$techspec}</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
HTML;
|
HTML;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// dpi standard
|
// dpi standard
|
||||||
|
|
||||||
$html .= '<table>
|
$html .= '<table>
|
||||||
@ -637,6 +667,47 @@ while ($rowstd = $resultstd->fetch_assoc()) {
|
|||||||
};
|
};
|
||||||
$html .= '</tbody></table>';
|
$html .= '</tbody></table>';
|
||||||
|
|
||||||
|
//other info
|
||||||
|
|
||||||
|
if ($idarttype == 1) {
|
||||||
|
$html .= <<<HTML
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">Altre informazioni</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="first-column">Resistenza allo scivolamento</td>
|
||||||
|
<td class="header-data" style="width: 50%;">{$slippingtext}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="first-column">Autoclavabile</td>
|
||||||
|
<td class="header-data">{$autoclavabletext}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="first-column">Certificazione UKCA</td>
|
||||||
|
<td class="header-data">{$ukcatext}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="first-column">Calzature con plantari personalizzati (DGUV)</td>
|
||||||
|
<td class="header-data">{$shoesorthopedictext}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="first-column">Calzature modificate con rialzi o inserti nel fondo (DGUV)</td>
|
||||||
|
<td class="header-data">{$shoesorthopedicmodtext}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="first-column">Calzature ESD</td>
|
||||||
|
<td class="header-data">{$esdtext}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
HTML;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Add prot category
|
// Add prot category
|
||||||
|
|
||||||
$html .= '<table>
|
$html .= '<table>
|
||||||
|
|||||||
@ -67,7 +67,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||||||
'proddescription',
|
'proddescription',
|
||||||
'packaging',
|
'packaging',
|
||||||
'declarconformity',
|
'declarconformity',
|
||||||
'webaddress'
|
'webaddress',
|
||||||
|
'techspecificationapplied'
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($fields as $field) {
|
foreach ($fields as $field) {
|
||||||
@ -216,6 +217,13 @@ $phototwo = $tdquery->getColumnVal("phototwo");
|
|||||||
$virusprot = $tdquery->getColumnVal("virusprotection");
|
$virusprot = $tdquery->getColumnVal("virusprotection");
|
||||||
$idarttype = $tdquery->getColumnVal("idarticletype");
|
$idarttype = $tdquery->getColumnVal("idarticletype");
|
||||||
|
|
||||||
|
$slippingtext = $tdquery->getColumnVal("slipping") === 'Y' ? 'Sì' : ($tdquery->getColumnVal("slipping") === '' ? 'No' : $tdquery->getColumnVal("slipping"));
|
||||||
|
$autoclavabletext = $tdquery->getColumnVal("autoclavable") === 'Y' ? 'Sì' : ($tdquery->getColumnVal("autoclavable") === '' ? 'No' : $tdquery->getColumnVal("autoclavable"));
|
||||||
|
$ukcatext = $tdquery->getColumnVal("ukca") === 'Y' ? 'Sì' : ($tdquery->getColumnVal("ukca") === '' ? 'No' : $tdquery->getColumnVal("ukca"));
|
||||||
|
$esdtext = $tdquery->getColumnVal("esd") === 'Y' ? 'Sì' : ($tdquery->getColumnVal("esd") === '' ? 'No' : $tdquery->getColumnVal("esd"));
|
||||||
|
$shoesorthopedictext = $tdquery->getColumnVal("shoesorthopedic") === 'Y' ? 'Sì' : ($tdquery->getColumnVal("shoesorthopedic") === '' ? 'No' : $tdquery->getColumnVal("shoesorthopedic"));
|
||||||
|
$shoesorthopedicmodtext = $tdquery->getColumnVal("shoesorthopedicmod") === 'Y' ? 'Sì' : ($tdquery->getColumnVal("shoesorthopedicmod") === '' ? 'No' : $tdquery->getColumnVal("shoesorthopedicmod"));
|
||||||
|
|
||||||
|
|
||||||
$conn = new mysqli($servername, $username, $password, $dbname);
|
$conn = new mysqli($servername, $username, $password, $dbname);
|
||||||
|
|
||||||
@ -586,6 +594,7 @@ $destppe = $row['destinationuseppe'];
|
|||||||
$manprocess = $row['manufacutringprocess'];
|
$manprocess = $row['manufacutringprocess'];
|
||||||
$ppeage = $row['ppeageing'];
|
$ppeage = $row['ppeageing'];
|
||||||
$obsol = $row['obsolescencedeadline'];
|
$obsol = $row['obsolescencedeadline'];
|
||||||
|
$techspec = $row['techspecificationapplied'];
|
||||||
if ($ppeage == 'Y') {
|
if ($ppeage == 'Y') {
|
||||||
$ppeagetext = 'Sì';
|
$ppeagetext = 'Sì';
|
||||||
} else {
|
} else {
|
||||||
@ -636,6 +645,14 @@ $html .= <<<HTML
|
|||||||
<td class="first-column">DPI soggetto ad invecchiamento</td>
|
<td class="first-column">DPI soggetto ad invecchiamento</td>
|
||||||
<td class="header-data">{$ppeagetext}</td>
|
<td class="header-data">{$ppeagetext}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="first-column">Data di obsolescenza (anni)</td>
|
||||||
|
<td class="header-data">{$obsol}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="first-column">{$techapplied}</td>
|
||||||
|
<td class="header-data">{$techspec}</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
HTML;
|
HTML;
|
||||||
@ -661,6 +678,45 @@ while ($rowstd = $resultstd->fetch_assoc()) {
|
|||||||
};
|
};
|
||||||
$html .= '</tbody></table>';
|
$html .= '</tbody></table>';
|
||||||
|
|
||||||
|
|
||||||
|
if ($idarttype == 1) {
|
||||||
|
$html .= <<<HTML
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th colspan="2">Altre informazioni</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="first-column">Resistenza allo scivolamento</td>
|
||||||
|
<td class="header-data" style="width: 50%;">{$slippingtext}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="first-column">Autoclavabile</td>
|
||||||
|
<td class="header-data">{$autoclavabletext}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="first-column">Certificazione UKCA</td>
|
||||||
|
<td class="header-data">{$ukcatext}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="first-column">Calzature con plantari personalizzati (DGUV)</td>
|
||||||
|
<td class="header-data">{$shoesorthopedictext}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="first-column">Calzature modificate con rialzi o inserti nel fondo (DGUV)</td>
|
||||||
|
<td class="header-data">{$shoesorthopedicmodtext}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="first-column">Calzature ESD</td>
|
||||||
|
<td class="header-data">{$esdtext}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
HTML;
|
||||||
|
}
|
||||||
|
|
||||||
// Add prot category
|
// Add prot category
|
||||||
|
|
||||||
$html .= '<table>
|
$html .= '<table>
|
||||||
|
|||||||
BIN
public/uploadtddocuments/15-1747813845.jpg
Normal file
BIN
public/uploadtddocuments/15-1747813845.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 41 KiB |
BIN
public/uploadtddocuments/ziptd/15-1747813931.zip
Normal file
BIN
public/uploadtddocuments/ziptd/15-1747813931.zip
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user