fixed TF in inglese

This commit is contained in:
2025-09-12 15:15:33 +02:00
parent d106d42c03
commit 18364b7127
22 changed files with 1945 additions and 952 deletions
+18 -18
View File
@@ -40,14 +40,14 @@ if (isset($_POST['submit'])) {
$stmt->execute();
$stmt->close();
} else {
echo "Errore durante l'inserimento nel database.";
echo ($_SESSION['langselect'] == 'en') ? "Error during database insertion." : "Errore durante l'inserimento nel database.";
}
} else {
echo "Errore nel caricamento del file.";
echo ($_SESSION['langselect'] == 'en') ? "Error uploading the file." : "Errore nel caricamento del file.";
}
$conn->close();
} else {
echo "Sono ammessi solo file PNG e JPG.";
echo ($_SESSION['langselect'] == 'en') ? "Only PNG and JPG files are allowed." : "Sono ammessi solo file PNG e JPG.";
}
// Reindirizza per evitare reinvii
header("Location: logopopup.php?idcompany=$idcompany");
@@ -56,12 +56,12 @@ if (isset($_POST['submit'])) {
?>
<!DOCTYPE html>
<html lang="en">
<html lang="<?php echo ($_SESSION['langselect'] == 'en') ? 'en' : 'it'; ?>">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Aggiungi Logo</title>
<title><?php echo ($_SESSION['langselect'] == 'en') ? 'Add Logo' : 'Aggiungi Logo'; ?></title>
<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">
<style>
@@ -82,43 +82,43 @@ if (isset($_POST['submit'])) {
}
.custom-file-label::after {
content: "Sfoglia";
content: "<?php echo ($_SESSION['langselect'] == 'en') ? 'Browse' : 'Sfoglia'; ?>";
}
</style>
</head>
<body>
<div class="container mt-5">
<button type="button" class="btn btn-secondary" onclick="closeAndRefresh()">Chiudi e Aggiorna</button>
<h3>Aggiungi Logo</h3>
<button type="button" class="btn btn-secondary" onclick="closeAndRefresh()"><?php echo ($_SESSION['langselect'] == 'en') ? 'Close and Refresh' : 'Chiudi e Aggiorna'; ?></button>
<h3><?php echo ($_SESSION['langselect'] == 'en') ? 'Add Logo' : 'Aggiungi Logo'; ?></h3>
<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">
<label for="logoDescription">Descrizione Logo:</label>
<label for="logoDescription"><?php echo ($_SESSION['langselect'] == 'en') ? 'Logo Description:' : 'Descrizione Logo:'; ?></label>
<input type="text" class="form-control" id="logoDescription" name="descriptionlogo" required>
</div>
<div class="form-group">
<label for="logoFile">File Logo:</label>
<label for="logoFile"><?php echo ($_SESSION['langselect'] == 'en') ? 'Logo File:' : 'File Logo:'; ?></label>
<div class="drag-area" id="drag-area">
<p>Trascina qui il file o clicca per selezionare</p>
<p><?php echo ($_SESSION['langselect'] == 'en') ? 'Drag the file here or click to select' : '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>
<label class="custom-file-label" for="logoFile"><?php echo ($_SESSION['langselect'] == 'en') ? 'Choose file' : 'Scegli file'; ?></label>
</div>
</div>
<button type="submit" class="btn btn-primary" name="submit">Carica Logo</button>
<button type="submit" class="btn btn-primary" name="submit"><?php echo ($_SESSION['langselect'] == 'en') ? 'Upload Logo' : 'Carica Logo'; ?></button>
</form>
</div>
<div class="container mt-5">
<h3>Loghi Caricati</h3>
<h3><?php echo ($_SESSION['langselect'] == 'en') ? 'Uploaded Logos' : 'Loghi Caricati'; ?></h3>
<table class="table">
<thead>
<tr>
<th>Descrizione</th>
<th>Logo</th>
<th>Azione</th>
<th><?php echo ($_SESSION['langselect'] == 'en') ? 'Description' : 'Descrizione'; ?></th>
<th><?php echo ($_SESSION['langselect'] == 'en') ? 'Logo' : 'Logo'; ?></th>
<th><?php echo ($_SESSION['langselect'] == 'en') ? 'Action' : 'Azione'; ?></th>
</tr>
</thead>
<tbody>
@@ -135,7 +135,7 @@ if (isset($_POST['submit'])) {
echo "<td>" . htmlspecialchars($row['descriptionlogo']) . "</td>";
echo "<td><img src='logos/" . htmlspecialchars($row['filenamelogo']) . "' alt='Logo' style='width: 50px;'></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 "<a href='deletelogo.php?id=" . $row['idlogo_td'] . "&idcompany=$idcompany' onclick='return confirm(\"" . ($_SESSION['langselect'] == 'en' ? 'Are you sure you want to delete this logo?' : 'Sei sicuro di voler cancellare questo logo?') . "\");'><i class='fas fa-trash-alt' style='color: red;'></i></a>";
echo "</td>";
echo "</tr>";
}