forked from jimit105/Project-Online-Shopping-Website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
214 lines (153 loc) · 5.17 KB
/
search.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
<?php
session_start();
include_once("config.php");
//current URL of the Page. cart_update.php redirects back to this URL
$current_url = urlencode($url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
?>
<!DOCTYPE html>
<html>
<head>
<title>Game of Thrones | ThinkGeek</title>
<link rel="icon" href="res/ThinkGeek-pt.png" sizes="16x16">
<link rel="stylesheet" type="text/css" href="css/sidebar.css">
<link rel="stylesheet" type="text/css" href="css/navbar.css">
<link rel="stylesheet" type="text/css" href="css/content.css">
<!--BOOTSTRAP-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"/>
<style type="text/css">
body{
margin: 0;
}
#logo{
padding-top: 0.7%;
background-color: #333;
width: 14%;
height: 9.65%;
float: left;
position: fixed;
}
</style>
</head>
<body>
<div id="logo">
<a href="fandom.php">
<img src="res/thinkgeek-png.png" width="100%">
</a>
</div>
<div id="sidebar">
<ul>
<li>Welcome</li>
<li><a href="#clothing" onclick="return false" style="filter: blur(2px);"><table><tr><td><img src="res/icons/clothing.png" /></td>
<td> Clothing</td></tr></table></a></li>
<li><a href="#acc" onclick="return false" style="filter: blur(2px);"><table><tr><td><img src="res/icons/accessories.png" /></td>
<td> Accessories</td></tr></table></a></li>
<li><a href="#sou" onclick="return false" style="filter: blur(2px);"><table><tr><td><img src="res/icons/souvenir.png" /></td>
<td> Souvenir</td></tr></table></a></li>
<li> </li>
<li><table><tr><td><img src="res/icons/cart.png" /></td>
<td> View Cart </td><td><img src="res/icons/new_page.png" /></td></tr></table></li>
<li> </li>
<li><table><tr><td><img src="res/icons/chat.png" /></td>
<td> Chat Box </td><td><img src="res/icons/new_page.png" /></td></tr></table></li>
<li><a href="https://goo.gl/forms/jhAHet2TLLPIOQff1" target="_blank"><table><tr><td><img src="res/icons/request.png" /></td>
<td> Request Here </td><td><img src="res/icons/new_page.png" /></td></tr></table></a></li>
</ul>
</div>
<div id="navbar">
<ul>
<li><a href="got.php">Game of Thrones</a></li>
<li><a href="hp.php">Harry Potter</a></li>
<li><a href="hg.php">Hunger Games</a></li>
<li><a class="active" href="got.php">Search by Price</a></li>
</ul>
</div>
<!-- BACK TO TOP-->
<a href="#" class="back-to-top">Back To Top </a>
<!--CONTENT-->
<div class="content">
<section class="container">
<form name="search">
<label>Enter Amount</label><br>
<label>From:</label>
<input type="text" name="from">
<label>To:</label>
<input type="text" name="to">
<br>
<input type="submit" name="search" value="Go">
</form>
<!-- Products List Start -->
<h3>CLOTHING</h3>
<div class="row" id="clothing">
<?php
$results = $mysqli->query("SELECT product_code, product_name, product_img_name, price FROM products WHERE category='clothing' AND fandom='Game of Thrones' ORDER BY id ASC");
if($results){
$products_item = '<ul style="list-style-type: none;">';
//fetch results set as object and output HTML
while($obj = $results->fetch_object())
{
$products_item .= <<<EOT
<div class="col-sm-4">
<div class="box">
<li class="product">
<form method="post" action="cart_update.php">
<img src="res/got/{$obj->product_img_name}">
<p align="center">{$obj->product_name}</p>
<p align="center" style="font-size: 1.2em;">{$currency}{$obj->price} </p>
<input type="hidden" name="product_code" value="{$obj->product_code}" />
<input type="hidden" name="type" value="add" />
<input type="hidden" name="return_url" value="{$current_url}" />
<div align="center"><button type="submit" class="add_to_cart" id="myButton">Add to Cart</button></div>
</form>
</li>
</div>
</div>
EOT;
}
$products_item .= '</ul>';
echo $products_item;
}
?>
</div>
<!-- Products List End -->
</section>
</div>
<!--FOOTER-->
<footer class="container">
<div class="row">
<p class="col-sm-6">
© 2016 ThinkGeek | Made with<i style="color: #fd4b4b;"> ♥ </i>in India
</p>
<ul class="col-sm-6">
<li class="col-sm-1">
<a href="mailto:[email protected]" target="_blank">
<img src="res/social media/help.png">
</a>
</li>
<li class="col-sm-1">
<a href="https://twitter.com/jimit105" target="_blank">
<img src="res/social media/twitter.png">
</a>
</li>
<li class="col-sm-1">
<a href="https://www.facebook.com/jimit105" target="_blank">
<img src="res/social media/facebook.png">
</a>
</li>
<li class="col-sm-1">
<a href="https://plus.google.com/+JimitDholakia105" target="_blank">
<img src="res/social media/google-plus.png">
</a>
</li>
<li class="col-sm-1">
<a href="https://www.instagram.com/jimit105/" target="_blank">
<img src="res/social media/instagram.png">
</a>
</li>
<li class="col-sm-1">
<img src="res/social media/youtube.png">
</li>
</ul>
</div>
</footer>
</body>
</html>