-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.php
416 lines (358 loc) · 13.7 KB
/
contact.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
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
413
414
415
416
<?php
session_start();
// if (!isset($_SESSION['username'])) {
// $_SESSION['msg'] = "You must log in first";
// header('location: login.php');
// }
if (isset($_GET['logout'])) {
session_destroy();
unset($_SESSION['username']);
header("location: login.php");
}
$login=$_SESSION['loggin'];
?>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/stylecontact.css">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<style>
.navigations{
background-color: rgb(209 20 80);
}
* {
margin: 0;
padding: 0;
}
body {
font-size: 14px;
background-color: black;
color: black;
}
h1 {
color: black;
}
.container {
width: 80%;
margin: 50px auto;
color: black;
}
.contact-box {
background: rgb(87, 73, 73);
display: flex;
}
.contact-left {
background: #ccc;
color: black;
flex-basis: 60%;
padding: 40px 60px;
}
.contact-right {
flex-basis: 40%;
padding: 40px;
background: rgb(209 20 80);
color: #fff;
}
h1 {
margin-bottom: 10px;
}
.container p {
margin-bottom: 40px;
}
.input-row {
display: flex;
justify-content: space-between;
margin-bottom: 20px;
}
.input-row .input-group {
flex-basis: 45%;
}
input {
width: 100%;
border: none;
border-bottom: 1px solid #ccc;
outline: none;
padding: 5px;
}
textarea {
width: 100%;
border: 1px solid #ccc;
outline: none;
padding: 5px;
}
label {
margin-bottom: 6px;
display: block;
color: black;
}
button {
background: #03000c;
width: 100px;
border: none;
outline: none;
color: #fff;
height: 35px;
border-radius: 30px;
margin-top: 20px;
box-shadow: 0px 5px 15px 0px rgba(28, 0, 181, 0.3);
}
.contact-left h3 {
color: black;
font-weight: 600;
margin-bottom: 30px;
width: 50%;
}
.navigations {
background-color: rgb(209 20 80);
}
.contact-right h3 {
font-weight: 600;
margin-bottom: 30px;
width: 50%;
}
tr td:first-child {
padding-right: 20px;
}
td {
padding-top: 10px;
}
.footer {
background: black;
height: 30px;
}
body {
background-color: rgb(202, 212, 224);
}
.fa-facebook {
background: #3B5998;
color: white;
}
/* Twitter */
.fa-twitter {
background: #55ACEE;
color: white;
}
.fa-instagram {
background: #ee55e1;
color: white;
}
.fa {
padding: 20px;
font-size: 30px;
width: 50px;
text-align: center;
text-decoration: none;
}
/* Add a hover effect if you want */
.fa:hover {
opacity: 0.7;
}
</style>
<title>HOSTEL WORLD</title>
</head>
<body>
<!-- navigation bar -->
<nav class="navbar fixed-top navbar-expand-lg navbar-dark navigations">
<div class="container-fluid">
<a class="navbar-brand" href="/project/index.php">HOSTEL WORLD</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" aria-current="page" href="/project/index.php">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" aria-current="page" href="/project/hostels.php">Hostels</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/project/myhostels.php">My Profile</a>
</li>
<li class="nav-item">
<a class="nav-link" aria-current="page" href="/project/about.php">About Us</a>
</li>
<li class="nav-item">
<a class="nav-link active">Contact Us</a>
</li>
<?php
if($login){
echo "</li>
<li class='nav-item'>
<a class='nav-link'href='index.php?logout='1''>LOGOUT</a>
</li>";
}
?>
</ul>
<div class="d-flex">
<?php
if(!$login){
echo '<a class="navbar-brand" href="login.php">
<img src="https://img.icons8.com/color/48/000000/user.png" alt="" width="30" height="24" class="d-inline-block align-text-top">User Login
</a>
<a class="navbar-brand" href="admin_login.php">
<img src="https://img.icons8.com/external-itim2101-lineal-color-itim2101/64/000000/external-admin-network-technology-itim2101-lineal-color-itim2101-1.png" alt="" width="30" height="24" class="d-inline-block align-text-top">Admin
Login
</a>';
}
?>
<?php if (isset($_SESSION['username'])) : ?>
<p><img src="https://img.icons8.com/metro/26/000000/guest-male.png"><button class="btn btn-primary" type="submit"> <a href="myhostels.php" style="color: white; text-decoration:none"><?php echo $_SESSION['username']; ?></a></button> </p>
<?php endif ?>
</div>
</div>
</nav>
<br>
<!-- contact us form -->
<div class="container">
<h1>CONTACT US</h1>
<p>We understand that when a newcomer arrives in a new city, finding a hostel on time can be tough. In these difficult times, finding a hostel can be a difficult task, but don't worry, we're here to assist. Simply go to our hostel website and you'll get all the information you need on the most cost-effective hostels in your chosen cities. Why waste time when you can get your favourite hostels at your fingertips with just one click?</p>
<div class="contact-box">
<div class="contact-left">
<h3>SEND YOUR REQUEST</h3>
<form method="POST">
<div class="input-row">
<div class="input-group">
<label for="">Your Full Name</label>
<input type="text" placeholder="John Smith" name="name">
</div>
<div class="input-group">
<label for="">Contact</label>
<input type="text" placeholder="0000000000"name="phone">
</div>
</div>
<div class="input-row">
<div class="input-group">
<label for="">Email</label>
<input type="email" placeholder="[email protected]"name="email">
</div>
<div class="input-group">
<label for="">Subject</label>
<input type="text" placeholder="Subject"name="subject">
</div>
</div>
<label for="">Message</label>
<textarea name="message" id="" rows="5" placeholder="Your message"></textarea>
<button type="submit" name="submit">SEND</button>
<?php
include 'connection.php';
if (isset($_POST['submit'])) {
$name = $_POST['name'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message'];
$query = "insert into query
(name,phone,email,subject,message)
values ('$name','$phone','$email','$subject','$message')";
$run = mysqli_query($conn, $query) or die(mysqli_connect_error());
}
?>
</form>
</div>
<div class="contact-right">
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3494.861456017023!2d77.10234885032014!3d28.842984481189514!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x390d1b1923ada2e3%3A0x1169930518add2fe!2sNational%20Institute%20of%20Technology%20Delhi!5e0!3m2!1sen!2sin!4v1636705780921!5m2!1sen!2sin"
width="600" height="350" style="border:0;" allowfullscreen="" loading="lazy"></iframe>
<h3>REACH US</h3>
<table>
<tr>
<td>Email</td>
<td>[email protected]</td>
</tr>
<tr>
<td>Phone</td>
<td>9667650530</td>
</tr>
<tr>
<td>Address</td>
<td>National Institute of Technology Delhi
A-7, Institutional Area, near Satyawadi Raja Harish Chandra Hospital, New Delhi, Delhi 110040</td>
</tr>
</table>
</div>
</div>
</div>
<div class="footer">
<!-- Footer -->
<footer class="text-center text-white" style="background-color: rgb(209 20 80);">
<!-- Grid container -->
<div class="container">
<!-- Section: Links -->
<section class="mt-5">
<!-- Grid row-->
<div class="row text-center d-flex justify-content-center pt-5">
<!-- Grid column -->
<div class="col-md-2">
<h6 class="text-uppercase font-weight-bold">
<a href="/project/about.html" class="text-white">About us</a>
</h6>
</div>
<!-- Grid column -->
<!-- Grid column -->
<div class="col-md-2">
<h6 class="text-uppercase font-weight-bold">
<a href="/project/hostels.html" class="text-white">Hostels</a>
</h6>
</div>
<!-- Grid column -->
<!-- Grid column -->
<div class="col-md-2">
<h6 class="text-uppercase font-weight-bold">
<a href="#!" class="text-white">Review</a>
</h6>
</div>
<!-- Grid column -->
<!-- Grid column -->
<div class="col-md-2">
<h6 class="text-uppercase font-weight-bold">
<a href="/project/contact.html" class="text-white">Help</a>
</h6>
</div>
<!-- Grid column -->
<!-- Grid column -->
<div class="col-md-2">
<h6 class="text-uppercase font-weight-bold">
<a href="/project/contact.html" class="text-white">Contact</a>
</h6>
</div>
<!-- Grid column -->
</div>
<!-- Grid row-->
</section>
<!-- Section: Links -->
<hr class="my-5" />
<!-- Section: Text -->
<section class="mb-5">
<div class="row d-flex justify-content-center">
<div class="col-lg-8">
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Sunt distinctio earum repellat quaerat voluptatibus placeat nam, commodi optio pariatur est quia magnam eum harum corrupti dicta, aliquam sequi voluptate quas.
</p>
</div>
</div>
</section>
<!-- Section: Text -->
<!-- Section: Social -->
<section class="text-center mb-5">
<a href="#" class="fa fa-facebook"></a>
<a href="#" class="fa fa-twitter"></a>
<a href="#" class="fa fa-instagram"></a>
</section>
<!-- Section: Social -->
</div>
<!-- Grid container -->
<!-- Copyright -->
<!-- Copyright -->
</footer>
<!-- Footer -->
</div>
</body>
</html>