Fix contrast ratio per accessibilità

This commit is contained in:
2026-05-07 09:03:20 +02:00
parent 3afe958740
commit f68297e1b4
11 changed files with 27 additions and 27 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ if ($result === false) {
<a href="logout.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #dc3545; color: white; border: none; border-radius: 4px; cursor: pointer;">Logout</button></a> <a href="logout.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #dc3545; color: white; border: none; border-radius: 4px; cursor: pointer;">Logout</button></a>
<span style="margin-left: 10px;">Benvenuto, <?php echo htmlspecialchars($_SESSION['name']); ?></span> <span style="margin-left: 10px;">Benvenuto, <?php echo htmlspecialchars($_SESSION['name']); ?></span>
<?php else: ?> <?php else: ?>
<a href="login.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #28a745; color: white; border: none; border-radius: 4px; cursor: pointer;">Accesso</button></a> <a href="login.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #1d8033; color: white; border: none; border-radius: 4px; cursor: pointer;">Accesso</button></a>
<?php endif; ?> <?php endif; ?>
</div> </div>
</header> </header>
@@ -54,7 +54,7 @@ if ($result === false) {
<h1>Account di <?php echo htmlspecialchars($_SESSION['name']); ?><?php if ($_SESSION['role'] == 'admin') { echo ' (Admin)'; } ?></h1> <h1>Account di <?php echo htmlspecialchars($_SESSION['name']); ?><?php if ($_SESSION['role'] == 'admin') { echo ' (Admin)'; } ?></h1>
<p><strong>Nome completo:</strong> <?php echo htmlspecialchars($_SESSION['name']) . ' ' . htmlspecialchars($_SESSION['surname']); ?></p> <p><strong>Nome completo:</strong> <?php echo htmlspecialchars($_SESSION['name']) . ' ' . htmlspecialchars($_SESSION['surname']); ?></p>
<br> <br>
<a href="account/passwordChange.php" style="padding: 8px 16px; background-color: #17a2b8; color: white; border: none; border-radius: 4px; text-decoration: none; cursor: pointer;">Modifica password</a> <a href="account/passwordChange.php" style="padding: 8px 16px; background-color: #117281; color: white; border: none; border-radius: 4px; text-decoration: none; cursor: pointer;">Modifica password</a>
<a href="account/delete.php" style="padding: 8px 16px; background-color: #dc3545; color: white; border: none; border-radius: 4px; text-decoration: none; cursor: pointer;">Elimina account</a> <a href="account/delete.php" style="padding: 8px 16px; background-color: #dc3545; color: white; border: none; border-radius: 4px; text-decoration: none; cursor: pointer;">Elimina account</a>
<br><br> <br><br>
</div> </div>
+1 -1
View File
@@ -73,7 +73,7 @@ if ($result_total_products) {
<a href="/logout.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #dc3545; color: white; border: none; border-radius: 4px; cursor: pointer;">Logout</button></a> <a href="/logout.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #dc3545; color: white; border: none; border-radius: 4px; cursor: pointer;">Logout</button></a>
<span style="margin-left: 10px;">Benvenuto, <?php echo htmlspecialchars($_SESSION['name']); ?></span> <span style="margin-left: 10px;">Benvenuto, <?php echo htmlspecialchars($_SESSION['name']); ?></span>
<?php else: ?> <?php else: ?>
<a href="/login.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #28a745; color: white; border: none; border-radius: 4px; cursor: pointer;">Accesso</button></a> <a href="/login.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #1d8033; color: white; border: none; border-radius: 4px; cursor: pointer;">Accesso</button></a>
<?php endif; ?> <?php endif; ?>
</div> </div>
</header> </header>
+1 -1
View File
@@ -88,7 +88,7 @@ if ($result === false) {
<a href="/logout.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #dc3545; color: white; border: none; border-radius: 4px; cursor: pointer;">Logout</button></a> <a href="/logout.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #dc3545; color: white; border: none; border-radius: 4px; cursor: pointer;">Logout</button></a>
<span style="margin-left: 10px;">Benvenuto, <?php echo htmlspecialchars($_SESSION['name']); ?></span> <span style="margin-left: 10px;">Benvenuto, <?php echo htmlspecialchars($_SESSION['name']); ?></span>
<?php else: ?> <?php else: ?>
<a href="/login.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #28a745; color: white; border: none; border-radius: 4px; cursor: pointer;">Accesso</button></a> <a href="/login.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #1d8033; color: white; border: none; border-radius: 4px; cursor: pointer;">Accesso</button></a>
<?php endif; ?> <?php endif; ?>
</div> </div>
</header> </header>
+1 -1
View File
@@ -147,7 +147,7 @@ $stmt_prod->close();
<a href="/logout.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #dc3545; color: white; border: none; border-radius: 4px; cursor: pointer;">Logout</button></a> <a href="/logout.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #dc3545; color: white; border: none; border-radius: 4px; cursor: pointer;">Logout</button></a>
<span style="margin-left: 10px;">Benvenuto, <?php echo htmlspecialchars($_SESSION['name']); ?></span> <span style="margin-left: 10px;">Benvenuto, <?php echo htmlspecialchars($_SESSION['name']); ?></span>
<?php else: ?> <?php else: ?>
<a href="/login.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #28a745; color: white; border: none; border-radius: 4px; cursor: pointer;">Accesso</button></a> <a href="/login.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #1d8033; color: white; border: none; border-radius: 4px; cursor: pointer;">Accesso</button></a>
<?php endif; ?> <?php endif; ?>
</div> </div>
</header> </header>
+1 -1
View File
@@ -93,7 +93,7 @@ if ($result === false) {
<a href="/logout.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #dc3545; color: white; border: none; border-radius: 4px; cursor: pointer;">Logout</button></a> <a href="/logout.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #dc3545; color: white; border: none; border-radius: 4px; cursor: pointer;">Logout</button></a>
<span style="margin-left: 10px;">Benvenuto, <?php echo htmlspecialchars($_SESSION['name']); ?></span> <span style="margin-left: 10px;">Benvenuto, <?php echo htmlspecialchars($_SESSION['name']); ?></span>
<?php else: ?> <?php else: ?>
<a href="/login.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #28a745; color: white; border: none; border-radius: 4px; cursor: pointer;">Accesso</button></a> <a href="/login.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #1d8033; color: white; border: none; border-radius: 4px; cursor: pointer;">Accesso</button></a>
<?php endif; ?> <?php endif; ?>
</div> </div>
</header> </header>
+11 -11
View File
@@ -190,7 +190,7 @@ header span {
} }
.product-card button { .product-card button {
padding: 8px 16px; padding: 8px 16px;
background-color: #007bff; background-color: #1c71d8;
color: white; color: white;
border: none; border: none;
border-radius: 4px; border-radius: 4px;
@@ -360,7 +360,7 @@ form button:hover {
} }
.checkout-btn { .checkout-btn {
padding: 10px 20px; padding: 10px 20px;
background-color: #28a745; background-color: #1d8033;
color: white; color: white;
border: none; border: none;
border-radius: 4px; border-radius: 4px;
@@ -401,7 +401,7 @@ form button:hover {
} }
.my-sidebar a { .my-sidebar a {
color: #007bff; color: #1c71d8;
text-decoration: none; text-decoration: none;
} }
@@ -472,7 +472,7 @@ form button:hover {
.toggle-button { .toggle-button {
padding: 10px 16px; padding: 10px 16px;
background-color: #17a2b8; background-color: #117281;
color: #fff; color: #fff;
border: none; border: none;
border-radius: 4px; border-radius: 4px;
@@ -517,7 +517,7 @@ form button:hover {
height: 32px; height: 32px;
border: none; border: none;
border-radius: 4px; border-radius: 4px;
background-color: #007bff; background-color: #1c71d8;
color: #fff; color: #fff;
cursor: pointer; cursor: pointer;
} }
@@ -594,7 +594,7 @@ form button:hover {
} }
.admin-stat-products { .admin-stat-products {
border-color: #17a2b8; border-color: #117281;
background-color: #e9f7fb; background-color: #e9f7fb;
} }
@@ -649,7 +649,7 @@ form button:hover {
} }
.status-completed { .status-completed {
background-color: #28a745; background-color: #1d8033;
color: white; color: white;
} }
@@ -748,7 +748,7 @@ form button:hover {
/* Stili per btn-reset */ /* Stili per btn-reset */
.btn-reset { .btn-reset {
background-color: #17a2b8; background-color: #117281;
color: white; color: white;
border: none; border: none;
border-radius: 4px; border-radius: 4px;
@@ -1068,7 +1068,7 @@ header button {
margin-left: 0 !important; margin-left: 0 !important;
margin-right: 5px !important; margin-right: 5px !important;
padding: 8px 12px !important; padding: 8px 12px !important;
background-color: #007bff !important; background-color: #1c71d8 !important;
color: white !important; color: white !important;
border: none !important; border: none !important;
border-radius: 4px !important; border-radius: 4px !important;
@@ -1082,8 +1082,8 @@ header a:has(button[style*="#dc3545"]) button {
} }
header a[href*="login"] button, header a[href*="login"] button,
header a:has(button[style*="#28a745"]) button { header a:has(button[style*="#1d8033"]) button {
background-color: #28a745 !important; background-color: #1d8033 !important;
} }
header button:hover { header button:hover {
+1 -1
View File
@@ -25,7 +25,7 @@ session_start();
<a href="logout.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #dc3545; color: white; border: none; border-radius: 4px; cursor: pointer;">Logout</button></a> <a href="logout.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #dc3545; color: white; border: none; border-radius: 4px; cursor: pointer;">Logout</button></a>
<span style="margin-left: 10px;">Benvenuto, <a href="account.php"><?php echo htmlspecialchars($_SESSION['name']); ?></a></span> <span style="margin-left: 10px;">Benvenuto, <a href="account.php"><?php echo htmlspecialchars($_SESSION['name']); ?></a></span>
<?php else: ?> <?php else: ?>
<a href="login.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #28a745; color: white; border: none; border-radius: 4px; cursor: pointer;">Accesso</button></a> <a href="login.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #1d8033; color: white; border: none; border-radius: 4px; cursor: pointer;">Accesso</button></a>
<?php endif; ?> <?php endif; ?>
</div> </div>
</header> </header>
+4 -4
View File
@@ -134,22 +134,22 @@ $conn->close();
<a href="logout.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #dc3545; color: white; border: none; border-radius: 4px; cursor: pointer;">Logout</button></a> <a href="logout.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #dc3545; color: white; border: none; border-radius: 4px; cursor: pointer;">Logout</button></a>
<span style="margin-left: 10px;">Benvenuto, <a href="account.php"><?php echo htmlspecialchars($_SESSION['name']); ?></a></span> <span style="margin-left: 10px;">Benvenuto, <a href="account.php"><?php echo htmlspecialchars($_SESSION['name']); ?></a></span>
<?php else: ?> <?php else: ?>
<a href="login.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #28a745; color: white; border: none; border-radius: 4px; cursor: pointer;">Accesso</button></a> <a href="login.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #1d8033; color: white; border: none; border-radius: 4px; cursor: pointer;">Accesso</button></a>
<?php endif; ?> <?php endif; ?>
</div> </div>
</header> </header>
<div style="max-width: 600px; margin: 50px auto; padding: 20px; text-align: center; border: 1px solid #ddd; border-radius: 8px; background-color: #fff;"> <div style="max-width: 600px; margin: 50px auto; padding: 20px; text-align: center; border: 1px solid #ddd; border-radius: 8px; background-color: #fff;">
<?php if ($success): ?> <?php if ($success): ?>
<h1 style="color: #28a745;">Ordine confermato!</h1> <h1 style="color: #1d8033;">Ordine confermato!</h1>
<p>Il tuo ordine è stato elaborato con successo.</p> <p>Il tuo ordine è stato elaborato con successo.</p>
<p><strong>Numero ordine:</strong> #<?php echo $order_id; ?></p> <p><strong>Numero ordine:</strong> #<?php echo $order_id; ?></p>
<p><strong>Totale:</strong> €<?php echo number_format($order_total, 2, ',', '.'); ?></p> <p><strong>Totale:</strong> €<?php echo number_format($order_total, 2, ',', '.'); ?></p>
<a href="index.php"><button style="padding: 10px 20px; background-color: #007bff; color: white; border: none; border-radius: 4px; cursor: pointer; margin-top: 20px;">Torna alla home</button></a> <a href="index.php"><button style="padding: 10px 20px; background-color: #1c71d8; color: white; border: none; border-radius: 4px; cursor: pointer; margin-top: 20px;">Torna alla home</button></a>
<?php else: ?> <?php else: ?>
<h1 style="color: #dc3545;">Errore nell'ordine</h1> <h1 style="color: #dc3545;">Errore nell'ordine</h1>
<p><?php echo htmlspecialchars($error); ?></p> <p><?php echo htmlspecialchars($error); ?></p>
<a href="cart.php"><button style="padding: 10px 20px; background-color: #007bff; color: white; border: none; border-radius: 4px; cursor: pointer; margin-top: 20px;">Torna al carrello</button></a> <a href="cart.php"><button style="padding: 10px 20px; background-color: #1c71d8; color: white; border: none; border-radius: 4px; cursor: pointer; margin-top: 20px;">Torna al carrello</button></a>
<?php endif; ?> <?php endif; ?>
</div> </div>
</body> </body>
+2 -2
View File
@@ -34,7 +34,7 @@ if ($result === false) {
<a href="logout.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #dc3545; color: white; border: none; border-radius: 4px; cursor: pointer;">Logout</button></a> <a href="logout.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #dc3545; color: white; border: none; border-radius: 4px; cursor: pointer;">Logout</button></a>
<span style="margin-left: 10px;">Benvenuto, <a href="account.php"><?php echo htmlspecialchars($_SESSION['name']); ?></a></span> <span style="margin-left: 10px;">Benvenuto, <a href="account.php"><?php echo htmlspecialchars($_SESSION['name']); ?></a></span>
<?php else: ?> <?php else: ?>
<a href="login.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #28a745; color: white; border: none; border-radius: 4px; cursor: pointer;">Accesso</button></a> <a href="login.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #1d8033; color: white; border: none; border-radius: 4px; cursor: pointer;">Accesso</button></a>
<?php endif; ?> <?php endif; ?>
</div> </div>
</header> </header>
@@ -43,7 +43,7 @@ if ($result === false) {
<div class="products-grid"> <div class="products-grid">
<?php while ($row = $result->fetch_assoc()): ?> <?php while ($row = $result->fetch_assoc()): ?>
<div class="product-card"> <div class="product-card">
<a href="product.php?id=<?php echo $row['ProductID']; ?>"><div class="img-square"><img src="img/<?php echo htmlspecialchars($row['ImagePath']); ?>" alt="Immagine prodotto"></div></a> <a href="product.php?id=<?php echo $row['ProductID']; ?>"><div class="img-square"><img src="img/<?php echo htmlspecialchars($row['ImagePath']); ?>" alt="Immagine di <?php echo htmlspecialchars($row['ProductName']); ?>"></div></a>
<h3><?php echo "<a href='product.php?id=" . $row['ProductID'] . "'>" . htmlspecialchars($row['ProductName']) . "</a>"; ?></h3> <h3><?php echo "<a href='product.php?id=" . $row['ProductID'] . "'>" . htmlspecialchars($row['ProductName']) . "</a>"; ?></h3>
<p><?php echo htmlspecialchars($row['Price']); ?>€</p> <p><?php echo htmlspecialchars($row['Price']); ?>€</p>
<?php if ($row['StockQuantity'] > 0): ?> <?php if ($row['StockQuantity'] > 0): ?>
+1 -1
View File
@@ -50,7 +50,7 @@ if (!$result) {
<a href="logout.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #dc3545; color: white; border: none; border-radius: 4px; cursor: pointer;">Logout</button></a> <a href="logout.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #dc3545; color: white; border: none; border-radius: 4px; cursor: pointer;">Logout</button></a>
<span style="margin-left: 10px;">Benvenuto, <?php echo htmlspecialchars($_SESSION['name']); ?></span> <span style="margin-left: 10px;">Benvenuto, <?php echo htmlspecialchars($_SESSION['name']); ?></span>
<?php else: ?> <?php else: ?>
<a href="login.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #28a745; color: white; border: none; border-radius: 4px; cursor: pointer;">Accesso</button></a> <a href="login.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #1d8033; color: white; border: none; border-radius: 4px; cursor: pointer;">Accesso</button></a>
<?php endif; ?> <?php endif; ?>
</div> </div>
</header> </header>
+2 -2
View File
@@ -45,7 +45,7 @@ if ($stmt = $conn->prepare($sql)) {
<a href="logout.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #dc3545; color: white; border: none; border-radius: 4px; cursor: pointer;">Logout</button></a> <a href="logout.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #dc3545; color: white; border: none; border-radius: 4px; cursor: pointer;">Logout</button></a>
<span style="margin-left: 10px;">Benvenuto, <a href="account.php"><?php echo htmlspecialchars($_SESSION['name']); ?></a></span> <span style="margin-left: 10px;">Benvenuto, <a href="account.php"><?php echo htmlspecialchars($_SESSION['name']); ?></a></span>
<?php else: ?> <?php else: ?>
<a href="login.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #28a745; color: white; border: none; border-radius: 4px; cursor: pointer;">Accesso</button></a> <a href="login.php"><button style="margin-left: 10px; padding: 8px 16px; background-color: #1d8033; color: white; border: none; border-radius: 4px; cursor: pointer;">Accesso</button></a>
<?php endif; ?> <?php endif; ?>
</div> </div>
</header> </header>
@@ -60,7 +60,7 @@ if ($stmt = $conn->prepare($sql)) {
<p><strong>Prezzo:</strong> €<?php echo htmlspecialchars($product['Price']); ?></p> <p><strong>Prezzo:</strong> €<?php echo htmlspecialchars($product['Price']); ?></p>
<p><strong>Quantità disponibile:</strong> <?php echo htmlspecialchars($product['StockQuantity']); ?></p> <p><strong>Quantità disponibile:</strong> <?php echo htmlspecialchars($product['StockQuantity']); ?></p>
<?php if ($product['StockQuantity'] > 0): ?> <?php if ($product['StockQuantity'] > 0): ?>
<button onclick="addToCart(<?php echo $product['ProductID']; ?>, '<?php echo htmlspecialchars($product['ProductName']); ?>', <?php echo $product['Price']; ?>)" style="padding: 10px 20px; background-color: #28a745; color: white; border: none; border-radius: 4px; cursor: pointer;">Aggiungi al carrello</button> <button onclick="addToCart(<?php echo $product['ProductID']; ?>, '<?php echo htmlspecialchars($product['ProductName']); ?>', <?php echo $product['Price']; ?>)" style="padding: 10px 20px; background-color: #1d8033; color: white; border: none; border-radius: 4px; cursor: pointer;">Aggiungi al carrello</button>
<?php else: ?> <?php else: ?>
<button disabled style="padding: 10px 20px; background-color: #ccc; color: white; border: none; border-radius: 4px; cursor: not-allowed;">Esaurito</button> <button disabled style="padding: 10px 20px; background-color: #ccc; color: white; border: none; border-radius: 4px; cursor: not-allowed;">Esaurito</button>
<?php endif; ?> <?php endif; ?>