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

4
include_once "includes/common.inc";
Dries's avatar
Dries committed
5

6
if (isset($q)) {
Dries's avatar
Dries committed
7 8
  $mod = arg(0);
}
9

Dries's avatar
Dries committed
10
if (isset($mod) && module_hook($mod, "page")) {
Dries's avatar
Dries committed
11 12 13 14 15 16 17
  if ($mod != "admin") {
    page_header();
  }
  module_invoke($mod, "page");
  if ($mod != "admin") {
    page_footer();
  }
18 19
}
else {
Dries's avatar
Dries committed
20
  page_header();
21

Dries's avatar
Dries committed
22 23 24 25 26 27 28
  check_php_setting("magic_quotes_gpc", 0);
  check_php_setting("register_globals", 1);

  if (module_hook(variable_get("site_frontpage", "node"), "page")) {
    module_invoke(variable_get("site_frontpage", "node"), "page");
  }
  else {
29 30
    theme("header");
    theme("footer");
Dries's avatar
Dries committed
31 32 33 34
  }

  page_footer();
}
35

Kjartan's avatar
Kjartan committed
36
?>