index.php

The primary entry point for FlightPath.

This script will determine which page the user is trying to view, and display it for them.

File

index.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * The primary entry point for FlightPath.
  5. *
  6. * This script will determine which page the user is trying to view,
  7. * and display it for them.
  8. */
  9. session_start();
  10. header("Cache-control: private");
  11. // If the settings.php file doesn't exist, then FlightPath must not be installed,
  12. // and we should redirect to install.php.
  13. if (!file_exists("custom/settings.php")) {
  14. header ("Location: install.php");
  15. die;
  16. }
  17. require_once("bootstrap.inc");
  18. // For development reasons only:
  19. // To rebuild the cache on every page load, uncomment the following line
  20. // menu_rebuild_cache();
  21. // FlightPath will now look at the request in the query to decide what page we are going to display.
  22. $page = menu_execute_page_request();
  23. if (!is_int($page)) {
  24. // Display the page!
  25. fp_display_page($page);
  26. }
  27. else {
  28. if ($page == MENU_NOT_FOUND) {
  29. display_not_found();
  30. }
  31. else if ($page == MENU_ACCESS_DENIED) {
  32. display_access_denied();
  33. }
  34. }
  35. // Call hook_exit as we leave the page.
  36. invoke_hook("exit");