1 <?php
3 class acltab extends tabs
4 {
6 function acltab($config, $data, $dn)
7 {
8 $data = array(array("CLASS" => "acl" , "NAME" => _("Acl")));
10 /* Save dn */
11 $this->dn= $dn;
12 $this->config= $config;
14 $baseobject= NULL;
16 foreach ($data as $tab){
17 $this->by_name[$tab['CLASS']]= $tab['NAME'];
20 if ($baseobject == NULL){
21 if($tab['CLASS'] == "acl"){
22 $baseobject= new $tab['CLASS']($this->config, $this, $this->dn);
23 }else{
24 $baseobject= new $tab['CLASS']($this->config,$this->dn);
25 }
26 $this->by_object[$tab['CLASS']]= $baseobject;
27 } else {
28 if($tab['CLASS'] == "acl"){
29 $this->by_object[$tab['CLASS']]= new $tab['CLASS']($this->config,$this,$this->dn, $baseobject);
30 }else{
31 $this->by_object[$tab['CLASS']]= new $tab['CLASS']($this->config, $this->dn, $baseobject);
32 }
33 }
35 $this->by_object[$tab['CLASS']]->parent= &$this;
36 $this->by_object[$tab['CLASS']]->set_acl_category("acl");
38 /* Initialize current */
39 if ($this->current == ""){
40 $this->current= $tab['CLASS'];
41 }
42 }
43 }
45 function save()
46 {
47 $ret= tabs::save();
48 return $ret;
49 }
51 function save_object()
52 {
53 tabs::save_object();
54 }
56 function execute()
57 {
58 $display= tabs::execute();
59 if(!$this->by_object['acl']->dialog){
60 $display.= "<p style=\"text-align:right\">\n";
61 $display.= " <input type=submit name=\"edit_finish\" style=\"width:80px\" value=\""._("Ok")."\">\n";
62 $display.= " \n";
63 $display.= " <input type=submit name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
64 $display.= "</p>";
65 }
66 return($display);
67 }
68 }
69 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
70 ?>