-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
executable file
·102 lines (98 loc) · 4.4 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
<?php
require('top.php');
$str=mysqli_real_escape_string($con,$_GET['str']);
if($str!=''){
$get_product=get_product($con,'','','',$str);
}else{
?>
<script>
window.location.href='index.php';
</script>
<?php
}
?>
<!-- <div class="body__overlay"></div> -->
<!-- Start Bradcaump area -->
<div class="ht__bradcaump__area" style="background: rgba(0, 0, 0, 0) url(images/bg/4.jpg) no-repeat scroll center center / cover ;">
<div class="ht__bradcaump__wrap">
<div class="container">
<div class="row">
<div class="col-xs-12">
<div class="bradcaump__inner">
<nav class="bradcaump-inner">
<a class="breadcrumb-item" href="index.php">Home</a>
<span class="brd-separetor"><i class="zmdi zmdi-chevron-right"></i></span>
<span class="breadcrumb-item active">Search</span>
<span class="brd-separetor"><i class="zmdi zmdi-chevron-right"></i></span>
<span class="breadcrumb-item active"><?php echo $str?></span>
</nav>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- End Bradcaump area -->
<!-- Start Product Grid -->
<section class="htc__product__grid bg__white ptb--100">
<div class="container">
<div class="row">
<?php if(count($get_product)>0){?>
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="htc__product__rightidebar">
<!-- Start Product View -->
<div class="row">
<div class="shop__grid__view__wrap">
<div role="tabpanel" id="grid-view" class="single-grid-view tab-pane fade in active clearfix">
<?php
foreach($get_product as $list){
$rating = $list['Rating'];
?>
<!-- Start Single Category -->
<div class="col-md-4 col-lg-3 col-sm-4 col-xs-12">
<div class="category">
<div class="ht__cat__thumb">
<a href="product.php?id=<?php echo $list['id']?>">
<img src="<?php echo PRODUCT_IMAGE_SITE_PATH.$list['image']?>" alt="product images">
</a>
</div>
<div class="fr__hover__info">
<ul class="product__action">
<li><a href="javascript:void(0)" onclick="wishlist_manage('<?php echo $list['id']?>','add')"><i class="icon-heart icons"></i></a></li>
<li><a href="javascript:void(0)" onclick="manage_cart('<?php echo $list['id']?>','add')"><i class="icon-handbag icons"></i></a></li>
</ul>
</div>
<div class="fr__product__inner">
<h4><a href="product.php?id=<?php echo $list['id']?>"><?php echo $list['name']?></a></h4>
<ul class="fr__pro__prize">
<li class="old__prize"><?php echo $list['mrp']?></li>
<li><?php echo $list['price']?></li>
</ul>
</div>
</div>
<h4>Rating: </h4>
<ul class="rating">
<?php
for ($i=0; $i < $rating; $i++) {
echo '<li><i class="icon-star icons"></i></li>';
}
for ($i=0; $i < 5-$rating; $i++) {
echo '<li class="old"><i class="icon-star icons"></i></li>';
} ?>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
<?php } else {
echo "Data not found";
} ?>
</div>
</div>
</section>
<!-- End Product Grid -->
<!-- End Banner Area -->
<input type="hidden" id="qty" value="1"/>
<?php require('footer.php')?>