diff options
author | floam <floam@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-11-02 06:05:40 +0000 |
---|---|---|
committer | floam <floam@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-11-02 06:05:40 +0000 |
commit | 44d08ff2ddedc0ac2100ce92dce113d31dee7c14 (patch) | |
tree | 4c375bfd4fd8d84eb166157f9dabcf5888f0c559 /web/include/thebrain.php | |
parent | fbd2525b03247e019854c8b52b71030f0014fb81 (diff) | |
download | ioquake3-aero-44d08ff2ddedc0ac2100ce92dce113d31dee7c14.tar.gz ioquake3-aero-44d08ff2ddedc0ac2100ce92dce113d31dee7c14.zip |
* 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
Diffstat (limited to 'web/include/thebrain.php')
-rw-r--r-- | web/include/thebrain.php | 28 |
1 files changed, 28 insertions, 0 deletions
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 @@ +<?php +$navlist = array( + "home" => "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']; + +?> |