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-10-07 18:16:41 +00:00
|
|
|
case "admin/system/modules#description":
|
2003-10-03 14:55:27 +00:00
|
|
|
$output .= t("Handles the administration pages.");
|
2003-08-05 18:33:39 +00:00
|
|
|
break;
|
2003-09-26 10:04:09 +00:00
|
|
|
case "admin":
|
2003-10-23 14:53:18 +00:00
|
|
|
$output .= t("Welcome to the administration section. Below are the most recent system events.");
|
2003-08-05 18:33:39 +00:00
|
|
|
break;
|
2003-10-03 14:55:27 +00:00
|
|
|
case "admin/overview":
|
|
|
|
$output = t("This is a complete overview of the site administration page.");
|
2003-08-05 18:33:39 +00:00
|
|
|
break;
|
|
|
|
}
|
2003-10-03 14:55:27 +00:00
|
|
|
return $output;
|
2003-08-05 18:33:39 +00:00
|
|
|
}
|
2003-09-26 10:04:09 +00:00
|
|
|
|
2003-01-26 13:27:59 +00:00
|
|
|
function admin_link($type) {
|
2003-09-26 23:05:14 +00:00
|
|
|
if ($type == "system" && user_access("access administration pages")) {
|
2003-10-12 21:25:42 +00:00
|
|
|
menu("admin", t("administer"), "admin_admin", 9);
|
2003-01-26 13:27:59 +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-30 10:58:29 +00:00
|
|
|
theme("header");
|
|
|
|
|
2003-09-28 10:51:40 +00:00
|
|
|
if ($help = menu_get_active_help()) {
|
2003-09-26 10:04:09 +00:00
|
|
|
$contents = "<small>$help</small><hr />";
|
|
|
|
}
|
|
|
|
if (arg(1)) {
|
2003-09-28 11:08:17 +00:00
|
|
|
$contents .= menu_execute_active_handler();
|
2003-09-26 10:04:09 +00:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
$contents.= watchdog_overview("actions");
|
|
|
|
$title = t("System messages");
|
|
|
|
}
|
|
|
|
|
2003-09-28 11:08:17 +00:00
|
|
|
$breadcrumb = menu_get_active_breadcrumb();
|
2003-09-26 10:04:09 +00:00
|
|
|
array_pop($breadcrumb);
|
2003-09-28 10:51:40 +00:00
|
|
|
$title = menu_get_active_title();
|
2003-09-26 10:04:09 +00:00
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|