INF.03-01-25.01-SG/i1.html

65 lines
2.0 KiB
HTML
Raw Permalink Normal View History

<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<title>Sklep z obuwiem</title>
<link rel="stylesheet" href="css/layout.css">
</head>
<body>
2025-09-04 11:00:25 +00:00
<header>
<img src="imgs/baner.png" alt="sklep z obuwiem">
<div class="header-text">Sklep z obuwiem</div>
</header>
2025-09-04 10:54:12 +00:00
<nav>
<a href="i1.php">Strona główna</a>
<a href="raty.html">Koszt rat</a>
<a href="https://moje-szkolenia.pl/">Nasz partner</a>
</nav>
2025-09-04 11:00:25 +00:00
<main>
<h3>Oferta obuwia</h3>
<table>
<tr>
<th>Model</th>
<th>Kategoria</th>
<th>Cena</th>
<th>Opis</th>
</tr>
<?php
require_once 'config/database.php';
try {
$stmt = $pdo->query("
SELECT b.model, k.nazwa_kat, b.nazwa, b.cena, b.opis
FROM obuwie_buty b
JOIN obuwie_kategorie k ON b.id_kat = k.id_kat
");
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
echo "<tr>";
echo "<td>" . htmlspecialchars($row['nazwa']) . "</td>";
echo "<td>" . htmlspecialchars($row['nazwa_kat']) . "</td>";
echo "<td>" . number_format($row['cena'], 2) . " zł</td>";
echo "<td>" . htmlspecialchars($row['opis']) . "</td>";
echo "</tr>";
}
} catch (PDOException $e) {
echo "<tr><td colspan='4'>Błąd przy ładowaniu danych: " . $e->getMessage() . "</td></tr>";
}
?>
</table>
<h3>Adres do korespondencji</h3>
<ul>
<li>Adres: Katowice, ul. Mariacka 5</li>
<li>Telefon: 32 888 88 88</li>
</ul>
<a href="mailto:sklep@obuwie.pl">skontaktuj się</a>
</main>
<footer>
<p>Autor strony: 99010101010</p>
</footer>
</body>
</html>