Vues affichages des listes par categorie/genre et fiche detaillee des jeux et creation de la page detail du jeu avec jointures gauches pour le developpeur et le poster
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title><?php echo html_escape($game['title']); ?> - Détails</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p><a href="<?php echo site_url('home'); ?>">← Retour à l'accueil</a></p>
|
||||
|
||||
<main style="display: flex; gap: 40px; margin-top: 20px;">
|
||||
|
||||
<section style="max-width: 300px;">
|
||||
<?php if (!empty($game['poster_url'])): ?>
|
||||
<img src="<?php echo html_escape($game['poster_url']); ?>" alt="Jaquette de <?php echo html_escape($game['title']); ?>" style="width: 100%; height: auto; border-radius: 8px;">
|
||||
<?php else: ?>
|
||||
<div style="width: 200px; height: 300px; background: #ccc; display: flex; align-items: center; justify-content: center; text-align: center; border-radius: 8px;">
|
||||
<span>Aucune image<br>disponible</span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1><?php echo html_escape($game['title']); ?></h1>
|
||||
<ul>
|
||||
<li><strong>Année de sortie :</strong> <?php echo html_escape($game['year']); ?></li>
|
||||
<li><strong>Développeur :</strong>
|
||||
<?php echo !empty($game['developer_name']) ? html_escape($game['developer_name']) : 'Inconnu'; ?>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
<p style="font-style: italic; color: #666;">Espace administration (Éditer / Supprimer)</p>
|
||||
</section>
|
||||
|
||||
</main>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Jeux de la catégorie <?php echo html_escape($category['name']); ?></title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p><a href="<?php echo site_url('home'); ?>">← Retour à l'accueil</a></p>
|
||||
|
||||
<h1>Jeux dans la catégorie : "<?php echo html_escape($category['name']); ?>"</h1>
|
||||
|
||||
<?php if (empty($games)): ?>
|
||||
<p>Aucun jeu trouvé dans cette catégorie pour le moment.</p>
|
||||
<?php else: ?>
|
||||
<ul>
|
||||
<?php foreach ($games as $game): ?>
|
||||
<li>
|
||||
<a href="<?php echo site_url('game/detail/' . $game['gameId']); ?>">
|
||||
<strong><?php echo html_escape($game['title']); ?></strong>
|
||||
</a>
|
||||
(<?php echo html_escape($game['year']); ?>)
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Jeux du genre <?php echo html_escape($genre['name']); ?></title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p><a href="<?php echo site_url('home'); ?>">← Retour à l'accueil</a></p>
|
||||
|
||||
<h1>Jeux du genre : "<?php echo html_escape($genre['name']); ?>"</h1>
|
||||
|
||||
<?php if (empty($games)): ?>
|
||||
<p>Aucun jeu trouvé pour ce genre pour le moment.</p>
|
||||
<?php else: ?>
|
||||
<ul>
|
||||
<?php foreach ($games as $game): ?>
|
||||
<li>
|
||||
<a href="<?php echo site_url('game/detail/' . $game['gameId']); ?>">
|
||||
<strong><?php echo html_escape($game['title']); ?></strong>
|
||||
</a>
|
||||
(<?php echo html_escape($game['year']); ?>)
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Univers Jeux Vidéo - Accueil</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Bienvenue sur l'application Jeux Vidéo</h1>
|
||||
|
||||
<main style="display: flex; gap: 50px;">
|
||||
<section>
|
||||
<h2>Nos Catégories</h2>
|
||||
<ul>
|
||||
<?php foreach ($categories as $category): ?>
|
||||
<li>
|
||||
<a href="<?php echo site_url('category/view/' . $category['id']); ?>">
|
||||
<?php echo html_escape($category['name']); ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Nos Genres</h2>
|
||||
<ul>
|
||||
<?php foreach ($genres as $genre): ?>
|
||||
<li>
|
||||
<a href="<?php echo site_url('genre/view/' . $genre['id']); ?>">
|
||||
<?php echo html_escape($genre['name']); ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user