/
index.php
35 lines (35 loc) · 1.04 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
<?php
$pageTitle = "Unique T-shirts designed by a frog";
$section = "home";
include('inc/header.php'); ?>
<div class="section banner">
<div class="wrapper">
<img class="hero" src="img/southpark_kb.png" alt="Kim says:">
<div class="button">
<?php if($section == "shirts" || $section == "home"){ echo "on"; } ?>"><a href="shirts.php"><h2>Hey, I’m Kim!</h2>
<p>Check Out My Shirts</p>
</a>
</div>
</div>
</div>
<div class="section shirts latest">
<div class="wrapper">
<h2>Kim’s Latest Products</h2>
<?php include("inc/products.php"); ?>
<ul class="products">
<?php
$totalProducts = count($products);
$position = 0;
$list_view_html = "";
foreach($products as $productID => $product){
$position = $position+ 1;
if($totalProducts - $position < 4){
$list_view_html = get_list_view_html($productID, $product) . $list_view_html;
}
}
echo $list_view_html;
?>
</ul>
</div>
</div>
<?php include('inc/footer.php') ?>