summaryrefslogtreecommitdiff
path: root/htdocs/index.php
diff options
context:
space:
mode:
authordeva <deva>2009-03-23 18:41:22 +0000
committerdeva <deva>2009-03-23 18:41:22 +0000
commiteec8fdf3fd36f6f8511bdb4bea0899f82bf3f6ab (patch)
treeeefac33e9ef9980c81fd6200a437f39c12e63ba8 /htdocs/index.php
parent93a934051be4af5f61e28d98650808fcc701ae91 (diff)
First attempt on a modularized plugin system, complete with admin, and parameters.
Diffstat (limited to 'htdocs/index.php')
-rw-r--r--htdocs/index.php30
1 files changed, 22 insertions, 8 deletions
diff --git a/htdocs/index.php b/htdocs/index.php
index f374113..6ce08d8 100644
--- a/htdocs/index.php
+++ b/htdocs/index.php
@@ -6,6 +6,10 @@ header("Content-Type: text/html; charset=UTF-8");
include_once($UTIL_DIR . "/login.php");
if($page == "admin") checklogin();
+
+include_once($UTIL_DIR . "/pages.php");
+
+$pages = new Pages($DATA_DIR . "/pages.xml");
?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -20,7 +24,8 @@ if($page == "admin") checklogin();
<link href="/favicon.ico" rel="shortcut icon"/>
<link rel="stylesheet" type="text/css" href="style.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="handheld.css" media="handheld"/>
-<script type="text/javascript" src="external.js">js"></script>
+<link rel="stylesheet" type="text/css" href="admin.css" media="screen"/>
+<script type="text/javascript" src="external.js"></script>
</head>
<body>
<div style="display: none;">
@@ -79,6 +84,15 @@ if($page == "admin") checklogin();
<?php
include_once("config.php");
+if($page == "admin") {
+ include($PAGE_DIR."/admin.php");
+} else {
+ if($page) $p = $pages->getPage($page);
+ else $p = $pages->getPage($DEFAULT_PAGE);
+ if($p) $p->show();
+}
+
+/*
switch($page) {
case "news": include($PAGE_DIR."/news.php"); break;
case "shop": include($PAGE_DIR."/shop.php"); break;
@@ -104,23 +118,23 @@ case "cancel": include($PAGE_DIR."/cancel.php"); break;
// Default
default: include($PAGE_DIR."/news.php"); break;
}
+*/
?>
</div>
<div class="column" <?php if(strstr($_SERVER['HTTP_USER_AGENT'], "MSIE 6.0"))
echo "style=\"width: 249px;\"";
?>>
<?php
- include $PAGE_DIR."/column.php"
+$p = $pages->getPage("column");
+if($p) $p->show();
?>
</div>
</div>
<div class="footer">
- Hosted by <a href="http://www.aasimon.org">Aasimon.org</a>.
- Design and DIE logo by <a href="mailto:elsenator@gmail.com">Lars Bisballe Jensen</a>.
- Artwork by <a href="http://tonysandoval.deviantart.com">Tony Sandoval</a>.
- Copyright&copy;2007 <a href="http://www.executionroom.com">DIE</a>.
- This site is valid <a href="http://validator.w3.org/check?uri=referer">XHTML1.1</a>
- and <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS2.0</a>
+<?php
+$p = $pages->getPage("footer");
+if($p) $p->show();
+?>
</div>
</div>
<?php if(strstr($_SERVER['HTTP_USER_AGENT'], "MSIE 6.0")) echo "</td></tr></table></center>"; ?>