-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
521 lines (505 loc) · 24.8 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
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
<?php include_once("connection.php"); ?>
<?php session_start(); ?>
<!DOCTYPE html>
<html lang="en">
<!-- Include php files here for header and navigation -->
<?php include_once 'include/header.php'; ?>
<?php include_once 'include/navigation.php'; ?>
<!-- ============================================ -->
<!-- BODY OF THE 'myPage' PAGE -->
<!-- ============================================ -->
<body id="myPage" data-spy="scroll" data-target=".navbar" data-offset="60">
<div class="jumbotron text-center">
<video id="video-background" preload muted autoplay loop>
<source src="vid/farm.mp4" type="video/mp4">
<source src="vid/farm.ogg" type="video/ogg">
<h1>Farmable</h1>
<p>We specialize in farming</p>
</div>
<!-- Container (About Section) -->
<div id="about" class="container-fluid">
<div class="row">
<div class="col-sm-8">
<h2>About Us</h2><br>
<h4>We farm to provide our customers with the best quality fresh products, STRAIGHT OUTA GREEN fields of Farmable.</h4><br>
<p>Farmable distributes locally grown farm products to area restaurants, commercial kitchens, cafeterias, and independent grocery stores.
Our products include fruits, vegetables, cage-free eggs, herbs, cheese, grass-fed beef and lamb and pasture-raised chicken all raised without hormones or antibiotics.
We partner with the very best farmers in Kuching Sarawak that utilize sustainable agriculture and ranching methods to produce the highest quality, most flavorful product found on the market.</p>
<br>
<!-- Modal for login -->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header" style="padding:35px 50px;">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4><span class="glyphicon glyphicon-lock"></span> Login</h4>
</div>
<div class="modal-body" style="padding:40px 50px;">
<!-- Form to Sign up the user/admin -->
<!-- Check user login UserType -->
<!-- NOTES for Lee: Technically the form action should be action="logincheck.php"
// and if the conditions are met user/admin should be directed to their respective
// locations on the website for.
// if userType == 'admin' -> loginadmin.php
// if userType == 'user' -> loginuser.php
-->
<form role="form" action="logincheck.php" method="POST">
<!-- Remove this after processing , added action="loginadmin.php" just to make it have no errors atm-->
<img src="img/cheflogo.png" alt="Avatar" class="center">
<div class="form-group">
<label id="email" name="email" for="usrname"><span class="glyphicon glyphicon-envelope"></span> Email</label>
<input type="text" class="form-control" name="email" id="username" placeholder="Enter email">
</div>
<div class="form-group">
<label for="psw"><span class="glyphicon glyphicon-eye-open"></span> Password</label>
<input type="password" class="form-control" id="password" placeholder="Enter password">
</div>
<div class="checkbox">
<label><input type="checkbox" value="" checked>Remember me</label>
</div>
<button type="submit" class="btn btn-success btn-block" onClick="Login()"><span class="glyphicon glyphicon-off"></span> Login</button>
<script>
function Login(){
alert("Successfully Logged In at Farmable!");
}
</script>
</form>
</div>
<div class="modal-footer">
<p>Not a customer? Join us! Today <a href="register.php"> Sign up</a></p>
<p>Forgot <a href="#">Password?</a></p>
</div>
</div>
</div>
</div>
</div>
<!-- JS for the modal -->
<script>
$(document).ready(function(){
$("#myBtn").click(function(){
$("#myModal").modal();
});
});
</script>
<!-- TEST ENDS HERE -->
<div class="col-sm-4">
<span class="glyphicon glyphicon-grain logo"></span>
</div>
</div>
</div>
</div>
<div class="container-fluid bg-grey">
<div class="row">
<div class="col-sm-4">
<span class="glyphicon glyphicon-globe logo slideanim"></span>
</div>
<div class="col-sm-8">
<h2>Our Values, Why Farmable?</h2><br>
<h4><strong>MISSION:</strong> Our mission is to provide high quality fresh grown products at the farms to restaurants.</h4><br>
<p> The life of a farmer has never been easy, with long hours daily, be it plowing away at the soil or rearing the animals under the swealtering heat, praying for a bountiful harvest every season; life is not easy for them. With the advent of supermarkets and chemically enhanced vegetables and animal meat, the numbers of farmers are slowly dwindling. They are having difficulty sustaining their livelihood.
What we aim to do is to create a website that allows the farmers to better connect with clients. The website will be a medium for chef's to order fresh produce straight from the farmer. These days, farmers are still reliant on the Farmer's market to sell their produce, but customers would rather the convenience of purchasing their groceries through supermarkets. While farmers can still sell their produce to supermarkets, they lose profits as the supermarkets would want those produce at a discounted rate.
What we are offering is an alternative that maximizes the farmers profit margins, as we do not take percentage cuts but rather, a one-time payment. So in the long run, farmers would definitely have a better profit margin overall.</p>
<h3>Taste & Nutrition</h3>
<p>Because local products do not have to travel far to reach the consumer, the produce can be picked when it is ripest. When a fruit or vegetable is given the time to completely ripen, it fully develops and retains its vitamins and minerals, giving it a more vibrant flavor and maximizing the nutritional content.</p>
<h3>Optimal Freshness</h3>
<p>Our produce is generally harvested within 36 hours of delivery. They have a longer time to ripen “on the vine” and are ready to eat when delivered. They are not picked and processed and then spend a week or more traveling. Other non-local farms pick their produce when it’s still green or unripe. A common practice is to “gas” green tomatoes so they turn red. The result is a red tomato with the taste and texture of a green tomato.</p>
<h3>Economy</h3>
<p>Buying local keeps your money in the local economy. According to the London-based New Economics Foundation, a local farm’s income generated twice as much money for the local economy as a supermarket’s income in the same area.</p>
<h3>Community</h3>
<p>Each item that we carry has its own unique story. Buying locally means you are supporting the family farmers and ranchers that raised your food. Connecting to the sources of your food is a very meaningful part of enjoying your meals.</p>
</div>
</div>
</div>
<!-- Container (Services Section) -->
<div id="services" class="container-fluid text-center">
<h2>OUR BELIEF</h2>
<h4>What we offer</h4>
<br>
<div class="row slideanim">
<div class="col-sm-4">
<span class="glyphicon glyphicon-off logo-small"></span>
<h4>POWER</h4>
<p>Availability of products at your touch</p>
</div>
<div class="col-sm-4">
<span class="glyphicon glyphicon-heart logo-small"></span>
<h4>LOVE</h4>
<p>Treating our customers with love</p>
</div>
<div class="col-sm-4">
<span class="glyphicon glyphicon-lock logo-small"></span>
<h4>JOB DONE</h4>
<p>Delivery services for all our products within 5 hours of placing the order</p>
</div>
</div>
<br><br>
<div class="row slideanim">
<div class="col-sm-4">
<span class="glyphicon glyphicon-leaf logo-small"></span>
<h4>GREEN</h4>
<p>100% Organic Products </p>
</div>
<div class="col-sm-4">
<span class="glyphicon glyphicon-certificate logo-small"></span>
<h4>CERTIFIED</h4>
<p>Certified by all Food authorities in Malaysia.</p>
</div>
<div class="col-sm-4">
<span class="glyphicon glyphicon-eye-open logo-small"></span>
<h4>VISIBILITY</h4>
<p>We invite all of our premium customers to visit our farms, to have a look at our farm setup.</p>
</div>
</div>
</div>
<!-- Container (Portfolio Section) -->
<div id="portfolio" class="container-fluid text-center bg-grey">
<h2>PRODUCTS</h2><br>
<h4>What we provide!</h4>
<div class="row text-center slideanim">
<div class="col-sm-4">
<div class="thumbnail">
<img src="img/food_1.jpg" alt="Paris" width="400" height="300">
<p><strong>A steak which surpases Nusret</strong></p>
<p>Yes, It's our farm-bred Australian Beef medium rare steak</p>
</div>
</div>
<div class="col-sm-4">
<div class="thumbnail">
<img src="img/farm_2.jpg" alt="New York" width="400" height="300">
<p><strong>Mooooooo!!!! Australian Bulls!</strong></p>
<p>Highest quality bred cows</p>
</div>
</div>
<div class="col-sm-4">
<div class="thumbnail">
<img src="img/restaurant_1.jpg" alt="San Francisco" width="400" height="300">
<p><strong>Door-Delivery-Service</strong></p>
<p>Step up your game by providing your customers with our exquisite beef!</p>
</div>
</div>
</div><br>
<h2>What our customers say</h2>
<div id="myCarousel" class="carousel slide text-center" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
<li data-target="#myCarousel" data-slide-to="3"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<h4>"If you want to buy the best meat in town!Farmable is the platform to purchase it from!"<br><span>Michael Roe, Vice President, Food Street Kuching</span></h4>
</div>
<div class="item">
<h4>"One word... WOW!! They definitely provided the platform to purchase all your organic foods!"<br><span>John Doe, Salesman, Rep Inc</span></h4>
</div>
<div class="item">
<h4>"I feel safe purchasing organic grown products at Farmable, farms and I know for sure that"<br><span>Michelle Tan, House Mom</span></h4>
</div>
<div class="item">
<h4>"Farmable truly provides visibility for their users, I had the privelage of visiting their farms and I must say, I was astonished at how professional they are at what they do!"<br><span>Krystal Li, Director of Food Authority, Government</span></h4>
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<!-- Container (Pricing Section) -->
<div id="pricing" class="container-fluid">
<div class="text-center">
<h2>Pricing</h2>
<h4>Bundle purchase for fresh items available at Farmable</h4>
</div>
<div class="row slideanim">
<!-- VEGETABLES SECTION -->
<div class="col-sm-4 col-xs-12">
<div class="panel panel-default text-center">
<div class="panel-heading">
<h1>Vegetables</h1>
<!-- carousel for vegetable-->
<div id="myCarousel" class="carousel slide text-center" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
<li data-target="#myCarousel" data-slide-to="3"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<h4>"Fresh Bidin!"</h4>
</div>
<div class="item">
<h4>"Fresh Choysam!"</h4>
</div>
<div class="item">
<h4>"Fresh RedOnion!"</h4>
</div>
<div class="item">
<h4>"Fresh Kangkung!"</h4>
</div>
</div>
</div>
<!-- carousel ends here for vegetables -->
</div>
<div class="panel-body">
<?php
$query1= "SELECT * FROM inventory where itemCategory= 'Vegetables' LIMIT 3";
$result1 = mysqli_query($connection, $query1);
while ($row1 = mysqli_fetch_assoc($result1))
{ ?>
<p><strong><?php echo $row1["itemName"]; ?></strong>--</p>
<img src="<?php echo $row1["Image"]; ?>">
</div>
<?php } ?>
<div class="panel-footer">
<h3>PRICE DETAILS 1</h3>
<p>Limited Time Offer</p>
<button class="btn btn-lg">Purchase</button>
</div>
</div>
</div>
<!-- FRUITS SECTION -->
<div class="col-sm-4 col-xs-12">
<div class="panel panel-default text-center">
<div class="panel-heading">
<h1>Fruits</h1>
<!-- carousel for Fruits-->
<div id="myCarousel" class="carousel slide text-center" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
<li data-target="#myCarousel" data-slide-to="3"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<h4>"Fresh Oranges!"</h4>
</div>
<div class="item">
<h4>"Fresh Apples!"</h4>
</div>
<div class="item">
<h4>"Fresh Mangosteen!"</h4>
</div>
<div class="item">
<h4>"Fresh Papaya!"</h4>
</div>
</div>
</div>
<!-- carousel ends here for fruits -->
</div>
<div class="panel-body">
<?php
$query1= "SELECT * FROM inventory where itemCategory= 'Fruits' LIMIT 3";
$result1 = mysqli_query($connection, $query1);
while ($row1 = mysqli_fetch_assoc($result1))
{ ?>
<p><strong><?php echo $row1["itemName"]; ?></strong> --</p>
<img src="<?php echo $row1["Image"]; ?>">
<?php } ?>
</div>
<div class="panel-footer">
<h3>PRICE DETAILS</h3>
<p>Limited Time Offer</p>
<button class="btn btn-lg">Purchase</button>
</div>
</div>
</div>
<!-- MEATS SECTION -->
<div class="col-sm-4 col-xs-12">
<div class="panel panel-default text-center">
<div class="panel-heading">
<h1>Meats</h1>
<!-- carousel for meats-->
<div id="myCarousel" class="carousel slide text-center" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
<li data-target="#myCarousel" data-slide-to="3"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<h4>"Fresh Beef!"</h4>
</div>
<div class="item">
<h4>"Fresh Chicken!"</h4>
</div>
<div class="item">
<h4>"Fresh Mutton!"</h4>
</div>
<div class="item">
<h4>"Fresh Lamb!"</h4>
</div>
</div>
</div>
<!-- carousel ends here for meats -->
</div>
<div class="panel-body">
<?php
$query1= "SELECT * FROM inventory where itemCategory= 'Meats' LIMIT 3";
$result1 = mysqli_query($connection, $query1);
while ($row1 = mysqli_fetch_assoc($result1))
{ ?>
<p><strong> <?php echo $row1["itemName"]; ?> </strong> -- </p>
<img src="<?php echo $row1["Image"]; ?>">
<?php } ?>
</div>
<div class="panel-footer">
<h3>PRICE DETAILS</h3>
<p>Limited Time Offer</p>
<!-- WILL WORK ON IT LATER -->
<a name="product" id="productP">
<button class="btn btn-lg" id="purchase_meat">Purchase</button>
</a>
</div>
</div>
</div>
</div>
</div>
<!-- Modal Shopping Cart content for purchasing an Meats-->
<div class="modal fade" id="shop" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header" style="padding:35px 50px;">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4><span class="glyphicon glyphicon-shopping-cart"></span>Purchase Meats</h4>
</div>
<div class="modal-body" style="padding:40px 50px;">
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>Select</th>
<th>Item name</th>
<th>Unit Price</th>
<th>Quantity</th>
<th></th>
</tr>
</thead>
<!-- ============================================= -->
<!-- DUMMY MODAL SHOPPING CART STARTS HERE -->
<!-- ============================================= -->
<tbody>
<tr>
<td>
<input type="checkbox" id="test1" />
<label for="test1"></label>
</td>
<td>Chicken</td>
<td>RM 8</td>
<td>100</td>
<td>
<button data-toggle="tooltip" data-placement="left" title="Update"><img src="img/plus.png"></button>
<button data-toggle="tooltip" data-placement="right" title="Delete "><img src="img/subtract.png"></button>
</td>
</tr>
<tr>
<td>
<input type="checkbox" id="test1" />
<label for="test1"></label>
</td>
<td>Beef</td>
<td>RM 10</td>
<td>10</td>
<td>
<button data-toggle="tooltip" data-placement="left" title="Update"><img src="img/plus.png"></button>
<button data-toggle="tooltip" data-placement="right" title="Delete "><img src="img/subtract.png"></button>
</td>
</tr>
<div class="modal-footer">
</div>
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<tr class="active lead">
<td colspan="4">Total</td>
</td> RM 500.00 </td>
<br>
<br>
<td><a href="#" class="btn btn-danger btn-sm">Clear all</a>
</td>
</tr>
<a href="#" class="btn btn-default" data-dismiss="modal">Continue</a>
<button type="button" class="btn btn-success" data-dismiss="modal" class="glyphicon glyphicon-chevron-right">Check out</button>
</div>
</div>
</div>
</div>
</div>
<!-- JS for the modal -->
<script>
$(document).ready(function(){
$("#purchase_meat").click(function(){
$("#shop").modal();
});
});
</script>
<!-- ============================================= -->
<!-- DUMMY MODAL SHOPPING CART ENDS HERE -->
<!-- ============================================= -->
<!-- Container (Contact Section) -->
<form name="enquiry_form" action="database/enquiry_process.php" method="POST">
<div id="contact" class="container-fluid bg-grey">
<h2 class="text-center">CONTACT</h2>
<div class="row">
<div class="col-sm-5">
<p>Contact us and we'll get back to you within 24 hours.</p>
<p><span class="glyphicon glyphicon-map-marker"></span> Kuching,Sarawak, MY</p>
<p><span class="glyphicon glyphicon-phone"></span> +00 100000000000</p>
<p><span class="glyphicon glyphicon-envelope"></span> CustomerService@datax.com</p>
</div>
<div class="col-sm-7 slideanim">
<div class="row">
<div class="col-sm-4 form-group">
<input class="form-control" id="name" name="name" placeholder="Name" type="text" required>
</div>
<div class="col-sm-4 form-group">
<input class="form-control" id="email" name="email" placeholder="Email" type="email" required>
</div>
<!-- WORKING ON IT lol -->
<div class="col-sm-4 form-group">
<input class="form-control" id="field" name="subject" type="field" required>
</div>
</div>
<textarea class="form-control" id="comments" name="comments" placeholder="Comment" rows="5"></textarea><br>
<div class="row">
<div class="col-sm-12 form-group">
<button class="btn btn-default pull-right" type="submit">Send</button>
</div>
</div>
</div>
</div>
</div>
</form>
<!-- Just need to get Google Maps API and edit it into the src link, it'll work -->
<!-- Google Maps should go here -->
<!-- <iframe src="https://www.google.com/maps/embed/v1/place?key=AIzaSyDz_1Rk4az74eXiXXKUyC3VHcsSA4q7Q6o&q=Swinburne+University,Kuching+Sarawak;" allowfullscreen="" id="map"> </iframe> -->
<!-- Include javascript file here -->
<script src="js/script.js" type="text/javascript"></script>
<!-- Include footer php here -->
<?php include_once 'include/footer.php';?>
</body>
<!-- ============================================ -->
<!-- BODY OF THE 'myPage' PAGE ENDS -->
<!-- ============================================ -->
</html>