premier test
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Détails de <?php echo $game['name']; ?></title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1><?php echo $game['name']; ?></h1>
|
||||
<p><strong>Année de sortie :</strong> <?php echo $game['releaseYear']; ?></p>
|
||||
<p><strong>Prix :</strong> <?php echo $game['price']/100; ?> $</p>
|
||||
<?php if ($game['metacritic'] !== NULL): ?>
|
||||
<p><strong>Note Metacritic :</strong> <?php echo $game['metacritic']; ?>/100</p>
|
||||
<?php endif; ?>
|
||||
<p><strong>Développeur :</strong> <?php echo $game['developer_name']; ?></p>
|
||||
|
||||
<p><strong>Description du jeu :</strong><?php echo $game['shortDescription']; ?></p>
|
||||
|
||||
<p><strong>Compatibilité :</strong></p>
|
||||
<ul>
|
||||
<li>Windows : <?php echo ($game['windows']) ? 'Oui' : 'Non'; ?></li>
|
||||
<li>Linux : <?php echo ($game['linux']) ? 'Oui' : 'Non'; ?></li>
|
||||
<li>Mac : <?php echo ($game['mac']) ? 'Oui' : 'Non'; ?></li>
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
<a href="<?php echo site_url('game/index'); ?>">Retour à la liste des jeux</a>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Liste des Jeux</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Liste des jeux</h1>
|
||||
|
||||
<form method="GET" action="<?php echo site_url('game/index'); ?>">
|
||||
<input type="text" name="search" value="<?php echo $current_search; ?>" placeholder="Rechercher un jeu...">
|
||||
<button type="submit">Rechercher</button>
|
||||
<a href="<?php echo site_url('game/index'); ?>">Réinitialiser</a>
|
||||
</form>
|
||||
<br>
|
||||
<p>
|
||||
Trier par :
|
||||
<a href="<?php echo site_url('game/index?sort=name&order=ASC&search='.$current_search); ?>">Nom (A-Z)</a> |
|
||||
<a href="<?php echo site_url('game/index?sort=releaseYear&order=DESC&search='.$current_search); ?>">Année</a>
|
||||
</p>
|
||||
<p>
|
||||
<strong>Filtrer par Genre :</strong>
|
||||
<?php foreach ($genres as $genre): ?>
|
||||
<a href="<?php echo site_url('game/index?genre='.$genre['id']); ?>">
|
||||
<?php echo $genre['description']; ?>
|
||||
</a> |
|
||||
<?php endforeach; ?>
|
||||
</p>
|
||||
<p>
|
||||
<strong>Filtrer par Catégorie :</strong>
|
||||
<?php foreach ($categories as $category): ?>
|
||||
<a href="<?php echo site_url('game/index?category=' . $category['id']); ?>">
|
||||
<?php echo $category['description']; ?>
|
||||
</a> |
|
||||
<?php endforeach; ?>
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<?php foreach ($games as $game): ?>
|
||||
<li>
|
||||
<strong><a href="<?php echo site_url('game/detail/' . $game['id']); ?>"><strong><?php echo $game['name']; ?></strong></a></strong>
|
||||
(<?php echo $game['releaseYear']; ?>)
|
||||
<br>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user