summaryrefslogtreecommitdiff
path: root/admin.php
blob: 33f89dd7662f60a86f83ca552dbe7bd029bb88fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php

include_once "includes/common.inc";

// validate user access:
if (!user_access($user)) exit();

function status($message) {
  if ($message) return "<B>Status:</B> $message<HR>\n";
}

function admin_page($mod) {
  global $menu, $user;

  function module($name) {
    global $menu, $user;
    if (function_exists($name. "_admin") && user_access($user, $name)) $output .= "<A HREF=\"admin.php?mod=$name\">$name</A> | ";
    $menu .= $output;
  }

 ?>
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  <HTML>
   <HEAD><TITLE><?php echo variable_get(site_name, "drupal"); ?> administration</TITLE></HEAD>
   <STYLE>
    body { font-family: helvetica, arial; }
    h1   { font-size: 18pt; font-weight: bold; color: #990000; }
    h2   { font-family: helvetica, arial; font-size: 18pt; font-weight: bold; }
    h3   { font-family: helvetica, arial; font-size: 14pt; font-weight: bold; }
    th   { font-family: helvetica, arial; text-align: center; vertical-align: top; background-color: #CCCCCC; color: #995555; }
    td   { font-family: helvetica, arial; }
   </STYLE>
   <BODY BGCOLOR="#FFFFFF" LINK="#005599" VLINK="#004499" ALINK="#FF0000">
    <H1>Administration</H1>
    <?php module_iterate("module"); ?>
    <HR><?php echo $menu; ?><A HREF="index.php">home</A><HR>
    <?php if (user_access($user, $mod)) module_invoke($mod, "admin"); ?>
  </BODY>
 </HTML>
 <?php
}

user_rehash();
admin_page($mod);

?>