2026-06-10 16:31:05 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="fr">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="UTF-8">
|
2026-06-10 22:01:21 +02:00
|
|
|
<title>Résultats de recherche pour "<?= html_escape($search_keyword) ?>"</title>
|
2026-06-12 21:40:50 +02:00
|
|
|
<style>
|
|
|
|
|
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f4f7f6; color: #333; margin: 0; padding: 20px; }
|
|
|
|
|
.container { max-width: 900px; margin: 0 auto; background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
|
|
|
|
|
h1 { color: #2c3e50; border-bottom: 2px solid #ecf0f1; padding-bottom: 10px; margin-bottom: 20px; }
|
|
|
|
|
a { color: #3498db; text-decoration: none; }
|
|
|
|
|
a:hover { text-decoration: underline; }
|
|
|
|
|
ul { list-style: none; padding: 0; }
|
|
|
|
|
li { background: #f9f9f9; margin-bottom: 10px; padding: 15px; border-radius: 5px; border-left: 4px solid #9b59b6; transition: transform 0.2s; display: flex; justify-content: space-between; align-items: center; }
|
|
|
|
|
li:hover { transform: translateX(5px); background: #f1f1f1; }
|
|
|
|
|
li a { text-decoration: none; color: #2c3e50; }
|
|
|
|
|
li a:hover { color: #9b59b6; }
|
|
|
|
|
.price-tag { background: #9b59b6; color: white; padding: 4px 10px; border-radius: 4px; font-weight: bold; font-size: 14px; }
|
|
|
|
|
.empty-msg { padding: 15px; background: #ffeaa7; color: #d35400; border-radius: 5px; font-weight: bold; }
|
|
|
|
|
.result-count { display: inline-block; background: #ecf0f1; padding: 5px 10px; border-radius: 4px; margin-bottom: 15px; }
|
|
|
|
|
</style>
|
2026-06-10 16:31:05 +02:00
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
|
2026-06-12 21:40:50 +02:00
|
|
|
<div class="container">
|
2026-06-10 22:01:21 +02:00
|
|
|
<p><a href="<?= site_url('home') ?>">⬅ Retour à l'accueil</a></p>
|
2026-06-10 16:31:05 +02:00
|
|
|
|
2026-06-10 22:01:21 +02:00
|
|
|
<h1>Résultats pour : "<?= html_escape($search_keyword) ?>"</h1>
|
2026-06-10 16:31:05 +02:00
|
|
|
|
|
|
|
|
<?php if (empty($games)): ?>
|
2026-06-12 21:40:50 +02:00
|
|
|
<p class="empty-msg">Aucun jeu vidéo ne correspond à votre recherche.</p>
|
2026-06-10 16:31:05 +02:00
|
|
|
<?php else: ?>
|
2026-06-12 21:40:50 +02:00
|
|
|
<p class="result-count"><strong><?= count($games) ?></strong> jeu(x) trouvé(s) :</p>
|
2026-06-10 16:31:05 +02:00
|
|
|
<ul>
|
|
|
|
|
<?php foreach ($games as $game): ?>
|
|
|
|
|
<li>
|
2026-06-12 21:40:50 +02:00
|
|
|
<div>
|
|
|
|
|
<a href="<?= site_url('game/detail/' . $game['id']) ?>">
|
|
|
|
|
<strong><?= html_escape($game['name']) ?></strong>
|
|
|
|
|
</a>
|
|
|
|
|
<span style="color: #7f8c8d;"> - (<?= html_escape($game['releaseYear']) ?>)</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<?php if (isset($game['prix'])): ?>
|
|
|
|
|
<span class="price-tag"><?= number_format($game['prix'] / 100, 2, ',', ' ') ?> €</span>
|
|
|
|
|
<?php elseif (isset($game['price'])): ?>
|
|
|
|
|
<span class="price-tag"><?= number_format($game['price'] / 100, 2, ',', ' ') ?> €</span>
|
|
|
|
|
<?php endif; ?>
|
2026-06-10 16:31:05 +02:00
|
|
|
</li>
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
</ul>
|
|
|
|
|
<?php endif; ?>
|
2026-06-12 21:40:50 +02:00
|
|
|
</div>
|
2026-06-10 16:31:05 +02:00
|
|
|
|
|
|
|
|
</body>
|
2026-06-12 21:40:50 +02:00
|
|
|
</html>
|