Code

0d532c8714635b4671477b6fd47263c5d72c5b35
[gosa.git] / plugins / admin / systems / class_glpiAccount.inc
1 <?php
3 class glpiAccount 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   /* Contructor 
16      Sets default values and checks if we already hae an existing glpi account
17   */
18   function glpiAccount ($config, $dn= NULL)
19   {
20     plugin::plugin ($config, $dn);
21     print $this->is_account;
22     print $this->initialy_was_account;
23   }
25   function execute()
26   {
27         /* Call parent execute */
28         plugin::execute();
30     /* Fill templating stuff */
31     $smarty= get_smarty();
32     $display= "";
34     /* Do we need to flip is_account state? */
35     if (isset($_POST['modify_state'])){
36       $this->is_account= !$this->is_account;
37     }
39     /* Show tab dialog headers */
40     if ($this->is_account){
41       $display= $this->show_header(_("Remove DNS service"),
42           _("This server has DNS features enabled. You can disable them by clicking below."));
43     } else {
44       $display= $this->show_header(_("Add DNS service"),
45           _("This server has DNS features disabled. You can enable them by clicking below."));
46       return ($display);
47     }
49     $display.= $smarty->fetch(get_template_path('glpi.tpl', TRUE));
50     return($display);
51   }
53   function remove_from_parent()
54   {
55   }
58   /* Save data to object */
59   function save_object()
60   {
61     plugin::save_object();
62   }
65   /* Check supplied data */
66   function check()
67   {
68     $message= array();
70     return ($message);
71   }
74   /* Save to LDAP */
75   function save()
76   {
77   }
79 }
81 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
82 ?>