initial import from onelab svn codebase
[plewww.git] / index.php
1 <?php
2 // $Id: index.php 144 2007-03-28 07:52:20Z thierry $
3
4 /**
5  * @file
6  * The PHP page that serves all page requests on a Drupal installation.
7  *
8  * The routines here dispatch control to the appropriate handler, which then
9  * prints the appropriate page.
10  */
11
12 require_once './includes/bootstrap.inc';
13 drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
14
15 $return = menu_execute_active_handler();
16 switch ($return) {
17   case MENU_NOT_FOUND:
18     drupal_not_found();
19     break;
20   case MENU_ACCESS_DENIED:
21     drupal_access_denied();
22     break;
23   case MENU_SITE_OFFLINE:
24     drupal_site_offline();
25     break;
26   default:
27     // Print any value (including an empty string) except NULL or undefined:
28     if (isset($return)) {
29       print theme('page', $return);
30     }
31     break;
32 }
33
34 drupal_page_footer();
35