-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcollection.php
More file actions
55 lines (48 loc) · 1.5 KB
/
Copy pathcollection.php
File metadata and controls
55 lines (48 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
require "connect.php";
$sql = "SELECT * FROM gamemerch WHERE game = ? AND voorraad > 0;";
$items = $pdo->prepare($sql);
$items->execute([$_GET["game"]]);
$sql = "SELECT game FROM gamemerch GROUP BY game;";
$games = $pdo->query($sql)->fetchAll();
?>
<!-- TODO: easter egg -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?= $_GET["game"] ?></title>
<link rel="stylesheet" href="style.css">
<script src="script.js" defer></script>
<style>
#collection {
padding: 14px 16px;
background-color: #00695C;
}
#<?= $_GET["game"] ?> {
padding: 14px 16px;
background-color: #00695C;
color: white;
}
</style>
</head>
<body>
<?php require "nav.php" ?>
<h1 class="mgl"><?= $_GET["game"] ?></h1>
<div class="collectiondiv">
<?php foreach ($items as $item) : ?>
<a href="detail.php?id=<?= $item["id"] ?>">
<div class="item shadow">
<div>
<h3 class="mg"><?= $item["naam"] ?></h3>
<img src="media/itemimg/<?= $item["foto"] ?>" class="itemimg" alt="<?= $item["foto"] ?>">
</div>
<p class="gotobottom">Ga naar item ></p>
</div>
</a>
<?php endforeach; ?>
</div>
</body>
</html>