-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadminDashboard.php
More file actions
61 lines (61 loc) · 1.95 KB
/
Copy pathadminDashboard.php
File metadata and controls
61 lines (61 loc) · 1.95 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
<?php include 'includes/config.php';
if(!(isset($_SESSION['email'])&&$_SESSION['role']=="admin"))
{
header('Location: login.php');
}
if (isset($_GET['delete'])) {
$id = $_GET['id'];
$status = 'activated';
$delete_sql="Delete from contact where id='".$id."'";
$db->query($delete_sql);
header('Location: admindashboard.php');
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Hostel Hub</title>
<?php include 'includes/links.php'; ?>
</head>
<body>
<?php include("includes/header.php")?>
<!-- Main Content -->
<main>
<section class="dashboard">
<nav>
<section class="options">
<p>Dashboard</p>
<ul>
<li id="hh">Hostels</li>
<li id="ho">Hostels Owners</li>
<li id="uq">Users Queries
</li>
<li><a href="alogout.php">Logout</a></li>
</ul>
</section>
</nav>
</section>
</main>
<br><br><br><br><br>
<div id="content">
<?php include 'view_all_hostels.php'; ?>
</div>
<?php include 'includes/footer.php'; ?>
<script>
$(document).ready(function () {
$('#hh').click(function () {
$('#content').load('view_all_hostels.php', 'status=view');
$('#content').html("<img src='graphics/loading.gif' alt='Loading Packages...'>");
});
$('#ho').click(function () {
$('#content').load('view_all_housers.php', 'status=view');
$('#content').html("<img src='graphics/loading.gif' alt='Loading Packages...'>");
});
$('#uq').click(function () {
$('#content').load('show_contacts_msg.php', 'status=view');
$('#content').html("<img src='graphics/loading.gif' alt='Loading Packages...'>");
});
});
</script>
</body>
</html>