Skip to content
Snippets Groups Projects
Select Git revision
  • f104d3cc12134fc574373d6a643d9c84a317de44
  • 11.x default protected
  • 11.2.x protected
  • 10.6.x protected
  • 10.5.x protected
  • 11.1.x protected
  • 10.4.x protected
  • 11.0.x protected
  • 10.3.x protected
  • 7.x protected
  • 10.2.x protected
  • 10.1.x protected
  • 9.5.x protected
  • 10.0.x protected
  • 9.4.x protected
  • 9.3.x protected
  • 9.2.x protected
  • 9.1.x protected
  • 8.9.x protected
  • 9.0.x protected
  • 8.8.x protected
  • 10.5.1 protected
  • 11.2.2 protected
  • 11.2.1 protected
  • 11.2.0 protected
  • 10.5.0 protected
  • 11.2.0-rc2 protected
  • 10.5.0-rc1 protected
  • 11.2.0-rc1 protected
  • 10.4.8 protected
  • 11.1.8 protected
  • 10.5.0-beta1 protected
  • 11.2.0-beta1 protected
  • 11.2.0-alpha1 protected
  • 10.4.7 protected
  • 11.1.7 protected
  • 10.4.6 protected
  • 11.1.6 protected
  • 10.3.14 protected
  • 10.4.5 protected
  • 11.0.13 protected
41 results

admin.module

  • Dries Buytaert's avatar
    Dries Buytaert authored
    - Committed the admin menu integration patch.  Thanks Adrian, Stefan and others.
    f104d3cc
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    admin.module 2.10 KiB
    <?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":
          $output .= "Handles the administration pages.";
          break;
        case "admin":
          $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;
        case "admin":
          $output = "This is a complete overview of the site administration page.";
          break;
      }
      return t($output);
    }
    
    function admin_system($field){
      $output = "";
      if ($field == "description") {
        $output = admin_help("admin/system/modules");
      }
    
      return $output;
    }
    
    function admin_link($type) {
      if ($type == "system") {
        menu("admin", t("administer %a", array("%a" => variable_get("site_name", "drupal"))) , NULL, NULL, 9);
        menu("admin/overview", "sitemap", "overview_callback", admin_help("admin/overview"), 8);
      }
    }
    
    function overview_callback() {
      return menu_map();
    }
    
    function admin_admin() {
      return menu_map();
    }
    
    
    function admin_page() {
      if (user_access("access administration pages")) {
        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");
      }
      else {
        theme("header");
        theme("box", t("Access denied"), message_access());
        theme("footer");
      }
    }
    
    ?>