forked from OpenUAE-UOS/Flight-Path-UOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
57 lines (41 loc) · 1.27 KB
/
index.php
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
/**
* @file
* The primary entry point for FlightPath.
*
* This script will determine which page the user is trying to view,
* and display it for them.
*/
session_start();
header("Cache-control: private");
// If the user is requesting a "clean URLs" check, display a simple success message.
if (isset($_REQUEST["q"]) && $_REQUEST["q"] == "test-clean-urls/check") {
print "CLEAN URLS CHECK SUCCESSFUL";
die;
}
// If the settings.php file doesn't exist, then FlightPath must not be installed,
// and we should redirect to install.php.
if (!file_exists("custom/settings.php")) {
header ("Location: install.php");
die;
}
require_once("bootstrap.inc");
// For development reasons only:
// To rebuild the cache on every page load, uncomment the following line
// menu_rebuild_cache();
// FlightPath will now look at the request in the query to decide what page we are going to display.
$page = menu_execute_page_request();
if (!is_int($page)) {
// Display the page!
fp_display_page($page);
}
else {
if ($page == MENU_NOT_FOUND) {
display_not_found();
}
else if ($page == MENU_ACCESS_DENIED) {
display_access_denied();
}
}
// Call hook_exit as we leave the page.
invoke_hook("exit");