not entirely sure, think its all the messaging components
[glcas.git] / plugins / server_admin.php
1 <?php 
2
3 error_log("server admin loaded");
4
5 global $BASE_URL, $MENU_ITEMS;
6 $MENU_ITEMS["10serveradmin"]["name"] = "Server Admin";
7 $MENU_ITEMS["10serveradmin"]["link"] = "$BASE_URL/serveradmin";
8
9 global $SERVER_ADMIN_MENU;
10 $SERVER_ADMIN_MENU["10services"]["name"] = "Services";
11 $SERVER_ADMIN_MENU["10services"]["link"] = "?action=services";
12 $SERVER_ADMIN_MENU["20hostcontrol"]["name"] = "Host Control";
13 $SERVER_ADMIN_MENU["20hostcontrol"]["link"] = "?action=hostcontrol";
14
15 global $URL_HANDLERS;
16 $URL_HANDLERS["serveradmin.*"] = "GLCASServerAdmin";
17
18 class GLCASServerAdmin {
19         function __construct($config)
20         {
21                 $this->config = $config;
22                 error_log("constructor for GLCASRepoAdmin");
23                 
24         }
25         
26         function go($url)
27         {
28                 error_log("repo:go called");
29                 GLCASpageBuilder($this, "mainbody");
30                 
31         }
32         
33         function mainbody()
34         {
35                 echo "<h2>Server Admin</h2>";
36                 global $SERVER_ADMIN_MENU;
37                 echo "<table border=\"1\"><tr>";
38                 foreach($SERVER_ADMIN_MENU as $val) {
39                         $link = $val["link"];
40                         $name = $val["name"];
41                         echo "<td><a href=\"$link\">$name</a></td>";
42                 }
43                 echo "</tr></table>";
44                 
45                 
46         }
47 }
48
49 ?>