-
Notifications
You must be signed in to change notification settings - Fork 0
/
product-search.php
executable file
·231 lines (220 loc) · 10.7 KB
/
product-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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<?php include('header.php');
include_once "function.php";
if(isset($_GET["page"]))
$page = (int)$_GET["page"];
else
$page = 1;
$setLimit = 18;
$pageLimit = ($page * $setLimit) - $setLimit;
$query='';
$searchTerm=$_GET['search'];
$query="select *from product_details where title LIKE '%".$searchTerm."%' order by pid desc LIMIT ".$pageLimit." , ".$setLimit;
$mysqluery=mysql_query($query)
?>
<style type="text/css">
</style>
<!--banner-->
<div class="banner-top">
<div class="container">
<h1>Search Result</h1>
<em></em>
<h2><a href="index.php">Home</a><label>/</label>Search Result</a></h2>
</div>
</div>
<!--content-->
<div class="product">
<div class="container">
<div class="col-md-9">
<?php if(mysql_num_rows($mysqluery)>=1){ ?>
<div class="mid-popular">
<?php while($rows=mysql_fetch_array($mysqluery)) { $productimages=mysql_query("select *from product_images where pid=".$rows['pid']." order by piid asc");
$images=mysql_fetch_array($productimages);
?>
<div class="col-md-4 item-grid simpleCart_shelfItem" style="margin-bottom:30px;">
<div class=" mid-pop">
<div class="pro-img">
<img src="admin/images/product/<?php echo $images['product_path']; ?>" class="img-responsive product-home-images" alt="">
<div class="zoom-icon ">
<!--<a class="picture" href="admin/images/product/<?php echo $images['product_path']; ?>" rel="title" class="b-link-stripe b-animate-go thickbox"><i class="glyphicon glyphicon-search icon "></i></a>-->
<a href="product-details.php?details=<?php echo $rows['pid']; ?>"><i class="glyphicon glyphicon-eye-open icon"></i></a>
<?php if(isset($_SESSION['ID'])) { ?>
<a style="cursor:pointer;" onClick="return wislistaddedproducts(<?php echo $rows['pid'] ?>)" class=""><span class="glyphicon glyphicon-heart icon" aria-hidden="true"></span></a>
<a href="#" style="cursor:pointer;" data-toggle="modal" data-target="#product_enquiry" onClick="return product_enquiry_details_get(<?php echo $rows['pid']; ?>)"><span class="glyphicon glyphicon-comment icon" aria-hidden="true"></span></a>
<?PHP }else{ ?>
<a href="login.php" class=""><span class="glyphicon glyphicon-heart icon" aria-hidden="true"></span></a>
<a href="login.php" class=""><span class="glyphicon glyphicon-envelope icon" aria-hidden="true"></span></a>
<?php } ?>
</div>
</div>
<div class="mid-1">
<div class="women">
<div class="women-top">
<?php $maincategory=mysql_query("select *from category where cid='".$rows['category_id']."'"); $cat=mysql_fetch_array($maincategory);?>
<span><?php echo $cat['category_name']; ?></span>
<?php $title = (strlen($rows['title'])>15) ? substr($rows['title'],0,12).'...' : $rows['title']; ?>
<h6><a href="product-details.php?details=<?php echo $rows['pid']; ?>"><?php echo $title; ?></a></h6>
</div>
<?php if(isset($_SESSION['ID'])) { ?>
<div class="img item_add">
<!--<a style="cursor:pointer;" onClick="return addproductincart(<?php echo $rows['pid']; ?>)"><img src="images/ca.png" alt=""></a>-->
<?php if($rows['product_quantity']<=10){ ?>
<span>Left <?php echo $rows['product_quantity']; ?></span>
<?php } ?>
</div>
<?php }else{ ?>
<div class="img item_add">
<!--<a href="login.php"><img src="images/ca.png" alt=""></a>-->
<?php if($rows['product_quantity']<=10){ ?>
<span>Left <?php echo $rows['product_quantity']; ?></span>
<?php } ?>
</div>
<?php } ?>
<div class="clearfix"></div>
</div>
<div class="mid-2">
<p ><label>Rs.<?php echo $rows['price']; ?> INR</label><em class="item_price">Rs <?php echo $rows['discount_price']; ?> INR</em>
<br />
<input type="checkbox" name="cbox" onClick="mycheckedboxmy(<?php echo $rows['pid']; ?>)" id="checkid<?php echo $rows['pid']; ?>" title="Compare Item" /> Compare Item
</p>
<!-- <div class="block">
<div class="starbox small ghosting"> </div>
</div> -->
<div class="clearfix"></div>
</div>
</div>
<?php if(isset($_SESSION['ID'])) { ?>
<a href="#" class="btn material-btn material-btn_primary main-container__column btn-block" style="cursor:pointer;" data-toggle="modal" data-target="#product_enquiry" onClick="return product_enquiry_details_get(<?php echo $rows['pid']; ?>)">Product Enquiry <i class="fa fa-comment"></i></a>
<?php }else{ ?>
<a href="login.php" class="btn material-btn material-btn_primary main-container__column btn-block">Product Enquiry <i class="fa fa-comment"></i></a>
<?php } ?>
</div>
</div>
<?php } ?>
</div>
<div class="row">
<div class="col-md-12">
<?php echo searchpaginations($setLimit,$page,$_GET['search']); ?>
</div>
</div>
<?php }else{ ?>
<div class="alert alert-danger">No Records Founds</div>
<?php } ?>
</div>
<div class="col-md-3 product-bottom">
<!--categories-->
<div class=" rsidebar span_1_of_left">
<h4 class="cate">Categories</h4>
<?php $category=mysql_query("select category_name,status,date,cid from category order by cid desc"); ?>
<ul class="menu-drop">
<?php if(mysql_num_rows($category)>=1){ while($cat=mysql_fetch_array($category)){
$subcategory=mysql_query("select category_name,scid,mid from sub_category where mid='".$cat['cid']."'"); ?>
<li class="item1"><a href="#"><?php echo $cat['category_name']; ?> </a>
<ul class="cute">
<?php if(mysql_num_rows($subcategory)>=1) { while($sub=mysql_fetch_array($subcategory)) { ?>
<li class="subitem1"><a href="product.php?subcategory=<?php echo $sub['scid']; ?>"><?php echo $sub['category_name']; ?></a></li>
<?php } }else{ ?>
<li class="subitem1"><a href="#"><div class="alert alert-danger">No Found Subcategory</div></a></li>
<?php } ?>
</ul>
</li>
<?php } } ?>
</ul>
</div>
<!--initiate accordion-->
<script type="text/javascript">
$(function() {
var menu_ul = $('.menu-drop > li > ul'),
menu_a = $('.menu-drop > li > a');
menu_ul.hide();
menu_a.click(function(e) {
e.preventDefault();
if(!$(this).hasClass('active')) {
menu_a.removeClass('active');
menu_ul.filter(':visible').slideUp('normal');
$(this).addClass('active').next().stop(true,true).slideDown('normal');
} else {
$(this).removeClass('active');
$(this).next().stop(true,true).slideUp('normal');
}
});
});
</script>
<!--//menu-->
<!-- <section class="sky-form">
<h4 class="cate">Discounts</h4>
<div class="row row1 scroll-pane">
<div class="col col-4">
<label class="checkbox"><input type="checkbox" name="checkbox" checked=""><i></i>Upto - 10% (20)</label>
</div>
<div class="col col-4">
<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>40% - 50% (5)</label>
<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>30% - 20% (7)</label>
<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>10% - 5% (2)</label>
<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Other(50)</label>
</div>
</div>
</section>
-->
<!---->
<!-- <section class="sky-form">
<h4 class="cate">Type</h4>
<div class="row row1 scroll-pane">
<div class="col col-4">
<label class="checkbox"><input type="checkbox" name="checkbox" checked=""><i></i>Sofa Cum Beds (30)</label>
</div>
<div class="col col-4">
<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Bags (30)</label>
<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Caps & Hats (30)</label>
<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Jackets & Coats (30)</label>
<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Jeans (30)</label>
<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Shirts (30)</label>
<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Sunglasses (30)</label>
<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Swimwear (30)</label>
</div>
</div>
</section> -->
<!-- <section class="sky-form">
<h4 class="cate">Brand</h4>
<div class="row row1 scroll-pane">
<div class="col col-4">
<label class="checkbox"><input type="checkbox" name="checkbox" checked=""><i></i>Roadstar</label>
</div>
<div class="col col-4">
<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Levis</label>
<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Persol</label>
<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Nike</label>
<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Edwin</label>
<label class="checkbox"><input type="checkbox" name="checkbox" ><i></i>New Balance</label>
<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Paul Smith</label>
<label class="checkbox"><input type="checkbox" name="checkbox"><i></i>Ray-Ban</label>
</div>
</div>
</section> -->
</div>
</div class="clearfix"></div>
<!--products-->
<!--//products-->
<!--brand-->
<!--<div class="container">
<div class="brand">
<div class="col-md-3 brand-grid">
<img src="images/ic.png" class="img-responsive" alt="">
</div>
<div class="col-md-3 brand-grid">
<img src="images/ic1.png" class="img-responsive" alt="">
</div>
<div class="col-md-3 brand-grid">
<img src="images/ic2.png" class="img-responsive" alt="">
</div>
<div class="col-md-3 brand-grid">
<img src="images/ic3.png" class="img-responsive" alt="">
</div>
<div class="clearfix"></div>
</div>
</div>-->
<!--//brand-->
</div>
</div>
<!--//content-->
<!--//footer-->
<?php include('footer.php'); ?>