-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbooking.php
More file actions
412 lines (350 loc) · 9.73 KB
/
Copy pathbooking.php
File metadata and controls
412 lines (350 loc) · 9.73 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
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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
<?php $title = "Fest Event Booking Service";
include "header.php";
?>
<style>
.contain {
text-align: center;
width: 500px;
}
.userbooking {
justify-content: center;
align-items: center;
}
.block-white {
color: rgb(255, 255, 255);
}
h1 {
text-align: center;
margin-bottom: 40px;
color: rgb(255, 255, 255);
}
h6 {
text-align: center;
margin-bottom: 40px;
color: rgb(255, 255, 255);
}
.submit {
padding: 10px 30px;
border-radius: 20px;
font-size: 20px;
background: #fff;
border: 0;
outline: none;
cursor: pointer;
}
.popup {
width: 400px;
background: #fff;
border-radius: 6px;
position: absolute;
top: 0%;
left: 50%;
transform: translate(-50%, -50%) scale(0.1);
text-align: center;
padding: 0 30px 30px;
color: #333;
transition: transform 0.4s, top 0.4s;
}
.open-popup {
visibility: visible;
top: 50%;
transform: translate(-50%, -50%) scale(1);
z-index: 2;
border: 1px solid #8b8080;
}
.popup h1 {
font-size: 38px;
font-weight: 500;
margin: 30px;
color: unset;
}
.popup button {
width: 100%;
margin-top: 50px;
padding: 10px 0;
background: #6fd649;
background: #fff;
border: 0;
outline: none;
font-size: 18px;
border-radius: 4px;
curson: pointer;
box-shadow: 0 5px 5px rgba(0, 0, 0, 0.2);
}
/* Form Modal CSS starts */
section {
display: flex;
justify-content: center;
align-items: center;
/* min-height: 100vh; */
margin: 3%;
}
section::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 50%;
height: 100%;
}
.containercont {
position: relative;
min-width: 1100px;
min-height: 550px;
display: flex;
z-index: 1;
}
.containercont .contactInfo {
position: absolute;
top: 50px;
margin-left: 0px;
width: 350px;
height: 460px;
background-color: #8c70a9;
z-index: 1;
padding: 40px;
display: flex;
justify-content: center;
flex-direction: column;
justify-content: space-between;
box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
}
.containercont .contactInfo h2 {
color: #fff;
font-size: 24px;
font-weight: 500;
}
.contactInfo ul.continfo li {
list-style: none;
}
.continfo img {
height: 30px;
}
.conttext {
color: #fff;
margin-left: 10px;
font-weight: 300;
}
.sci {
list-style: none;
margin-right: 15px;
}
.containercont .contactForm {
position: absolute;
padding: 70px 50px;
/* padding-left: 250px; */
/* margin-left: 150px; */
width: 1000px;
height: 100%;
background: #fff;
box-shadow: 0 50px 50px rgba(0, 0, 0, 0.25);
}
.containercont .contactForm h2 {
color: 0f3959;
font-size: 24px;
font-weight: 500;
}
.containercont .contactForm .formbox {
position: relative;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
padding-top: 30px;
}
.containercont .contactForm .formbox .inputbox {
position: relative;
margin-bottom: 35px;
}
.containercont .contactForm .formbox .inputbox.w50 {
width: 47%;
}
.containercont .contactForm .formbox .inputbox.w100 {
width: 100%;
}
.containercont .contactForm .formbox .inputbox input,
.containercont .contactForm .formbox .inputbox select,
.containercont .contactForm .formbox .inputbox textarea {
width: 100%;
resize: none;
padding: 5px 0;
font-size: 18px;
font-weight: 500;
color: #333;
border: none;
outline: none;
border-bottom: 1px solid #777;
border-radius: 5px;
}
.formbox .inputbox textarea {
height: 120px;
}
.formbox .inputbox span {
position: absolute;
left: 0;
padding: 5px 0;
pointer-events: none;
font-size: 18px;
font-weight: 300;
transition: 0.3s;
}
.inputbox .inputtype:focus~span,
.inputbox .inputype:valid~span,
.inputbox .inputtype:focus~span,
.inputbox .inputtype:valid~span {
transform: translateY(-20px);
font-weight: 400;
font-size: 12px;
Letter-spacing: 1px;
font-weight: 500;
}
.formbox .inputbox input[type="submit"] {
position: relative;
cursor: pointer;
background: #8c70a9;
color: #fff !important;
border: none !important;
max-width: 150px;
padding: 12px !important;
}
.formbox .inputbox input[type="submit"]:hover {
background: #bfafcf;
}
@media(max-width:1200px) {
.containercont {
width: 90%;
min-width: auto;
margin: 20px;
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}
.contactInfo {
top: 0;
height: 500px;
position: relative;
box-shadow: none;
}
.containercont .contactForm {
position: relative;
width: calc(100%-350px);
padding-left: 250px;
margin-left: 0;
padding: 40px;
height: 550px;
}
}
@media(max-width:991px) {
section {
background: #8c70a9;
}
section::before {
display: none;
}
.containercont {
display: flex;
/* flex-direction: column-reverse; */
}
.containercont .contactForm {
width: 100%;
height: auto;
}
.containercont .contactInfo {
width: 100%;
height: auto;
flex-direction: row;
}
.containercont .contactInfo .sci {
position: relative;
display: flex;
justify-content: center;
align-items: center;
}
@media(max-width:600px) {
.containercont .contactForm {
padding: 25px;
}
.containercont .contactInfo {
padding: 25px;
flex-direction: column;
align-items: flex-start;
}
.containercont .contactInfo .sci {
margin-top: 40px;
}
.containercont .contactForm .formbox .inputbox.w50 {
width: 100%;
}
}
}
/* Form Modal CSS ends */
</style>
<section>
<div class="containercont">
<div class="contactForm">
<h2>Fill Your Information</h2>
<form class="formbox" method="post" action="">
<div class="inputbox w50">
<select name="events" class="events">
<option value="Festival"> Festival Events </option>
<option value="Concert"> Concert Events </option>
<option value="Musical"> Musical Events </option>
</select>
</div>
<div class="inputbox w50">
<input type="text" name="fname" required placeholder="First Name" class="form-control"
onblur="requiredValidate(event);" required>
</div>
<div class="inputbox w50">
<input type="text" name="lname" required placeholder="Last Name" class="form-control"
onblur="requiredValidate(event);" required>
</div>
<div class="inputbox w50">
<input type="email" name="email" required placeholder="Email_id" class="form-control"
onblur="requiredValidate(event);" required>
</div>
<div class="inputbox w50">
<input type="date" name="date" class="form-control" placeholder="Book date"
onblur="requiredValidate(event)">
</div>
<div class="inputbox w100">
<input type="submit" name="submit" value="Submit">
</div>
</form>
</div>
</div>
</section>
<div class="contain">
<div class="popup" id="popup">
<img src="images/icons-done.gif" title="done" />
<h1>Thank You!</h1>
<p>Your details has been submitted sucessfully.</p>
<button type="button" onclick="closePopup();">OK</button>
</div>
<div class="popup" id="popup-error">
<img src="images/icons-error.png" title="error" />
<h1>Error</h1>
<p id="error-massage"></p>
<button type="button" onclick="closeErrorPopup();">OK</button>
</div>
</div>
<?php
if (isset($_POST['submit'])) {
$events = $_POST['events'];
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$email = $_POST['email'];
$date = $_POST['date'];
include "db.php";
$sql = "insert into bookinginfo (events,fname,lname,email,date)
values ('$events', '$fname', '$lname', '$email', '$date')";
if ($conn->query($sql) === TRUE) {
echo
"<script type='text/javascript'>
openPopup();
</script>";
} else {
echo
"<script type='text/javascript'>
openErrorPopup(`" . $conn->error . "`);
</script>";
}
}
include "footer.php" ?>