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/admin.css | 124 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ htdocs/index.php | 30 ++++++++++---- 2 files changed, 146 insertions(+), 8 deletions(-) create mode 100644 htdocs/admin.css (limited to 'htdocs') diff --git a/htdocs/admin.css b/htdocs/admin.css new file mode 100644 index 0000000..86d0d49 --- /dev/null +++ b/htdocs/admin.css @@ -0,0 +1,124 @@ +/*** Admin ***/ + +.admin { + text-align: center; + position: absolute; + top: 10%; + left: 10%; + right: 10%; + width: 80%; + height: 500px; + border: solid #0000ff 3px; + background: url(gfx/transparent.png) repeat; + color: #000; +} + +.admin .menu { + background-image: none; + border-bottom: solid blue 1px; + width: 100%; + height: 30px; + padding-top: 0px; + padding-left: 0px; +} + +.admin .submenu { + border-bottom: solid blue 1px; +} + +.admin .header { + background-image: none; + text-align: center; + font-size: 16px; + font-weight: bold; + border: 0px; + border-bottom: solid #0000ff 3px; +} + +.admin .logout { + text-align: right; +} + +.admin .preview { + text-align: left; + border: solid green 1px; + padding: 20px 20px 20px 20px; + margin: 20px 60px 20px 60px; +} + +.IGNOREadmin h2 { + text-align: center; +} + +.IGNOREadmin_menu { + margin-top: 4px; + border-top: solid #930104 1px; + border-left: solid #930104 1px; + border-right: solid #930104 1px; + padding-right: 2px; + float: left; +} + +.IGNOREadmin_menu_entry { + text-align: center; + background: url(gfx/chicken.jpg) repeat; + border: solid #930104 1px; + color: #cc7f00; + padding: 1px; + margin: 3px 0px 3px 3px; + width: 67px; + float: left; + text-decoration: none; +} + +.IGNOREadmin_menu_entry_active { + text-align: center; + background: url(gfx/chicken.jpg) repeat; + border-top: solid #930104 1px; + border-left: solid #930104 1px; + border-right: solid #930104 1px; + color: #ffaf00; + font-weight: bold; + padding: 2px 2px 6px 2px; + margin: 1px -1px 0px 2px; + width: 67px; + float: left; + text-decoration: none; +} + +.IGNOREadmin_form { + padding: 4px; + border: solid #930104 1px; + min-height: 300px; + clear:both; +} + +.IGNOREadmin_form input { + margin: 1px; + padding: 0px; + background: #000; + border: solid #930104 1px; + color: #6f6f6f; + width: 150px; +} + +.IGNOREadmin_form select { + background: #000; + border: solid #930104 1px; + color: #6f6f6f; + width: 150px; +} + +.IGNOREadmin_form textarea { + background: #000; + border: solid #930104 1px; + color: #6f6f6f; + width: 500px; + margin-bottom: 4px; +} + +.IGNOREadmin_form button { + background: url(gfx/chicken.jpg) repeat; + border: solid #930104 1px; + color: #ff9f00; +} 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