forked from Kccorp/PA_2021_ESGI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGame.php
93 lines (77 loc) · 3.7 KB
/
Game.php
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?php
include "header.php";
?>
<div class="container mt-5">
<h1 class="text-center mb-5 display-4 font-weight-bold"><u>Mini-jeu : Memo</u></h1>
<div class="row">
<div class="col-8">
<div id="resultat" class="text-center">
<div>
<button class="btn btn-primary m-1" disabled style="width:100px; height:100px; border-radius: 1;" >Afficher</button>
<button class="btn btn-primary m-1" disabled style="width:100px; height:100px; border-radius: 1;" >Afficher</button>
<button class="btn btn-primary m-1" disabled style="width:100px; height:100px; border-radius: 1;" >Afficher</button>
<button class="btn btn-primary m-1" disabled style="width:100px; height:100px; border-radius: 1;" >Afficher</button>
</div>
<div>
<button class="btn btn-primary m-1" disabled style="width:100px; height:100px; border-radius: 1;" >Afficher</button>
<button class="btn btn-primary m-1" disabled style="width:100px; height:100px; border-radius: 1;" >Afficher</button>
<button class="btn btn-primary m-1" disabled style="width:100px; height:100px; border-radius: 1;" >Afficher</button>
<button class="btn btn-primary m-1" disabled style="width:100px; height:100px; border-radius: 1;" >Afficher</button>
</div>
<div>
<button class="btn btn-primary m-1" disabled style="width:100px; height:100px; border-radius: 1;" >Afficher</button>
<button class="btn btn-primary m-1" disabled style="width:100px; height:100px; border-radius: 1;" >Afficher</button>
<button class="btn btn-primary m-1" disabled style="width:100px; height:100px; border-radius: 1;" >Afficher</button>
<button class="btn btn-primary m-1" disabled style="width:100px; height:100px; border-radius: 1;" >Afficher</button>
</div>
<div>
<button class="btn btn-primary m-1" disabled style="width:100px; height:100px; border-radius: 1;" >Afficher</button>
<button class="btn btn-primary m-1" disabled style="width:100px; height:100px; border-radius: 1;" >Afficher</button>
<button class="btn btn-primary m-1" disabled style="width:100px; height:100px; border-radius: 1;" >Afficher</button>
<button class="btn btn-primary m-1" disabled style="width:100px; height:100px; border-radius: 1;" >Afficher</button>
</div>
</div>
<div id="Start" class="mt-5">
<button type="button" class="btn btn-secondary" onclick="Start()">Commencer</button>
</div>
</div>
<div class="col-4 text-center">
<h2 class="text-center font-weight-bold">
Leaderboard
</h2>
<table class="table table-dark" style="border-radius: 0px 0px 15px 15px; border-top : none;">
<thead>
<tr>
<th scope="col">Pseudo</th>
<th scope="col">Temps</th>
</tr>
</thead>
<tbody id="leaderboard">
<?php
$queryPrepared = $connection->prepare("SELECT username, time FROM ".PRE."Memo ORDER BY time LIMIT 10;");
$queryPrepared->execute();
$leader = $queryPrepared->fetchALL(PDO::FETCH_ASSOC);
foreach ($leader as $key=> $joueur) {
echo '<tr>';
echo '<th scope="row">'.$leader[$key]["username"].'</th>';
echo '<td>'.$leader[$key]["time"].'</td>';
echo '</tr>';
}
?>
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="col-6">
<div id="ici" class="form-group mt-5">
<h2>Chonomètre :</h2>
<h3 id="timer">00:00:0</h3>
</div>
</div>
</div>
</div>
<script src="CSS\bootstrap-4.6.0-dist\js\mini-jeux.js" charset="utf-8"></script>
<?php
include "footer.php";
?>