-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
373 lines (252 loc) · 8.61 KB
/
index.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
<?php
$db_name = 'mysql:host=localhost;dbname=contact_db';
$username = 'root';
$password = '';
$conn = new PDO($db_name, $username, $password);
if(isset($_POST['send'])){
$name = $_POST['name'];
$name = filter_var($name, FILTER_SANITIZE_STRING);
$number = $_POST['number'];
$number = filter_var($number, FILTER_SANITIZE_STRING);
$guests = $_POST['guests'];
$guests = filter_var($guests, FILTER_SANITIZE_STRING);
$select_contact = $conn->prepare("SELECT * FROM `contact_form` WHERE name = ? AND number = ? AND guests = ?");
$select_contact->execute([$name, $number, $guests]);
if($select_contact->rowCount() > 0){
$message[] = 'message sent already!';
}else{
$insert_contact = $conn->prepare("INSERT INTO `contact_form`(name, number, guests) VALUES(?,?,?)");
$insert_contact->execute([$name, $number, $guests]);
$message[] = 'message sent successfully!';
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Complete Responsive Coffee Shop Website Design</title>
<!-- font awesome cdn link -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css">
<!-- custom css file link -->
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<?php
if(isset($message)){
foreach($message as $message){
echo '
<div class="message">
<span>'.$message.'</span>
<i class="fas fa-times" onclick="this.parentElement.remove();"></i>
</div>
';
}
}
?>
<!-- header section starts -->
<header class="header">
<section class="flex">
<a href="#home" class="logo"><img src="images/logo.png" alt=""></a>
<nav class="navbar">
<a href="#home">home</a>
<a href="#about">about</a>
<a href="#menu">menu</a>
<a href="#gallery">gallery</a>
<a href="#team">team</a>
<a href="#contact">contact</a>
</nav>
<div id="menu-btn" class="fas fa-bars"></div>
</section>
</header>
<!-- header section ends -->
<!-- home section starts -->
<div class="home-bg">
<section class="home" id="home">
<div class="content">
<h3>coffee heaven</h3>
<p>Coffee is darkly colored, bitter, slightly acidic and has a stimulating effect in humans, primarily due to its caffeine content. </p>
<a href="#about" class="btn">about us</a>
</div>
</section>
</div>
<!-- home section ends -->
<!-- about section starts -->
<section class="about" id="about">
<div class="image">
<img src="images/about-img.svg" alt="">
</div>
<div class="content">
<h3>A cup of coffee can complete your day</h3>
<p>Coffee is darkly colored, bitter, slightly acidic and has a stimulating effect in humans, primarily due to its caffeine content. </p>
<a href="#menu" class="btn">our menu</a>
</div>
</section>
<!-- about section ends -->
<!-- facility section starts -->
<section class="facility">
<div class="heading">
<img src="images/heading-img.png" alt="">
<h3>our facility</h3>
</div>
<div class="box-container">
<div class="box">
<img src="images/icon-1.png" alt="">
<h3>varieties of coffees</h3>
<p>Black coffee is coffee with no milk in it.White coffee is coffee with milk in it.Café au lait is coffee made with a lot of hot milk.</p>
</div>
<div class="box">
<img src="images/icon-2.png" alt="">
<h3>coffee beans</h3>
<p>A coffee bean is a seed of the Coffea plant and the source for coffee. It is the pip inside the red or purple fruit often referred to as a cherry.</p>
</div>
<div class="box">
<img src="images/icon-3.png" alt="">
<h3>breakfast and sweets</h3>
<p> breakfast can be sweet or salty. Of course breakfast CAN be eaten for dinner, but it just isn't the same.</p>
</div>
<div class="box">
<img src="images/icon-4.png" alt="">
<h3>read to go coffee</h3>
<p>Coffee is a brewed drink prepared from roasted coffee beans, the seeds of berries from certain flowering plants in the Coffea genus.</p>
</div>
</div>
</section>
<!-- facility section ends -->
<!-- menu section starts -->
<section class="menu" id="menu">
<div class="heading">
<img src="images/heading-img.png" alt="">
<h3>popular menu</h3>
</div>
<div class="box-container">
<div class="box">
<img src="images/menu-1.png" alt="">
<h3>love you coffee</h3>
</div>
<div class="box">
<img src="images/menu-2.png" alt="">
<h3>Cappuccino</h3>
</div>
<div class="box">
<img src="images/menu-3.png" alt="">
<h3>Mocha coffee</h3>
</div>
<div class="box">
<img src="images/menu-4.png" alt="">
<h3>Frappuccino</h3>
</div>
<div class="box">
<img src="images/menu-5.png" alt="">
<h3>black coffee</h3>
</div>
<div class="box">
<img src="images/menu-6.png" alt="">
<h3>love heart coffee</h3>
</div>
</div>
</section>
<!-- menu section ends -->
<!-- gallery section starts -->
<section class="gallery" id="gallery">
<div class="heading">
<img src="images/heading-img.png" alt="">
<h3>our gallery</h3>
</div>
<div class="box-container">
<img src="images/gallery-1.webp" alt="">
<img src="images/gallery-2.webp" alt="">
<img src="images/gallery-3.webp" alt="">
<img src="images/gallery-4.webp" alt="">
<img src="images/gallery-5.webp" alt="">
<img src="images/gallery-6.webp" alt="">
</div>
</section>
<!-- gallery section ends -->
<!-- team section starts -->
<section class="team" id="team">
<div class="heading">
<img src="images/heading-img.png" alt="">
<h3>our team</h3>
</div>
<div class="box-container">
<div class="box">
<img src="images/our-team-1.jpg" alt="">
<h3>john deo</h3>
</div>
<div class="box">
<img src="images/our-team-2.jpg" alt="">
<h3>Mr. Kapoor</h3>
</div>
<div class="box">
<img src="images/our-team-3.jpg" alt="">
<h3>kavya</h3>
</div>
<div class="box">
<img src="images/our-team-4.jpg" alt="">
<h3>Krish</h3>
</div>
<div class="box">
<img src="images/our-team-5.jpg" alt="">
<h3>Chandler</h3>
</div>
<div class="box">
<img src="images/our-team-6.jpg" alt="">
<h3>Mr. Beast</h3>
</div>
</div>
</section>
<!-- team section ends -->
<!-- contact section starts -->
<section class="contact" id="contact">
<div class="heading">
<img src="images/heading-img.png" alt="">
<h3>contact us</h3>
</div>
<div class="row">
<div class="image">
<img src="images/contact-img.svg" alt="">
</div>
<form action="" method="post">
<h3>book a table</h3>
<input type="text" name="name" required class="box" maxlength="20" placeholder="enter your name">
<input type="number" name="number" required class="box" maxlength="20" placeholder="enter your number" min="0" max="9999999999" onkeypress="if(this.value.length == 10) return false">
<input type="number" name="guests" required class="box" maxlength="20" placeholder="how many guests" min="0" max="99" onkeypress="if(this.value.length == 2) return false">
<input type="submit" name="send" value="send message" class="btn">
</form>
</div>
</section>
<!-- contact section ends -->
<!-- footer section starts -->
<section class="footer">
<div class="box-container">
<div class="box">
<i class="fas fa-envelope"></i>
<h3>our email</h3>
<p>[email protected]</p>
</div>
<div class="box">
<i class="fas fa-clock"></i>
<h3>opening hours</h3>
<p>09:00am to 09:00pm</p>
</div>
<div class="box">
<i class="fas fa-map-marker-alt"></i>
<h3>shop location</h3>
<p>Surat-395004</p>
</div>
<div class="box">
<i class="fas fa-phone"></i>
<h3>our number</h3>
<p>+91 971235023</p>
</div>
</div>
<div class="credit"> © copyright @ <?= date('Y'); ?> by <span>Mansi Italiya</span> | all rights reserved! </div>
</section>
<!-- footer section ends -->
<!-- custom js file link -->
<script src="js/script.js"></script>
</body>
</html>