-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathreservation_form1.php
137 lines (124 loc) · 5.67 KB
/
reservation_form1.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?php
session_start();
require_once 'cnntdb.php';
connect();
?>
<!DOCTYPE html>
<html>
<head>
<title>Template</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="dist/css/bootstrap.min.css">
</head>
<body>
<!--Navigation Bar-->
<nav class = "navbar navbar-default">
<div class = "container-fluid">
<div class = "navbar-header">
<a class = "navbar-brand" href="index.php">RmBkingSys</a>
</div>
<div>
<ul class = "nav navbar-nav">
<li><a href = "index.php">Home</a></li>
<li class = "active"><a href = "#">Reservation</a></li>
<li><a href = "brwsrm.php">Room Availability</a></li>
<li><a href = "upmingents.php">Upcoming Events</a></li>
<li><a href = "index.php#cntctus">Contact</a></li>
<li><a href = "index.php#faq">FAQ</a></li>
<li><a href = "index.php#about">About Us</a></li>
</ul>
<ul class = "nav navbar-nav navbar-right">
<?php
if (!isset( $_COOKIE['root_user'] )) {
echo "<li>"
."<a href = \"root_user/rtloginform.php\">Admin Login</a></li>";
}
else echo "<li class=\"dropdown\">"
."<a class=\"dropdown-toggle\" data-toggle=\"dropdown\" href=\"#\">Admin <span class=\"caret\"></span></a>"
."<ul class=\"dropdown-menu\">"
."<li><a href=\"root_user/adrm.php\">Add Room</a></li>"
."<li><a href=\"root_user/delrm.php\">Delete Room</a></li>"
."<li><a href=\"root_user/rmresvion.php\">Cancel Reservation</a></li>"
."<li><a href = \"root_user/rmuser.php\">Remove User</a></li>"
."<li><a href=\"root_user/rtlogout.php\">Log Out</a></li>"
."</ul>"
."</li>";
?>
<?php
if (!isset( $_COOKIE['user'] )) {
echo "<li>"
."<a href = \"loginform.php\">Login</a></li>";
}
else echo "<li class=\"dropdown\">"
."<a class=\"dropdown-toggle\" data-toggle=\"dropdown\" href=\"#\">My Account <span class=\"caret\"></span></a>"
."<ul class=\"dropdown-menu\">"
."<li><a href=\"My_Account/shwple.php\">Show Profile</a></li>"
."<li><a href=\"My_Account/edit.php\">Edit</a></li>"
."<li><a href=\"My_Account/bkinghtry.php\">Booking History</a></li>"
."<li><a href=\"My_Account/logout.php\">Log Out</a></li>"
."</ul>"
."</li>";
?>
</ul>
</div>
</div>
</nav>
<!--Page Content-->
<!--div class = "container">
<table class="table table-hover">
<thead>
<tr>
<th>#</th>
</tr>
</thead>
<tbody>
<tr>
<td>#</td>
</tr>
</tbody>
</table>
</div-->
<div class = "container">
<form role = "form" name = "Form1" onsubmit="return validateForm()" method = "post" action = 'reservation_form2.php' >
<div class = "form-group">
<label>Room Type:</label>
<select name="room_type" class = "form-control">
<?php
$sql = "SELECT DISTINCT Rtype FROM Room";
$result = $conn->query($sql);
while ( $row = $result->fetch_assoc() ) {
echo "<option>".$row["Rtype"]."</option>";
}
?>
</select>
</div>
<div class = "form-group">
<label>Room Capacity:</label>
<select name="room_capacity" class = "form-control">
<?php
$sql = "SELECT DISTINCT Rcapacity FROM Room";
$result = $conn->query($sql);
while ( $row = $result->fetch_assoc() ) {
echo "<option>".$row["Rcapacity"]."</option>";
}
?>
</select>
</div>
<div class = "form-group">
<label>From Date:</label>
<input type ="date" name = "f_date" placeholder="yyyy-mm-dd" class = "form-control" required/>
</div>
<div class = "form-group">
<label>To Date:</label>
<input type ="date" name = "t_date" placeholder="yyyy-mm-dd" class = "form-control" required/>
</div>
<input type="submit" name="proceed" class = "btn btn-default" value="Proceed"/>
<a href="index.php" class = "btn btn-default" >Cancel</a>
</form>
</div>
<!--JavaScript Files-->
<script src="dist/js/jquery.min.js"></script>
<script src="dist/js/bootstrap.min.js"></script>
</body>
</html>