Code

Updated logging
[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);
19     if($this->is_account){
20       @log::log("view","unknown/".get_class($this),$this->dn);
21     }
22   }
24   function execute()
25   {
26         /* Call parent execute */
27         plugin::execute();
29     /* Fill templating stuff */
30     $smarty= get_smarty();
31     $display= "";
33     /* Do we need to flip is_account state? */
34     if (isset($_POST['modify_state'])){
35       $this->is_account= !$this->is_account;
36     }
38     /* Show tab dialog headers */
39     if ($this->is_account){
40       $display= $this->show_disable_header(_("Remove DHCP service"),
41           _("This server has DHCP features enabled. You can disable them by clicking below."));
42     } else {
43       $display= $this->show_enable_header(_("Add DHCP service"),
44           _("This server has DHCP features disabled. You can enable them by clicking below."));
45       return ($display);
46     }
48     $display.= $smarty->fetch(get_template_path('servdhcp.tpl', TRUE));
49     return($display);
50   }
52   function remove_from_parent()
53   {
54     /* This cannot be removed... */
55     @log::log("remove","unknown/".get_class($this),$this->dn);
56   }
59   /* Save data to object */
60   function save_object()
61   {
62     plugin::save_object();
63   }
66   /* Check supplied data */
67   function check()
68   {
69     /* Call common method to give check the hook */
70     $message= plugin::check();
71     
72     return ($message);
73   }
76   /* Save to LDAP */
77   function save()
78   {
79     plugin::save();
80     @log::log("modfiy","unknown/".get_class($this),$this->dn);
82     /* Optionally execute a command after we're done */
83     #$this->handle_post_events($mode);
84   }
86 }
88 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
89 ?>