-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
309 lines (277 loc) · 11.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
<!doctype html>
<?php
// Start the session
session_start();
$ip=$_SERVER['REMOTE_ADDR'];
// $mac = shell_exec('arp '.$ip.' | awk \'{print $4}\'');
if(!isset($_SESSION["ip"]) && !isset($_SESSION["uname"])) {
echo '<script type="text/javascript">
window.location = "login.php"
</script>';
}
$servername = "localhost";
$username = "root";
$password = "root";
$dbname = "cipproject";
$user=$_SESSION["uname"];
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
$errors='2';
}
//Get count of previous orders!!!
$sql = "SELECT * FROM orders where username='$user'";
$result = $conn->query($sql);
$id=0;
while($row = $result->fetch_assoc()) {
$id++;
}
?>
<html class="fixed">
<head>
<!-- Basic -->
<meta charset="UTF-8">
<title>CIP Project</title>
<meta name="keywords" content="HTML5 Admin Template" />
<meta name="description" content="Porto Admin - Responsive HTML5 Template">
<meta name="author" content="okler.net">
<!-- Mobile Metas -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<!-- Web Fonts -->
<link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800|Shadows+Into+Light" rel="stylesheet" type="text/css">
<!-- Vendor CSS -->
<link rel="stylesheet" href="assets/vendor/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" href="assets/vendor/font-awesome/css/font-awesome.css" />
<link rel="stylesheet" href="assets/vendor/magnific-popup/magnific-popup.css" />
<link rel="stylesheet" href="assets/vendor/bootstrap-datepicker/css/datepicker3.css" />
<!-- Specific Page Vendor CSS -->
<link rel="stylesheet" href="assets/vendor/jquery-ui/css/ui-lightness/jquery-ui-1.10.4.custom.css" />
<link rel="stylesheet" href="assets/vendor/bootstrap-multiselect/bootstrap-multiselect.css" />
<link rel="stylesheet" href="assets/vendor/morris/morris.css" />
<!-- Theme CSS -->
<link rel="stylesheet" href="assets/stylesheets/theme.css" />
<!-- Skin CSS -->
<link rel="stylesheet" href="assets/stylesheets/skins/default.css" />
<!-- Theme Custom CSS -->
<link rel="stylesheet" href="assets/stylesheets/theme-custom.css">
<!-- Head Libs -->
<script src="assets/vendor/modernizr/modernizr.js"></script>
</head>
<body>
<section class="body">
<!-- start: header -->
<header class="header">
<div class="logo-container">
<a href="../" class="logo">
<img src="assets/images/annauniv.png" height="35" alt="CIP Project" />
</a>
<div class="visible-xs toggle-sidebar-left" data-toggle-class="sidebar-left-opened" data-target="html" data-fire-event="sidebar-left-opened">
<i class="fa fa-bars" aria-label="Toggle sidebar"></i>
</div>
</div>
<!-- start: search & user box -->
<div class="header-right">
<div id="userbox" class="userbox">
<a href="#" data-toggle="dropdown">
<figure class="profile-picture">
<img src="assets/images/!logged-user.jpg" alt=<?php echo $_SESSION["uname"] ?> class="img-circle" data-lock-picture="assets/images/!logged-user.jpg" />
</figure>
<div class="profile-info" data-lock-name=<?php echo $_SESSION["uname"] ?> data-lock-email=<?php echo $_SESSION["uname"] ?>>
<span class="name">Welcome[<b><?php echo $_SESSION["uname"] ?></b>]</span>
<span class="role">User</span>
</div>
<i class="fa custom-caret"></i>
</a>
<div class="dropdown-menu">
<ul class="list-unstyled">
<li class="divider"></li>
<li>
<a role="menuitem" tabindex="-1" href="#" data-lock-screen="true"><i class="fa fa-lock"></i> Change Username</a>
</li>
<li>
<a role="menuitem" tabindex="-1" href="logout.php"><i class="fa fa-power-off"></i> Logout</a>
</li>
</ul>
</div>
</div>
</div>
<!-- end: search & user box -->
</header>
<!-- end: header -->
<div class="inner-wrapper">
<!-- start: sidebar -->
<aside id="sidebar-left" class="sidebar-left">
<div class="sidebar-header">
<div class="sidebar-title">
Navigation
</div>
<div class="sidebar-toggle hidden-xs" data-toggle-class="sidebar-left-collapsed" data-target="html" data-fire-event="sidebar-left-toggle">
<i class="fa fa-bars" aria-label="Toggle sidebar"></i>
</div>
</div>
<div class="nano">
<div class="nano-content">
<nav id="menu" class="nav-main" role="navigation">
<ul class="nav nav-main">
<li class="nav-active">
<a href="index.php">
<i class="fa fa-home" aria-hidden="true"></i>
<span>Welcome</span>
</a>
</li>
<li>
<a href="previousorder.php">
<span class="pull-right label label-primary"><?php echo $id;?></span>
<i class="fa fa-history" aria-hidden="true"></i>
<span>Previous Orders</span>
</a>
</li>
<li>
<a href="addorder.php">
<i class="fa fa-cutlery" aria-hidden="true"></i>
<span>Add Order</span>
</a>
</li>
</ul>
</nav>
</div>
</div>
</aside>
<!-- end: sidebar -->
<section role="main" class="content-body">
<header class="page-header">
<h2>Welcome</h2>
</header>
<!-- start: page -->
<div class="row">
<div class="col-md-6 col-lg-12 col-xl-6">
<section class="panel">
<div class="panel-body">
<div class="row">
<div class="col-lg-8">
<div class="chart-data-selector" id="salesSelectorWrapper">
<h2>
Current Token on process:
<strong>TN06</strong>
</h2></br></br>
<h3>You will be served "" if you order now!</h3>
Scroll below to add an order.</br>
New Orders get new Tokens Automatically.</br>
Note: Predictable Token Number may vary from the token shown above.</br>
</div>
</div>
<div class="col-lg-4 text-center">
<h2 class="panel-title mt-md">Your Serving</h2>
<div class="circular-bar">
<div class="circular-bar-chart" data-percent="75" data-plugin-options='{ "barColor": "#2BAAB1", "delay": 600 }'>
<strong>Serving queue</strong>
<label><span class="percent">75</span>%</label>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<div class="col-md-6 col-lg-12 col-xl-6">
<div class="row">
<div class="col-md-12 col-lg-6 col-xl-6">
<section class="panel panel-featured-left panel-featured-tertiary">
<div class="panel-body">
<div class="widget-summary">
<div class="widget-summary-col widget-summary-col-icon">
<div class="summary-icon bg-tertiary">
<i class="fa fa-shopping-cart"></i>
</div>
</div>
<div class="widget-summary-col">
<div class="summary">
<h4 class="title">Previous Orders</h4>
<div class="info">
<strong class="amount"><?php echo $id;?></strong>
</div>
</div>
<div class="summary-footer">
<a class="text-muted text-uppercase" href="previousorder.php">(view all)</a>
</div>
</div>
</div>
</div>
</section>
</div>
<div class="col-md-12 col-lg-6 col-xl-6">
<section class="panel panel-featured-left panel-featured-quartenary">
<div class="panel-body">
<div class="widget-summary">
<div class="widget-summary-col widget-summary-col-icon">
<div class="summary-icon bg-quartenary">
<i class="fa fa-cutlery"></i>
</div>
</div>
<div class="widget-summary-col">
<div class="summary">
<h4 class="title">Add Order</h4>
<div class="info">
<strong class="amount">Order Now!</strong>
</div>
</div>
<div class="summary-footer">
<a class="text-muted text-uppercase" href="addorder.php">(get me there!)</a>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</div>
</div>
<!-- end: page -->
</section>
</div>
</section>
<!-- Vendor -->
<script src="assets/vendor/jquery/jquery.js"></script>
<script src="assets/vendor/jquery-browser-mobile/jquery.browser.mobile.js"></script>
<script src="assets/vendor/bootstrap/js/bootstrap.js"></script>
<script src="assets/vendor/nanoscroller/nanoscroller.js"></script>
<script src="assets/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script src="assets/vendor/magnific-popup/magnific-popup.js"></script>
<script src="assets/vendor/jquery-placeholder/jquery.placeholder.js"></script>
<!-- Specific Page Vendor -->
<script src="assets/vendor/jquery-ui/js/jquery-ui-1.10.4.custom.js"></script>
<script src="assets/vendor/jquery-ui-touch-punch/jquery.ui.touch-punch.js"></script>
<script src="assets/vendor/jquery-appear/jquery.appear.js"></script>
<script src="assets/vendor/bootstrap-multiselect/bootstrap-multiselect.js"></script>
<script src="assets/vendor/jquery-easypiechart/jquery.easypiechart.js"></script>
<script src="assets/vendor/flot/jquery.flot.js"></script>
<script src="assets/vendor/flot-tooltip/jquery.flot.tooltip.js"></script>
<script src="assets/vendor/flot/jquery.flot.pie.js"></script>
<script src="assets/vendor/flot/jquery.flot.categories.js"></script>
<script src="assets/vendor/flot/jquery.flot.resize.js"></script>
<script src="assets/vendor/jquery-sparkline/jquery.sparkline.js"></script>
<script src="assets/vendor/raphael/raphael.js"></script>
<script src="assets/vendor/morris/morris.js"></script>
<script src="assets/vendor/gauge/gauge.js"></script>
<script src="assets/vendor/snap-svg/snap.svg.js"></script>
<script src="assets/vendor/liquid-meter/liquid.meter.js"></script>
<script src="assets/vendor/jqvmap/jquery.vmap.js"></script>
<script src="assets/vendor/jqvmap/data/jquery.vmap.sampledata.js"></script>
<script src="assets/vendor/jqvmap/maps/jquery.vmap.world.js"></script>
<script src="assets/vendor/jqvmap/maps/continents/jquery.vmap.africa.js"></script>
<script src="assets/vendor/jqvmap/maps/continents/jquery.vmap.asia.js"></script>
<script src="assets/vendor/jqvmap/maps/continents/jquery.vmap.australia.js"></script>
<script src="assets/vendor/jqvmap/maps/continents/jquery.vmap.europe.js"></script>
<script src="assets/vendor/jqvmap/maps/continents/jquery.vmap.north-america.js"></script>
<script src="assets/vendor/jqvmap/maps/continents/jquery.vmap.south-america.js"></script>
<!-- Theme Base, Components and Settings -->
<script src="assets/javascripts/theme.js"></script>
<!-- Theme Custom -->
<script src="assets/javascripts/theme.custom.js"></script>
<!-- Theme Initialization Files -->
<script src="assets/javascripts/theme.init.js"></script>
<!-- Examples -->
<script src="assets/javascripts/dashboard/examples.dashboard.js"></script>
</body>
</html>