-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
123 lines (95 loc) · 5.35 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
<<<<<<< HEAD
<?php include 'header.php' ;
$top_products = $db->query('SELECT * FROM products ORDER BY date DESC LIMIT 6')->fetchAll();
?>
<?php include_once 'sidebar.php' ?>
<div class="row carousel-holder">
<div class="col-md-12">
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
<li data-target="#carousel-example-generic" data-slide-to="3"></li>
<li data-target="#carousel-example-generic" data-slide-to="4"></li>
</ol>
<div class="carousel-inner">
<div class="item active">
<img class="slide-image" src="img/slider/slider1.jpg" alt="">
</div>
<div class="item">
<img class="slide-image" src="img/slider/slider2.jpg" alt="">
</div>
<div class="item">
<img class="slide-image" src="img/slider/slider3.jpg" alt="">
</div>
<div class="item">
<img class="slide-image" src="img/slider/slider4.jpg" alt="">
</div>
<div class="item">
<img class="slide-image" src="img/slider/slider5.jpg" alt="">
</div>
</div>
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div><!-- /.carousel -->
</div><!-- /.col-md-12 -->
</div><!-- /.row.carousel-holder -->
<div class="row">
<?php foreach ($top_products as $product) {
?>
<div class="product col-sm-4 col-lg-4 col-md-4">
<div class="thumbnail">
<img src="img/product/product5.jpg" alt="">
<div class="caption">
<h4 class="pull-right"><?= $product['price'] ?></h4>
<h4><a href="product.php?id=<?= $product['id'] ?>"><?= $product['name'] ?></a>
</h4>
<p><?= cutString($product['description'], 100, '[...]') ?></p>
</div>
<div class="ratings">
<p class="pull-right">15 reviews</p>
<p>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
</p>
</div>
<div class="btns clearfix">
<a class="btn btn-info pull-left" href="product.php?id=<?= $product['id'] ?>"><span class="glyphicon glyphicon-eye-open"></span> View</a>
<a class="btn btn-primary pull-right" href="product.php"><span class="glyphicon glyphicon-shopping-cart"></span> Add to cart</a>
</div>
</div><!-- /.thumbnail -->
</div><!-- /.product -->
<?php } ?>
=======
<?php
include_once 'header.php';
$last_products = $db->query('SELECT * FROM products ORDER BY date DESC LIMIT 6')->fetchAll();
?>
<div class="row">
<?php include_once 'sidebar.php' ?>
<div class="col-md-9">
<?= getSliderPictures() ?>
<div class="row">
<?php
foreach($last_products as $product) {
echo displayProduct($product, 'product col-sm-4 col-lg-4 col-md-4');
}
?>
>>>>>>> dac3df1668e72fa28db142677cb31d923055eaac
</div><!-- /.row -->
</div><!-- col-md-9 -->
</div><!-- /.row -->
<<<<<<< HEAD
</div><!-- /.container -->
<?php require_once 'footer.php' ?>
=======
<?php include_once 'footer.php' ?>
>>>>>>> dac3df1668e72fa28db142677cb31d923055eaac