aboutsummaryrefslogtreecommitdiffstats
path: root/web/include/thebrain.php
blob: 6b47a7f820d7fca1d5bd8007381ff460e8ad8d56 (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
<?php
if  ((strpos($_SERVER['HTTP_ACCEPT'], "application/xhtml+xml")) || ($ua->parent == "Validation Checkers"))  {
	$content_type = "application/xhtml+xml";
}

elseif ((strpos($_SERVER['HTTP_ACCEPT'], "application/xml")) || ($ua->browser == "IE" && $ua->version >= 6)) {
	if ($ua->browser == "IE") {
		$extradoctype = "<?xml-stylesheet type=\"text/xsl\" href=\"/include/copy.xsl\"?>\n";
	}
	$content_type = "application/xml";
}
else {
	$content_type = "text/html";
}

header("Content-type: $content_type; charset=UTF-8");

$navlist = array(
 "home"		=> "Home",
 "help"		=> "Help",
 "status" 		=> "Status",
 "mailinglists" 	=> "Mailing Lists"
);

function include_safe($file) {
	if (file_exists("include/$file")) {
		include($file);
	}
	else {
		$code = 404;
		require("errors.php");
	}
}

if (!$_GET['page']) {
	$page = "home";
}
else {
	$page = $_GET['page'];
}
?>