-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.php
executable file
·340 lines (323 loc) · 17.7 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
<?php
session_start();
if (isset($_SESSION["sess_id"])) {
$usr_id = $_SESSION["sess_id"];
if ($_SESSION["sess_status"] == "admin") {
header('location: admin/pnl_user');
}
if ($_SESSION["sess_status"] == "shop") {
header('location: shop/pnl_order');
}
}
if (isset($_GET['id'])) {
$id = $_GET['id'];
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="favicon.ico">
<title>Food Ordering Management System</title>
<link rel="stylesheet" href="bootstrap/css/all.min.css">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<script src="bootstrap/js/jquery-3.4.1.min.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<style type="text/css">
.masthead {
height: 100vh;
min-height: 500px;
background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
url('https://source.unsplash.com/-YHSwy6uqvk/1920x1080');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
</style>
</head>
<body class="content">
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-light sticky-top shadow bg-light">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo01" aria-controls="navbarTogglerDemo01" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarTogglerDemo01">
<a class="navbar-brand" href="#">FOS</a>
<ul class="navbar-nav mr-auto mt-2 mt-lg-0">
<li class="nav-item active">
<a class="nav-link" href="#">Home<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="browse">Browse</a>
</li>
<li class="nav-item">
<a class="nav-link" href="checkout">Checkout</a>
</li>
<li class="nav-item">
<a class="nav-link" href="order">Status</a>
</li>
</ul>
<div class="my-2 my-lg-0">
<ul class="navbar-nav ml-auto">
<?php
if (isset($_SESSION['sess_id'])) {
?>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" id="navbarDropdownMenuLink-333" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-user"></i> </a>
<div class="dropdown-menu dropdown-menu-right dropdown-default" aria-labelledby="navbarDropdownMenuLink-333">
<a class="dropdown-item" href="profile">Profile</a>
<a class="dropdown-item" href="action?act=lgout">Logout</a>
</div>
</li>
<?php
} else {
?>
<a href="" class="btn btn-outline-success my-2 my-sm-0" data-toggle="modal" data-target="#modalLoginForm">Login</a>
<?php
}
?>
</ul>
</div>
</div>
</nav>
<!-- Alert -->
<div id="alert" style="position:absolute;z-index:1;" class="m-5">
</div>
<!-- Content -->
<!-- Full Page Image Header with Vertically Centered Content -->
<header class="masthead">
<div class="container h-100">
<div class="row h-100 align-items-center">
<?php
if (isset($_SESSION['sess_id'])) {
echo '<div class="col-12 text-center text-white">';
echo '<h1 class="font-weight-light">Welcome, ' . $_SESSION["sess_username"] . '!</h1>';
echo '<p class="lead">Browse meal to feed your tummy now.</p>';
echo '<a href="profile?act=update" class="btn btn-outline-light">Update your info</a>';
echo '</div>';
} else {
echo '<div class="col-12 text-center text-white">';
echo '<h1 class="font-weight-light">A great way to fill your appetite </h1>';
echo '<p class="lead"><a href="browse" class="btn btn-outline-light">Order now.</a></p>';
echo '</div>';
}
?>
</div>
</div>
</header>
<!-- Page Content -->
<section class="py-5">
<div class="container text-justify">
<h2 class="font-weight-light">FOS's About Us</h2>
<p> FOS is sub-application in Food Delivery Management System(FDMS) family.
We simplified food ordering and take-away in a simple steps that will ease enagegment between customer and food vendor.
this is to ensure our customer satisfaction and provide the best facility and automation in the simplest way possible.
FOS aims to become the number one user choice in food order and management in 2021.
Helps us achieve our target by supporting us and keep using our beloved apps to enjoy your daily meals.
Keep in touch with our daily promotion and services pricing changes. We hope you will have the best time using our apps.
</p>
</div>
<div class="container pt-4 text-justify">
<h2 class="font-weight-light">FOS's Policy</h2>
<p>
These Terms of Use (“Terms”) govern your use of the websites and mobile applications provided by foodpanda (or referred to as “us”)
(collectively the “Platforms”). Please read these Terms carefully. By accessing and using the Platforms, you agree that you have read,
understood and accepted the Terms including any additional terms and conditions and any policies referenced herein, available on the
Platforms or available by hyperlink. If you do not agree or fall within the Terms, please do not use the Platforms.
</p>
<p>
The Platforms may be used by (i) natural persons who have reached 18 years of age and (ii) corporate legal entities, e.g companies.
Where applicable, these Terms shall be subject to country-specific provisions as set out herein.
</p>
<p>
Users below the age of 18 must obtain consent from parent(s) or legal guardian(s), who by accepting these Terms shall agree to take
responsibility for your actions and any charges associated with your use of the Platforms and/or purchase of Goods. If you do not have
consent from your parent(s) or legal guardian(s), you must stop using/accessing the Platforms immediately.
</p>
<p>
foodpanda reserves the right to change or modify these Terms (including our policies which are incorporated into these Terms) at any time.
You are strongly recommended to read these Terms regularly. You will be deemed to have agreed to the amended Terms by your continued use
of the Platforms following the date on which the amended Terms are posted.
</p>
</div>
</section>
<!-- Model Signup -->
<div class="modal fade" id="modalSignupForm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form action="action.php" method="post" id="signup_form">
<div class="modal-header text-center">
<h4 class="modal-title w-100 font-weight-bold">Welcome to our family!</h4>
</div>
<div class="modal-body mx-3">
<div class="row">
<div class="col">
<div class="input-group mb-2">
<div class="input-group-prepend">
<div class="input-group-text"><i class="fas fa-user"></i></div>
</div>
<input type="text" class="form-control" id="fullname" name="fullname" placeholder="Enter your name">
</div>
</div>
</div>
<div class="row">
<div class="col">
<div class="input-group mb-2">
<div class="input-group-prepend">
<div class="input-group-text"><i class="fas fa-user"></i></div>
</div>
<input type="text" class="form-control" id="usr" name="username" placeholder="Create a username">
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<div class="input-group mb-2">
<div class="input-group-prepend">
<div class="input-group-text"><i class="fas fa-lock"></i></div>
</div>
<input type="password" class="form-control" id="pwd" name="password" placeholder="Choose a password">
</div>
</div>
<div class="col-6">
<div class="input-group mb-2">
<div class="input-group-prepend">
<div class="input-group-text"><i class="fas fa-lock"></i></div>
</div>
<input type="password" class="form-control" id="c_pwd" name="confirm_password" placeholder="Confirm password">
</div>
</div>
</div>
<div class="row">
<div class="col">
<div class="input-group mb-2">
<div class="input-group-prepend">
<div class="input-group-text"><i class="fas fa-map-marked-alt"></i></div>
</div>
<textarea class="form-control" rows="3" id="address" name="address" placeholder="Enter your address"></textarea>
</div>
</div>
</div>
</div>
<div class="modal-footer d-flex justify-content-center">
<div class="col text-center">
<input type="hidden" name="signup" value="user">
<input type="submit" class="btn btn-default" value="Sign Up">
</div>
</div>
</form>
</div>
</div>
</div>
<!-- Model Vendor -->
<div class="modal fade" id="modalVendorForm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form action="action.php" method="post" id="vendor_form">
<div class="modal-header text-center">
<h4 class="modal-title w-100 font-weight-bold">Become a vendor!</h4>
</div>
<div class="modal-body mx-3">
<div class="row">
<div class="col">
<div class="input-group mb-2">
<div class="input-group-prepend">
<div class="input-group-text"><i class="fas fa-user"></i></div>
</div>
<input type="text" class="form-control" id="shop_name" name="shop_name" placeholder="Enter shop name">
</div>
</div>
</div>
<div class="row">
<div class="col">
<div class="input-group mb-2">
<div class="input-group-prepend">
<div class="input-group-text"><i class="fas fa-user"></i></div>
</div>
<input type="text" class="form-control" id="shop_username" name="shop_username" placeholder="Create a shop username">
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<div class="input-group mb-2">
<div class="input-group-prepend">
<div class="input-group-text"><i class="fas fa-lock"></i></div>
</div>
<input type="password" class="form-control" id="shop_password" name="shop_password" placeholder="Choose a password">
</div>
</div>
<div class="col-6">
<div class="input-group mb-2">
<div class="input-group-prepend">
<div class="input-group-text"><i class="fas fa-lock"></i></div>
</div>
<input type="password" class="form-control" id="shop_confirm_password" name="shop_confirm_password" placeholder="Confirm password">
</div>
</div>
</div>
</div>
<div class="modal-footer d-flex justify-content-center">
<div class="col text-center">
<input type="hidden" name="signup" value="vendor">
<input type="submit" class="btn btn-default" value="Register">
</div>
</div>
</form>
</div>
</div>
</div>
<!-- Model Login -->
<div class="modal fade" id="modalLoginForm" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<form action="action.php" method="post" id="login_form">
<div class="modal-header text-center">
<h4 class="modal-title w-100 font-weight-bold">Hello.</h4>
</div>
<div class="modal-body mx-3">
<div class="row">
<div class="col">
<label class="sr-only" for="inlineFormInputGroup1"></label>
<div class="input-group mb-2">
<div class="input-group-prepend">
<div class="input-group-text"><i class="fas fa-user"></i></div>
</div>
<input type="text" class="form-control" name="username" placeholder="Username">
</div>
</div>
</div>
<div class="row">
<div class="col">
<label class="sr-only" for="inlineFormInputGroup2"></label>
<div class="input-group mb-2">
<div class="input-group-prepend">
<div class="input-group-text"><i class="fas fa-lock"></i></div>
</div>
<input type="password" class="form-control" name="password" placeholder="Password">
</div>
</div>
</div>
<div class="row">
<div class="col">
<small class="text-muted text-center"> Don't have an account? <a href="" class="text-primary" data-toggle="modal" data-dismiss="modal" data-target="#modalSignupForm">Sign up</a> now!</small><br>
<small class="text-muted text-center"> Become a vendor, register <a href="" class="text-primary" data-toggle="modal" data-dismiss="modal" data-target="#modalVendorForm">here</a>.</small>
</div>
</div>
</div>
<div class="modal-footer d-flex justify-content-center">
<div class="col text-center">
<input type="hidden" name="login">
<input type="submit" class="btn btn-default" value="Login">
</div>
</div>
</form>
</div>
</div>
</div>
<!-- Script -->
<script src="bootstrap/js/app.js"></script>
</body>
</html>