-
Notifications
You must be signed in to change notification settings - Fork 0
/
catalog.php
44 lines (36 loc) · 969 Bytes
/
catalog.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
<?php
include("inc/data.php");
include("inc/functions.php");
$pageTitle = 'Full Catalog';
$section = null;
if (isset($_GET["cat"])) {
if ($_GET["cat"] == "books") {
$pageTitle = 'Books';
$section = 'books';
} else if ($_GET["cat"] == "movies") {
$pageTitle = 'Movies';
$section = 'movies';
} else if ($_GET["cat"] == "music") {
$pageTitle = 'Music';
$section = 'music';
}
}
include("inc/header.php"); ?>
<div class="section catalog page">
<div class="wrapper">
<h1><?php
if ($section !=null) {
echo "<a href='catalog.php'>Full Catalog</a> > ";
}
echo $pageTitle ?></h1>
<ul class="items">
<?php
$categories = array_category($catalog,$section);
foreach ($categories as $id) {
echo get_item_html($id,$catalog[$id]);
}
?>
</ul>
</div><!--/.wrapper-->
</div>
<?php include("inc/footer.php"); ?>