-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.php
More file actions
77 lines (39 loc) · 1.41 KB
/
test.php
File metadata and controls
77 lines (39 loc) · 1.41 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
require_once("StructLib.php");
require_once("FunctionLib.php");
$test = $_GET["id"];
@$json = file_get_contents("jeux.json");
$liste_jeux = json_decode($json, true);
$nombre_jeux = count($liste_jeux);
$liste_prix = array();
$liste_nom = array();
$liste_image = array();
$liste_date = array();
$liste_description = array();
$liste_support = array();
$supports =array();
foreach ($liste_jeux as $key => $value){
$jeux = $liste_jeux[$key];
$liste_nom[$key] = $jeux["nom"];
$liste_prix[$key] = $jeux["prix"];
$liste_image[$key] = $jeux["image"];
$liste_date[$key] = $jeux["date"];
$liste_description[$key] = $jeux["description"];
$liste_support[$key] = $jeux["support"];
foreach ($liste_support as $supkey => $supvalue) {
$supports[$supkey] = $supvalue;
}
}
echo getHead($liste_nom[$id]);
?>
<?php
echo "<h1 id=\"titre_page_jeux\">".$liste_nom[$id]."<h3>(sorti le ".$liste_date[$id]." )</h1><br><br>\n";
echo "<img src=\"images jeux/".$liste_image[$id]."\" id=\"image_page_jeux\"><br><br>\n";
echo "<h2 id=\"prix_page_jeux\">".$liste_prix[$id]."</h2><br><br>\n";
echo "<ul id=\"liste_supports_page_jeux\"><br><br>\n";
foreach ($supports[$id] as $supportkey => $supportvalue) {
echo "<li id=\"éléments_liste_supports\">".$supportvalue."</li><br>\n";
}
echo "</ul><br><br>\n";
echo "<p id\"description_page_jeux\">".$liste_description[$id];
?>