e0b4f093c36e8725924f99aa780f01f7771ba837
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)
16 {
17 plugin::plugin ($config, $dn);
18 }
20 function execute()
21 {
22 /* Call parent execute */
23 plugin::execute();
24 /* Fill templating stuff */
25 $smarty= get_smarty();
26 $display= "";
28 /* Do we need to flip is_account state? */
29 if (isset($_POST['modify_state'])){
30 $this->is_account= !$this->is_account;
31 }
33 /* Show tab dialog headers */
34 if ($this->is_account){
35 $display= $this->show_header(_("Remove DHCP service"),
36 _("This server has DHCP features enabled. You can disable them by clicking below."));
37 } else {
38 $display= $this->show_header(_("Add DHCP service"),
39 _("This server has DHCP features disabled. You can enable them by clicking below."));
40 return ($display);
41 }
43 $display.= $smarty->fetch(get_template_path('servdhcp.tpl', TRUE));
44 return($display);
45 }
47 function remove_from_parent()
48 {
49 /* This cannot be removed... */
50 }
53 /* Save data to object */
54 function save_object()
55 {
56 plugin::save_object();
57 }
60 /* Check supplied data */
61 function check()
62 {
63 $message= array();
65 return ($message);
66 }
69 /* Save to LDAP */
70 function save()
71 {
72 plugin::save();
74 /* Optionally execute a command after we're done */
75 #$this->handle_post_events($mode);
76 }
78 }
80 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
81 ?>