-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdashboard-view-listings.php
64 lines (56 loc) · 2.05 KB
/
dashboard-view-listings.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
<?php
session_start();
// Check visitor is logged in. If not redirect to login page
if (!$_SESSION['logged_in']) {
header('location: dashboard-login');
}
$title = "View Listings";
$metaD = "Admin dashboard page, view listings";
include 'includes/dashboard-header.php';
include 'includes/dashboard-sidebar.php';
include 'processes/process-populate-view-listings.php';
?>
<h1>View Listing</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['serverDelError'])) { echo $_SESSION['serverDelError']; unset($_SESSION['serverDelError']); }; ?></div>
<div><?php if (isset($_SESSION['imgDelError'])) { echo $_SESSION['imgDelError']; unset($_SESSION['imgDelError']); }; ?></div>
<div><?php if (isset($_SESSION['listDelError'])) { echo $_SESSION['listDelError']; unset($_SESSION['listDelError']); }; ?></div>
<table class='table table-striped table-responsive view-listings'>
<thead class='view-listings-head'>
<tr>
<th>Featured Image</th>
<th>Listing No.</th>
<th>Agent</th>
<th>Listing Title</th>
<th>Address</th>
<th>City</th>
<th>Type</th>
<th>Price</th>
<th>Sell Method</th>
<th>Bedrooms</th>
<th>Bathrooms</th>
<th>Lounges</th>
<th>Garages</th>
<th>House Size</th>
<th>Land Size</th>
<th>Featured Listing</th>
</tr>
</thead>
<tbody>
<?php echo $populate_view_listings ?>
</tbody>
</table>
<script language="javascript">
// Confirm delete alert
function deletelisting(dellisting) {
if (confirm("Are you sure you want to delete this listing?")) {
window.location.href='processes/process-delete-listing.php?del_listing=' +dellisting+'';
return true;
}
}
</script>
<?php
include 'includes/dashboard-footer.php';
?>