hosts bits
[glcas.git] / plugins / hosts.php
1 <?php 
2
3 error_log("hosts loaded");
4
5 global $URL_HANDLERS;
6 $URL_HANDLERS["hosts.*"] = "GLCASHosts";
7 global $BASE_URL, $MENU_ITEMS;
8 $MENU_ITEMS["30hosts"]["name"] = "Known Machines";
9 $MENU_ITEMS["30hosts"]["link"] = "$BASE_URL/hosts";
10
11 class GLCASHosts {
12         function __construct($config)
13         {
14                 $this->config = $config;
15                 error_log("constructor for GLCASHosts");
16                 
17         }
18         
19         function go($url)
20         {
21                 if(isset($_REQUEST["action"])) {
22                         switch($_REQUEST["action"]) {
23                                 case "addhost":
24                                         error_log("in updaterepo");
25                                         GLCASpageBuilder($this,"addPackage");
26                                         return;
27                                 case "delhost":
28                                         error_log("in delete pkg");
29                                         GLCASpageBuilder($this, "delPackage");
30                                         return;
31                         }
32                 }
33                 
34                 GLCASpageBuilder($this,"mainBody");
35                 return;
36                 
37         }
38         
39         function mainBody($url)
40         {
41                 echo "I am a hosts thingy";
42         }
43         
44         private $config;
45 }
46
47 ?>