-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmembers.php
64 lines (54 loc) · 2 KB
/
members.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
<?php
require 'inc/app.php';
App::needAdmin($auth);
if (isset($_POST['delete'])){
Users::delete($_POST['delete'], $db);
}
$members = Users::getAll($db);
require 'inc/header.php';
?>
<div class="page-content">
<div class="table">
<h2>Membres</h2>
<table>
<thead>
<tr>
<th>Login</th>
<th>Nom</th>
<th>Prénom</th>
<th>Email</th>
<th>Type</th>
<th></th>
</tr>
</thead>
<tbody>
<?php
foreach ($members as $membre) {
?>
<tr>
<td><?= $membre->username ?></td>
<td><?= $membre->name ?></td>
<td><?= $membre->surname ?></td>
<td><a href="mailto:<?= $membre->email ?>"><?= $membre->email ?></a></td>
<td><?= Users::getRole($membre->id, $db) ?></td>
<td class="button-col">
<form action="configUser.php" method="get">
<button type="submit" class="button-rounded button-std" name="userId"
value="<?= $membre->id ?>"><i
class="fa fa-pencil fa-lg" aria-hidden="true"></i></button>
<button type="submit" class="button-rounded button-abort" name="delete" formaction=""
formmethod="post" value="<?= $membre->id ?>"><i
class="fa fa-trash fa-lg" aria-hidden="true"></i></button>
</form>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
<?php
require 'inc/footer.php';
?>