-
Notifications
You must be signed in to change notification settings - Fork 0
/
new-booking.php
236 lines (206 loc) · 10.2 KB
/
new-booking.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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<?php require_once("header.php"); ?>
<br>
<br>
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12">
<h2 class="all-booking-head"><a href="index.php">Home / </a>Add Booking</h2>
</div>
</div>
</div>
<section class="new-booking-section">
<div class="container" >
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="new-booking-box">
<h3 style="margin-top: 10px; margin-left: 20px;" class="table-title">Add Booking</h3>
<form class="box" action="php-core/add_booking_core.php" method="POST" enctype="multipart/form-data">
<div class="inputBox" style="margin-right: 15px;">
<input type="text" name="fName" required value="">
<label>First Name*</label>
</div>
<div class="inputBox" style="margin-right: 15px;">
<input type="text" name="lName" required value="">
<label>Last Name*</label>
</div>
<div class="inputBox" style="margin-right: 15px;">
<input type="email" name="email" required value="">
<label>Email*</label>
</div>
<div class="inputBox">
<select name="gender">
<option value="0" class="d-none"></option>
<option value="Male" onclick="document.querySelector('.gernder_field').style.display='none'">Male</option>
<option onclick="document.querySelector('.gernder_field').style.display='none'" value="Female">Female</option>
<option onclick="document.querySelector('.gernder_field').style.display='none'" value="Other">Other</option>
</select>
<label class="gernder_field" style="top: 0;">Gender*</label>
</div>
<div class="inputBox" style="margin-right: 15px;">
<input type="text" name="phone_number" onkeyup="this.setAttribute('value', this.value);" required value="">
<label>Phone Number*</label>
</div>
<div class="inputBox">
<input type="text" name="city" required value="">
<label>City*</label>
</div>
<div class="inputBox" style="margin-right: 15px;">
<input id="datepicker" name="arrived_date" style="height: 47px;" onclick="document.querySelector('.arrived_date_label').style.display='none';" value="">
<i onclick="document.querySelector('.form-control').focus();" class="fas fa-calendar-alt arrived_date_icon"></i>
<label class="arrived_date_label">Arrived Date</label>
</div>
<div class="inputBox" style="margin-right: 15px;">
<input id="datepicker" class="datePicker" name="depert_date" style="height: 47px;" onclick="document.querySelector('.depeart_date_label').style.display='none';" value="">
<i onclick="document.querySelector('.datePicker').focus();" class="fas fa-calendar-alt arrived_date_icon"></i>
<label class="depeart_date_label">Depart Date</label>
</div>
<div class="inputBox" style="margin-right: 15px;">
<input class="total-person" type="number" name="t_p_n" required onkeyup="this.setAttribute('value', this.value);" value="">
<label>Total Person*</label>
</div>
<div class="inputBox">
<select name="room_type" style="padding: 12px 0px;">
<option value="0" class="d-none"></option>
<?php
require_once("config/configer.php");
$shoDataQuery = "SELECT * FROM room";
$runDataQuery = mysqli_query($connect,$shoDataQuery);
if ($runDataQuery==true) {
while ($db_data = mysqli_fetch_array($runDataQuery)) {
$roomName = $db_data["roomName"];
$totalRoom = $db_data["haveRoom"];
?>
<option value="<?php echo $roomName; ?>" onclick="document.querySelector('.room_field').style.display='none'"><?php echo $roomName; ?></option>
<?php
}
}
?>
</select>
<label class="room_field" style="top: 0;">Room Type*</label>
</div>
<div class="inputBox" style="width: 100%">
<textarea name="address"onkeyup="this.setAttribute('value', this.value);" value=""></textarea>
<label>Address*</label>
</div>
<div class="inputBox avater_img_target_box" style="margin-right: 15px;">
</div>
<div class="inputBox avater_img_target_box" style="margin-right: 15px;">
</div>
<div class="inputBox avater_img_target_box" style="margin-right: 15px;">
</div>
<div class="inputBox avater_img_target_box">
</div>
<div class="target_nid_field">
<div class="inputBox nid_img_target_box" style="margin-right: 15px;">
</div>
<div class="inputBox nid_img_target_box" style="height: 100px; margin-bottom: 30px">
</div>
</div>
<div class="target_nid_field">
<div class="inputBox nid_img_target_box" style="margin-right: 15px;">
</div>
<div class="inputBox nid_img_target_box" style="height: 100px; margin-bottom: 30px">
</div>
</div>
<div class="target_nid_field">
<div class="inputBox nid_img_target_box" style="margin-right: 15px;">
</div>
<div class="inputBox nid_img_target_box" style="height: 100px; margin-bottom: 30px">
</div>
</div>
<div class="target_nid_field">
<div class="inputBox nid_img_target_box" style="margin-right: 15px;">
</div>
<div class="inputBox nid_img_target_box" style="height: 100px; margin-bottom: 30px">
</div>
</div>
<div class="inputBox">
<select name="paid_unpaid" style="padding: 12px 0px;" required="">
<option value="0" class="d-none"></option>
<option value="Paid" onclick="document.querySelector('.gernder_field2').style.display='none';">Paid</option>
<option onclick="document.querySelector('.gernder_field2').style.display='none';" value="Unpaid" >Unpaid</option>
</select>
<label class="gernder_field2" style="top: 0;">Paid or Unpaid*</label>
</div><br><br>
<input type="text" hidden="" name="O_k_T_k_a_c" >
<input class="n_booking_s_btn" type="SUBMIT" value="Submit">
</form>
</div>
</div>
</div>
</div>
<!-- submite succes code e90600b9e58032d4e84a55d6facaedf0 -->
</section>
<?php
if (isset($_REQUEST["e90600b9e58032d4e84a55d6facaedf0"])) {
?>
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12">
<div style="display: block;background: #3333337a;" class="modal modal2" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Congratulation!</h5>
<a href="new-booking.php?trueNewBooking">
<button type="button" class="close de-colose" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button></a>
</div>
<div class="modal-body">
<p style="color: green;">Data Succesfully Submited</p>
<p>Prease ok button to continue...</p>
</div>
<div class="modal-footer">
<?php if (isset($_REQUEST["pdfname"])) {
$name_pdf = $_REQUEST["pdfname"];
?>
<a href="php-core/pdfcreat.php?newBooking&token=<?php echo $name_pdf; ?>" ><button type="button" class="btn btn-primary" >Download Pdf</button></a>
<?php
} ?>
<a href="new-booking.php?trueNewBooking">
<button type="button" class="btn btn-secondary de-colose" data-dismiss="modal">Close</button>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
}elseif (isset($_REQUEST["da94b62094880691bb01371e16fd36e3"])) {
?>
<!-- da94b62094880691bb01371e16fd36e3 -->
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12">
<div style="display: block;background: #3333337a;" class="modal modal2" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Opps!</h5>
<button type="button" class="close de-colose" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p style="color: red;">Data is not Submited</p>
<p>Prease ok or close button to continue...</p>
</div>
<div class="modal-footer">
<a href="new-booking.php?trueNewBooking">
<button type="button" class="btn btn-primary ">Ok</button>
</a>
<a href="new-booking.php?trueNewBooking">
<button type="button" class="btn btn-secondary de-colose" data-dismiss="modal">Close</button>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php } ?>
<?php require_once("footer.php"); ?>