summaryrefslogtreecommitdiffstats
path: root/categories.php
blob: 2ef44df3cc7f0c469b527ce5d2693b5ec3d5287d (plain)
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Categories</title>
<link rel="stylesheet" type="text/css" href="styles/style.css">
</head>
<body>
<header><h1>Categories</h1></header>
<nav>
<dl>
<dt><a href="contact.html">Contact us</a></dt>
<dt><a href=".">Home</a></dt>
<dt><a href="login.html">Login</a></dt>
</dl>
</nav>
<div id="content">
<dl>
<?php
	require_once('vendor.inc.php');

	$categories = CategoryQuery::create()->find();

	foreach( $categories as $category ){
		echo "<dt><a href=\"products.php?id={$category->getId()}\">{$category->getName()}</a></dt>";
		echo "<dd>{$category->getDescription()}</dd>";
	}

?>
</dl>
<div class="spacer"></div>
</div>
<footer>Copyright by SomeCompany Ltd.</footer>
</body>
</html>