2001-03-10 11:07:52 +00:00
|
|
|
<?php
|
2001-10-20 18:57:09 +00:00
|
|
|
// $Id$
|
2000-05-18 19:51:59 +00:00
|
|
|
|
2004-08-21 06:42:38 +00:00
|
|
|
/**
|
|
|
|
* @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.
|
2007-12-26 08:46:48 +00:00
|
|
|
*
|
|
|
|
* All Drupal code is released under the GNU General Public License.
|
|
|
|
* See COPYRIGHT.txt and LICENSE.txt.
|
2004-08-21 06:42:38 +00:00
|
|
|
*/
|
|
|
|
|
2008-09-20 20:22:25 +00:00
|
|
|
/**
|
|
|
|
* Root directory of Drupal installation.
|
|
|
|
*/
|
|
|
|
define('DRUPAL_ROOT', dirname(realpath(__FILE__)));
|
|
|
|
|
|
|
|
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
|
2005-07-23 05:57:27 +00:00
|
|
|
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
|
2005-04-24 16:34:36 +00:00
|
|
|
$return = menu_execute_active_handler();
|
2006-12-12 09:32:18 +00:00
|
|
|
|
|
|
|
// 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;
|
|
|
|
}
|
2003-01-06 19:51:01 +00:00
|
|
|
}
|
2006-12-12 09:32:18 +00:00
|
|
|
elseif (isset($return)) {
|
|
|
|
// Print any value (including an empty string) except NULL or undefined:
|
|
|
|
print theme('page', $return);
|
|
|
|
}
|
2003-08-12 15:57:16 +00:00
|
|
|
|
2007-02-11 09:30:51 +00:00
|
|
|
drupal_page_footer();
|