-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdepartment-list.php
42 lines (42 loc) · 1.61 KB
/
department-list.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
<?php include('partials/header.php');
restrict_access();
$all_users = User::find_all_users();
?>
<div class="row">
<div class="medium-12 columns">
<h3>Departments</h3>
<?php if( is_admin() ) : ?>
<div class="table-functions">
<a class="button success" href="#">Add User</a>
</div>
<?php endif; ?>
<table class="hover stack" id="users-table">
<thead>
<th>Username</th>
<th>Name</th>
<th>Email</th>
<th>Role</th>
</thead>
<tbody>
<?php foreach( $all_users as $account ) : ?>
<tr>
<td valign="top">
<?php echo $account['username']; ?>
<br><a href="user-profile?user=<?php echo $account['id']; ?>">Edit User</a>
</td>
<td valign="top"><?php echo "{$account['first_name']} {$account['last_name']}"; ?></td>
<td valign="top"><?php echo $account['email']; ?></td>
<td valign="top">
<?php if( $account['access_level'] == 1 ) {
echo 'Admin';
} else {
echo 'Employee';
} ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
<?php include('partials/footer.php'); ?>