summaryrefslogtreecommitdiff
path: root/index.php
blob: f75d50b7ad69e018ef0f1394f9ede7357b07a904 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
// $Id$

include_once "includes/common.inc";

drupal_page_header();

fix_gpc_magic();

menu_build("system");

if (menu_active_handler_exists()) {
  $breadcrumb = menu_get_active_breadcrumb();
  array_pop($breadcrumb);
  $title = menu_get_active_title();

  print theme("header");
  print theme("breadcrumb", $breadcrumb);
  if ($help = menu_get_active_help()) {
    $contents = "<small>$help</small><hr />";
  }
  $contents .= menu_execute_active_handler();
  print theme("box", $title, $contents);
  print theme("footer");
}
else {
  $mod = arg(0);

  if (isset($mod) && module_hook($mod, "page")) {
    module_invoke($mod, "page");
  }
  else {
    if (module_hook(variable_get("site_frontpage", "node"), "page")) {
      module_invoke(variable_get("site_frontpage", "node"), "page");
    }
    else {
      print theme("header");
      print theme("footer");
    }
  }
}

drupal_page_footer();

?>