forked from Anderson-Juhasc/bitcoin-point-of-sale
-
Notifications
You must be signed in to change notification settings - Fork 0
/
users.php
65 lines (59 loc) · 2.04 KB
/
users.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
<?php include 'partials/header.php'; ?>
<?php
if ($_SESSION['auth'] != 1 && $_SESSION['user_type'] == 'admin') {
unset($_SESSION['auth']);
header('Location: index.php');
exit();
}
$db = new Db();
$users = $db->query("SELECT * FROM users ORDER BY user_id DESC");
?>
<!-- .wrapper -->
<div class="wrapper">
<!-- .page -->
<div class="page">
<!-- .page__head -->
<header class="page__head">
<h2 class="page__title">Users</h2>
<!-- .page__nav -->
<ul class="page__nav">
<li>
<a class="btn btn--secondary" href="users-create.php">+ New user</a>
</li>
</ul>
<!-- /.page__nav -->
</header>
<!-- /.page__head -->
<!-- .page__body -->
<div class="page__body">
<table class="table">
<thead>
<tr>
<th>ID</th>
<th>Data</th>
<th>Username</th>
<th>Permission</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php foreach ($users as $key) : ?>
<tr>
<td><?php echo $key["user_id"]; ?></td>
<td></td>
<td><?php echo $key["user_name"]; ?></td>
<td><?php echo $key["user_type"]; ?></td>
<td>
<a href="">Delete</a>
</td>
</tr>
<?php endForeach; ?>
</tbody>
</table>
</div>
<!-- /.page__body -->
</div>
<!-- /.page -->
</div>
<!-- /.wrapper -->
<?php include 'partials/footer.php'; ?>