-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhostel.php
More file actions
70 lines (65 loc) · 2.77 KB
/
Copy pathhostel.php
File metadata and controls
70 lines (65 loc) · 2.77 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
65
66
67
68
69
70
<?php include 'includes/config.php'; ?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Hostel Tracker</title>
<?php include 'includes/links.php'; ?>
</head>
<body>
<?php include 'includes/header.php'; ?>
<div class="admin-form">
<?php
if (isset($_GET['id'])) {
?>
<h1>Hostel Details!</h1>
<div>
<?php
$id=$_GET['id'];
$query = "SELECT * FROM hostels where id='".$id."'";
$result = $db->query($query);
if (!empty($result)) {
while ($item = mysqli_fetch_assoc($result)) {
?>
<ul>
<li>Hostel: <?php echo $item['hostel_name'] ?></li>
<li>Type: <?php echo $item['hostel_type'] ?></li>
<li>City: <?php echo $item['hostel_city'] ?></li>
<li>Sector: <?php echo $item['hostel_sector'] ?></li>
<li>Address: <?php echo $item['hostel_address'] ?></li>
<input type="hidden" id="pb" name="status" value="<?php echo $item['id'] ?>">
</ul>
<?php
}
}
?>
</div>
<div id="packages">
<?php include 'view_packages.php' ?>
</div>
<div id="features">
<?php include 'view_features.php' ?>
</div>
<div id="gallery">
<?php include 'view_gallery.php' ?>
</div>
<?php
}
else
{
?><p>Not Logged In!</p><?php
}
?>
</div>
<?php include 'includes/footer.php' ?>
</body>
</html>
<script>
$(document).ready(function(){
$('#packages').load('view_packages.php','status='+$('input[name=status]').val()+'&mod=view');
$('#packages').html("<img src='graphics/loading.gif' alt='Loading Packages...'>");
$('#features').load('view_features.php','status1='+$('input[name=status]').val()+'&mod=view');
$('#features').html("<img src='graphics/loading.gif' alt='Loading Packages...'>");
$('#gallery').load('view_gallery.php','status2='+$('input[name=status]').val()+'&mod=view');
$('#gallery').html("<img src='graphics/loading.gif' alt='Loading Pictures...'>");
});
</script>