Imported drupal-5.5
[drupal.git] / index.php
blobc87e45aed0c75654f5a8d5702460b3fe1c8abc94
1 <?php
2 // $Id: index.php,v 1.91 2006/12/12 09:32:18 unconed Exp $
4 /**
5 * @file
6 * The PHP page that serves all page requests on a Drupal installation.
8 * The routines here dispatch control to the appropriate handler, which then
9 * prints the appropriate page.
12 require_once './includes/bootstrap.inc';
13 drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
15 $return = menu_execute_active_handler();
17 // Menu status constants are integers; page content is a string.
18 if (is_int($return)) {
19 switch ($return) {
20 case MENU_NOT_FOUND:
21 drupal_not_found();
22 break;
23 case MENU_ACCESS_DENIED:
24 drupal_access_denied();
25 break;
26 case MENU_SITE_OFFLINE:
27 drupal_site_offline();
28 break;
31 elseif (isset($return)) {
32 // Print any value (including an empty string) except NULL or undefined:
33 print theme('page', $return);
37 drupal_page_footer();