Code

Added subtree search to selectUserToPrinter
[gosa.git] / plugins / admin / systems / class_servDHCP.inc
1 <?php
3 class servdhcp extends plugin
4 {
5   /* attribute list for save action */
6   var $ignore_account= TRUE;
7   var $attributes= array();
8   var $objectclasses= array("whatever");
10   function servdhcp ($config, $dn= NULL, $parent= NULL)
11   {
12     plugin::plugin ($config, $dn, $parent);
13   }
15   function execute()
16   {
17         /* Call parent execute */
18         plugin::execute();
20     /* Fill templating stuff */
21     $smarty= get_smarty();
22     $display= "";
24     /* Do we need to flip is_account state? */
25     if (isset($_POST['modify_state'])){
26       $this->is_account= !$this->is_account;
27     }
29     /* Show tab dialog headers */
30     if ($this->is_account){
31       $display= $this->show_header(_("Remove DHCP service"),
32           _("This server has DHCP features enabled. You can disable them by clicking below."));
33     } else {
34       $display= $this->show_header(_("Add DHCP service"),
35           _("This server has DHCP features disabled. You can enable them by clicking below."));
36       return ($display);
37     }
39     $display.= $smarty->fetch(get_template_path('servdhcp.tpl', TRUE));
40     return($display);
41   }
43   function remove_from_parent()
44   {
45     /* This cannot be removed... */
46   }
49   /* Save data to object */
50   function save_object()
51   {
52     plugin::save_object();
53   }
56   /* Check supplied data */
57   function check()
58   {
59     /* Call common method to give check the hook */
60     $message= plugin::check();
61     
62     return ($message);
63   }
66   /* Save to LDAP */
67   function save()
68   {
69     plugin::save();
71     /* Optionally execute a command after we're done */
72     #$this->handle_post_events($mode);
73   }
75 }
77 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
78 ?>