summaryrefslogtreecommitdiff
path: root/htdocs
diff options
context:
space:
mode:
Diffstat (limited to 'htdocs')
-rw-r--r--htdocs/index.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/htdocs/index.php b/htdocs/index.php
index 6783187..5d05807 100644
--- a/htdocs/index.php
+++ b/htdocs/index.php
@@ -1,6 +1,8 @@
<?php
include_once("config.php");
-include_once($UTIL_DIR . "/config.php");
+include_once($MODULES_DIR . "/config.php");
+
+$config = new Config($DATA_DIR . "/config.xml");
include_once($UTIL_DIR . "/guestbook.php");
header("Content-Type: text/html; charset=UTF-8");
@@ -16,7 +18,7 @@ $pages = new Pages($DATA_DIR . "/pages.xml");
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title><?php echo config('title');?></title>
+ <title><?php echo $config->value('title');?></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="MSSmartTagsPreventParsing" content="true"/>
<meta http-equiv="Content-Type" content="text/html"/>
@@ -43,7 +45,7 @@ $pages = new Pages($DATA_DIR . "/pages.xml");
<body>
<div style="display: none;">
<?php
-$ps = config('preload');
+$ps = $config->value('preload');
foreach($ps as $p) {
echo " <img alt=\"preload\" src=\"".$p."\"/>\n";
}
@@ -55,7 +57,7 @@ foreach($ps as $p) {
echo "style=\"width: 848px;\"";
?>>
<?php
-$menu = config('menu');
+$menu = $config->value('menu');
foreach($menu as $_m => $_t) {
echo " <a href=\"?page=".$_m."\" class=\"menu_entry_".$_m."\"></a>\n";
echo " <a href=\"?page=".$_m."\" class=\"menutitle\">".$t."</a>\n";
@@ -70,13 +72,11 @@ foreach($menu as $_m => $_t) {
echo "style=\"width: 599px;\"";
?>>
<?php
-include_once("config.php");
-
if($page == "admin") {
include($PAGE_DIR."/admin.php");
} else {
if($page) $p = $pages->getPage($page);
- else $p = $pages->getPage(config('default'));
+ else $p = $pages->getPage($config->value('default'));
if($p) $p->show();
}
?>