-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproducts.php
More file actions
170 lines (148 loc) · 5.36 KB
/
products.php
File metadata and controls
170 lines (148 loc) · 5.36 KB
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
<?php
include 'inc/header.php';
?>
<!-- /banner_bottom_agile_info -->
<div class="page-head_agile_info_w3l">
<div class="container">
<h3>Products</h3>
<!--/w3_short-->
<div class="services-breadcrumb">
<div class="agile_inner_breadcrumb">
<ul class="w3_short">
<li><a href="index.html">Home</a><i>|</i></li>
<li>Products</li>
</ul>
</div>
</div>
<!--//w3_short-->
</div>
</div>
<!-- banner-bootom-w3-agileits -->
<div class="banner-bootom-w3-agileits">
<div class="container">
<!-- mens -->
<div class="col-md-4 products-left">
<div class="css-treeview">
<h4>Categories</h4>
<ul class="tree-list-pad">
<li><input type="checkbox" checked="checked" id="item-0" /><label for="item-0"><i class="fa fa-long-arrow-right" aria-hidden="true"></i> Computer</label>
<ul>
<?php
$query = "select * from tbl_sub_cat where cat_id=1";
$subCat = $db->select($query);
if ($subCat) {
while ($subCatResult =$subCat->fetch_assoc() ) {
?>
<li><label for="item-0-0"><i class="fa fa-long-arrow-right" aria-hidden="true"></i><a href="products.php?id=<?php echo $subCatResult['id'];?>"><?php echo $subCatResult['name']; ?></a></label>
</li>
<?php }}?>
</ul>
</li>
<li><input type="checkbox" id="item-1" /><label for="item-1"><i class="fa fa-long-arrow-right" aria-hidden="true"></i>Mobile</label>
<ul>
<?php
$query = "select * from tbl_sub_cat where cat_id=1";
$subCat = $db->select($query);
if ($subCat) {
while ($subCatResult =$subCat->fetch_assoc() ) {
?>
<li><label for="item-0-0"><i class="fa fa-long-arrow-right" aria-hidden="true"></i><a href="products.php?id=<?php echo $subCatResult['id'];?>"><?php echo $subCatResult['name']; ?></a></label>
</li>
<?php }}?>
</ul>
</li>
<li><input type="checkbox" id="item-2" /><label for="item-2"><i class="fa fa-long-arrow-right" aria-hidden="true"></i>Camera</label>
<ul>
<?php
$query = "select * from tbl_sub_cat where cat_id=1";
$subCat = $db->select($query);
if ($subCat) {
while ($subCatResult =$subCat->fetch_assoc() ) {
?>
<li><label for="item-0-0"><i class="fa fa-long-arrow-right" aria-hidden="true"></i><a href="products.php?id=<?php echo $subCatResult['id'];?>"><?php echo $subCatResult['name']; ?></a></label>
</li>
<?php }}?>
</ul>
</li>
<li><input type="checkbox" id="item-2" /><label for="item-2"><i class="fa fa-long-arrow-right" aria-hidden="true"></i>Sound System</label>
<ul>
<?php
$query = "select * from tbl_sub_cat where cat_id=1";
$subCat = $db->select($query);
if ($subCat) {
while ($subCatResult =$subCat->fetch_assoc() ) {
?>
<li><label for="item-0-0"><i class="fa fa-long-arrow-right" aria-hidden="true"></i><a href="products.php?id=<?php echo $subCatResult['id'];?>"><?php echo $subCatResult['name']; ?></a></label>
</li>
<?php }}?>
</ul>
</li>
</ul>
</div>
<div class="clearfix"></div>
</div>
<div class="col-md-8 products-right">
<?php
$cat = $_GET['id'];
$query = "select * from tbl_product where sub_cat_id = $cat order by id desc limit 10";
$product = $db->select($query);
if ($product){
while ($result = $product->fetch_assoc()){
?>
<div class="col-md-12 product-men">
<div class="men-pro-item simpleCart_shelfItem">
<div class="men-thumb-item">
<img src="admin/<?php echo $result['main_image'];?>" alt="" class="pro-image-front">
<img src="admin/<?php echo $result['image1'];?>" alt="" class="pro-image-back">
<div class="men-cart-pro">
<div class="inner-men-cart-pro">
<a href="single.php?id=<?php echo $result['id'];?>" class="link-product-add-cart">Quick View</a>
</div>
</div>
</div>
<div class="item-info-product ">
<h4><a href="single.php?id=<?php echo $result['id'];?>"><?php echo $result['title'];?></a></h4>
<div class="info-product-price">
<span class="item_price">$<?php echo $result['price'];?></span>
</div>
<div class="snipcart-details top_brand_home_details item_add single-item hvr-outline-out button2">
<a href="<?php echo $result['link'];?>" target="_blank">Shop Now</a>
</div>
</div>
</div>
</div>
<?php }}else{echo " <div class='alert alert-danger' role='alert'>
<h3>No product available</h3>
</div>";}?>
<div class="clearfix"></div>
</div>
<div class="clearfix"></div>
</div>
</div>
<style>
.product-men:nth-child(1){
margin-top: 0!important;
}
.men-thumb-item img{
padding: 0!important;
}
.men-thumb-item{
width: 25%;
float: left;
}
.item-info-product{
text-align: left;
height: 215px!important;
padding-left: 100px!important;
}
.snipcart-details{
width:20%;
}
.item-info-product h4{
padding-top: 20px;
}
</style>
<!-- //mens -->
<?php
include 'inc/footer.php';
?>