From 44d08ff2ddedc0ac2100ce92dce113d31dee7c14 Mon Sep 17 00:00:00 2001 From: floam Date: Wed, 2 Nov 2005 06:05:40 +0000 Subject: * Starting new version in PHP with multiple sections and rewritten words [eventually]. Right now it's totally untested and is the base I'm starting from. This shouldn't bother anyone viewing the real site. git-svn-id: svn://svn.icculus.org/quake3/trunk@223 edf5b092-35ff-0310-97b2-ce42778d08ea --- web/include/thebrain.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 web/include/thebrain.php (limited to 'web/include/thebrain.php') diff --git a/web/include/thebrain.php b/web/include/thebrain.php new file mode 100644 index 0000000..eb36a73 --- /dev/null +++ b/web/include/thebrain.php @@ -0,0 +1,28 @@ + "Home", + "instruc" => "Instructions", + "status" => "Status" +); + +function include_safe($file) { + if (strpos(realpath("include/$file"), realpath($_SERVER['DOCUMENT_ROOT'])) !== 0) { + $code = 403; + require("errors.php"); + } + elseif (file_exists("include/$file")) { + include($file); + } + else { + $code = 404; + require("errors.php"); + } +} + +if (!$_GET['page']) { + $page = "home"; +} +else { + $page = $_GET['page']; + +?> -- cgit v1.2.3