summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorStefan Suhren <suhren.stefan@fh-swf.de>2015-06-01 18:46:12 +0200
committerStefan Suhren <suhren.stefan@fh-swf.de>2015-06-01 18:46:12 +0200
commitaf6dd5f8f9844596e85db25a8e97df9e08cb795c (patch)
tree8408e754dd335571635bcde041bbce69213af592 /index.php
parentbe50d9ed4ba2b844bbc29686cee46b1dc149372a (diff)
downloadCatalog-af6dd5f8f9844596e85db25a8e97df9e08cb795c.tar.gz
Catalog-af6dd5f8f9844596e85db25a8e97df9e08cb795c.zip
Port alls sites to smarty and use the inheritance model
Diffstat (limited to 'index.php')
-rw-r--r--index.php43
1 files changed, 9 insertions, 34 deletions
diff --git a/index.php b/index.php
index c7eb711..eeb50c5 100644
--- a/index.php
+++ b/index.php
@@ -1,36 +1,11 @@
<?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
+
+require_once('vendor.inc.php');
+
+$smarty = new Smarty;
+
+$smarty->assign('loggedin', isset($_SESSION['username']));
+
+$smarty->display('index.tpl');
+?> \ No newline at end of file