summaryrefslogtreecommitdiff
path: root/htdocs/index.php
blob: 4f8d94688d58146e84c3104183aa07013b1eed07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php
include_once("config.php");
include_once($UTIL_DIR . "/config.php");

include_once($UTIL_DIR . "/guestbook.php");
header("Content-Type: text/html; charset=UTF-8");

include_once($UTIL_DIR . "/login.php");
if($page == "admin") checklogin();

include_once($MODULES_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">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title><?php echo config('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"/>
	<link rel="alternate" type="application/rss+xml" title="RSS" href="rss.xml" />
	<link rel="author" title="Bent Bisballe Nyeng" href="http://www.aasimon.org"/>
	<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"/>
	<link rel="stylesheet" type="text/css" href="admin.css" media="screen"/>
	<script type="text/javascript">
    function externalLinks() {
    	if (!document.getElementsByTagName) return;
    	var anchors = document.getElementsByTagName("a");
    	for (var i=0; i<anchors.length; i++) {
    		var anchor = anchors[i];
    		if (anchor.getAttribute("href") &&
    				anchor.getAttribute("rel") == "external")
    			anchor.target = "_blank";
    	}
    }
    window.onload = externalLinks;
  </script>
</head>
<body>
<div style="display: none;">
<?php
$ps = config('preload');
foreach($ps as $p) {
	echo "	<img alt=\"preload\" src=\"".$p."\"/>\n";
}
?>
</div>
<?php if(strstr($_SERVER['HTTP_USER_AGENT'], "MSIE 6.0")) echo "<center><table><tr><td>"; ?>
<div class="page">
  <div class="menu" <?php if(strstr($_SERVER['HTTP_USER_AGENT'], "MSIE 6.0")) 
		 echo "style=\"width: 848px;\"";
		 ?>>
<?php
$menu = config('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";
	echo "\n";
}
?>
  </div>
  <div class="wrapper" <?php if(strstr($_SERVER['HTTP_USER_AGENT'], "MSIE 6.0")) 
		 echo "style=\"width: 848px; margin-top: -102px;\"";
		 ?>>
  <div class="content" <?php if(strstr($_SERVER['HTTP_USER_AGENT'], "MSIE 6.0")) 
		 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'));
	if($p) $p->show();
}
?>
  </div>
  <div class="column" <?php if(strstr($_SERVER['HTTP_USER_AGENT'], "MSIE 6.0")) 
		 echo "style=\"width: 249px;\"";
		 ?>>
<?php
$p = $pages->getPage("column");
if($p) $p->show();
?>
  </div>
  </div>
  <div class="footer">
<?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>"; ?>
<div>
<a href="?page=admin" class="forum_link"></a>
<a href="?page=admin" class="forum_link_text">Admin</a>
</div>
</body>
</html>