-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
406 lines (388 loc) · 21.5 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
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
<?php session_start() ?>
<!DOCTYPE HTML>
<html lang="en-CA">
<head>
<title>La Hacienda - From Farm to Fork</title>
<meta name="description" content="La Hacienda delivers farm fresh organic food straight from the producer and onto your fork. All meat and produce sold is sustainably grown with utmost respect for animals and care for the future of our planet. La Hacienda is your local farmers market hooked up to the digital world, bringing your the freshest to your fingertips.">
<meta name="keywords" content="organic food, sustainable, farm fresh, fresh">
<meta name="author" content="Jan Mikhail Alexei Ong (SID: 40154849)">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<!-- BOOTSTRAP LIBRARIES -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.7/css/all.css">
<script src="https://kit.fontawesome.com/6ebd7b3ed7.js" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<!---->
<!--GOOGLE FONT APIS-->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Bodoni+Moda">
<!---->
<!--EXTERNAL STYLESHEET & JS-->
<link rel="stylesheet" href="lahacienda.css">
<script src="lahacienda.js"></script>
<!---->
</head>
<body>
<!--START PAGE HEADER-->
<div class="topnav" id="myTopnav">
<a href="/index.php"><img src="assets/logo-white.png" style="width:150px; float:left" class="m-1 mx-2 p-1"></a>
<a href="#" class="element" style="float:left">
<?php if(isset($_SESSION['session_username'])) { ?>
<?php echo "Welcome " . $_SESSION['session_username']; ?>
<?php } ?>
</a>
<a href="javascript:void(0);" class="icon element" onclick="myFunction()"><i class="fa fa-bars"></i></a>
<a href="/cart.php" class="element">Cart</a>
<a href="/login.php" class="element">Register/Login</a>
<a href="/about.php" class="element">About</a>
<a href="/contact.php" class="element">Contact</a>
<a href="/market.php" class="active element">Shop the Market!</a>
</div>
<script>
function myFunction() {
var x = document.getElementById("myTopnav");
if (x.className === "topnav") {
x.className += " responsive";
} else {
x.className = "topnav";
}
}
</script>
<!--END PAGE HEADER-->
<div class="pb-3">
<img src="assets/splash.jpg" style="width:100%" />
</div>
<h1 class="text-center" style="font-weight: bold;">LA HACIENDA</h1>
<div class="row container-fluid" style="padding-left: 10%; padding-right: 10%; padding-top: 1%; padding-bottom:2%">
<div class="col-sm-3 text-center">
<img src="/assets/deliver.png" height="75px">
<h3>QUICK DELIVERIES</h3>
<p>Your food is delivered from your producer to your fork, fast. Rapid deliveries ensure that food is at its freshest.</p>
</div>
<div class="col-sm-3 text-center">
<img src="/assets/waste.png" height="75px">
<h3>REDUCED WASTE</h3>
<p>All orders will be packed in an eco-friendly manner, with the least amount of plastic possible.</p>
</div>
<div class="col-sm-3 text-center">
<img src="assets/local.png" height="75px">
<h3>SUPPORT LOCAL</h3>
<p>We select producers who are closest to you, reducing our carbon footprint upon delivery and providing economic opportunities.</p>
</div>
<div class="col-sm-3 text-center">
<img src="assets/mission.png" height="75px">
<h3>OUR MISSION</h3>
<p>To build a sustainable food eco-system, suporting local producers and reducing waste.</p>
</div>
</div>
<!--Carousel-->
<div class="row container-fluid justify-content-center" style="padding-left: 10%; padding-right: 10%; padding-top: 1%; padding-bottom:2%">
<h2 class="text-center">TODAY'S DEALS</h1>
<div id="my-carousel" class="carousel slide carousel-multi-item" data-ride="carousel">
<div class="controls-top">
<a class="btn-floating" href="#my-carousel" data-slide="prev"><i class="fa fa-chevron-left"></i></a>
<a class="btn-floating" href="#my-carousel" data-slide="next"><i class="fa fa-chevron-right"></i></a>
<ol class="carousel-indicators">
<li data-target="#my-carousel" data-slide-to="0" class="active"></li>
<li data-target="#my-carousel" data-slide-to="1"></li>
<li data-target="#my-carousel" data-slide-to="2"></li>
</ol>
<?php $string_data = file_get_contents("products.php"); ?>
<?php $products = unserialize($string_data); ?>
<div class="carousel-inner" role="listbox">
<!--First slide-->
<div class="carousel-item active">
<div class="row">
<div class="col-md-4 justify-content-center">
<div class="card mb-2">
<?php $key = 1 + array_search("Cremini Mushrooms", array_column($products, 'name')); ?>
<a href="<?php echo $products[$key]['file']; ?>">
<img class="card-img-top img-fluid" src="<?php echo $products[$key]['image']; ?>" alt="<?php echo $products[$key]['name']; ?>" />
<div class="card-body">
<h4 class="card-title"><?php echo $products[$key]['name']; ?></h4>
</a>
<p class="card-text">
<span style="text-decoration: line-through;">$<?php echo $products[$key]['price']; ?></span>
<?php $discount = number_format($products[$key]['price'] * (1 - $products[$key]['promo_amt']), "2"); ?>
<br /> <span style="font-weight: bolder; font-size: large;">$<?php echo $discount; ?></span>
<br /> <span style="font-weight: bolder; font-size: large;">Save <?php echo 100*$products[$key]['promo_amt']; ?>%!</span>
</p>
<a href="<?php echo $products[$key]['file']; ?>"><button type="button" class="btn btn-light btn-block btn-outline-secondary">GO!</button> </a>
</div>
</div>
</div>
<div class="col-md-4 clearfix d-none d-md-block">
<div class="card mb-2">
<?php $key = 1 + array_search("Porcini Mushrooms", array_column($products, 'name')); ?>
<a href="<?php echo $products[$key]['file']; ?>">
<img class="card-img-top img-fluid" src="<?php echo $products[$key]['image']; ?>" alt="<?php echo $products[$key]['name']; ?>" />
<div class="card-body">
<h4 class="card-title"><?php echo $products[$key]['name']; ?></h4>
</a>
<p class="card-text">
<span style="text-decoration: line-through;">$<?php echo $products[$key]['price']; ?></span>
<?php $discount = number_format($products[$key]['price'] * (1 - $products[$key]['promo_amt']), "2"); ?>
<br /> <span style="font-weight: bolder; font-size: large;">$<?php echo $discount; ?></span>
<br /> <span style="font-weight: bolder; font-size: large;">Save <?php echo 100*$products[$key]['promo_amt']; ?>%!</span>
</p>
<a href="<?php echo $products[$key]['file']; ?>"><button type="button" class="btn btn-light btn-block btn-outline-secondary">GO!</button> </a>
</div>
</div>
</div>
<div class="col-md-4 clearfix d-none d-md-block">
<div class="card mb-2">
<?php $key = 1 + array_search("Mushroom Mix", array_column($products, 'name')); ?>
<a href="<?php echo $products[$key]['file']; ?>">
<img class="card-img-top img-fluid" src="<?php echo $products[$key]['image']; ?>" alt="<?php echo $products[$key]['name']; ?>" />
<div class="card-body">
<h4 class="card-title"><?php echo $products[$key]['name']; ?></h4>
</a>
<p class="card-text">
<span style="text-decoration: line-through;">$<?php echo $products[$key]['price']; ?></span>
<?php $discount = number_format($products[$key]['price'] * (1 - $products[$key]['promo_amt']), "2"); ?>
<br /> <span style="font-weight: bolder; font-size: large;">$<?php echo $discount; ?></span>
<br /> <span style="font-weight: bolder; font-size: large;">Save <?php echo 100*$products[$key]['promo_amt']; ?>%!</span>
</p>
<a href="<?php echo $products[$key]['file']; ?>"><button type="button" class="btn btn-light btn-block btn-outline-secondary">GO!</button> </a>
</div>
</div>
</div>
</div>
</div>
<!--Second slide-->
<div class="carousel-item">
<div class="row">
<div class="col-md-4">
<div class="card mb-2">
<?php $key = 1 + array_search("Brie", array_column($products, 'name')); ?>
<a href="<?php echo $products[$key]['file']; ?>">
<img class="card-img-top img-fluid" src="<?php echo $products[$key]['image']; ?>" alt="<?php echo $products[$key]['name']; ?>" />
<div class="card-body">
<h4 class="card-title"><?php echo $products[$key]['name']; ?></h4>
</a>
<p class="card-text">
<span style="text-decoration: line-through;">$<?php echo $products[$key]['price']; ?></span>
<?php $discount = number_format($products[$key]['price'] * (1 - $products[$key]['promo_amt']), "2"); ?>
<br /> <span style="font-weight: bolder; font-size: large;">$<?php echo $discount; ?></span>
<br /> <span style="font-weight: bolder; font-size: large;">Save <?php echo 100*$products[$key]['promo_amt']; ?>%!</span>
</p>
<a href="<?php echo $products[$key]['file']; ?>"><button type="button" class="btn btn-light btn-block btn-outline-secondary">GO!</button> </a>
</div>
</div>
</div>
<div class="col-md-4 clearfix d-none d-md-block">
<div class="card mb-2">
<?php $key = 1 + array_search("Parmesan Cheese", array_column($products, 'name')); ?>
<a href="<?php echo $products[$key]['file']; ?>">
<img class="card-img-top img-fluid" src="<?php echo $products[$key]['image']; ?>" alt="<?php echo $products[$key]['name']; ?>" />
<div class="card-body">
<h4 class="card-title"><?php echo $products[$key]['name']; ?></h4>
</a>
<p class="card-text">
<span style="text-decoration: line-through;">$<?php echo $products[$key]['price']; ?></span>
<?php $discount = number_format($products[$key]['price'] * (1 - $products[$key]['promo_amt']), "2"); ?>
<br /> <span style="font-weight: bolder; font-size: large;">$<?php echo $discount; ?></span>
<br /> <span style="font-weight: bolder; font-size: large;">Save <?php echo 100*$products[$key]['promo_amt']; ?>%!</span>
</p>
<a href="<?php echo $products[$key]['file']; ?>"><button type="button" class="btn btn-light btn-block btn-outline-secondary">GO!</button></a>
</div>
</div>
</div>
<div class="col-md-4 clearfix d-none d-md-block">
<div class="card mb-2">
<?php $key = 1 + array_search("Roquefort", array_column($products, 'name')); ?>
<a href="<?php echo $products[$key]['file']; ?>">
<img class="card-img-top img-fluid" src="<?php echo $products[$key]['image']; ?>" alt="<?php echo $products[$key]['name']; ?>" />
<div class="card-body">
<h4 class="card-title"><?php echo $products[$key]['name']; ?></h4>
</a>
<p class="card-text">
<span style="text-decoration: line-through;">$<?php echo $products[$key]['price']; ?></span>
<?php $discount = number_format($products[$key]['price'] * (1 - $products[$key]['promo_amt']), "2"); ?>
<br /> <span style="font-weight: bolder; font-size: large;">$<?php echo $discount; ?></span>
<br /> <span style="font-weight: bolder; font-size: large;">Save <?php echo 100*$products[$key]['promo_amt']; ?>%!</span>
</p>
<a href="<?php echo $products[$key]['file']; ?>"><button type="button" class="btn btn-light btn-block btn-outline-secondary">GO!</button> </a>
</div>
</div>
</div>
</div>
</div>
<!--Third slide-->
<div class="carousel-item">
<div class="row">
<div class="col-md-4">
<div class="card mb-2">
<?php $key = 1 + array_search("Filet Mignon", array_column($products, 'name')); ?>
<a href="<?php echo $products[$key]['file']; ?>">
<img class="card-img-top img-fluid" src="<?php echo $products[$key]['image']; ?>" alt="<?php echo $products[$key]['name']; ?>" />
<div class="card-body">
<h4 class="card-title"><?php echo $products[$key]['name']; ?></h4>
</a>
<p class="card-text">
<span style="text-decoration: line-through;">$<?php echo $products[$key]['price']; ?></span>
<?php $discount = number_format($products[$key]['price'] * (1 - $products[$key]['promo_amt']), "2"); ?>
<br /> <span style="font-weight: bolder; font-size: large;">$<?php echo $discount; ?></span>
<br /> <span style="font-weight: bolder; font-size: large;">Save <?php echo 100*$products[$key]['promo_amt']; ?>%!</span>
</p>
<a href="<?php echo $products[$key]['file']; ?>"><button type="button" class="btn btn-light btn-block btn-outline-secondary">GO!</button> </a>
</div>
</div>
</div>
<div class="col-md-4 clearfix d-none d-md-block">
<div class="card mb-2">
<?php $key = 1 + array_search("Lamb Chops", array_column($products, 'name')); ?>
<a href="<?php echo $products[$key]['file']; ?>">
<img class="card-img-top img-fluid" src="<?php echo $products[$key]['image']; ?>" alt="<?php echo $products[$key]['name']; ?>" />
<div class="card-body">
<h4 class="card-title"><?php echo $products[$key]['name']; ?></h4>
</a>
<p class="card-text">
<span style="text-decoration: line-through;">$<?php echo $products[$key]['price']; ?></span>
<?php $discount = number_format($products[$key]['price'] * (1 - $products[$key]['promo_amt']), "2"); ?>
<br /> <span style="font-weight: bolder; font-size: large;">$<?php echo $discount; ?></span>
<br /> <span style="font-weight: bolder; font-size: large;">Save <?php echo 100*$products[$key]['promo_amt']; ?>%!</span>
</p>
<a href="<?php echo $products[$key]['file']; ?>"><button type="button" class="btn btn-light btn-block btn-outline-secondary">GO!</button> </a>
</div>
</div>
</div>
<div class="col-md-4 clearfix d-none d-md-block">
<div class="card mb-2">
<?php $key = 1 + array_search("Beef Short Ribs", array_column($products, 'name')); ?>
<a href="<?php echo $products[$key]['file']; ?>">
<img class="card-img-top img-fluid" src="<?php echo $products[$key]['image']; ?>" alt="<?php echo $products[$key]['name']; ?>" />
<div class="card-body">
<h4 class="card-title"><?php echo $products[$key]['name']; ?></h4>
</a>
<p class="card-text">
<span style="text-decoration: line-through;">$<?php echo $products[$key]['price']; ?></span>
<?php $discount = number_format($products[$key]['price'] * (1 - $products[$key]['promo_amt']), "2"); ?>
<br /> <span style="font-weight: bolder; font-size: large;">$<?php echo $discount; ?></span>
<br /> <span style="font-weight: bolder; font-size: large;">Save <?php echo 100*$products[$key]['promo_amt']; ?>%!</span>
</p>
<a href="<?php echo $products[$key]['file']; ?>"><button type="button" class="btn btn-light btn-block btn-outline-secondary">GO!</button> </a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="myModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
Item added to cart!
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="pt-4 pb-4" style="padding-right: 5%; padding-left: 5%;">
<h2 class="text-center pt-3">POPULAR AISLES</h1>
<div class="row container-fluid pt-2 py-5">
<div class="col-sm-4 text-center thumb-container">
<a href="shrooms.html">
<img src="assets/tile_shrooms.jpg" style="width:75%;"/>
<div class="content">
<h2>Mushrooms</h2>
</div>
</a>
</div>
<div class="col-sm-4 text-center thumb-container">
<a href="grains.html">
<img src="assets/tile_grains.jpg" style="width:75%;"/>
<div class="content">
<h2>Grains</h2>
</div>
</a>
</div>
<div class="col-sm-4 text-center thumb-container">
<a href="dairy.html">
<img src="assets/tile_dairy.jpg" class="img-fluid" style="width:75%;" />
<div class="content">
<h2>Dairy</h2>
</div>
</a>
</div>
</div>
<div class="row container-fluid pt-2 py-5">
<div class="col-sm-4 text-center thumb-container">
<a href="beef.html">
<img src="assets/tile_beef.jpg" style="width:75%;"/>
<div class="content">
<h2>Beef</h2>
</div>
</a>
</div>
<div class="col-sm-4 text-center thumb-container">
<a href="chicken.html">
<img src="assets/tile_chicken.jpg" style="width:75%;"/>
<div class="content">
<h2>Chicken</h2>
</div>
</a>
</div>
<div class="col-sm-4 text-center thumb-container">
<a href="lamb.html">
<img src="assets/tile_lamb.jpg" class="img-fluid" style="width:75%;" />
<div class="content">
<h2>Lamb</h2>
</div>
</a>
</div>
</div>
</div>
<div class="pt-4 pb-4" style="padding-right: 5%; padding-left: 5%;">
<h2 class="text-center pt-3">HEAR FROM OUR CUSTOMERS</h1>
<div class="row container-fluid pt-2 py-5">
<div class="col-sm-4 text-center thumb-container">
<h4>Now this is what I call fresh! I'm supporting local from now on!</h3>
<p>—John D.</p>
</div>
<div class="col-sm-4 text-center thumb-container">
<h4>For the past few weeks, we've hade an overwhelmingly positive experience at our restaurant, La Casa de Alvarez. Ingredients are always of the highest quality, without compromise.</h4>
<p>—Jean D.</p>
</div>
<div class="col-sm-4 text-center thumb-container">
<h4>I could never get something this fresh and affordable from my grocers. La Hacienda is the best!</h4>
<p>—Juan P.</p>
</div>
</div>
</div>
<!--FOOTER-->
<footer class="blog-footer pt-3">
<div class="row">
<div class="col-sm-4 text-center">
<a href="about.php">About Us</a>
<a href="contact.php">Contact Us</a>
<a href="shipping.html">Shipping & Returns</a>
<a href="privacy.html">Privacy Policy</a>
</div>
<div class="col-sm-4 text-center">
<a href="careers.html">Join Our Team</a>
<a href="supplier.html">Become a Supplier</a>
<a href="recipes.html">Recipes</a>
<a href="employee.php">Employee Login</a>
</div>
<div class="col-sm-4 text-center">
<form action="#">
<label for="email" style="color: #f2f2f2;">Subscribe to us for exclusive offers!</label><br/>
<input type="text" id="email" name="email" style="width:50%;" placeholder="Your e-mail address...">
</div>
</div>
</footer>
<!--BOTTOM BAR-->
<footer class="container-fluid text-center pt-3">
<p style="font-family: 'Bodoni Moda'; color: #f2f2f2; font-size:small;">© La Hacienda - Farm to Fork | All Rights Reserved.</p>
</footer>
<!--END FOOTER-->
</body>
</html>