-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdashboard-view-agents.php
51 lines (46 loc) · 1.63 KB
/
dashboard-view-agents.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
<?php
session_start();
// Check visitor is logged in. If not redirect to login page
if (!$_SESSION['logged_in']) {
header('location: dashboard-login');
}
$title = "View Agents";
$metaD = "Admin dashboard page, view agents";
include 'includes/dashboard-header.php';
include 'includes/dashboard-sidebar.php';
include 'processes/process-populate-view-agents.php';
?>
<h1>View Agents</h1>
<!-- error/success messages -->
<div><?php if (isset($_SESSION['successMessage'])) { echo $_SESSION['successMessage']; unset($_SESSION['successMessage']); }; ?></div>
<div><?php if (isset($_SESSION['errorMessage'])) { echo $_SESSION['errorMessage']; unset($_SESSION['errorMessage']); }; ?></div>
<div><?php if (isset($_SESSION['agentDelError'])) { echo $_SESSION['agentDelError']; unset($_SESSION['agentDelError']); }; ?></div>
<div><?php if (isset($_SESSION['serverDelError'])) { echo $_SESSION['serverDelError']; unset($_SESSION['serverDelError']); }; ?></div>
<table class='table table-striped table-responsive view-agents'>
<thead class='agents-head'>
<tr>
<th>Agent Image</th>
<th>Agent ID</th>
<th>Name</th>
<th>Email</th>
<th>Phone</th>
<th>Profile</th>
<th>Area</th>
</tr>
</thead>
<tbody>
<?php echo $populate_view_agents ?>
</tbody>
</table>
<script language="javascript">
// Confirm delete alert
function deleteAgent(delagent) {
if (confirm("Are you sure you want to delete this Agent?")) {
window.location.href='processes/process-delete-agent.php?del_agent=' +delagent+'';
return true;
}
}
</script>
<?php
include 'includes/dashboard-footer.php';
?>