drupal/modules/admin.module

66 lines
1.5 KiB
Plaintext
Raw Normal View History

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";
}
}
function admin_help($section) {
$output = "";
switch ($section) {
case "admin/system/modules#description":
$output .= t("Handles the administration pages.");
break;
case "admin":
$output .= t("Welcome to the administration section. Below are the most recent system events.");
break;
case "admin/overview":
$output = t("This is a complete overview of the site administration page.");
break;
}
return $output;
}
function admin_link($type) {
if ($type == "system" && user_access("access administration pages")) {
menu("admin", t("administer"), "admin_admin", 9);
}
}
function admin_page() {
2003-01-06 19:51:01 +00:00
if (user_access("access administration pages")) {
theme("header");
if ($help = menu_get_active_help()) {
$contents = "<small>$help</small><hr />";
}
if (arg(1)) {
$contents .= menu_execute_active_handler();
}
else {
$contents.= watchdog_overview("actions");
$title = t("System messages");
}
$breadcrumb = menu_get_active_breadcrumb();
array_pop($breadcrumb);
$title = menu_get_active_title();
theme("breadcrumb", $breadcrumb);
theme("box", $title, $contents);
theme("footer");
2003-01-06 19:51:01 +00:00
}
else {
theme("header");
theme("box", t("Access denied"), message_access());
theme("footer");
2003-01-06 19:51:01 +00:00
}
}
?>