blob: d89027db084efc996b9c24438f51d416629b839f (
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
|
<?php
$navlist = array(
"home" => "Home",
"instruc" => "Instructions",
"status" => "Status"
);
function include_safe($file) {
if (file_exists("include/$file")) {
if (strpos(realpath("include/$file"), realpath($_SERVER['DOCUMENT_ROOT'])) !== 0) {
echo $_SERVER['DOCUMENT_ROOT'];
echo realpath("include/$file");
$code = 403;
require("errors.php");
}
else {
include($file);
}
}
else {
$code = 404;
require("errors.php");
}
}
if (!$_GET['page']) {
$page = "home";
}
else {
$page = $_GET['page'];
}
?>
|