not entirely sure, think its all the messaging components
[glcas.git] / plugins / server_admin.php
diff --git a/plugins/server_admin.php b/plugins/server_admin.php
new file mode 100644 (file)
index 0000000..9b6887f
--- /dev/null
@@ -0,0 +1,49 @@
+<?php 
+
+error_log("server admin loaded");
+
+global $BASE_URL, $MENU_ITEMS;
+$MENU_ITEMS["10serveradmin"]["name"] = "Server Admin";
+$MENU_ITEMS["10serveradmin"]["link"] = "$BASE_URL/serveradmin";
+
+global $SERVER_ADMIN_MENU;
+$SERVER_ADMIN_MENU["10services"]["name"] = "Services";
+$SERVER_ADMIN_MENU["10services"]["link"] = "?action=services";
+$SERVER_ADMIN_MENU["20hostcontrol"]["name"] = "Host Control";
+$SERVER_ADMIN_MENU["20hostcontrol"]["link"] = "?action=hostcontrol";
+
+global $URL_HANDLERS;
+$URL_HANDLERS["serveradmin.*"] = "GLCASServerAdmin";
+
+class GLCASServerAdmin {
+       function __construct($config)
+       {
+               $this->config = $config;
+               error_log("constructor for GLCASRepoAdmin");
+               
+       }
+       
+       function go($url)
+       {
+               error_log("repo:go called");
+               GLCASpageBuilder($this, "mainbody");
+               
+       }
+       
+       function mainbody()
+       {
+               echo "<h2>Server Admin</h2>";
+               global $SERVER_ADMIN_MENU;
+               echo "<table border=\"1\"><tr>";
+               foreach($SERVER_ADMIN_MENU as $val) {
+                       $link = $val["link"];
+                       $name = $val["name"];
+                       echo "<td><a href=\"$link\">$name</a></td>";
+               }
+               echo "</tr></table>";
+               
+               
+       }
+}
+
+?>
\ No newline at end of file