-
Notifications
You must be signed in to change notification settings - Fork 0
/
refrigerator.php
167 lines (160 loc) · 5.4 KB
/
refrigerator.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
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<style>
nav {
float: left;
max-width: 220px;
margin: 0;
padding: 1em;
}
nav ul {
list-style-type: none;
padding: 0;
color:#0066ff;
}
nav ul a {
text-decoration: none;
padding-left:20px;
font-size:20px;
font-style:oblique;
}
article {
border-left: 1px solid gray;
padding: 1em;
overflow: hidden;
}
.mySlides
{
display:none;
}
div.gallery1 {
margin: 40px;
width: 240px;
float:left;
}
div.gallery1 img {
width: 200px;
height:430px;
}
div.gallery1 img:hover {
width: 215px;
height:430px;
overflow:hidden;
}
div.desc1 {
padding: 8px;
text-align: center;
font-size:11px;
background-color:#ffffff;
}
#Result
{
position:absolute;
top:50px;
}
#Result :hover
{
font-size:22px;
}
</style>
<script>
function fx(str)
{
if (str.length == 0)
{
document.getElementById("Result").innerHTML = "";
return;
}
else
{
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
{
document.getElementById("Result").innerHTML = xmlhttp.responseText;
}
}
xmlhttp.open("GET", "search.php?q=" + str, true);
xmlhttp.send();
}
}
function fz(str)
{
if (str.length == 0)
{
document.getElementById("Res").innerHTML = "";
return;
}
else
{
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
{
document.getElementById("Res").innerHTML = xmlhttp.responseText;
}
}
xmlhttp.open("GET", "sort.php?q=" + str, true);
xmlhttp.send();
}
}
</script>
</head>
<body>
<header style="background-color:#555;height:70px">
<p style="padding-top:10px">
<a href="index.php"><i class="glyphicon glyphicon-home" style="font-size:30px;color:#ffffff;padding-left:30px">HOME</i></a>
<?php
session_start();
$cookie=0;
if(isset($_COOKIE['user']))
{
$cookie=$_COOKIE['user'];
}
if(isset($_SESSION['id']))
{
$id=$_SESSION['id'];
$con=new MySQLi("localhost","root","","project");
$sql="select * from registration where cid=$id";
$res=$con->query($sql);
$row=$res->fetch_array();
echo "<span style='padding-left:160px'><input type='text' name='n1' style='width:300px;height:30px;font-size:16px' placeholder=' What are you looking for?' onKeyUp='fx(this.value)'></span><button type='submit' style='background-color:#ffffff;height:30px;width:30px' ><i class='fa fa-search'></i></button><span style='padding-left:120px;color:#ffffff'>Welcome,".$row[1]."</span><span style='padding-left:15px;color:#ffffff'><a href='track.php'><button type='submit' style='background-color:#555;color:#ffffff'>Track Orders</button></a></span><span style='padding-left:15px'><a href='log out.php'><button type='submit' style='background-color:#555;color:#ffffff'>LOG OUT </button></a></span><a href='cartdetails.php'><i class='fa fa-shopping-cart' style='padding-left:18px;font-size:28px;color:white'> Cart(".$cookie.")</i></a>";
}
else
{
echo "<span style='padding-left:160px'><input type='text' name='n1' style='width:300px;height:30px;font-size:16px' placeholder=' What are you looking for?' onKeyUp='fx(this.value)'></span><button type='submit' style='background-color:#ffffff;height:30px;width:30px' ><i class='fa fa-search'></i></button><span style='padding-left:350px;color:#ffffff'><a href='login.php'><button type='submit' style='background-color:#555;color:#ffffff'>LOG IN </button></a></span><span style='padding-left:50px'><a href='sign up.php'><button type ='submit' style='background-color:#555;color:#ffffff'> SIGN UP </button></a></span><a href='cartdetails.php'><i class='fa fa-shopping-cart' style='padding-left:18px;font-size:28px;color:white'> Cart(".$cookie.")</i></a>";
}
?>
</header><div style='padding-left:312px' id='Result'></div><br>
<nav>
<p style="padding-left:4px;background-color:#000099;color:#ffffff;font-size:20px"> Sort By Price </p>
<input type='radio' name='n11' onChange='fz(this.value)' value='51'> Upto 20,000 <br>
<input type='radio' name='n11' onChange='fz(this.value)' value='52'> More than 20,000 <br><br>
<p style="padding-left:4px;background-color:#000099;color:#ffffff;font-size:20px"> Sort By Capacity </p>
<input type='radio' name='n11' onChange='fz(this.value)' value='141'> Upto 300 L <br>
<input type='radio' name='n11' onChange='fz(this.value)' value='142'> More than 300 L <br>
</nav>
<article>
<div id="Res">
<?php
$con=new MySQLi("localhost","root","","project");
$sql="select * from refrigerator";
$res=$con->query($sql);
echo "<ul style='list-style-type:none;padding-left:25px'>";
while($row=$res->fetch_array())
{
echo "<li><div class='gallery1'><a href='refrigeratorspecification.php?id=$row[0]'><img src='".$row[5]."'><div class='desc1'><p style='font-weight:900;font-size:14px'>".$row[1]."</p><p style='color:#006600;font-weight:600;font-size:12px'><strike>₹".$row[12]."</strike></p><p style='font-weight:600;font-size:12px;color:#5c8a8a'>NOW ₹" .$row[13]."</p></div></a></div></li>";
}
echo "</ul>";
?>
</div>
</article>
</body>
</html>