-
Notifications
You must be signed in to change notification settings - Fork 39
/
menu.php
219 lines (122 loc) · 4.84 KB
/
menu.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
<?php
session_start();
require "admin/includes/functions.php";
require "admin/includes/db.php";
$bfast = "";
$lunch = "";
$dinner = "";
$special = "";
$get_recent = $db->query("SELECT * FROM food");
if($get_recent->num_rows) {
while($row = $get_recent->fetch_assoc()) {
if($row['food_category'] == "breakfast") {
$bfast .= "<div class='parallax_item'>
<a href='detail.php?fid=".$row['id']."'><img src='image/FoodPics/".$row['id'].".jpg' width='80px' height='80px' />
<div class='detail'>
<h4>".$row['food_name']."</h4>
<p class='desc'>".substr($row['food_description'], 0, 33)."...</p>
<p class='price'>#".$row['food_price']."</p>
</div>
<p class='clear'></p>
</a>
</div>";
}elseif($row['food_category'] == "lunch") {
$lunch .= "<div class='parallax_item'>
<a href='detail.php?fid=".$row['id']."'><img src='image/FoodPics/".$row['id'].".jpg' width='80px' height='80px' />
<div class='detail'>
<h4>".$row['food_name']."</h4>
<p class='desc'>".substr($row['food_description'], 0, 33)."...</p>
<p class='price'>#".$row['food_price']."</p>
</div>
<p class='clear'></p>
</a>
</div>";
}elseif($row['food_category'] == "dinner") {
$dinner .= "<div class='parallax_item'>
<a href='detail.php?fid=".$row['id']."'><img src='image/FoodPics/".$row['id'].".jpg' width='80px' height='80px' />
<div class='detail'>
<h4>".$row['food_name']."</h4>
<p class='desc'>".substr($row['food_description'], 0, 33)."...</p>
<p class='price'>#".$row['food_price']."</p>
</div>
<p class='clear'></p>
</a>
</div>";
}elseif($row['food_category'] == "special") {
$special .= "<div class='parallax_item'>
<a href='detail.php?fid=".$row['id']."'><img src='image/FoodPics/".$row['id'].".jpg' width='80px' height='80px' />
<div class='detail'>
<h4>".$row['food_name']."</h4>
<p class='desc'>".substr($row['food_description'], 0, 33)."...</p>
<p class='price'>#".$row['food_price']."</p>
</div>
<p class='clear'></p>
</a>
</div>";
}
}
}else{
}
?>
<!Doctype html>
<html lang="en">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<head>
<title>MFORS</title>
<link rel="stylesheet" href="css/main.css" />
<script src="js/jquery.min.js" ></script>
<script src="js/myscript.js"></script>
</head>
<body>
<?php require "includes/header.php"; ?>
<div class="parallax" onclick="remove_class()">
<div class="parallax_head">
<h2>Discover</h2>
<h3>FOOD MENU</h3>
</div>
</div>
<div class="content" onclick="remove_class()">
<div class="inner_content on_parallax">
<h2><span class="fresh">BreakFast Menu</span></h2>
<div class="parallax_content">
<?php echo ($bfast == "") ? "<h3 style=' text-align: center; font-weight: lighter; padding: 10px 0px; background: #ffeeee; color: #333;'>Your shopping basket is empty</h3>" : $bfast; ?>
<p class="clear"></p>
</div>
</div>
</div>
<div class="content" onclick="remove_class()">
<div class="inner_content on_parallax">
<h2><span class="fresh">Lunch Menu</span></h2>
<div class="parallax_content">
<?php echo ($lunch == "") ? "<h3 style=' text-align: center; font-weight: lighter; padding: 10px 0px; background: #ffeeee; color: #333;'>Your shopping basket is empty</h3>" : $lunch; ?>
<p class="clear"></p>
</div>
</div>
</div>
<div class="content" onclick="remove_class()">
<div class="inner_content on_parallax">
<h2><span class="fresh">Dinner Menu</span></h2>
<div class="parallax_content">
<?php echo ($dinner == "") ? "<h3 style=' text-align: center; font-weight: lighter; padding: 10px 0px; background: #ffeeee; color: #333;'>Your shopping basket is empty</h3>" : $dinner; ?>
<p class="clear"></p>
</div>
</div>
</div>
<div class="content" onclick="remove_class()">
<div class="inner_content on_parallax">
<h2><span class="fresh">Special Menu</span></h2>
<div class="parallax_content">
<?php echo ($special == "") ? "<h3 style=' text-align: center; font-weight: lighter; padding: 10px 0px; background: #ffeeee; color: #333;'>Your shopping basket is empty</h3>" : $special; ?>
<p class="clear"></p>
</div>
</div>
</div>
<div class="footer_parallax" onclick="remove_class()">
<div class="on_footer_parallax">
<p>© <?php echo strftime("%Y", time()); ?> <span>MyRestaurant</span>. All Rights Reserved</p>
</div>
</div>
</body>
</html>