summaryrefslogtreecommitdiff
path: root/htdocs
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
parent93a934051be4af5f61e28d98650808fcc701ae91 (diff)
First attempt on a modularized plugin system, complete with admin, and parameters.
Diffstat (limited to 'htdocs')
-rw-r--r--htdocs/admin.css124
-rw-r--r--htdocs/index.php30
2 files changed, 146 insertions, 8 deletions
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");
?>
<?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>"; ?>