-
Notifications
You must be signed in to change notification settings - Fork 0
/
recitem.php
309 lines (284 loc) · 11.2 KB
/
recitem.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
<?php
session_start();
if($_SESSION["stid"] && $_SESSION["studentname"] )
{
$a=$_SESSION["studentname"];
}
else
{
header("location:login.php");
}
?>
<!DOCTYPE html>
<html lang="en">
<!-- Basic -->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Mobile Metas -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Site Metas -->
<title>ONLINE CANTEEN SYSTEM</title>
<meta name="keywords" content="">
<meta name="description" content="">
<meta name="author" content="">
<!-- Site Icons -->
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Site CSS -->
<link rel="stylesheet" href="css/style.css">
<!-- Responsive CSS -->
<link rel="stylesheet" href="css/responsive.css">
<!-- Custom CSS -->
<link rel="stylesheet" href="css/custom.css">
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<script>
function calc()
{
var price = document.getElementById("ticket_price").innerHTML;
var noTickets = document.getElementById("num").value;
var total = parseFloat(price) * noTickets
if (!isNaN(total))
{
document.getElementById("total").innerHTML = total;
document.getElementById("the").innerHTML = total
}
}
</script>
<body>
<div class="main-top">
<div class="container-fluid">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="text-slid-box">
<div id="offer-box" class="carouselTicker">
<ul class="offer-box">
<li>
<i class="fab fa"></i>Hello <?php
$a=$_SESSION["studentname"];
$result_str = strtoupper($a);
echo $result_str;
?>
</li>
<li>
<i class="fab fa"></i> WILL COME TO ONLINE CANTEEN SYSTEM
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Start Main Top -->
<header class="main-header">
<!-- Start Navigation -->
<nav class="navbar navbar-expand-lg navbar-light bg-light navbar-default bootsnav">
<div class="container">
<!-- Start Header Navigation -->
<div class="navbar-header">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-menu" aria-controls="navbars-rs-food" aria-expanded="false" aria-label="Toggle navigation">
<i class="fa fa-bars"></i>
</button>
<a class="navbar-brand" href="index.html"><img src="images/logo5.png" class="logo" alt=""></a>
</div>
<!-- End Header Navigation -->
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="navbar-menu">
<ul class="nav navbar-nav ml-auto" data-in="fadeInDown" data-out="fadeOutUp">
<li class="nav-item active"><a class="nav-link" href="mainstudent.php">Home</a></li>
<li class="nav-item"><a class="nav-link" href="profilestudent.php">PROFILE</a></li>
<li class="nav-item"><a class="nav-link" href="viewmashop.php">VIEW SHOPKEEPER</a></li>
<li class="nav-item"><a class="nav-link" href="vieworder.php">VIEW ORDERS</a></li>
<li class="nav-item"><a class="nav-link" href="feedstudent.php">FEEDBACK</a></li>
<li class="nav-item"><a class="nav-link" href="passstudent.php">CHANGE PASSWORD</a></li>
<li class="nav-item"><a class="nav-link" href="logoutstudent.php">LOGOUT</a></li>
</ul>
</div>
<!-- /.navbar-collapse -->
</header>
<div class="all-title-box">
<div class="container">
<div class="row">
<div class="col-lg-12">
<h2>Shop Detail</h2>
<ul class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Shop</a></li>
<li class="breadcrumb-item active">PLACE_ORDER</li>
</ul>
</div>
</div>
</div>
</div>
<div class="cart-box-main">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="table-main table-responsive">
<table class="table">
<thead>
<tr>
<th>Images</th>
<th>Product Name</th>
<th>Food Description</th>
<th>Price</th>
<th>Quantity</th>
<th>Total</th>
</tr>
</thead>
<tbody>
<?php
$con=mysqli_connect("localhost","root","","canteen");
$str = "select * from productupload
inner join shopkeeper_reg on shopkeeper_reg.s_id= productupload.s_id1 where p_id=".$_GET['p_id'];
$result=mysqli_query($con,$str);
$row=mysqli_fetch_array($result);
$a=$row['photo'];
$b=$row['productname'];
$c=$row['price'];
$d=$row['description'];
$t=$_GET['p_id'];
echo'<form action= "precitem.php?p_id='.$t.'" method="post">';
echo "<tr>";
echo "<td class='thumbnail-img'>";?>
<img class="img-fluid" src="admin/<?php echo $a; ?>" alt="" /><?php
echo "</a>";
echo "</td>";
echo "<td class='name-pr'>";
echo $b;
echo "</a>";
echo "</td>";
echo "<td class='name-pr'>";
echo $d;
echo "</a>";
echo "</td>";
echo "<td class='price-pr'>";
echo "<p>₹ <span id='ticket_price'>$c</span></p>";
echo "</td>";
$e=$_POST["b1"];
echo "<td class='quantity-box'>";?><input type="number" size="4" value="<?php echo $e; ?>" min="1" name="p1" step="1" id="num" class="c-input-text qty text" oninput="calc()"><?php echo"</td>";
echo "<td class='total-pr'>";
$u=$c*$e;
echo "<p>₹ <span id='total'>$u</span></p>";
echo "</td>";
echo "</tr>";
echo "</tbody>";
echo "</table>";
echo '</div>';
echo '</div>';
echo '</div>';
echo '<div class="row my-5">';
echo '<div class="col-lg-8 col-sm-12"></div>';
echo '<div class="col-lg-4 col-sm-12">';
echo '<div class="order-box">';
echo "<h3>Order summary</h3>";
echo '<div class="d-flex gr-total">';
echo "<h5>Grand Total</h5>";
echo '<div class="ml-auto h5">';
echo "<p>₹ <span id='the'>$u</span>";
echo '</div>';
echo '</div>';
?>
<hr class="my-1">
<div class="d-flex">
<h4>Current Time:</h4>
<div class="ml-auto font-weight-bold">
<?php
date_default_timezone_set('Asia/Kolkata');
echo date("H:i",time());
?>
</div>
</div>
<div class="d-flex">
<h4>Delivery Time:</h4>
<div class="ml-auto font-weight-bold">
<?php
date_default_timezone_set('Asia/Kolkata');
$timestamp = time() + 60*60;
$time = date('H:i',$timestamp);
echo $time;
?>
</div>
</div>
</div>
</div>
<div class="col-12 d-flex shopping-box">
<input type="submit" class="ml-auto btn btn-primary " value="Place Order">
</div>
</div>
</div>
</div>
<footer>
<div class="footer-main">
<div class="container">
<div class="row">
<div class="col-lg-4 col-md-12 col-sm-12">
<div class="footer-top-box">
<h3>Canteen Time</h3>
<ul class="list-time">
<li>Monday - Saturday: 08.00am to 05.00pm</li> <li>Sunday: <span>Closed</span></li>
</ul>
</div>
</div>
<div class="col-lg-4 col-md-12 col-sm-12">
<div class="footer-widget">
<h4>About Online Canteen System</h4>
<p>Hello! we are the students from Bhagwan Mahavir Polytechnic. we have made a system for our college. Our system is for only for our college and other colleges of our campus.</p>
<p>The system is devloped for the student help purpose,student can reserved their food. As they have limited time for recess,and they can save their valuable time using the system</p>
<p>THANK YOU</p>
</div>
</div>
<div class="col-lg-4 col-md-12 col-sm-12">
<div class="footer-link-contact">
<h4>Contact Us</h4>
<ul>
<li>
<p><i class="fas fa-map-marker-alt"></i>Address:<a href=>BMEF Campus,Bharthana Road,Vesu,Surat,Gujarat,395017</a></p>
</li>
<li>
<p><i class="fas fa-phone-square"></i>Phone: <a href="tel:+91 8347849429">+91 8347849429</a></p>
</li>
<li>
<p><i class="fas fa-envelope"></i>Email: <a href="mailto:[email protected]">[email protected]</a></p>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</footer>
<!-- End Footer -->
<!-- Start copyright -->
<div class="footer-copyright">
- <p class="footer-company">All Rights Reserved. © 2020 <a href="#">Online Canteen System</a> Design By :
Ghanshyam,vatsal and Narendra</p>
</div>
<!-- End copyright -->
<a href="#" id="back-to-top" title="Back to top" style="display: none;">↑</a>
<!-- ALL JS FILES -->
<script src="js/jquery-3.2.1.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<!-- ALL PLUGINS -->
<script src="js/jquery.superslides.min.js"></script>
<script src="js/bootstrap-select.js"></script>
<script src="js/inewsticker.js"></script>
<script src="js/bootsnav.js."></script>
<script src="js/images-loded.min.js"></script>
<script src="js/isotope.min.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/baguetteBox.min.js"></script>
<script src="js/form-validator.min.js"></script>
<script src="js/contact-form-script.js"></script>
<script src="js/custom.js"></script>
</body>
</html>