summaryrefslogtreecommitdiffstats
path: root/categories.php
diff options
context:
space:
mode:
authorStefan Suhren <suhren.stefan@fh-swf.de>2015-05-05 19:34:39 +0200
committerStefan Suhren <suhren.stefan@fh-swf.de>2015-05-05 19:34:39 +0200
commit705c4cb50eea66585cc95c7314001fce9dd197cd (patch)
tree4a448f4e30b117e12306b643121f49da15e6376b /categories.php
downloadCatalog-705c4cb50eea66585cc95c7314001fce9dd197cd.tar.gz
Catalog-705c4cb50eea66585cc95c7314001fce9dd197cd.zip
Initial commit
Diffstat (limited to 'categories.php')
-rw-r--r--categories.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/categories.php b/categories.php
new file mode 100644
index 0000000..2ef44df
--- /dev/null
+++ b/categories.php
@@ -0,0 +1,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> \ No newline at end of file