forked from AnkDos/The-Canteen-Project
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhome.php
executable file
·143 lines (104 loc) · 3.52 KB
/
home.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
<?php
ob_start();
session_start();
require_once 'dbconnect.php';
// if( !isset($_SESSION['user']) ) {
// header("Location: index.php");
// exit;
// }
$dayum=$_SESSION['user'];
// select loggedin users detail
$res=mysql_query("SELECT * FROM users WHERE userId=".$_SESSION['user']);
$userRow=mysql_fetch_array($res);
$qua=mysql_query("SELECT * FROM Items WHERE PID= '100'");
$tit=mysql_fetch_array($qua);
if (isset($_GET['gd']))
{
header("Location: getorder.php");
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="Smart Cart 2 - a javascript jQuery shopping cart plugin" />
<title>Welcome - <?php echo $userRow['userEmail']; ?></title>
<!-- Smart Cart Files Include -->
<link href="styles/smart_cart.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery.smartCart-2.0.js"></script>
<script type="text/javascript">
$(document).ready(function(){
// Call Smart Cart
$('#SmartCart').smartCart();
});
</script>
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all">
<link href="css/style.css" rel="stylesheet" type="text/css" media="all"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head><body>
<header>
<div class="header-bottom">
<div class="fixed-header">
<div class="container">
<div class="top-menu">
<span class="menu"><img src="images/nav.png" alt=""/> </span>
<ul>
<nav class="cl-effect-5">
<li><a href="index.php"><span data-hover="Home">home</span></a></li>
<?php
if( !isset($_SESSION['user']) ) {
?>
<li><a href="index.php">signin</a></li>
<?
}
else{
?>
<li> <a class="scroll" href="?gd"><span data-hover="ORDERS ">HI <?php echo $userRow['userName'];?></a></li>
<?
}
?>
<li><a class="scroll" href="#about"><span data-hover="help">assist</span></a></li>
<li><a href="home.php"><span data-hover="food">menu/cart</span></a></li>
</ul>
<!-- script for menu -->
<!--script-nav-->
<script>
$("span.menu").click(function(){
$(".top-menu ul").slideToggle("slow" , function(){
});
});
</script>
<!-- //script for menu -->
<!-- //script-for sticky-nav -->
</div>
</div>
</div>
</div>
</header>
<table align="center" border="0" cellpadding="0" cellspacing="0">
<tr><td>
<form action="results.php" method="post">
<!-- Smart Cart HTML Starts -->
<div id="SmartCart" class="scMain">
<?php
$pro=mysql_query("select * from Products");
while($fet= mysql_fetch_array($pro))
{
?>
<input type="hidden" pprice="<?php echo $fet['pprice']?>" pcategory="<?php echo $fet['pcategory']?>" pname="<?php echo $fet['pname']?>" pid="<?php echo $fet['pid']?>">
<?
}
?>
</div>
<!-- Smart Cart HTML Ends -->
</form>
</td></tr>
</table>
<footer>
Wallet Balance : <?php echo $userRow['Wallet_Bal']; ?>
<a href="getorder.php"><span class="glyphicon glyphicon-log-out"></span> CHECK ORDERS</a>
<a href="logout.php?logout"><span class="glyphicon glyphicon-log-out"></span> Sign Out</a>
</footer>
</body>
</html>