2003-01-06 19:51:01 +00:00
<?php
// $Id$
include_once "includes/common.inc";
function status($message) {
if ($message) {
return "<b>Status:</b> $message<hr />\n";
}
}
2003-08-05 18:33:39 +00:00
function admin_help($section) {
$output = "";
switch ($section) {
2003-09-26 10:04:09 +00:00
case "admin/system/modules":
2003-08-05 18:33:39 +00:00
$output .= "Handles the administration pages.";
break;
2003-09-26 10:04:09 +00:00
case "admin":
2003-08-05 18:33:39 +00:00
$output .= "Welcome to the administration section. Below are the most recent system events. To get started please choose an item in the left column. If there is an arrow it will expand into a submenu. To jump up a level use the link,bread crumbs, above this block of text. To return to the home page click on the site name, and to go to Drupal's home page click on Druplicon, the drop on to the right.";
break;
2003-09-26 10:04:09 +00:00
case "admin":
2003-08-05 18:33:39 +00:00
$output = "This is a complete overview of the site administration page.";
break;
}
return t($output);
}
2003-09-26 10:04:09 +00:00
2003-05-29 09:15:00 +00:00
function admin_system($field){
2003-08-05 18:33:39 +00:00
$output = "";
2003-09-26 10:04:09 +00:00
if ($field == "description") {
$output = admin_help("admin/system/modules");
}
2003-08-05 18:33:39 +00:00
return $output;
2003-05-29 09:15:00 +00:00
}
2003-01-26 13:27:59 +00:00
function admin_link($type) {
2003-09-26 10:04:09 +00:00
if ($type == "system") {
menu("admin", t("administer %a", array("%a" => variable_get("site_name", "drupal"))) , NULL, NULL, 9);
2003-08-05 18:33:39 +00:00
menu("admin/overview", "sitemap", "overview_callback", admin_help("admin/overview"), 8);
2003-01-26 13:27:59 +00:00
}
}
2003-05-29 09:15:00 +00:00
function overview_callback() {
2003-09-26 10:04:09 +00:00
return menu_map();
2003-02-20 22:44:51 +00:00
}
2003-01-26 13:27:59 +00:00
function admin_admin() {
2003-09-26 10:04:09 +00:00
return menu_map();
2003-01-26 13:27:59 +00:00
}
2003-01-06 19:51:01 +00:00
2003-09-26 10:04:09 +00:00
function admin_page() {
2003-01-06 19:51:01 +00:00
if (user_access("access administration pages")) {
2003-09-26 10:04:09 +00:00
if (!isset($GLOBALS["_gmenu"])) {
menu_build("system");
}
if ($help = menu_help()) {
$contents = "<small>$help</small><hr />";
}
if (arg(1)) {
$contents .= menu_execute_action();
}
else {
$contents.= watchdog_overview("actions");
$title = t("System messages");
}
$breadcrumb = menu_path();
array_pop($breadcrumb);
$title = menu_title();
theme("header");
theme("breadcrumb", $breadcrumb);
theme("box", $title, $contents);
theme("footer");
2003-01-06 19:51:01 +00:00
}
else {
2003-09-26 10:04:09 +00:00
theme("header");
theme("box", t("Access denied"), message_access());
theme("footer");
2003-01-06 19:51:01 +00:00
}
}
?>