-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
129 lines (111 loc) · 5.31 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
<?php
ob_start();
require_once '@/config.php';
require_once '@/init.php';
$category = empty($_GET['category']) ? "" : "'" . $_GET['category'] . "'";
$query = "SELECT * FROM `products` " . ($category ? "WHERE `category` = $category" : "");
$productsQuery = $odb->query($query);
$products = $productsQuery->fetchAll(PDO::FETCH_ASSOC);
include 'header.php';
?>
<!-- Products Start -->
<div class="container-fluid pt-5 pb-3">
<h2 class="section-title position-relative text-uppercase mx-xl-5 mb-4"><span class="bg-secondary pr-3">Featured Products</span></h2>
<div class="row px-xl-5">
<?php
foreach ($products as $product){
echo '<div class="col-lg-3 col-md-4 col-sm-6 pb-1">
<div class="product-item bg-light mb-4">
<div class="product-img position-relative overflow-hidden">
<img class="img-fluid w-100" src="' . $product['image'] . '" alt="">
<div class="product-action">
<a class="btn btn-outline-dark btn-square" href=""><i class="fa fa-shopping-cart"></i></a>
<a class="btn btn-outline-dark btn-square" href=""><i class="far fa-heart"></i></a>
<a class="btn btn-outline-dark btn-square" href=""><i class="fa fa-sync-alt"></i></a>
<a class="btn btn-outline-dark btn-square" href=""><i class="fa fa-search"></i></a>
</div>
</div>
<div class="text-center py-4">
<a class="h6 text-decoration-none text-truncate" href="/products.php?id=' . $product['id'] . '">' . $product['name'] . '</a>
<div class="d-flex align-items-center justify-content-center mt-2">
<h5>$'. $product['price'] . '</h5><h6 class="text-muted ml-2"><del></del></h6>
</div>
<div class="d-flex align-items-center justify-content-center mb-1">
<small class="fa fa-star text-primary mr-1"></small>
<small class="fa fa-star text-primary mr-1"></small>
<small class="fa fa-star text-primary mr-1"></small>
<small class="fa fa-star text-primary mr-1"></small>
<small class="fa fa-star text-primary mr-1"></small>
<small>(99)</small>
</div>
</div>
</div>
</div>';
}
?>
</div>
</div>
<!-- Products End -->
<!-- Offer Start -->
<div class="container-fluid pt-5 pb-3">
<div class="row px-xl-5">
<div class="col-md-6">
<div class="product-offer mb-30" style="height: 300px;">
<img class="img-fluid" src="img/offer-1.jpg" alt="">
<div class="offer-text">
<h6 class="text-white text-uppercase">Save 20%</h6>
<h3 class="text-white mb-3">Special Offer</h3>
<a href="" class="btn btn-primary">Shop Now</a>
</div>
</div>
</div>
<div class="col-md-6">
<div class="product-offer mb-30" style="height: 300px;">
<img class="img-fluid" src="img/offer-2.jpg" alt="">
<div class="offer-text">
<h6 class="text-white text-uppercase">Save 20%</h6>
<h3 class="text-white mb-3">Special Offer</h3>
<a href="" class="btn btn-primary">Shop Now</a>
</div>
</div>
</div>
</div>
</div>
<!-- Offer End -->
<!-- Vendor Start -->
<div class="container-fluid py-5">
<div class="row px-xl-5">
<div class="col">
<div class="owl-carousel vendor-carousel">
<div class="bg-light p-4">
<img src="img/vendor-1.jpg" alt="">
</div>
<div class="bg-light p-4">
<img src="img/vendor-2.jpg" alt="">
</div>
<div class="bg-light p-4">
<img src="img/vendor-3.jpg" alt="">
</div>
<div class="bg-light p-4">
<img src="img/vendor-4.jpg" alt="">
</div>
<div class="bg-light p-4">
<img src="img/vendor-5.jpg" alt="">
</div>
<div class="bg-light p-4">
<img src="img/vendor-6.jpg" alt="">
</div>
<div class="bg-light p-4">
<img src="img/vendor-7.jpg" alt="">
</div>
<div class="bg-light p-4">
<img src="img/vendor-8.jpg" alt="">
</div>
</div>
</div>
</div>
</div>
<!-- Vendor End -->
<?php
include 'footer.php';
?>