-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuserlist.php
More file actions
64 lines (63 loc) · 1.53 KB
/
Copy pathuserlist.php
File metadata and controls
64 lines (63 loc) · 1.53 KB
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
include_once('components/config.php');
if(!($_SESSION['role'] == 'admin'))
{
header('Location: logout.php');
}
include('components/sidebar.php');
$result = $user->getUsers();
?>
<script>
document.getElementById('userlist.php').setAttribute("class", "current-page");
</script>
<!-- page content -->
<div class="right_col" role="main">
<div class="">
<div class="page-title">
<div class="title_left">
<h3>User Management</h3>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2>View Users</h2>
<div class="clearfix"></div>
</div>
<div class="x_content">
<table id="datatable" class="table table-striped table-bordered">
<thead>
<tr>
<th>Username</th>
<th>Role</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php
foreach($result as $row) {
echo '<tr>';
echo "<td>".htmlentities($row['username']) ."</td>";
echo "<td>".htmlentities($row['role']) ."</td>";
echo "<td>".htmlentities($row['status']) ."</td>";
echo "<td><a href=\"edituser.php?id=".htmlentities($row['user_ID'])."\" class=\"btn btn-info btn-xs\"><i class='fa fa-edit'></i>Edit</a></td>";
echo '</tr>';
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->
<?php
include 'components/footer.php';
include 'components/datatables.php';
include 'components/closing.php';
?>