-
Notifications
You must be signed in to change notification settings - Fork 0
/
products.php
121 lines (103 loc) · 4.26 KB
/
products.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
<?php
require_once './views/top.php';
require_once "models/category.php";
require_once './models/post.php';
$obj_product = new product();
$result_product = $obj_product->get_products();
?>
</head>
<body>
<!--logo Area-->
<?php
require_once './views/header.php';
?>
<!--logo area closed-->
<!--coursal-->
<?php
require_once './views/slider.php';
?>
<!--Coursal-->
<!-- Page Content -->
<div class="container">
<!--Middle Nav-->
<?php
require_once './views/middle_nav.php';
?>
<!--Middle Nav close-->
<!-- Products -->
<div class="col-lg-9 col-md-9 col-sm-12" id="product_area">
<div class="col-md-12" >
<h2 class="page-header">Products</h2>
</div>
<?php
while ($row_product = $result_product->fetch_array()) {
if ($row_product["product_status"] == "Active") {
?>
<div class="col-sm-4 col-lg-4 col-md-4">
<div class="thumbnail">
<?php if ($row_product['view_count'] >= 30) { ?>
<span class="badge">Specials</span>
<?php } else { ?>
<span class="badge">New</span>
<?php } ?>
<img id="product_img" src="images/products/<?php echo $row_product['product_name']; ?>/<?php echo $row_product['product_image']; ?>" alt="">
<div class="caption">
<h4 class="pull-right">$<?php echo $row_product['product_price']; ?></h4>
<h4><a id="details" title="Click To view Details"
href="products/details.php?product_ID=<?php echo $row_product['product_ID']; ?>" target="_blank">
<?php echo $row_product["product_name"]; ?>
</a>
</h4>
<p><?php echo $row_product['product_info']; ?></p>
</div>
<div class="ratings">
<p class="pull-right"><?php echo $row_product['view_count']; ?> reviews</p>
<p>
<?php
if ($row_product["view_count"] <= 30) {
?>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<?php
} else {
?>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<?php
}
?>
</p>
</div>
</div>
</div>
<?php
} else {
echo '';
}
}
?>
<!--pagination-->
<div class="col-md-12">
<ul class="pagination">
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
</ul>
</div>
<!--pagination-->
</div>
</div>
<!---Product Close-->
<!-- Footer -->
<hr>
<?php
require_once "./views/footer.php";
?>
<!--Footer-->
</body>
</html>