From eec8fdf3fd36f6f8511bdb4bea0899f82bf3f6ab Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 23 Mar 2009 18:41:22 +0000 Subject: First attempt on a modularized plugin system, complete with admin, and parameters. --- htdocs/index.php | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'htdocs/index.php') 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"); ?> @@ -20,7 +24,8 @@ if($page == "admin") checklogin(); - + +
@@ -79,6 +84,15 @@ if($page == "admin") checklogin(); 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; } +*/ ?>
> getPage("column"); +if($p) $p->show(); ?>
"; ?> -- cgit v1.2.3