summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorStefan Suhren <suhren.stefan@fh-swf.de>2015-05-18 00:42:16 +0200
committerStefan Suhren <suhren.stefan@fh-swf.de>2015-05-18 00:42:16 +0200
commit86042acca2f45f1153104941a17677ae01c91c9d (patch)
tree016ecca16603a4d1c695dc3c02cf130b8d2ae27d /index.php
parent6f33d7efdbfe7d26097ebefe95a9d8d38b111fba (diff)
downloadCatalog-86042acca2f45f1153104941a17677ae01c91c9d.tar.gz
Catalog-86042acca2f45f1153104941a17677ae01c91c9d.zip
PHPify everything and add user login
Diffstat (limited to 'index.php')
-rw-r--r--index.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..c7eb711
--- /dev/null
+++ b/index.php
@@ -0,0 +1,36 @@
+<?php
+session_start();
+?>
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>Home</title>
+<link rel="stylesheet" type="text/css" href="styles/style.css">
+</head>
+<body>
+ <header><h1>Home</h1></header>
+ <nav>
+ <dl>
+ <dt><a href="contact.php">Contact us</a></dt>
+ <dt><a href="categories.php">Categories</a></dt>
+ <?php
+ if(isset($_SESSION['username']))
+ {
+ echo "<dt><a href=\"login.php?logout\">Logout</a></dt>";
+ }
+ else
+ {
+ echo "<dt><a href=\"login.php\">Login</a></dt>";
+ }
+ ?>
+ </dl>
+ </nav>
+ <div id="content">
+ <p>This site will rock your chair. The best products from all over the world.
+ Furniture the like you have never seen. Contact us a get our catalog or login a order direct from our categories.</p>
+ <div class="spacer"></div>
+ </div>
+ <footer>Copyright by SomeCompany Ltd.</footer>
+</body>
+</html> \ No newline at end of file