1) { $bigtree["path"] = array_slice($bigtree["path"],$x - 1); } if (file_exists("../custom/admin/router.php")) { include "../custom/admin/router.php"; } else { include "../core/admin/router.php"; } die(); } // We're not in the admin, see if caching is enabled and serve up a cached page if it exists if ($bigtree["config"]["cache"] && $bigtree["path"][0] != "_preview" && $bigtree["path"][0] != "_preview-pending") { $cache_location = md5(json_encode($_GET)); $file = $server_root."cache/$cache_location.page"; // If the file is at least 5 minutes fresh, serve it up. clearstatcache(); if (file_exists($file) && filemtime($file) > (time() - 300)) { readfile($file); die(); } } // Clean up the variables we set. unset($config,$debug,$in_admin,$parts_of_admin,$x); // Bootstrap BigTree if (file_exists("../custom/bootstrap.php")) { include "../custom/bootstrap.php"; } else { include "../core/bootstrap.php"; } // Route BigTree if (file_exists("../custom/router.php")) { include "../custom/router.php"; } else { include "../core/router.php"; } ?>