corrections de toute les vue et maj du journal
This commit is contained in:
@@ -3,62 +3,59 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Détails du jeu - <?= html_escape($game['name']) ?></title>
|
||||
<style>
|
||||
.game-detail { display: flex; gap: 20px; margin-top: 20px; }
|
||||
.game-info { max-width: 600px; }
|
||||
.poster { max-width: 300px; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<a href="<?= site_url('home') ?>">⬅ Retour à l'accueil</a>
|
||||
<p>
|
||||
<a href="<?= site_url('home') ?>">⬅ Retour à l'accueil</a>
|
||||
</p>
|
||||
|
||||
<div class="game-detail">
|
||||
<div>
|
||||
<?php if (!empty($game['poster_url'])): ?>
|
||||
<img src="<?= base_url('assets/uploads/' . html_escape($game['poster_url'])) ?>" alt="Poster de <?= html_escape($game['name']) ?>" class="poster">
|
||||
<div>
|
||||
<?php if (!empty($game['poster_url'])): ?>
|
||||
<img src="data:image/jpeg;base64,<?= base64_encode($game['poster_url']) ?>" alt="Poster de <?= html_escape($game['name']) ?>">
|
||||
<?php else: ?>
|
||||
<p>Aucun poster disponible pour ce jeu.</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h1><?= html_escape($game['name']) ?> (<?= html_escape($game['releaseYear']) ?>)</h1>
|
||||
|
||||
<p><strong>Développeur :</strong> <?= !empty($game['developer_name']) ? html_escape($game['developer_name']) : 'Inconnu' ?></p>
|
||||
|
||||
<p><strong>Prix :</strong> <?= !empty($game['price']) ? html_escape($game['price']) . ' €' : 'Gratuit / Non renseigné' ?></p>
|
||||
|
||||
<h3>Description :</h3>
|
||||
<p><?= nl2br(html_escape($game['shortDescription'])) ?></p>
|
||||
|
||||
<h3>Catégories associées :</h3>
|
||||
<ul>
|
||||
<?php if (!empty($categories)): ?>
|
||||
<?php foreach ($categories as $cat): ?>
|
||||
<li>
|
||||
<a href="<?= site_url('category/view/' . $cat['id']) ?>">
|
||||
<?= html_escape($cat['description']) ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<div class="poster" style="background:#eee; padding:50px; text-align:center;">
|
||||
Aucun poster disponible
|
||||
</div>
|
||||
<li><em>Aucune catégorie pour ce jeu.</em></li>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
<div class="game-info">
|
||||
<h1><?= html_escape($game['name']) ?> (<?= html_escape($game['releaseYear']) ?>)</h1>
|
||||
|
||||
<p><strong>Développeur :</strong> <?= !empty($game['developer_name']) ? html_escape($game['developer_name']) : 'Inconnu' ?></p>
|
||||
|
||||
<p><strong>Prix :</strong> <?= !empty($game['price']) ? html_escape($game['price']) . ' €' : 'Non renseigné' ?></p>
|
||||
|
||||
<h3>Description :</h3>
|
||||
<p><?= nl2br(html_escape($game['shortDescription'])) ?></p>
|
||||
|
||||
<h3>Catégories associées :</h3>
|
||||
<p>
|
||||
<?php if (!empty($categories)): ?>
|
||||
<?php foreach ($categories as $cat): ?>
|
||||
<a href="<?= site_url('category/view/' . $cat['categoryId']) ?>" style="margin-right: 10px; background: #e0e0e0; padding: 5px 10px; border-radius: 3px; text-decoration: none; color: #333;">
|
||||
<?= html_escape($cat['name']) ?>
|
||||
<h3>Genres associés :</h3>
|
||||
<ul>
|
||||
<?php if (!empty($genres)): ?>
|
||||
<?php foreach ($genres as $gen): ?>
|
||||
<li>
|
||||
<a href="<?= site_url('genre/view/' . $gen['id']) ?>">
|
||||
<?= html_escape($gen['description']) ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
Aucune catégorie pour ce jeu.
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
|
||||
<h3>Genres associés :</h3>
|
||||
<p>
|
||||
<?php if (!empty($genres)): ?>
|
||||
<?php foreach ($genres as $gen): ?>
|
||||
<a href="<?= site_url('genre/view/' . $gen['genreId']) ?>" style="margin-right: 10px; background: #d0e0fc; padding: 5px 10px; border-radius: 3px; text-decoration: none; color: #1a4ba8;">
|
||||
<?= html_escape($gen['name']) ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
Aucun genre pour ce jeu.
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
|
||||
</div> </div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<li><em>Aucun genre pour ce jeu.</em></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user