-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.php
206 lines (146 loc) · 5.42 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
<?php
if(!file_exists('inc/config/db.inc.config.php')){
header('location:install/start.php');
die();
}
include('inc/header.php');
?>
<body>
<?php include('inc/navbar.php'); ?>
<?php include('inc/session_restart.php'); ?>
<div class="container-fluid">
<div class="container">
<div class="row">
<div class="col-md-8">
<!---searched item here------->
<div id="result"></div>
<!---searched item here------->
<!---searched item here------->
<div id="my_orders_result"></div>
<!---searched item here------->
<div id="main_section">
<div class="row">
<!---initialized order cancellation Modal------->
<?php include "inc/modal_remove_order.php"; ?>
<!---initialized order cancellation Modal------->
<div class="col-md-12">
<h4 class="page-header"><i class="fas fa-menorah" ></i> Menu</h4><br>
<ul class="nav nav-tabs">
<?php
$sql="select * from category order by categoryid asc limit 1";
$fquery=$conn->query($sql);
$frow=$fquery->fetch_array();
?>
<li class="active">
<a data-toggle="tab" href="#<?php echo $frow['categoryid'] ?>">
<?php echo $frow['catname'] ?>
</a>
</li>
<?php
$sql="select * from category order by categoryid asc";
$nquery=$conn->query($sql);
$num=$nquery->num_rows-1;
$sql="select * from category order by categoryid asc limit 1, $num";
$query=$conn->query($sql);
while($row=$query->fetch_array()){
?>
<li><a data-toggle="tab" href="#<?php echo $row['categoryid'] ?>"><?php echo $row['catname'] ?></a></li>
<?php
}
?>
</ul>
<!---content render here------->
<!---content before ajax loader------->
<div class="col-md-12 col-md-offset-5 col-xs-12 col-xs-offset-4" >
<img id="fetching_items" src="img/loader.gif" style="height:100px;width:100px;display:none;"/>
</div>
<!---content before ajax loader------->
<div class="tab-content" id="display_item"></div>
<!---content render here------->
</div>
<?php
if(!isset($_COOKIE['REP_NAME']) && !isset($_COOKIE['CODE']))
{
?>
<!---initialized Modal------->
<div class="modal fade" id="session_init" data-backdrop="static" data-keyboard="false" style="margin-top: 80px;">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="row">
<div class="col-md-12">
<h5 class="modal-title" ><i class="fas fa-smile-beam text-warning" ></i> Welcome, fill in the information below and start your order</h5>
</div>
</div>
</div>
<div class="modal-body">
<h5 class="text-danger"><i class="fas fa-info-circle text-primary" ></i> We do not store any personal data about you. Your anonymous account and will be automatically deleted after 1 day.</h5>
<form method="post" id="session_modal">
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label for="recipient-name" class="col-form-label">Number of persons</label>
<select class="form-control" name="mates" id="mates">
<option disabled selected>Select</option>
<?php
$total=30;
for($i=1;$i<=$total;$i++)
{
?>
<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
<?php
}
?>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label for="recipient-name" class="col-form-label">Table number</label>
<input type="text" class="form-control" name="tbl_no" id="tbl_no">
</div>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<p id="response" class="pull-left" style="margin-top: 5px;"></p>
<button type="button" class="btn btn-primary" id="session_start">Start session <i class="fas fa-chevron-right" ></i></button>
</div>
</div>
</div>
</div>
<!---initialized Modal------->
<?php
}
?>
</div>
</div>
</div>
<div class="col-md-4">
<!---cart item here------->
<?php include('inc/cart_display.php'); ?>
<!---cart item here------->
</div>
</div>
</div>
<?php include "inc/footer.php";?>
<!--
<script type="text/javascript">
$(document).ready(function(){
$("#checkAll").click(function(){
$('input:checkbox').not(this).prop('checked', this.checked);
});
});
</script>-->
<?php include "inc/jquery.php";?>
<?php include "inc/checkout_timer.php";?>
<script type="text/javascript">
$(window).on('load',function(){
$('#session_init').modal('show');
});
</script>
</body>
</html>