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

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

Dries's avatar
Dries committed
6
if (isset($_GET["q"])) {
Dries's avatar
Dries committed
7 8
  $mod = arg(0);
}
9 10 11 12
else {
  $_GET["q"] = variable_get("site_frontpage", "node");
  $mod = arg(0);
}
Dries's avatar
Dries committed
13

Dries's avatar
Dries committed
14
if (isset($mod) && module_hook($mod, "page")) {
Dries's avatar
Dries committed
15
  if ($mod != "admin") {
Dries's avatar
Dries committed
16
    drupal_page_header();
Dries's avatar
Dries committed
17 18 19
  }
  module_invoke($mod, "page");
  if ($mod != "admin") {
Dries's avatar
Dries committed
20
    drupal_page_footer();
Dries's avatar
Dries committed
21
  }
22 23
}
else {
Dries's avatar
Dries committed
24
  drupal_page_header();
25

Dries's avatar
Dries committed
26 27 28 29 30 31
  check_php_setting("magic_quotes_gpc", 0);

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

Dries's avatar
Dries committed
36
  drupal_page_footer();
Dries's avatar
Dries committed
37
}
Dries's avatar
Dries committed
38

Kjartan's avatar
Kjartan committed
39
?>