-
Notifications
You must be signed in to change notification settings - Fork 0
/
rangliste.php
60 lines (57 loc) · 1.55 KB
/
rangliste.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
<?php
session_start ();
include_once 'database/database_infos.php';
include_once 'database/Database.php';
?>
<!DOCTYPE html>
<html>
<head>
<?php include_once 'includes/head.php'; ?>
</head>
<body>
<?php include_once 'resources/form_controller.php';
include_once 'resources/navigation.php';
$result = Database::getInstance()->getRanking();
?>
<div class="container">
<div class="col-md-6">
<h1>Top 10</h1>
</div>
<div class="col-md-6">
<div id="search_container">
<form action="<?php $_SERVER['PHP_SELF']?>" method="POST">
<div class="input-group stylish-input-group">
<input type="text" class="form-control" placeholder="Search" name="search" >
<span class="input-group-addon">
<button type="submit">
<span class="glyphicon glyphicon-search"></span>
</button>
</span>
</div>
</form>
</div>
</div>
<hr>
<table class="table table-striped table-hover">
<thead>
<tr>
<th>Rank</th>
<th>Username</th>
<th>Points</th>
</thead>
<tbody>
<?php foreach($result as $row){
echo "<tr onclick=document.location='user.php?username=$row[1]'>";
foreach($row as $column){
echo "<th>" . $column . "</th>";
}
echo "</tr>";
}?>
</tbody>
</table>
</div>
</div>
<hr>
<?php include_once 'resources/footer.php';?>
</body>
</html>