bootstrap.inc

  1. 7.x bootstrap.inc
  2. 6.x bootstrap.inc
  3. 4.x bootstrap.inc
  4. 5.x bootstrap.inc

This file should be included by every public-facing page of FlightPath. It will include all the classes, as well as settings and function files, and modules.

File

bootstrap.inc
View source
  1. <?php
  2. /**
  3. * @file
  4. * This file should be included by every public-facing page of FlightPath.
  5. * It will include all the classes, as well as settings and function files, and modules.
  6. *
  7. */
  8. // Note: $levels_deep will have been set (or not) by another script. This
  9. // is so that you can send "../../" or whatever if you need to. Currently
  10. // used in routines/routines.php.
  11. if (!isset($levels_deep)) $levels_deep = "";
  12. // Load the includes files, for common functions.
  13. require_once("$levels_deep" . "includes/theme.inc");
  14. require_once("$levels_deep" . "includes/misc.inc");
  15. require_once("$levels_deep" . "includes/forms.inc");
  16. require_once("$levels_deep" . "includes/menu.inc");
  17. require_once("$levels_deep" . "includes/db.inc");
  18. // Should we load the settings file? This variable should be
  19. // set prior to including this bootstrap file.
  20. if (!isset($skip_flightpath_settings) || $skip_flightpath_settings != TRUE) {
  21. // Load the global system settings file.
  22. require_once("$levels_deep" . "custom/settings.php");
  23. }
  24. // Load all of the classes, as well as the custom classes.
  25. require_once("$levels_deep" . "classes/all_classes.php");
  26. // Should we load the settings file? This variable should be
  27. // set prior to including this bootstrap file.
  28. if (!isset($skip_flightpath_modules) || $skip_flightpath_modules != TRUE) {
  29. // Include all of the enabled modules
  30. foreach ($GLOBALS["fp_system_settings"]["modules"] as $module => $value) {
  31. if (isset($value["enabled"]) && $value["enabled"] != "1") {
  32. // Module is not enabled. Skip it.
  33. continue;
  34. }
  35. include_module($module, TRUE);
  36. }
  37. }
  38. // Constants
  39. define('FLIGHTPATH_VERSION', '4.4.2'); // will be replaced automatically by getflightpath.com.
  40. define('FLIGHTPATH_CORE', '4.x'); // hard-coded core version.
  41. define ('WATCHDOG_NOTICE', 5);
  42. define ('WATCHDOG_ALERT', 1);
  43. define ('WATCHDOG_ERROR', 3);
  44. define ('WATCHDOG_DEBUG', 7);
  45. define("MENU_TYPE_NORMAL_ITEM", 1);
  46. define("MENU_TYPE_CALLBACK", 2);
  47. define("MENU_TYPE_TAB", 3);
  48. define("MENU_TYPE_SUB_TAB", 4);
  49. define("MENU_ACCESS_DENIED", 61);
  50. define("MENU_NOT_FOUND", 62);
  51. // Set a global variable which confirms the bootstrap has been loaded.
  52. $GLOBALS["fp_bootstrap_loaded"] = TRUE;

Constants