forked from phongdong/match-all
-
Notifications
You must be signed in to change notification settings - Fork 0
/
topfivehroboter.php
76 lines (62 loc) · 2.75 KB
/
topfivehroboter.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
<?php require_once('config.php'); ?>
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<!-- include header navigation -->
<?php $current_page = "http://match-all.com/product.php"; ?>
<?php include 'header_nav.inc.php'; ?>
<!-- Page Content -->
<div class="container">
<div class="row">
<?php include 'side_bar.inc.php';?>
<div class="col-md-10">
<h3>HROBOTER</h3>
<div class="row">
<?php
$data = getMarketProduct('http://hroboter.com/topfiveout.php');
$count = 0;
foreach ($data as $row) {
if($count >= 5)
break;
else {
$count++;
print " <div class='col-sm-4 col-lg-4 col-md-4'> \n";
print " <div class='thumbnail'> \n";
print " <img src='" . $row["image"] . "' alt='' style='width:256px;height:200px;'> \n";
print " <div class='caption'> \n";
print " <h5><a href='http://hroboter.com/detail.php?id=" . $row["id"] ."'>" . $row["title"] . "</a></h5> \n";
print " <h5>$ " . $row["price"] . "</h5> \n";
print " <h5>" . $row["location"] . "</h5> \n";
print " <div class='ratings'> \n";
print " <p class='pull-right'>" . $row["count"] ." reviews</p>";
print "<p>";
$round_rating = round($row["avgRating"]);
$avgRating = number_format($row["avgRating"], 1, '.', '');
drawStars($round_rating);
print "  " . $avgRating . " stars";
print "</p>";
print " </div> \n";
print " </div> \n";
print " </div> \n";
print " </div> \n";
}
}
?>
</div>
</div>
</div>
</div>
<!-- /.container -->
<div class="container">
<!-- Footer -->
<?php include 'footer.inc.php';?>
</div>
<!-- /.container -->
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>