Code

Added speed optimizations
[gosa.git] / plugins / admin / systems / class_servDHCP.inc
1 <?php
3 class servdhcp extends plugin
4 {
5   /* CLI vars */
6   var $cli_summary= "Manage server basic objects";
7   var $cli_description= "Some longer text\nfor help";
8   var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
10   /* attribute list for save action */
11   var $ignore_account= TRUE;
12   var $attributes= array();
13   var $objectclasses= array("whatever");
15   function servdhcp ($config, $dn= NULL, $parent= NULL)
16   {
17     plugin::plugin ($config, $dn, $parent);
18   }
20   function execute()
21   {
22         /* Call parent execute */
23         plugin::execute();
25     /* Fill templating stuff */
26     $smarty= get_smarty();
27     $display= "";
29     /* Do we need to flip is_account state? */
30     if (isset($_POST['modify_state'])){
31       $this->is_account= !$this->is_account;
32     }
34     /* Show tab dialog headers */
35     if ($this->is_account){
36       $display= $this->show_disable_header(_("Remove DHCP service"),
37           _("This server has DHCP features enabled. You can disable them by clicking below."));
38     } else {
39       $display= $this->show_enable_header(_("Add DHCP service"),
40           _("This server has DHCP features disabled. You can enable them by clicking below."));
41       return ($display);
42     }
44     $display.= $smarty->fetch(get_template_path('servdhcp.tpl', TRUE));
45     return($display);
46   }
48   function remove_from_parent()
49   {
50     /* This cannot be removed... */
51   }
54   /* Save data to object */
55   function save_object()
56   {
57     plugin::save_object();
58   }
61   /* Check supplied data */
62   function check()
63   {
64     /* Call common method to give check the hook */
65     $message= plugin::check();
66     
67     return ($message);
68   }
71   /* Save to LDAP */
72   function save()
73   {
74     plugin::save();
76     /* Optionally execute a command after we're done */
77     #$this->handle_post_events($mode);
78   }
80 }
82 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
83 ?>