-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
54 lines (49 loc) · 952 Bytes
/
index.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
<?
ini_set('error_reporting','On');
error_reporting(E_ALL);
include('User.class.php');
$User = new User();
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<?
$users = $User->getUsers();
if (count($users) > 0) { ?>
<table border=1>
<tr>
<th>Id</th>
<th>Name</th>
<th>XP</th>
<th>Level</th>
<th>Level name</th>
<th></th>
</tr>
<?
foreach($users as $user) { ?>
<tr>
<td><?=$user['id']?></td>
<td><?=$user['name']?>
<td><?=$user['xp']?>
<td><?=$user['lvl']?>
<td><?=$user['lvl_name']?>
<td>
<a href="delete_dude.php?id=<?=$user['id']?>">usuń</a>
<a href="add_xp.php?id=<?=$user['id']?>">dodaj xp</a>
<a href="edit_dude.php?id=<?=$user['id']?>">zmień nick</a>
<a href="records.php?id=<?=$user['id']?>">historia</a>
</td>
</tr>
<?
}
?>
</table>
<?
} else { ?>
Nie ma żadnych levelowców w bazie
<? } ?>
<a href="add_dude.php">Dodaj nowego levelowca</a>
</body>
</html>