Code

Cutted objects will be displayed in light grey in the management lists now.
[gosa.git] / plugins / admin / systems / class_dhcpNewSectionDialog.inc
1 <?php
3 class dhcpNewSectionDialog extends plugin
4 {
5   /* attribute list for save action */
6   var $ignore_account     = TRUE;
7   var $attributes         = array();
8   var $objectclasses      = array("whatever");
10   /* Mapping array */
11   var $types= array();
12   var $classtype= "";
13   static $sectionMap= array(  "dhcpService" => array("dhcpSharedNetwork", "dhcpSubnet", "dhcpGroup", "dhcpHost", "dhcpClass", "dhcpLeases"),
14                               "dhcpClass" => array("dhcpSubClass"),
15                               "dhcpSubClass" => array(),
16                               "dhcpLeases" => array(),
17                               "dhcpHost" => array(),
18                               "dhcpGroup" => array("dhcpHost"),
19                               "dhcpPool" => array("dhcpLeases"),
20                               "dhcpSubnet" => array("dhcpPool", "dhcpGroup", "dhcpHost", "dhcpClass", "dhcpLeases"),
21                               "dhcpSharedNetwork" => array("dhcpSubnet", "dhcpPool"));
25   function dhcpNewSectionDialog($type)
26   {
27     $this->types= array(  "dhcpLog" => _("Logging"),
28                           "dhcpService" => _("Global options"),
29                           "dhcpClass" => _("Class"),
30                           "dhcpSubClass" => _("Subclass"),
31                           "dhcpLeases" => _("Lease"),
32                           "dhcpHost" => _("Host"),
33                           "dhcpGroup" => _("Group"),
34                           "dhcpPool" => _("Pool"),
35                           "dhcpSubnet" => _("Subnet"),
36                           "dhcpFailOverPeer" => _("Failover peer"),
37                           "dhcpSharedNetwork" => _("Shared network"));
39     $this->classtype= $type;
40   }
42   function execute()
43   {
44     /* Fill templating stuff */
45     $smarty = get_smarty();
46     $display= "";
48     $sections= dhcpNewSectionDialog::$sectionMap[$this->classtype];
49     $t_sections= array();
50     foreach ($sections as $section){
51       $t_sections[$section]= $this->types[$section]; 
52     }
53     $smarty->assign("sections", $t_sections);
54     $smarty->assign("dhcpSectionACL", chkacl($this->acl,"DHCP"));
55     $display.= $smarty->fetch(get_template_path('dhcpNewSection.tpl', TRUE));
56     return($display);
57   }
59   /* Get posts and set class name 
60    */ 
61   function save_object()
62   {
63   }
65   /* Check given class name */
66   function check()
67   {
68     /* Call common method to give check the hook */
69     $message= "";
70  
71     return ($message);
72   }
75   /* Return the class name */
76   function save()
77   {
78   }
80 }
82 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
83 ?>