-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·383 lines (345 loc) · 17.2 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
374
375
376
377
378
379
380
381
382
383
<!DOCTYPE html>
<html lang="en">
<head>
<!-- icon font -->
<script src="https://use.fontawesome.com/c0bbe922da.js"></script>
<meta charset="UTF-8">
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>e-grocery</title>
<!-- font -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&family=Otomanopee+One&display=swap" rel="stylesheet">
<!-- bootstrap cdn -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
<!-- stylesheet -->
<link rel="stylesheet" type="text/css" href="style/style.css">
</head>
<body>
<!-- Nav Bar -->
<div class="container-fluid">
<div class="row">
<nav class="nav">
<div class="col col-md-3 logo">
<a href="#"><span>e</span>-Grocery</a>
</div>
<div class="col col-md-9">
<ul class="nav-bar">
<li class="navbar__item"> <a href="#" class="navbar__item--link"> Home </a> </li>
<li class="navbar__item"> <a href="#services" class="navbar__item--link"> Services </a> </li>
<li class="navbar__item"> <a href="#products" class="navbar__item--link"> Products </a> </li>
<li class="navbar__item"> <a href="#about" class="navbar__item--link"> About </a> </li>
<li class="navbar__item"> <a href="#contact" class="navbar__item--link"> Contact </a> </li>
<li class="navbar__item">
<a href="register.php" class="navbar__item--link" target="_blank"> Register </a>
</li>
<li class="navbar__item" >
<a href="admin" class="navbar__item--link" target="_blank"> Admin? </a>
</li>
</ul>
</div>
</nav>
</div>
</div>
<!-- modal start -->
<div class="cart" id="cart" data-toggle="modal" data-target="#cart-modal">
<div class="cart-items" id="cart-items">
<i class="fa fa-shopping-cart" aria-hidden="true"></i> <br>
<span>0 items</span>
</div>
<div class="cart-price" id="cart-price">
<span>৳ 0</span>
</div>
</div>
<div class="modal fade" id="cart-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Your Selected Products</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<table class="table table-striped">
<thead>
<tr>
<th scope="col">Product Name</th>
<th scope="col">Product Quantity</th>
<th scope="col">Product Price</th>
<th scope="col">Handle</th>
</tr>
</thead>
<tbody id="modal-tbody">
</tbody>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- modal end -->
<header class="header">
<h1 class="heading-primary">
<span class="head-span">
<i class="fa fa-check-circle" aria-hidden="true"></i> Meats & Fish.
</span>
<span class="head-span"><i class="fa fa-check-circle" aria-hidden="true"></i>
Groceries.</span>
<span class="head-span"><i class="fa fa-check-circle" aria-hidden="true"></i>
Vegetables.</span>
<span class="head-span"><i class="fa fa-check-circle" aria-hidden="true"></i> Fruits.</span>
<a href="#products" class="btn">
Buy Now <i class="fa fa-shopping-cart" aria-hidden="true"></i>
</a>
</h1>
</header>
<section class="services" id="services">
<div class="container">
<div class="row">
<div class="col">
<h2 class="heading-secondary">
Our Services
</h2>
</div>
</div>
<div class="row d-flex justify-content-between">
<div class="col-md-3">
<div class="box">
<div class="box-icon">
<i class="fa fa-clock-o" aria-hidden="true"></i>
</div>
<h3 class="heading-tirtiary">
Fastest Delivery
</h3>
<p class="para-1 text-center">
Just order your products and sit back. You will receive your products in one hour.
</p>
</div>
</div>
<div class="col-md-3">
<div class="box">
<div class="box-icon">
<i class="fa fa-home" aria-hidden="true"></i>
</div>
<h3 class="heading-tirtiary">
Home Delivery
</h3>
<p class="para-1 text-center">
You will get your order in your home by only one hour with some little charges.
</p>
</div>
</div>
<div class="col-md-3">
<div class="box">
<div class="box-icon">
<i class="fa fa-map-marker" aria-hidden="true"></i>
</div>
<h3 class="heading-tirtiary">
Pick Up Point
</h3>
<p class="para-1 text-center">
Recieve your products in your nearest pick up point, there is no delivery charge.
</p>
</div>
</div>
</div>
</div>
</section>
<section class="products" id="products">
<div class="container">
<div class="row">
<div class="col">
<h2 class="heading-secondary">
Our Products
</h2>
</div>
</div>
<div class="row">
<?php
// Include config file
require_once "./admin/config.php";
// Attempt select query execution
$sql = "SELECT * FROM products limit 4";
if($result = mysqli_query($link, $sql)) {
if(mysqli_num_rows($result) > 0){
while($row = mysqli_fetch_array($result)){
echo '<div class="col-md-3">';
echo '<div class="product-card">';
echo '<img src="./admin/uploads/products/' . $row['image'] . '" alt="' . $row['image']. '" class="product-image">';
echo '<h5 class="product-name" id="product-name">'. $row['name']. '</h5>';
echo '<h6 class=""> <span class="product-price" id="product-price">৳ ' . $row['price']. '</span>/'. $row['unit'] .'</h6>';
echo '<p class="product-description">'. $row['description'] .'</p>';
echo '<div class="product-qty">
<label for="qty">Quantity : </label>
<input type="number" id="product-qty" name="qty" value="1" />
</div>';
echo '<button type="button" class="btn-product" id="add-item">
Add to Cart <i class="fa fa-shopping-cart" aria-hidden="true"></i>
</button>';
echo '</div>';
echo '</div>';
}
}
}
?>
</div>
<div class="row">
<div class="col text-center">
<a href="products.php" class="btn" target="_blank">
Order More...
</a>
</div>
</div>
</div>
</section>
<section class="about" id="about">
<div class="container-fluid">
<div class="row">
<div class="col">
<h2 class="heading-secondary">
Who We Are
</h2>
</div>
</div>
<div class="row d-flex justify-content-center">
<div class="col-md-2">
<div class="person">
<img class="person-image" src="./images/avatar/toma.jpeg" alt="toma">
<div class="person-body">
<h4 class="heading-4 font-weight-bold">
Tasrina Jahan Toma
</h4>
<p>
Department of ICT, <br> Comilla University
</p>
<ul class="social">
<li class="social-item"><a href="https://www.facebook.com/tasmisrajahan.toma" class="social-link"><i class="fa fa-facebook-official" aria-hidden="true"></i></a></li>
<li class="social-item"><a href="#about" class="social-link"><i class="fa fa-instagram" aria-hidden="true"></i></a></li>
<li class="social-item"><a href="#about" class="social-link"><i class="fa fa-twitter" aria-hidden="true"></i></a></li>
</ul>
</div>
</div>
</div>
<div class="col-md-2">
<div class="person">
<img class="person-image" src="./images/avatar/saiful.jpg" alt="saiful">
<div class="person-body">
<h4 class="heading-4 font-weight-bold">
Saiful Islam
</h4>
<p>
Department of ICT, <br> Comilla University
</p>
<ul class="social">
<li class="social-item"><a href="https://www.facebook.com/saiful70.me/" class="social-link"><i class="fa fa-facebook-official" aria-hidden="true"></i></a></li>
<li class="social-item"><a href="#about" class="social-link"><i class="fa fa-instagram" aria-hidden="true"></i></a></li>
<li class="social-item"><a href="#about" class="social-link"><i class="fa fa-twitter" aria-hidden="true"></i></a></li>
</ul>
</div>
</div>
</div>
<div class="col-md-2">
<div class="person">
<img class="person-image" src="./images/avatar/babu.jpg" alt="babu">
<div class="person-body">
<h4 class="heading-4 font-weight-bold">
Saheb Babu Sheikh
</h4>
<p>
Department of ICT, <br> Comilla University
</p>
<ul class="social">
<li class="social-item"><a href="https://www.facebook.com/saheb.babu.921230" class="social-link"><i class="fa fa-facebook-official" aria-hidden="true"></i></a></li>
<li class="social-item"><a href="#about" class="social-link"><i class="fa fa-instagram" aria-hidden="true"></i></a></li>
<li class="social-item"><a href="#about" class="social-link"><i class="fa fa-twitter" aria-hidden="true"></i></a></li>
</ul>
</div>
</div>
</div>
<div class="col-md-2">
<div class="person">
<img class="person-image" src="./images/avatar/imran.jpg" alt="imran">
<div class="person-body">
<h4 class="heading-4 font-weight-bold">
Mahmud Imran
</h4>
<p>
Department of ICT, <br> Comilla University
</p>
<ul class="social">
<li class="social-item"><a href="https://www.facebook.com/mahmud.imran.90834" class="social-link"><i class="fa fa-facebook-official" aria-hidden="true"></i></a></li>
<li class="social-item"><a href="#about" class="social-link"><i class="fa fa-instagram" aria-hidden="true"></i></a></li>
<li class="social-item"><a href="#about" class="social-link"><i class="fa fa-twitter" aria-hidden="true"></i></a></li>
</ul>
</div>
</div>
</div>
<div class="col-md-2">
<div class="person">
<img class="person-image" src="./images/avatar/alvee.jpg" alt="alvee">
<div class="person-body">
<h4 class="heading-4">
Alvee Khandoker
</h4>
<p>
Department of ICT, <br> Comilla University
</p>
<ul class="social">
<li class="social-item"><a href="https://www.facebook.com/profile.php?id=100006465457818" class="social-link"><i class="fa fa-facebook-official" aria-hidden="true"></i></a></li>
<li class="social-item"><a href="#about" class="social-link"><i class="fa fa-instagram" aria-hidden="true"></i></a></li>
<li class="social-item"><a href="#about" class="social-link"><i class="fa fa-twitter" aria-hidden="true"></i></a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</section>
<footer class="footer" id="contact">
<div class="container">
<div class="row ">
<div class="col-md-4 offset-md-3">
<div>
<h3 class="heading-4 footer-heading">
Contact With Us
</h3>
<ul>
<li> <i class="fa fa-envelope"></i> [email protected]</li>
<li><i class="fa fa-phone"></i> 01234567899 </li>
</ul>
</div>
</div>
<div class="col-md-4">
<div>
<h3 class="heading-4 footer-heading">
Social Links
</h3>
<ul>
<li><i class="fa fa-facebook"></i> Facebook</li>
<li><i class="fa fa-instagram"></i> Instragram</li>
<li><i class="fa fa-youtube"></i> Youtube</li>
</ul>
</div>
</div>
</div>
<div class="footer-line m-4"></div>
<div class="copy-right text-center">
All rights reserved ©<a href="https://github.com/saiful-70/" class="text-success" target="_blank">E-grocery's</a> team, 2021.
</div>
</div>
</footer>
<script src="script/script.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous">
</script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns" crossorigin="anonymous">
</script>
</body>
</html>