Skip to content
Snippets Groups Projects
Select Git revision
  • bfb3575c0950f2c0c1e22211a1efdf12e4efbd38
  • 11.x default protected
  • 11.2.x protected
  • 10.5.x protected
  • 10.6.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

Blame
  • Dries Buytaert's avatar
    Dries Buytaert authored
    - Some usability improvements requested by Michael.
    bfb3575c
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    admin.module 2.09 KiB
    <?php
    // $Id$
    
    include_once "includes/common.inc";
    
    function status($message) {
      if ($message) {
        return "<b>Status:</b> $message<hr />\n";
      }
    }
    
    function admin_page($mod) {
      global $user;
    
      if (user_access("access administration pages")) {
        page_header();
    
       ?>
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
        <html>
         <head>
          <title><?php echo variable_get("site_name", "drupal") . " " . t("administration pages"); ?></title>
          <link rel="stylesheet" type="text/css" media="print" href="misc/print.css" />
          <style type="text/css" title="layout" media="Screen">
            @import url("misc/admin.css");
          </style>
         </head>
         <body>
          <?php
            // NOTE: we include a dummy "print.css" to remove the "flash of unstyled content" (FUOC) problems in IE.
    
            module_invoke_all("link", "admin");
    
            /*
            ** Menu:
            */
    
            print "<div id=\"menu\">";
            echo "<h1><a href=\"index.php\">". variable_get("site_name", "drupal") ."</a></h1>";
            print menu_tree() ;
    
            print "</div>";
    
            /*
            ** Body:
            */
    
            print "<a href=\"http://drupal.org/\"><img align=\"right\" src=\"misc/druplicon-small.gif\" alt=\"Druplicon - Drupal logo\" border=\"0\" /></a>";
            print "<div id=\"main\">";
    
            if ($path = menu_path()) {
              print "<h2>". l(t("Administration"), "admin") ." &gt; $path</h2>";
            }
            else {
              print "<h2>". t("Administration") ."</h2>";
            }
    
            if ($menu = menu_menu()) {
              print "$menu<br />";
            }
    
            print "<br /><hr /><br />";
    
            if ($help = menu_help()) {
              print "<small>$help</small><br /><br />";
            }
    
            if (arg(1)) {
              print module_invoke(arg(1), "admin");
            }
            else {
              print "<h2>". t("System messages") ."</h2>";
              print watchdog_overview("actions");
            }
    
            print "</div>";
    
            db_query("DELETE FROM menu");
          ?>
        </body>
       </html>
       <?php
        page_footer();
      }
      else {
        print message_access();
      }
    }
    
    ?>