index.php 665 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 10 11
/**
 * @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.
 */

12
require_once './includes/bootstrap.inc';
13
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
14

Dries's avatar
 
Dries committed
15 16
$return = menu_execute_active_handler();
switch ($return) {
Dries's avatar
 
Dries committed
17 18
  case MENU_NOT_FOUND:
    drupal_not_found();
Dries's avatar
 
Dries committed
19
    break;
Dries's avatar
 
Dries committed
20
  case MENU_ACCESS_DENIED:
Dries's avatar
 
Dries committed
21 22
    drupal_access_denied();
    break;
23 24 25
  case MENU_SITE_OFFLINE:
    drupal_site_offline();
    break;
Dries's avatar
 
Dries committed
26 27 28 29 30
  default:
    if (!empty($return)) {
      print theme('page', $return);
    }
    break;
Dries's avatar
 
Dries committed
31
}
Dries's avatar
 
Dries committed
32

Dries's avatar
 
Dries committed
33 34
drupal_page_footer();