Code

Added some group acls
[gosa.git] / plugins / personal / environment / class_environment.inc
1 <?php
3 class environment 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       = FALSE;
12   var $plHeadline           = "Environment";
13   var $plDescription        = "This does something";
14   var $dialog               = false;    // Indicates that we are currently editing in an seperate dialog
15   
16   var $in_dialog            = false;
17   var $uid                  = "";
19   var $is_group             = false;
20   
21   /* Attribute definition
22    */
24   /* profile management */
25   var $useProfile         = false;  // Specifies if we want to use a Server 
26   var $gotoProfileServer  = "";     // Specifies the selected profile server
27   var $gotoProfileServers = array();// Specifies all available and selectable servers
28   var $gotoProfileFlags   = "";     // Flags enabled  ? only used to set ACL and save 
29   var $gotoProfileFlag_C  = "";     // Flag is set to C if we have the profile caching fucntion enabled 
30   
31   var $gotoXResolution    = "auto";     // The selected resolution eg: 1024x768
32   var $gotoXResolutions   = array();// Contains all available resolutions for this account
33   var $gotoProfileFlag_L  = "";     // Flag is set to L to enable runtime resolution change 
34   var $gotoProfileQuota   = "";     // User Quota Settings
36   /* Logon script section*/
37   var $gotoLogonScripts   = array();// Contains all available Logon Scripts  
38   var $gotoLogonScript    = "";     // The selected Logon Script
40   /* Printer */
41   var $gotoPrinter        = array();// All available Printer, with their configurations
42   var $gotoPrinterSel     = "";     //  The selected Printer
43   var $gosaDefaultPrinter = "";     // Default printer
45   /* Share */
46   var $gotoShares         = array();// Current Share Options
47   var $gotoShare          = "";     // currently selected Share Option
48   var $gotoShareSelections= array();// Available Shares for this account in Listbox format
49   var $gotoAvailableShares= array();// Available Shares for this account
50   
51   /* Kiosk profile */
52   var $gotoKioskProfile   = "none";     // The selected Kiosk Profile
53   var $gotoKioskProfiles  = array();// All available Kiosk profiles
54   var $newKioskProfiles   = array();
56   /* Hotplug Devices */
57   var $gotoHotplugDevice  = array();     // Selected hotplug
58   var $gotoHotplugDevices = array();// Already configured hotplug devices 
61   /* general settings */
62   // Sets the attributes which will kept on page reload, which will be saved, ...
64   var $CopyPasteVars      = array("gotoHotplugDevices","newKioskProfiles","gotoAvailableShares","gotoShareSelections","gotoPrinterSel","gotoProfileFlag_L","gotoXResolutions","gotoProfileFlag_C","gotoProfileServers","useProfile","is_group","in_dialog","OrigCn");
66   var $attributes         = array("uid","gotoProfileServer","gotoProfileFlags",
67                                     "gotoXResolution","gotoProfileQuota",
68                                     "gotoLogonScripts","gotoLogonScript",
69                                     "gotoPrinter", "gosaDefaultPrinter",
70                                     "gotoShares","gotoShare",
71                                     "gotoKioskProfile","gotoKioskProfiles"
72                                     );
73   var $objectclasses      = array("gotoEnvironment"); // Specifies the objectClass which contains the attributes edited here 
74   var $cn;
75   var $OrigCn;
77   function environment ($config, $dn= NULL)
78   {
79     plugin::plugin ($config, $dn);
81     /* Check : Are we currently editing a group or user dialog */
82     if((isset($this->attrs['cn'][0]))&&(!isset($this->attrs['uid'][0]))){
83       $suffix="Group";
84       $this->uid          = $this->attrs['cn'][0];
85       $this->attrs['uid'] = $this->attrs['cn'][0];
86       $this->OrigCn = $this->attrs['cn'][0];
87     }else{
88       $suffix="User";
89     }
91     $this->gotoKioskProfile= preg_replace("/^.*\//i","",$this->gotoKioskProfile);
93     /* Get all Printer assignments */
94     $ldap = $this->config->get_ldap_link();
95     $ldap->cd($this->config->current['BASE']);
96     $ldap->search("(&(objectClass=gotoPrinter)(goto".$suffix."Printer=".$this->uid."))",array("*"));
97     while($printer = $ldap->fetch()){
98       $this->gotoPrinter[$printer['cn'][0]]=$printer;
99       $this->gotoPrinter[$printer['cn'][0]]['mode']="user";
100     }
101     $ldap->search("(&(objectClass=gotoPrinter)(goto".$suffix."AdminPrinter=".$this->uid."))",array("*"));
102     while($printer = $ldap->fetch()){
103       $this->gotoPrinter[$printer['cn'][0]]=$printer;
104       $this->gotoPrinter[$printer['cn'][0]]['mode']="admin";
105     }
106   
107     /* prepare hotplugs */
108     if((isset($this->attrs['gotoHotplugDevice']))&&(is_array($this->attrs['gotoHotplugDevice']))){
109       unset($this->attrs['gotoHotplugDevice']['count']);
110       foreach($this->attrs['gotoHotplugDevice'] as $device){
111         $tmp = $tmp2 = array();
112         $tmp = split("\|",$device);
113         $tmp2['name']        = $tmp[0]; 
114         $tmp2['description'] = $tmp[1]; 
115         $tmp2['id']          = $tmp[2]; 
117         /* Produkt ID */
118         if(!isset($tmp[3])){
119           $tmp[3] = "";
120         }
121         /* Vendor ID */
122         if(!isset($tmp[4])){
123           $tmp[4] = "";
124         }
125   
126         $tmp2['produkt']     = $tmp[3]; 
127         $tmp2['vendor']      = $tmp[4];
128  
129         $this->gotoHotplugDevices[$tmp[0]]=$tmp2;
130       }
131     }
132     
133     /* prepare LogonScripts */
134     if((isset($this->attrs['gotoLogonScript']))&&(is_array($this->attrs['gotoLogonScript']))){
135       unset($this->attrs['gotoLogonScript']['count']);
136       foreach($this->attrs['gotoLogonScript'] as $device){
137         $tmp = $tmp2 = array();
138         $tmp = split("\|",$device);
139         $tmp2['LogonName']        = $tmp[0]; 
140         $tmp2['LogonPriority']    = $tmp[2]; 
141         if(preg_match("/O/i",$tmp[1])){
142           $tmp2['LogonOverload'] = "O";
143         }else{
144           $tmp2['LogonOverload'] = "";
145         }
146         if(preg_match("/L/i",$tmp[1])){
147           $tmp2['LogonLast'] = "L";
148         }else{
149           $tmp2['LogonLast'] = "";
150         }
151         $tmp2['LogonData']        = base64_decode($tmp[3]); 
152         $tmp2['LogonDescription'] = $tmp[4];
153         $this->gotoLogonScripts[$tmp[0]]=$tmp2;
154       }
155     }
156     
157     /* Prepare Shares */
158     if((isset($this->attrs['gotoShare']))&&(is_array($this->attrs['gotoShare']))){
159       unset($this->attrs['gotoShare']['count']);
160       foreach($this->attrs['gotoShare'] as $share){
161         $tmp = $tmp2 = array();
162         $tmp = split("\|",$share);
163         $tmp2['server']      =$tmp[0];
164         $tmp2['name']        =$tmp[1];
165         $tmp2['mountPoint']  =$tmp[2];
166         if(isset($tmp[3])){
167           $tmp2['PwdHash']  =$tmp[3];
168         }else{
169           $tmp2['PwdHash']  ="";
170         }
171         if(isset($tmp[4])){
172           $tmp2['Username']  =$tmp[4];
173         }else{
174           $tmp2['Username']  ="";
175         }
176         $this->gotoShares[$tmp[1]."|".$tmp[0]]=$tmp2;
177       }
178     }
180     for($i = 0 ; $i < strlen($this->gotoProfileFlags) ; $i ++){
181       $chr = $this->gotoProfileFlags[$i];
182       $name = "gotoProfileFlag_".$chr;
183       $this->$name=$chr;
184     }
186     if((!empty($this->gotoProfileServer))||($this->gotoProfileFlag_C=="C")){
187       $this->useProfile = true;
188     }else{
189       $this->useProfile = false;
190     }
192     /* Set to group environment if we editing a group */
193     if(!isset($this->parent)){
194       $this->is_group = true;
195     }
197     /* Set resolutions */
198     $this->gotoXResolutions = array("auto"=>_("auto"),
199                                     "640x480"   =>  "640x480",
200                                     "800x600"   =>  "800x600",
201                                     "1024x768"  =>  "1024x768",
202                                     "1154x864"  =>  "1154x864",
203                                     "1280x768"  =>  "1280x768",
204                                     "1280x1024" =>  "1280x1024");
206     if(isset($this->config->data['MAIN']['RESOLUTION_HOOK'])){
207       $file = $this->config->data['MAIN']['RESOLUTION_HOOK'];
208   
209       if(is_readable($file)){
210         $str = file_get_contents($file);
211         $lines = split("\n",$str);
212         foreach($lines as $line){
213           $line = trim($line);
214           if(!empty($line)){
215             $this->gotoXResolutions[$line]=$line;
216           }
217         }
218         //natcasesort($this->gotoXResolutions);
219       }else{
220         print_red(sprintf(_("You have specified an external resolution hook which can't be read, please check the permission of the file '%s'."),$file));
221       }
222     }
224  
225     $this->gotoProfileServers= $config->getShareServerList() ;
226     $this->gotoShareSelections= $config->getShareList(true);
227     $this->gotoAvailableShares= $config->getShareList(false);  
229   }
231   function execute()
232   {
233         /* Call parent execute */
234         plugin::execute();
236   /* Fill templating stuff */
237   $smarty= get_smarty();
238   $display= "";
240   /* Prepare all variables for smarty */
241   foreach($this->attributes as $s_attr){
242     /* Set value*/
243     $smarty->assign($s_attr,$this->$s_attr);
245     /* Set checkbox state*/
246     if(empty($this->$s_attr)){
247       $smarty->assign($s_attr."CHK","");
248     }else{
249       $smarty->assign($s_attr."CHK"," checked ");
250     }
252     /* Prepare ACL settings*/
253     if(chkacl($this->acl,$s_attr)=="") {
254       $smarty->assign($s_attr."ACL","");
255     }else{
256       $smarty->assign($s_attr."ACL"," disabled ");
257     }
259   }
261   /* Is accout enabled | are we editing from usermenu or admin menu 
262      All these tab management is done here
263    */
265   /* Working from Usermenu an the Account is currently disbled
266      * this->parent :  is only set if we are working in a list of tabs
267      * is_account   :  is only true if the needed objectClass is given
268     */
269     if((!isset($this->parent))&&(!$this->is_account)){
270       /* We are currently editing this tab from usermenu, but this account is not enabled */
271       $smarty->assign("is_account",$this->is_account);
272       /* Load template */
273       $display .= $smarty->fetch(get_template_path('environment.tpl', TRUE));
274       /* Avoid the "You are currently editing ...." message when you leave this tab */
275       $display .= back_to_main(); 
276       /* Display our message to the user */
277       return $display;
278     
280     /* We are currently editing from group tabs, because 
281      * $this->parent is set
282      * posixAccount is not set, so we are not in usertabs.
283      */
284     }elseif((isset($this->parent))&&(!isset($this->parent->by_object['posixAccount']))){
285       $smarty->assign("is_account","true");
286       $this->is_group     = true;
287       $this->uid          = $this->cn;
288       $this->attrs['uid'] = $this->cn;
290       /* Change state if needed */
291       if (isset($_POST['modify_state'])){
292         $this->is_account= !$this->is_account;
293       }
295       /* Group Dialog with enabled environment options */
296       if ($this->is_account){
297         $display= $this->show_header(_("Remove environment extension"),
298             _("Environment extension enabled. You can disable it by clicking below."));
299       } else {
300   
301       /* Environment is disabled 
302          If theres is no posixAccount enabled, you won't be able to enable 
303          environment extensions
304        */
305         if((isset($this->parent->by_object['group']))||(isset($this->attrs['objectClass']))&&((in_array("posixAccount",$this->attrs['objectClass'])))){
306           // 4. There is a PosixAccount
307           $display= $this->show_header(_("Add environment extension"),
308               _("Environment extension disabled. You can enable it by clicking below."));
309           return $display;
310         }else{
311           // 4. There is no PosixAccount
312           $display= $this->show_header(_("Add environment extension"),
313               _("Environment extension disabled. You have to setup a posix account before you can enable this feature."));
314           return $display;
315         }
316       }
317     }else{
318       /* Editing from Usermenu 
319        *  Tell smarty that this accoutn is enabled 
320        */
321       $smarty->assign("is_account","true");
323       $this->is_group = false;
325       /* Do we need to flip is_account state? */
326       if (isset($_POST['modify_state'])){
327         $this->is_account= !$this->is_account;
328       }
330       if(isset($this->parent)){
332         // 3. Account enabled . Editing from adminmenu
333         if ($this->is_account){
334           $display= $this->show_header(_("Remove environment extension"),
335               _("Environment extension enabled. You can disable it by clicking below."));
336         } else {
338           if($this->parent->by_object['posixAccount']->is_account==true){
339             // 4. There is a PosixAccount
340             $display= $this->show_header(_("Add environment extension"),
341                 _("Environment extension disabled. You can enable it by clicking below."));
342             return $display;
343           }else{
344             // 4. There is a PosixAccount
345             $display= $this->show_header(_("Add environment extension"),
346                 _("Environment extension disabled. You have to setup a posix account before you can enable this feature."),TRUE,TRUE);
347             return $display;
348           }
349         }
350       }
351     }
352     /* Account is Account : is_accounbt=true.
353      * Else we won't reach this. 
354      */
355    
356     /* Prepare all variables for smarty */
357     foreach($this->attributes as $s_attr){
358       /* Set value*/
359       $smarty->assign($s_attr,$this->$s_attr);
360      
361       /* Set checkbox state*/
362       if(empty($this->$s_attr)){
363         $smarty->assign($s_attr."CHK","");
364       }else{
365         $smarty->assign($s_attr."CHK"," checked ");
366       }
367     
368       /* Prepare ACL settings*/
369       if(chkacl($this->acl,$s_attr)=="") {
370         $smarty->assign($s_attr."ACL","");
371       }else{
372         $smarty->assign($s_attr."ACL"," disabled ");
373       }
374  
375     }
377     foreach(array("gotoHotplugDevice","gotoPrinterSel") as $s_attr){
378       if(chkacl($this->acl,$s_attr)=="") {
379         $smarty->assign($s_attr."ACL","");
380       }else{
381         $smarty->assign($s_attr."ACL"," disabled ");
382       }
383     }
385     if(empty($this->useProfile)){
386       $smarty->assign("gotoProfileACL","disabled");
387       $smarty->assign("useProfileCHK","");
388     }else{
389       $smarty->assign("gotoProfileACL","");
390       $smarty->assign("useProfileCHK"," checked ");
391     }
393  
394     $smarty->assign("useProfileACL","");
395     if($this->acl != "#none#"){
396       $smarty->assign("useProfileACL","");
397       $smarty->assign("gotoProfileFlag_CACL"," ");
398       $smarty->assign("gotoProfileQuotaACL"," ");
399     }else{
400       $smarty->assign("gotoProfileFlag_CACL"," disabled ");
401       $smarty->assign("useProfileACL","disabled");
402       $smarty->assign("gotoProfileServer"," disabled ");
403       $smarty->assign("gotoProfileQuotaACL"," disabled ");
404     }
406     /* HANDLE Profile Settings here 
407      * Assign available Quota and resolution settings
408      * Get all available profile server
409      * Get cache checkbox
410      * Assign this all to Smarty 
411      */
413     if(empty($this->gotoProfileFlag_L)){
414       $smarty->assign("gotoProfileFlag_LCHK"," ");
415     }else{
416       $smarty->assign("gotoProfileFlag_LCHK"," checked ");
417     }
419     if(empty($this->gotoProfileFlag_C)){
420       $smarty->assign("gotoProfileFlag_CCHK"," ");
421     }else{
422       $smarty->assign("gotoProfileFlag_CCHK"," checked ");
423     }
426     $smarty->assign("gotoXResolutions"    , $this->gotoXResolutions);
427     $smarty->assign("gotoXResolutionKeys" , array_flip($this->gotoXResolutions));
429     $smarty->assign("gotoProfileServers",$this->gotoProfileServers);
430     if(!is_array($this->gotoProfileServers)){
431       $this->gotoProfileServers =array();
432     }
433     $smarty->assign("gotoProfileServerKeys",array_flip($this->gotoProfileServers));
435     /* Handle kiosk profiles 
436      * Read available from filesystem
437      * Open management if post is transmitted
438      */
440     /* Save */
441     if(isset($_POST['KioskClose'])){
442       $this->newKioskProfiles = array_merge($this->newKioskProfiles,$this->dialog->save());
443   
444       unset($this->dialog);
445       $this->dialog=NULL;
446       $this->is_dialog = false;
447     }
449     /* Reassign help class */
450     $_SESSION['current_class_for_help'] = get_class($this);
451  
452     /* Open Management Dialog */
453     if(isset($_POST['KioskManagementDialog'])){
454       $this->dialog = new kioskManagementDialog($this->config,$this->dn,$this->newKioskProfiles); 
455       $this->dialog->parent= $this;
456       $this->dialog->acl = $this->acl;
457       $this->is_dialog = true;
458     }
459     $tmp = new kioskManagementDialog($this->config,$this->dn);
460     $list = $tmp->getKioskProfiles($this->newKioskProfiles);
461     $list['none']=_("None");
462     $list = array_reverse($list);
463     $smarty->assign("gotoKioskProfiles",$list);
464     $smarty->assign("gotoKioskProfileKeys",array_flip($list));
466     /* Logonscript Management
467      * Get available LogonScripts (possibly grey out (or mark) these script that are defined for the group) 
468      * Perform add Delete edit Posts 
469      */
471     /* Dialog Save */
472     if(isset($_POST['LogonSave'])){
473       $this->dialog->save_object();
474       if(count($this->dialog->check())!=0){
475         foreach($this->dialog->check() as $msg){
476           print_red($msg);
477         }
478       }else{
479         $tmp = $this->dialog->save();
480         unset($this->dialog);
481         $this->dialog=NULL;
482         $this->is_dialog=false;
483         $this->gotoLogonScripts[$tmp['LogonName']]=$tmp; 
484       }
485     }
486     
487     /* Dialog Quit without saving */
488     if(isset($_POST['LogonCancel'])){
489       $this->is_dialog= false;
490       unset($this->dialog);
491       $this->dialog= NULL;
492     }
493    
494     /* Check Edit Del New Posts for a selected LogonScript */ 
495     if(isset($_POST['gotoLogonScriptNew'])||isset($_POST['gotoLogonScriptEdit'])||isset($_POST['gotoLogonScriptDel'])){
497       /* New Logon Script: Open an edit dialog, we don't need a $_POST['gotoLogonScript'] here.
498        * In this case we create a new Logon Script.
499        */
500       if(isset($_POST['gotoLogonScriptNew'])){
501         $this->is_dialog = true;
502         $this->dialog = new logonManagementDialog($this->config,$this->dn);
503       }
505       /* If we receive a Delete request and there is a Script selected in the selectbox, delete this one.
506        * We only can delete if there is an entry selected.
507        */
508       if((isset($_POST['gotoLogonScriptDel']))&&(isset($_POST['gotoLogonScript']))){
509         unset($this->gotoLogonScripts[$_POST['gotoLogonScript']]);
510       }
511       
512       /* In this case we want to edit an existing entry, we open a new Dialog to allow editing.
513        * There must be an entry selected to perform edit request.
514        */
515       if((isset($_POST['gotoLogonScriptEdit']))&&(isset($_POST['gotoLogonScript']))){
516         $is_entry = $this->gotoLogonScripts[$_POST['gotoLogonScript']];
517         $this->is_dialog = true;
518         $this->dialog = new logonManagementDialog($this->config,$this->dn,$is_entry);
519       }
520     }
521      
522     /* Append List to smarty*/
523     $smarty->assign("gotoLogonScripts",   $this->printOutLogonScripts());
524     $smarty->assign("gotoLogonScriptKeys",array_flip($this->printOutLogonScripts()));
526     /* In this section server shares will be defined 
527      * A user can select one of the given shares and a mount point
528      *  and attach this combination to his setup.
529      */
530     
531     $smarty->assign("gotoShareSelections",    $this->gotoShareSelections);
532     if(!is_array($this->gotoShareSelections)){
533       print $this->gotoShareSelections;
534       $this->gotoShareSelections = array();
535     }
536     $smarty->assign("gotoShareSelectionKeys", array_flip($this->gotoShareSelections));
538     /* if $_POST['gotoShareAdd'] is set, we will try to add a new entry 
539      * This entry will be, a combination of mountPoint and sharedefinitions 
540      */
541     if(isset($_POST['gotoShareAdd'])){
542       /* We assign a share to this user, if we don't know where to mount the share */
543       if((!isset($_POST['gotoShareMountPoint']))||(empty($_POST['gotoShareMountPoint']))||(preg_match("/[\|]/i",$_POST['gotoShareMountPoint']))){
544         print_red(_("You must specify a valid mount point."));
545       }elseif(!(
546         preg_match("/^\//",$_POST['gotoShareMountPoint'])  ||
547         preg_match("/^~/",$_POST['gotoShareMountPoint']) ||
548         preg_match("/^\$HOME/",$_POST['gotoShareMountPoint']) ||
549         preg_match("/^.HOME/",$_POST['gotoShareMountPoint']) ||
550         preg_match("/^\$USER/",$_POST['gotoShareMountPoint']) ||
551         preg_match("/^.USER/",$_POST['gotoShareMountPoint']) ||
552         preg_match("/^%/",$_POST['gotoShareMountPoint'])
553         )
554       ){
555         print_red(_("You must specify a valid mount point.")); 
556       }else{
557         $a_share = $this->gotoAvailableShares[$_POST['gotoShareSelection']];
558         $s_mount = $_POST['gotoShareMountPoint'];
559         $s_user  = $_POST['ShareUser'];
560         /* Preparing the new assignment */ 
561         $this->gotoShares[$a_share['name']."|".$a_share['server']]=$a_share;
562         $this->gotoShares[$a_share['name']."|".$a_share['server']]['Username']=$s_user;
563         $this->gotoShares[$a_share['name']."|".$a_share['server']]['PwdHash']="";
564         $this->gotoShares[$a_share['name']."|".$a_share['server']]['mountPoint']=$s_mount;
565       }
566     }  
568     /* if the Post  gotoShareDel is set, someone asked GOsa to delete the selected entry (if there is one selected)
569      * If there is no defined share selected, we will abort the deletion without any message 
570      */
571     $once = true;
572     foreach($_POST as $name => $value){
573       if((preg_match("/^gotoShareDel_/",$name)) && ($once)){
574         $once = false;  
575         $key  = preg_replace("/^gotoShareDel_/","",$name);
576         $key  = preg_replace("/_+[xy]$/","",$key);
577         $key  = base64_decode($key);
578         if(isset($this->gotoShares[$key])) {
579           unset($this->gotoShares[$key]);
580         }
582         /* Remove corresponding password entry, too. This is a workaround
583            to get rid of old-style entries. */
584         $key= preg_replace("/\|/", "|!", $key);
585         if(isset($this->gotoShares[$key])) {
586           unset($this->gotoShares[$key]);
587         }
588       }
589       if((preg_match("/^gotoShareResetPwd_/",$name)) && ($once)){
590         $once = false;
591         $key  = preg_replace("/^gotoShareResetPwd_/","",$name);
592         $key  = preg_replace("/_+[xy]$/","",$key);
593         $key  = base64_decode($key);
594         $this->gotoShares[$key]['PwdHash'] = "";
595       }
596     }
598     $divlistShares = new divSelectBox("gotoShares");
599     $divlistShares->SetHeight(100);
600     $tmp = $this->printOutAssignedShares();
601     
602     foreach($tmp as $key => $value){
603       $img = "";
604   
605       /* Check if entry starts with an ! */
606       if(preg_match("/^!/",$this->gotoShares[$key]['server'])){
608         /* If we are currently editing groups environment, skip those ! entries */ 
609         if($this->is_group) continue;
610     
611         /* Create pwd reset images */
612         if($this->gotoShares[$key]['PwdHash'] != ""){
613           $img.= "<input type='image' name='gotoShareResetPwd_".base64_encode($key)." 'src='images/list_reset_password.png' alt='"._("Reset password hash")."' 
614             title='"._("Reset password hash")."'>";
615         }
616         $field1 = array("string" => "<font style=\"color:#C0C0C0\">".$value."</font>" );
617         $field2 = array("string" => $img   , "attach" => "style='border-right:0px;'");
618       }else{
620         /* Create pwd reset img && delete image */
621         if($this->gotoShares[$key]['PwdHash'] != ""){
622           $img.= "<input type='image' name='gotoShareResetPwd_".base64_encode($key)." 'src='images/list_reset_password.png' alt='"._("Reset password hash")."' 
623             title='"._("Reset password hash")."'>";
624           $img.= "&nbsp;";
625         }
626         $img.= "<input type='image' name='gotoShareDel_".base64_encode($key)." 'src='images/edittrash.png' alt='"._("Delete")."' 
627           title='"._("Delete share entry")."'>";
628         $field1 = array("string" => $value);
629         $field2 = array("string" => $img   , "attach" => "style='border-right:0px;'");
630       }
631       $divlistShares->AddEntry(array($field1,$field2));
632     }
633     $smarty->assign("divlistShares",$divlistShares->DrawList());
635     /* Hotplug devices will be handled here 
636      * There are 3 possible methods for this feature
637      * Create a new Hotplug, A Dialog will open where you can specify some hotplug information
638      * Delete will erase an entry, the entry must be selcted in the ListBox first
639      * Editing an entry will open a dialog where the informations about the selcted entry can be changed
640      */
642     /* If there is a new entry wanted, open a new entry by initilising the dialog */
643     if(isset($_POST['gotoHotplugDeviceNew'])){
644       $this->dialog = new hotplugDialog($this->config,$this->dn);
645       $this->is_dialog = true;
646     }
648     /* We have to delete the selected hotplug from the list*/
649     if((isset($_POST['gotoHotplugDeviceDel']))&&(isset($_POST['gotoHotplugDevice']))){
650       foreach($_POST['gotoHotplugDevice'] as $name){
651         unset($this->gotoHotplugDevices[$name]);
652       }
653     }
655     /* There are already defined hotplugs from other users we could use */
656     if(isset($_POST['gotoHotplugDeviceUse'])){
657       $tmp  =array();
658       foreach($this->gotoHotplugDevices as $plugs){
659         $tmp[] = $plugs['name'];
660       }
661       $this->dialog = new hotplugDialog($this->config,$this->dn,true,$tmp);
662       $this->is_dialog = true;
663     }
665     /* Dialog Aborted */
666     if(isset($_POST['HotPlugCancel'])){
667       unset($this->dialog);
668       $this->dialog= NULL;
669       $this->is_dialog = false;
670     }
671  
672     /* Dialod saved */
673     if(isset($_POST['HotPlugSave'])){
674       $this->dialog->save_object();
675       if(count($this->dialog->check())!=0){
676         foreach($this->dialog->check() as $msg){
677           print_red($msg);
678         }
679       }else{
680         $this->dialog->save_object();
681         $a_tmp = $this->dialog->save();
682        
683         if(is_array($a_tmp)){
684           foreach($a_tmp as $name => $hotplug){
685             $this->gotoHotplugDevices[$name]= $hotplug; 
686           }
687         }
688         unset($this->dialog);
689         $this->dialog= NULL;
690         $this->is_dialog = false;
691       }
692     }
693     
694     $smarty->assign("gotoHotplugDevices",$this->printOutHotPlugDevices());
695     $smarty->assign("gotoHotplugDeviceKeys",array_flip($this->printOutHotPlugDevices()));
696   
697     /* Printer Assignment will managed below 
698      * A printer can be assigned in two different ways and two different types
699      * There are 2 types of users assigned to a printer : user and admin
700      * They only differ in the member attribute they will be assigned to. user: gotoUserPrinter admin: gotoadminPrinter
701      * The different types of assigning a user are : 1 assigning a user to a printer 2. assigning a group to a printer
702      */ 
703     
704     /* First handle Add Post. Open a dialog that allows us to select a printer or two */ 
705     if(isset($_POST['gotoPrinterAdd'])){
706       $this->is_dialog=true;
707       $this->dialog = new selectPrinterDialog($this->config,$this->dn,$this->gotoPrinter);
708     }
710     if(isset($_POST['PrinterCancel'])){
711         $this->is_dialog=false;
712         unset($this->dialog);
713         $this->dialog=NULL;
714     }
716     if(isset($_POST['PrinterSave'])){
717       if(count($this->dialog->check())!=0){
718         $tmp = $this->dialog->check();
719         foreach($tmp as $msg){
720           print_red($msg);
721         } 
722       }else{
723         $this->dialog->save_object();
724         $tmp = $this->dialog->save();
725         $tmp2= $this->dialog->getPrinter(true);
726   
727         foreach($tmp as $pname){
728           $this->gotoPrinter[$pname]=$tmp2[$pname];
729           $this->gotoPrinter[$pname]['mode']="user";
730         }
731   
732         $this->is_dialog=false;
733         unset($this->dialog);
734         $this->dialog   =NULL;
735       }
736     }
737   
738     if((isset($_POST['gotoPrinterDel']))&&(isset($_POST['gotoPrinterSel']))&&(!empty($_POST['gotoPrinterSel']))){
739       $printer = $_POST['gotoPrinterSel'];
740       foreach($printer as $pname){
741         unset($this->gotoPrinter[$pname]);
742       }
743     }
745     if((isset($_POST['gotoPrinterEdit']))&&(isset($_POST['gotoPrinterSel']))&&(!empty($_POST['gotoPrinterSel']))){
748       $printers = $_POST['gotoPrinterSel'];
750       foreach($printers as $printer){
751         if($this->gotoPrinter[$printer]['mode']=="user"){
752           $this->gotoPrinter[$printer]['mode']="admin";
753         }else{
754           $this->gotoPrinter[$printer]['mode']="user";
755         }
756       }
757     }
759     if((isset($_POST['gotoPrinterDefault']))&&(isset($_POST['gotoPrinterSel']))&&(!empty($_POST['gotoPrinterSel']))){
760       if ($this->gosaDefaultPrinter == $_POST['gotoPrinterSel'][0]){
761         $this->gosaDefaultPrinter= "";
762       } else {
763         $this->gosaDefaultPrinter= $_POST['gotoPrinterSel'][0];
764       }
765     }
767     $smarty->assign("gotoPrinter",$this->printOutPrinterDevices());
768     $smarty->assign("gotoPrinterKeys",array_flip($this->printOutPrinterDevices()));
769  
770     /* General behavior */
771     if((isset($this->dialog))&&($this->dialog!=NULL)&&(!empty($this->dialog))){
772       $this->dialog->save_object();
773       $disp =$this->dialog->execute();
775       $tmp = new kioskManagementDialog($this->config,$this->dn);
776       $list = $tmp->getKioskProfiles($this->newKioskProfiles);
777       $list['none']=_("None");
778       $list = array_reverse($list);
779       if(!isset($list[$this->gotoKioskProfile])){
780         print_red(sprintf(_("The selected kiosk profile '%s' is no longer available, setting current profile to 'none'."),$this->gotoKioskProfile));
781         $this->gotoKioskProfile = 'none';
782       }
783       return($disp);
784     }
785     if($this->acl != "#none#"){
786       $smarty->assign("useProfileACL","");
787     }else{
788       $smarty->assign("gotoProfileFlag_CACL"," disabled ");
789       $smarty->assign("gotoProfileServerACL"," disabled ");
790       $smarty->assign("gotoProfileQuotaACL"," disabled ");
791     }
793     if(!$this->useProfile){
794       $smarty->assign("gotoProfileFlag_CACL"," disabled ");
795       $smarty->assign("gotoProfileServerACL"," disabled ");
796       $smarty->assign("gotoProfileQuotaACL"," disabled ");
797     }
799     /* Als smarty vars are set. Get smarty template and generate output */
800     $display.= $smarty->fetch(get_template_path('environment.tpl', TRUE,dirname(__FILE__)));
801     return($display);
802   }
804   function remove_from_parent()
805   {
806     /* only if it was an account*/
807     if (!$this->initially_was_account){
808       return;
809     }
811     /* include global link_info */
812     $ldap= $this->config->get_ldap_link();
814     /* Remove and write to LDAP */
815     plugin::remove_from_parent();
817     /* Don't save our template variables */
818     $skip = array("uid","gotoLogonScripts","gotoPrinter","gotoShares","gotoKioskProfiles","gotoHotplugDevices" );
820     /* Skip all these attributes */
821     foreach($skip as $del){
822       unset($this->attrs[$del]);
823     }
825     @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__,$this->attributes, "Save");
827     $ldap->cd($this->dn);
828     $this->cleanup();
829     $ldap->modify ($this->attrs); 
831     show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/environment account with dn '%s' failed."),$this->dn));
833     /* Optionally execute a command after we're done */
834     $this->handle_post_events("remove");
835   }
838   /* Save data to object */
839   function save_object()
840   {
841     /* Get all Posted vars 
842      * Setup checkboxes 
843      */
844  
845     if(isset($_POST['iamposted'])){
846       if(isset($_POST['useProfile'])){
847         $this->useProfile = true;
848       }else{
849         $this->useProfile = false;
850       }
851       if(isset($_POST['gotoProfileFlag_C'])){
852         $this->gotoProfileFlag_C = $_POST['gotoProfileFlag_C'];
853       }else{
854         $this->gotoProfileFlag_C = false;
855       }
856       if(isset($_POST['gotoProfileFlag_L'])){
857         $this->gotoProfileFlag_L = $_POST['gotoProfileFlag_L'];
858       }else{
859         $this->gotoProfileFlag_L = false;
860       }
862       $tmp= $this->gosaDefaultPrinter;
863       plugin::save_object();
864       foreach($this->attributes as $s_attr){
865         if(in_array($s_attr,array("gotoShares","gotoHotplugDevices","gotoPrinter","gotoLogonScripts","uid"))) continue;
866         if(isset($_POST[$s_attr])){
867           $this->$s_attr = $_POST[$s_attr];
868         }else{
869           $this->$s_attr = false;
870         }
871       }
872       $this->gosaDefaultPrinter= $tmp;
873     }
874   }
877   /* Check supplied data */
878   function check()
879   {
880     /* Call common method to give check the hook */
881     $message= plugin::check();
882   
883     if(preg_match("/[^0-9]/",$this->gotoProfileQuota)) {
884       $message[]=_("Please set a valid profile quota size.");
885     } 
886     if(!isset($this->attrs['objectClass'])){
887       $this->attrs['objectClass']=array();
888     } 
889     if(!$this->is_group){
890       if((!((in_array("posixAccount",$this->attrs['objectClass']))||($this->parent->by_object['posixAccount']->is_account==true)))&&(!$this->is_group)){
891         $message[]=(_("You need to setup a valid posix extension in order to enable evironment features."));  
892       }
893     }
894     return ($message);
895   }
898   /* Save to LDAP */
899   function save()
900   {
901     /* If group was renamed, all printer settings get lost
902      */ 
903     /* only save changed variables ....*/
904     if ($this->gotoKioskProfile =="none") $this->gotoKioskProfile ="";
905     if((!empty($this->gotoKioskProfile))&&($this->gotoKioskProfile != "none")){
906       if(preg_match("/https/i",$_SERVER['HTTP_REFERER'])){
907         $method="https://";
908       }else{
909         $method="http://";
910       }
912       $str = $method.str_replace("//","/",$_SERVER['SERVER_NAME']."/kiosk/");
913       $this->gotoKioskProfile= $str.$this->gotoKioskProfile;
914     }else{
915       $this->gotoKioskProfile= array();
916     }
917     
918     plugin::save();
919     $ldap= $this->config->get_ldap_link();
921     $realyUsedAttrs= array();
923     $path = search_config($this->config->data,"environment", "KIOSKPATH"); 
924     /* Creating Kiosk Profiles */
925     foreach($this->newKioskProfiles as $file){
926       $contents = $file['contents'];
927       $fp = @fopen($path."/".$file['name'],"w");
928       if(!$fp){
929         print_red(_("Can't save new kiosk profiles, possibly permission denied for folder")." : ",$path);
930       }else{
931         fwrite($fp,$contents,strlen($contents));
932       }
933       @unlink($file['tmp_name']);
934     }
935  
936     /* Save already used objectClasses */
937     $ocs        = $this->attrs['objectClass'];
938     unset($ocs['count']);
939     $this->attrs = array();
940     $this->attrs['objectClass']= $ocs;
941     foreach($this->objectclasses as $objc){
942       if(!in_array($objc,$this->attrs['objectClass'])){
943         $this->attrs['objectClass'][]=$objc;
944       }
945     }
948     /* Save usersettings to Printer */
950     if(chkacl($this->acl,"gotoPrinter")!=""){
951       $this->gotoPrinter = array();
952     }  
953     
954     if($this->is_group){
955       $s_suffix = "Group";
956     }else{
957       $s_suffix = "User";
958     }
959   
961     /* 1. Search all printers that have our uid/cn as member 
962      * 2. Delete this uid/cn from every single entry and save it again.
963      * 2.1 There are different types of members: Users / Groups, this will be defined in $suffix
964      * 2.2 And each type has two modes, Admin (e.g. 'gotoUserAdminPrinter') and Normal 
965      */
966     $ldap->search("(&(objectClass=gotoPrinter)(|(goto".$s_suffix."Printer=".$this->uid.")(goto".$s_suffix."AdminPrinter=".$this->uid.")))",array("*"));
967     while($attr = $ldap->fetch()){
969       /* Walk trough all printers and check if our user id used, if so remove it.
970        * Later we will insert our uid at the right place.
971        */
973       /* Remove normal entries (User)*/
974       if(isset($attr['goto'.$s_suffix.'Printer'])) {
975         unset($attr['goto'.$s_suffix.'Printer']['count']);
976         foreach($attr['goto'.$s_suffix.'Printer'] as $key => $user){
977           if($this->uid==$user){
978             unset($attr['goto'.$s_suffix.'Printer'][$key]);
979           }
980         }
981         $tmp = array();
982         foreach($attr['goto'.$s_suffix.'Printer'] as $user){
983           $tmp[] = $user;
984         }
985         $attr['goto'.$s_suffix.'Printer'] = array();  
986         $attr['goto'.$s_suffix.'Printer'] = $tmp;
987       }
989       /* Remove administrational entries (Admin)*/
990       if(isset($attr['goto'.$s_suffix.'AdminPrinter'])){
991         unset($attr['goto'.$s_suffix.'AdminPrinter']['count']);
992         foreach($attr['goto'.$s_suffix.'AdminPrinter'] as $key => $user){
993           if($this->uid==$user){
994             unset($attr['goto'.$s_suffix.'AdminPrinter'][$key]);
995           }
996         }    
997         $tmp = array();
998         foreach($attr['goto'.$s_suffix.'AdminPrinter'] as $user){
999           $tmp[] = $user;
1000         }
1001         $attr['goto'.$s_suffix.'AdminPrinter'] = array();  
1002         $attr['goto'.$s_suffix.'AdminPrinter'] = $tmp;
1003       }
1005       /* Extract useable tags, to be able to save all changes 
1006        */
1007       $attrs_used = array();
1008       foreach($attr as $key=>$val){
1010         /* If index is numeric, skip it ...*/
1011         if((!is_numeric($key))&&($key!="count")){
1013           /* If entry contains 'count' remove it */
1014           if(is_array($val)&&isset($val['count'])){
1015             unset($val['count']);
1016           }
1017           $attrs_used[$key]=$val;
1018         }
1019       }
1020       /* the result of cleaning the entry is 
1021        *  to be able to directly save this again,
1022        *  if all changes are made 
1023        */
1024       $attr= $attrs_used;
1026 #fix : Id don't know why such an entry was set ... 
1027       if(isset($attr['GOTOADMINPRINTER'])){
1028         unset($attr['GOTOADMINPRINTER']);
1029       }
1031       /* Save changes */
1032       $ldap->cd($attr['dn']);
1033       $dn = $attr['dn'];
1034       unset($attr['dn']);
1035         
1036       $ldap->modify ($attr); 
1037       show_ldap_error($ldap->get_error(),sprintf(_("Saving printer membership with dn %s failed "),$dn));
1038     }
1040     /* All printers are cleaned, (our cn/uid removed) 
1041      *  now we must add our uid / cn 
1042      *  to the new configured printers.
1043      */
1044     foreach($this->gotoPrinter as $printer) {
1045       $ldap->cat($printer['dn']);
1046       $attrs= $ldap->fetch();
1047       $attrs_used = array(); 
1048       foreach($attrs as $key=>$val){
1049         if((!is_numeric($key))&&($key!="count")){
1050           if(is_array($val)&&isset($val['count'])){
1051             unset($val['count']);
1052           }
1053           $attrs_used[$key]=$val;
1054         }
1055       }
1056       /* $attrs contains all values 
1057        * we need, to save the entry lateron 
1058       */
1059       $attrs= $attrs_used;
1061       /* Depending on the type (User/Admin) 
1062        *  switch these attributes, that makes it easier
1063        */
1064       if($printer['mode'] == "user"){
1065         $attribute  = "goto".$s_suffix."Printer";
1066         $attribute2 = "goto".$s_suffix."AdminPrinter";
1067       }else{
1068         $attribute  = "goto".$s_suffix."AdminPrinter";
1069         $attribute2 = "goto".$s_suffix."Printer";
1070       }
1072       /* If this user is already assigned to $attribute2 
1073        * delete user from $attribute2, to be albe to attach him to $attribute
1074        * A user can't be admin and normal user for one printer
1075        */
1076       if(!isset($printer[$attribute2])){
1077         $printer[$attribute2]=array();
1078       }else{
1079         if(in_array($this->uid,$printer[$attribute2])){ 
1080           $tmp = array_flip($printer[$attribute2]);
1081           unset($tmp[$this->uid]);
1082           $attrs[$attribute2]=array_flip($tmp);
1083         }
1084         /* If Last entry removed, clear attribute*/
1085         if(empty($attrs[$attribute2])){
1086           $attrs[$attribute2]=array();
1087         }
1088       }
1089     
1090       /* Attach user to the $attribute, if he is'nt already attached
1091        */
1092       if(!isset($attrs[$attribute])){
1093         $attrs[$attribute]=array($this->uid);
1094       }else{
1095         unset($attrs[$attribute]['count']);
1096         if(!in_array($this->uid,$attrs[$attribute])){
1097           $attrs[$attribute][]=$this->uid;
1098         }
1099       }
1101       $ldap->cd($attrs['dn']);
1102       unset($attrs['dn']);
1103 $ldap->modify ($attrs); 
1105       if($ldap->get_error()!="Success"){
1106         print_red(_("Error while writing printer settings")." : ".$ldap->get_error());
1107       }
1108     }
1109   
1110     /* Prepare HotPlug devices */
1111     $this->attrs['gotoHotplugDevice'] = array();
1112     foreach($this->gotoHotplugDevices as $name => $device){
1113       $this->attrs['gotoHotplugDevice'][] = $device['name']."|".$device['description']."|".$device['id'].
1114         "|".$device['produkt']."|".$device['vendor'];
1115     }
1117     /* Prepare LogonScripts */
1118     $this->attrs['gotoLogonScript'] = array();
1119     foreach($this->gotoLogonScripts as $name => $script){
1120       $this->attrs['gotoLogonScript'][] =   $script['LogonName']."|".
1121                                             $script['LogonOverload'].$script['LogonLast']."|".
1122                                             $script['LogonPriority']."|".
1123                                             base64_encode($script['LogonData'])."|".
1124                                             $script['LogonDescription'];
1125     }
1127     /* Prepare Shares */
1128     $this->attrs['gotoShare']=array();
1129     foreach($this->gotoShares as $name => $share){
1130       $this->attrs['gotoShare'][] =$share['server']."|".$share['name']."|".$share['mountPoint']."|".$share['PwdHash']."|".$share['Username'];
1131     }
1134     if($this->gotoXResolution == "auto") $this->gotoXResolution ="";
1135     $saveThis = array("gotoProfileQuota","gotoXResolution","gotoProfileServer","gotoKioskProfile","gosaDefaultPrinter");
1136      
1137     foreach($saveThis as $tosave){
1138       if(!empty($this->$tosave)){
1139         $this->attrs[$tosave]=$this->$tosave;
1140       }else{
1141         $this->attrs[$tosave]=array();
1142       }
1143     }
1144  
1145     /* Prepare Flags */
1146     $this->attrs['gotoProfileFlags'] = array($this->gotoProfileFlag_C.$this->gotoProfileFlag_L);
1147     if(empty($this->attrs['gotoProfileFlags'][0])){
1148       $this->attrs['gotoProfileFlags']=array();
1149       }
1151     if($this->useProfile == false){
1152       $this->attrs['gotoProfileFlags'] = preg_replace("/C/i","",$this->attrs['gotoProfileFlags']);
1153       $this->attrs['gotoProfileServer']= array(); 
1154     }
1156     foreach($this->attributes as $s_attr){
1157       if(chkacl($this->acl,$s_attr)!="") {
1158         if(isset($this->attrs[$s_attr])){
1159           unset($this->attrs[$s_attr]);
1160         }
1161       }
1162     }
1164     $ldap->cat ($this->dn, array('dn'));
1165     if ($ldap->fetch()){
1166       $mode= "modify";
1167     } else {
1168       $mode= "add";
1169       $ldap->cd($this->config->current['BASE']);
1170       $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
1171     }
1173     $ldap->cd($this->dn);
1174     $this->cleanup();
1175     $ldap->$mode($this->attrs);
1176     show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/environment account with dn '%s' failed."),$this->dn));
1177     $this->handle_post_events($mode);
1178   }
1180 /* Generate ListBox frindly output for the defined shares 
1181  * Possibly Add or remove an attribute here, 
1182  */
1183   function printOutAssignedShares()
1184   {
1185     $a_return = array();
1186     if(is_array($this->gotoShares)){
1187       foreach($this->gotoShares as $share){
1188         if(preg_match("/^!/",$share['server'])){
1189           $a_return[$share['name']."|".$share['server']]= preg_replace("/^!/","",$share['server'])."://".$share['name']." - "._("group share"); 
1190         }else{
1191           $a_return[$share['name']."|".$share['server']]= $share['server']."://".$share['name']." on ".$share['mountPoint']." as ".$share['Username'];
1192         }
1193       }
1194       natcasesort($a_return);
1195     }
1196     return($a_return);
1197   }
1199 /* Generate ListBox frindly output for the definedhotplugs 
1200  * Possibly Add or remove an attribute here,
1201  */
1202 function printOutHotPlugDevices()
1203   {
1204     $a_return= array();
1205     if(is_array($this->gotoHotplugDevices)){
1206       foreach($this->gotoHotplugDevices as $key=>$device){
1207         $a_return[$key] = $device['name']." - ".$device['id'];
1208       }
1209     }
1210     return($a_return);
1211   }
1213   /* Generates ListBox frienly output of used printer devices 
1214    * Append ' - admin' if printer is used in admin mode
1215    */
1216   function printOutPrinterDevices()
1217   {
1218     $a_return = array();
1219     if(is_array($this->gotoPrinter)){
1220       foreach($this->gotoPrinter as $printer){
1221         if($printer['mode'] == "admin"){
1222           $a_return[$printer['cn'][0]]= $printer['cn'][0]." - "._("Administrator");
1223         }else{
1224           $a_return[$printer['cn'][0]]= $printer['cn'][0]; 
1225         }
1226         if ($printer['cn'][0] == $this->gosaDefaultPrinter){
1227           $a_return[$printer['cn'][0]].=" - "._("Default printer");
1228         }
1229       }
1230     }
1231     return($a_return);
1232   }
1234   /* Generates ListBox frienly output of used logonscripts 
1235    */
1236   function printOutLogonScripts()
1237   {
1238     $a_return = array();
1239     if(is_array($this->gotoLogonScripts)){
1240       foreach($this->gotoLogonScripts as $script){
1241         $a_return[$script['LogonName']]= $script['LogonPriority']." - ".$script['LogonName']; 
1242       }
1243     }
1244     return($a_return);
1245   }
1248   /* Return plugin informations for acl handling 
1249       #FIXME these ACLs should work for groups too */ 
1250   function plInfo()
1251   {
1252     return (array("plDescription"   => _("Environment settings"),
1253                   "plSelfModify"    => TRUE,
1254                   "plDepends"       => array("objectClass" => "gotoAccount"),
1256                   "gotoProfileServer"   => _("Profile server") ,
1257                   "gotoProfileFlag_L"   => "FIXME"._("Resolution changeable during session") ,  // These variable are flags 
1258                   "gotoProfileFlag_C"   => "FIXME"._("Cache profile localy") ,                  // extracted from gotoProfileFlag
1259                   "gotoXResolution"     => _("Resolution") ,
1260                   "gotoProfileQuota"    => _("Profile quota") ,
1261                   "gotoLogonScripts"    => _("Logon script") ,
1262                   "gotoPrinter"         => _("Printer") ,
1263                   "gosaDefaultPrinter"  => _("Default printer") ,
1264                   "gotoKioskProfile"    => _("Kiosk profile") ,
1265                   "gotoShare"           => _("Shares") ));
1266     }
1269   
1271 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
1272 ?>