-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlist-of-reservations.php
More file actions
79 lines (66 loc) · 2.89 KB
/
list-of-reservations.php
File metadata and controls
79 lines (66 loc) · 2.89 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
71
72
73
74
75
76
77
78
79
<?php
include_once("header.php");
include_once("navigation.php");
include_once("adminsidebar.php");
include_once("connection.php");
echo '<div id="page-content-wrapper">';
echo '<div data-aos="flip-up">';
?>
<div id="reservationDiv">
<h2><span id="eventTitle">Pending Reservation</span> <small align="right"><button class="btn btn-success" onclick="displayPending()">Pending</button> <button class="btn btn-primary" onclick="displayUpcoming()">Upcoming</button>
<button class="btn btn-primary" onclick="displayCompleted()">Completed</button> <button class="btn btn-primary" onclick="displayDissaproved()">Disapproved</button> <button class="btn btn-primary" onclick="displayCancel()">Cancelled</button> <button class="btn btn-primary" onclick="displayAll()">All</button></small></h2>
<hr/>
<?php
echo '<table class="table table-hover table-striped">
<tr>
<th>Event Type</th>
<th>Event Name</th>
<th>Client Name</th>
<th>Date (y/m/d)</th>
<th>Details</th>
<th>Approve</th>
<th>Dissaprove</th>
</tr>';
$sql = "SELECT * FROM reservation WHERE STATUS = 'PENDING'";
$result = mysqli_query($conn,$sql);
while ($row = mysqli_fetch_array($result)) {
echo '<tr>
<td>'.$row["PACKAGETYPE"].'</td>
<td>'.$row["ENAME"].'</td>
<td>'.$row["CNAME"].'</td>
<td>'.$row["EDATE"].'</td>
<td><a href="reservation-event-details.php?id='.$row["ID"].'"class="btn btn-info btn-sm">View Details</a></td>
<td><a href="updateDetails.php?approve='.$row["ID"].'&cname='.$row["CNAME"].'" class="btn btn-success btn-sm"><i class="fa fa-thumbs-o-up"></i> approve</a></td>
<td><button data-toggle="modal" data-target="#disapproveReason" class="btn btn-danger btn-sm" value="'.$row["ID"].'*'.$row["CNAME"].'" onclick="getDataModal(this.value)"><i class="fa fa-thumbs-o-down"></i> disapprove</button></td>
</tr>';
}
echo '</table>';
?>
</div></div>
<!-- Modal -->
<div id="disapproveReason" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title"><b>Tell customer why</b></h4>
</div>
<div class="modal-body">
<div id="mbody">
<b>Tell the customer the reason for dissaproval of the reservation</b><br/><br/>
<textarea rows="5" id="remarks" class="form-control" placeholder="eg: personal appointments, weather conflict (make it as professional as you can)"></textarea>
</div>
</div>
<div class="modal-footer">
<div id="mfoot">
<button type="button" class="btn btn-danger" onclick="submitRemarks()">Submit & Disapprove Reservation</button>
</div>
</div>
</div>
</div>
</div>
<input type="text" id="dataToGet" style="display: none">
<?php
include_once('footeradmin.php');
?>