index.php 930 Bytes
Newer Older
Dries's avatar
 
Dries committed
1
<?php
2
// $Id$
Dries's avatar
Dries committed
3

Dries's avatar
 
Dries committed
4 5 6 7 8 9
/**
 * @file
 * The PHP page that serves all page requests on a Drupal installation.
 *
 * The routines here dispatch control to the appropriate handler, which then
 * prints the appropriate page.
10 11 12
 *
 * All Drupal code is released under the GNU General Public License.
 * See COPYRIGHT.txt and LICENSE.txt.
Dries's avatar
 
Dries committed
13 14
 */

15
require_once './includes/bootstrap.inc';
16
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
Dries's avatar
 
Dries committed
17
$return = menu_execute_active_handler();
18 19 20 21 22 23 24 25 26 27 28 29 30 31

// Menu status constants are integers; page content is a string.
if (is_int($return)) {
  switch ($return) {
    case MENU_NOT_FOUND:
      drupal_not_found();
      break;
    case MENU_ACCESS_DENIED:
      drupal_access_denied();
      break;
    case MENU_SITE_OFFLINE:
      drupal_site_offline();
      break;
  }
Dries's avatar
 
Dries committed
32
}
33 34 35 36
elseif (isset($return)) {
  // Print any value (including an empty string) except NULL or undefined:
  print theme('page', $return);
}
Dries's avatar
 
Dries committed
37

38
drupal_page_footer();