-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
136 lines (129 loc) · 5.74 KB
/
index.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
<?php
include 'inc/header.php';
?>
<div class="slider-area">
<!-- Slider -->
<div class="block-slider block-slider4">
<ul class="" id="bxslider-home4">
<?php
$query = "SELECT * FROM products ORDER BY views DESC LIMIT 5";
$result = mysqli_query($conn,$query);
while ($row = mysqli_fetch_assoc($result)) {
?>
<li>
<img style=" width: 1206px; height: 378px; " src="<?=get_image($row['image']);?>" alt="<?=$row['title'];?>">
<div class="caption-group" style=" background: #fafafa; padding: 20px; border-radius: 15px; ">
<h2 class="caption title">
<?=$row['title'];?>
</h2>
<h4 class="caption subtitle"><?=substr($row['des'], 0,50);?></h4>
<a class="caption button-radius" href="single-product.php?id=<?=$row['id'];?>"><span class="icon"></span>Shop now</a>
</div>
</li>
<?php
}
?>
</ul>
</div>
<!-- ./Slider -->
</div> <!-- End slider area -->
<div class="promo-area">
<div class="zigzag-bottom"></div>
<div class="container">
<div class="row">
<div class="col-md-3 col-sm-6">
<div class="single-promo promo1">
<i class="fa fa-refresh"></i>
<p>30 Days return</p>
</div>
</div>
<div class="col-md-3 col-sm-6">
<div class="single-promo promo2">
<i class="fa fa-truck"></i>
<p>Free shipping</p>
</div>
</div>
<div class="col-md-3 col-sm-6">
<div class="single-promo promo3">
<i class="fa fa-lock"></i>
<p>Secure payments</p>
</div>
</div>
<div class="col-md-3 col-sm-6">
<div class="single-promo promo4">
<i class="fa fa-gift"></i>
<p>New products</p>
</div>
</div>
</div>
</div>
</div> <!-- End promo area -->
<div class="maincontent-area">
<div class="zigzag-bottom"></div>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="latest-product">
<h2 class="section-title">Latest Products</h2>
<div class="product-carousel">
<?php
$query = "SELECT * FROM products ORDER BY id DESC LIMIT 10";
$result = mysqli_query($conn,$query);
while ($row = mysqli_fetch_assoc($result)) {
?>
<div class="single-product">
<div class="product-f-image">
<img style="height: 270px" src="<?=get_image($row['image']);?>" alt="">
<div class="product-hover">
<a href="cart.php?add=<?=$row['id'];?>" class="add-to-cart-link"><i class="fa fa-shopping-cart"></i> Add to cart</a>
<a href="single-product.php?id=<?=$row['id'];?>" class="view-details-link"><i class="fa fa-link"></i> See details</a>
</div>
</div>
<h2><a href="single-product.php?id=<?=$row['id'];?>"><?=$row['title'];?></a></h2>
<div class="product-carousel-price">
<?php
if ($row['currency']=='$') {
$price = $row['currency'].$row['price'];
}else{
$price = $row['price'].' '.$row['currency'];
}
?>
<ins><?=$price;?></ins>
</div>
</div>
<?php
}
?>
</div>
</div>
</div>
</div>
</div>
</div> <!-- End main content area -->
<div class="brands-area">
<div class="zigzag-bottom"></div>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="brand-wrapper">
<div class="brand-list">
<?php
$query = "SELECT * FROM categories ORDER BY views DESC LIMIT 10";
$result = mysqli_query($conn,$query);
while ($row = mysqli_fetch_assoc($result)) {
?>
<a href="cat.php?id=<?=$row['id'];?>">
<img style="width: 270px;height: 120px" src="<?=get_image($row['image']);?>" alt="<?=$row['name'];?>" title="<?=$row['name'];?>">
</a>
<?php
}
?>
</div>
</div>
</div>
</div>
</div>
</div> <!-- End brands area -->
<?php
include 'inc/footer.php';
?>