-
Notifications
You must be signed in to change notification settings - Fork 29
/
table.php
168 lines (142 loc) · 4.72 KB
/
table.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
<!DOCTYPE html>
<html lang="en">
<head>
<?php
include ("head.php");
?>
</head>
<body>
<?php
error_reporting(0);
include ("./includes/settings.inc.php"); // database settings
include ("./includes/connectdb.inc.php");
session_start();
if(isset($_SESSION['uName'])) {
include ("./includes/floorplan.php");
include ("./includes/category.php");
include ("./includes/item.php");
include ("./includes/orderline.php");
include ("./includes/order.php");
include ("change table.php");
include ("select category.php");
include ("add items.php");
include ("confirmation.php");
?>
<div id="wrapper">
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<?php
include ("header.php");
include ("menu.php");
?>
</nav>
<div id="page-wrapper">
<div class="container-fluid">
<!-- Page Heading -->
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">
Table Management System
<small>Controls</small>
</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-dashboard"></i> <a href="table.php">TMS</a>
</li>
<li class="active">
<i class="fa fa-file"></i> Configuration
</li>
</ol>
</div>
</div>
<!-- /.row -->
<div class="well">
<p>Please select a table from the list allocated to you.</p>
<div class="tableContainer">
<?php
$tabs = new Table;
$limit = $tabs->tabCount();
$status = $tabs->tabStatus();
$tables = explode(";",$status);
for($i = 0; $i<$limit; $i++) {
$tabDet = explode("-",$tables[$i]);
echo "<div class='circleBase circleSize ".$tabDet[1]."'>".$tabDet[0]."</div>";
}
if(isset($_REQUEST['id']) && $_REQUEST['status']!="") {
$tabs->updateStatus($_REQUEST['id'], $_REQUEST['status']);
}
$order = new OrderLines;
if(isset($_REQUEST['price']) && $_REQUEST['price']!="") {
$order = new OrderLines;
$order->addItem($_REQUEST['tabid'], $_REQUEST['desc'], $_REQUEST['quantity'], $_REQUEST['price']);
echo $order->viewLineItem($_REQUEST['tabid']);
}$place = new PlaceOrders;
if(isset($_REQUEST['tabidOrder']) && $_REQUEST['tabidOrder']!="") {
$place = new PlaceOrders;
$place->addOrder($_REQUEST['tabidOrder']);
}
?>
<div class="controls">
<button class="btn btn-disabled" data-toggle="modal" data-target="#selCategory" id="addItem" disabled>Add Items</button>
<button class="btn btn-disabled" data-toggle="modal" data-target="#status" id="changeStatus" disabled>Change Status</button>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<!-- /.container-fluid -->
</div>
<!-- /#page-wrapper -->
</div>
<!-- /#wrapper -->
<?php
} else {
include ("login.php");
?>
<div class="wrapIndex">
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<?php
include ("header.php");
?>
</nav>
<div id="page-wrapper">
<div class="container-fluid">
<!-- Page Heading -->
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">
Restaurant Automation System
<small>RAS</small>
</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-dashboard"></i> <a href="index.php">RAS</a>
</li>
<li class="active">
<i class="fa fa-file"></i> Warning
</li>
</ol>
</div>
</div>
<!-- /.row -->
<div class="well">
<p>Authorized Users Only</p>
</div>
</div>
<!-- /.container-fluid -->
</div>
<!-- /#page-wrapper -->
</div>
<!-- /#wrapper -->
<?php
}
?>
<!-- jQuery Version 1.11.0 -->
<script src="js/jquery-1.11.0.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<!-- Custom JavaScript -->
<script src="js/custom.js"></script>
</body>
</html>