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
16 var $in_dialog = false;
17 var $uid = "";
19 var $is_group = false;
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 $gotoProfileFlagC = ""; // Flag is set to C if we have the profile caching fucntion enabled
31 var $gotoXResolution = "auto"; // The selected resolution eg: 1024x768
32 var $gotoXResolutions = array();// Contains all available resolutions for this account
33 var $gotoProfileFlagL = ""; // 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
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
60 var $NewAddedPrinters = array();
61 var $NewDeletedPrinters = array();
63 /* general settings */
64 // Sets the attributes which will kept on page reload, which will be saved, ...
66 var $CopyPasteVars = array("gotoHotplugDevices","newKioskProfiles","gotoAvailableShares","gotoShareSelections","gotoPrinterSel","gotoProfileFlagL","gotoXResolutions","gotoProfileFlagC","gotoProfileServers","useProfile","is_group","in_dialog","OrigCn");
68 var $attributes = array("uid","gotoProfileServer","gotoProfileFlags",
69 "gotoXResolution","gotoProfileQuota",
70 "gotoLogonScripts","gotoLogonScript",
71 "gotoPrinter", "gosaDefaultPrinter",
72 "gotoShares","gotoShare",
73 "gotoKioskProfile","gotoKioskProfiles"
74 );
75 var $objectclasses = array("gotoEnvironment"); // Specifies the objectClass which contains the attributes edited here
76 var $cn;
77 var $OrigCn;
78 var $add_del_printer_member_was_called = false;
80 function environment ($config, $dn= NULL)
81 {
82 plugin::plugin ($config, $dn);
84 /* Check : Are we currently editing a group or user dialog */
85 if((isset($this->attrs['cn'][0]))&&(!isset($this->attrs['uid'][0]))){
86 $suffix="Group";
87 $this->uid = $this->attrs['cn'][0];
88 $this->attrs['uid'] = $this->attrs['cn'][0];
89 $this->OrigCn = $this->attrs['cn'][0];
90 }else{
91 $suffix="User";
92 }
94 $this->gotoKioskProfile= preg_replace("/^.*\//i","",$this->gotoKioskProfile);
96 /* Get all Printer assignments */
97 $ldap = $this->config->get_ldap_link();
98 $ldap->cd($this->config->current['BASE']);
99 $ldap->search("(&(objectClass=gotoPrinter)(goto".$suffix."Printer=".$this->uid."))",array("*"));
100 while($printer = $ldap->fetch()){
101 $this->gotoPrinter[$printer['cn'][0]]=$printer;
102 $this->gotoPrinter[$printer['cn'][0]]['mode']="user";
103 }
104 $ldap->search("(&(objectClass=gotoPrinter)(goto".$suffix."AdminPrinter=".$this->uid."))",array("*"));
105 while($printer = $ldap->fetch()){
106 $this->gotoPrinter[$printer['cn'][0]]=$printer;
107 $this->gotoPrinter[$printer['cn'][0]]['mode']="admin";
108 }
110 /* prepare hotplugs */
111 if((isset($this->attrs['gotoHotplugDevice']))&&(is_array($this->attrs['gotoHotplugDevice']))){
112 unset($this->attrs['gotoHotplugDevice']['count']);
113 foreach($this->attrs['gotoHotplugDevice'] as $device){
114 $tmp = $tmp2 = array();
115 $tmp = split("\|",$device);
116 $tmp2['name'] = $tmp[0];
117 $tmp2['description'] = $tmp[1];
118 $tmp2['id'] = $tmp[2];
120 /* Produkt ID */
121 if(!isset($tmp[3])){
122 $tmp[3] = "";
123 }
124 /* Vendor ID */
125 if(!isset($tmp[4])){
126 $tmp[4] = "";
127 }
129 $tmp2['produkt'] = $tmp[3];
130 $tmp2['vendor'] = $tmp[4];
132 $this->gotoHotplugDevices[$tmp[0]]=$tmp2;
133 }
134 }
136 /* prepare LogonScripts */
137 if((isset($this->attrs['gotoLogonScript']))&&(is_array($this->attrs['gotoLogonScript']))){
138 unset($this->attrs['gotoLogonScript']['count']);
139 foreach($this->attrs['gotoLogonScript'] as $device){
140 $tmp = $tmp2 = array();
141 $tmp = split("\|",$device);
142 $tmp2['LogonName'] = $tmp[0];
143 $tmp2['LogonPriority'] = $tmp[2];
144 if(preg_match("/O/i",$tmp[1])){
145 $tmp2['LogonOverload'] = "O";
146 }else{
147 $tmp2['LogonOverload'] = "";
148 }
149 if(preg_match("/L/i",$tmp[1])){
150 $tmp2['LogonLast'] = "L";
151 }else{
152 $tmp2['LogonLast'] = "";
153 }
154 $tmp2['LogonData'] = base64_decode($tmp[3]);
155 $tmp2['LogonDescription'] = $tmp[4];
156 $this->gotoLogonScripts[$tmp[0]]=$tmp2;
157 }
158 }
160 /* Prepare Shares */
161 if((isset($this->attrs['gotoShare']))&&(is_array($this->attrs['gotoShare']))){
162 unset($this->attrs['gotoShare']['count']);
163 foreach($this->attrs['gotoShare'] as $share){
164 $tmp = $tmp2 = array();
165 $tmp = split("\|",$share);
166 $tmp2['server'] =$tmp[0];
167 $tmp2['name'] =$tmp[1];
169 /* Decode base64 if needed */
170 if (!preg_match('%/%', $tmp[2])){
171 $tmp2['mountPoint'] =base64_decode($tmp[2]);
172 } else {
173 $tmp2['mountPoint'] =$tmp[2];
174 }
176 if(isset($tmp[3])){
177 $tmp2['PwdHash'] =$tmp[3];
178 }else{
179 $tmp2['PwdHash'] ="";
180 }
181 if(isset($tmp[4])){
182 $tmp2['Username'] =$tmp[4];
183 }else{
184 $tmp2['Username'] ="";
185 }
186 $this->gotoShares[$tmp[1]."|".$tmp[0]]=$tmp2;
187 }
188 }
190 for($i = 0 ; $i < strlen($this->gotoProfileFlags) ; $i ++){
191 $chr = $this->gotoProfileFlags[$i];
192 $name = "gotoProfileFlag".$chr;
193 $this->$name=$chr;
194 }
196 if((!empty($this->gotoProfileServer))||($this->gotoProfileFlagC=="C")){
197 $this->useProfile = true;
198 }else{
199 $this->useProfile = false;
200 }
202 /* Set resolutions */
203 $this->gotoXResolutions = array("auto"=>_("auto"),
204 "640x480" => "640x480",
205 "800x600" => "800x600",
206 "1024x768" => "1024x768",
207 "1152x864" => "1152x864",
208 "1280x768" => "1280x768",
209 "1280x1024" => "1280x1024");
211 if(isset($this->config->data['MAIN']['RESOLUTION_HOOK'])){
212 $file = $this->config->data['MAIN']['RESOLUTION_HOOK'];
214 if(is_readable($file)){
215 $str = file_get_contents($file);
216 $lines = split("\n",$str);
217 foreach($lines as $line){
218 $line = trim($line);
219 if(!empty($line)){
220 $this->gotoXResolutions[$line]=$line;
221 }
222 }
223 //natcasesort($this->gotoXResolutions);
224 }else{
225 print_red(sprintf(_("You have specified an external resolution hook which can't be read, please check the permission of the file '%s'."),$file));
226 }
227 }
229 $this->gotoProfileServers= $config->getShareServerList() ;
230 $this->gotoShareSelections= $config->getShareList(true);
231 $this->gotoAvailableShares= $config->getShareList(false);
233 }
236 /* Detect type of edited object (user|group)*/
237 function detect_grouptype()
238 {
239 if((!isset($this->parent))&&(!$this->is_account)){
240 $this->is_group = false;
241 }elseif((isset($this->parent))&&(!isset($this->parent->by_object['posixAccount']))){
242 $this->is_group = true;
243 }else{
244 $this->is_group = false;
245 }
246 }
249 function execute()
250 {
251 /* Call parent execute */
252 plugin::execute();
254 $this->detect_grouptype();
256 /* Fill templating stuff */
257 $smarty= get_smarty();
258 $display= "";
260 $smarty->assign("is_group",$this->is_group);
262 /* Are we editing from MyAccount and not editing a user */
263 $WriteOnly = (!isset($this->parent)|| !$this->parent) && !isset($_SESSION['edit']);
265 /* Prepare all variables for smarty */
266 foreach($this->attributes as $s_attr){
267 /* Set value*/
268 $smarty->assign($s_attr,$this->$s_attr);
270 /* Set checkbox state*/
271 if(empty($this->$s_attr)){
272 $smarty->assign($s_attr."CHK","");
273 }else{
274 $smarty->assign($s_attr."CHK"," checked ");
275 }
277 /* Prepare ACL settings*/
278 $smarty->assign($s_attr."ACL",$this->getacl($s_attr,$WriteOnly));
279 }
281 /* Is accout enabled | are we editing from usermenu or admin menu
282 All these tab management is done here
283 */
286 /* Working from Usermenu an the Account is currently disbled
287 * this->parent : is only set if we are working in a list of tabs
288 * is_account : is only true if the needed objectClass is given
289 */
290 if((!isset($this->parent))&&(!$this->is_account)){
291 /* We are currently editing this tab from usermenu, but this account is not enabled */
292 $smarty->assign("is_account",$this->is_account);
293 /* Load template */
294 $display .= $smarty->fetch(get_template_path('environment.tpl', TRUE));
295 /* Avoid the "You are currently editing ...." message when you leave this tab */
296 $display .= back_to_main();
297 /* Display our message to the user */
298 return $display;
301 /* We are currently editing from group tabs, because
302 * $this->parent is set
303 * posixAccount is not set, so we are not in usertabs.
304 */
305 }elseif((isset($this->parent))&&(!isset($this->parent->by_object['posixAccount']))){
306 $smarty->assign("is_account","true");
307 $this->uid = $this->cn;
308 $this->attrs['uid'] = $this->cn;
310 /* Change state if needed */
311 if (isset($_POST['modify_state'])){
312 if(($this->acl_is_createable() && !$this->is_account) ||
313 ($this->acl_is_removeable() && $this->is_account)){
314 $this->is_account= !$this->is_account;
315 }
316 }
317 /* Group Dialog with enabled environment options */
318 if ($this->is_account){
319 $display= $this->show_enable_header(_("Remove environment extension"),
320 _("Environment extension enabled. You can disable it by clicking below."));
321 } else {
323 /* Environment is disabled
324 If theres is no posixAccount enabled, you won't be able to enable
325 environment extensions
326 */
327 if((isset($this->parent->by_object['group']))||(isset($this->attrs['objectClass']))&&((in_array("posixAccount",$this->attrs['objectClass'])))){
328 // 4. There is a PosixAccount
329 $display= $this->show_enable_header(_("Add environment extension"),
330 _("Environment extension disabled. You can enable it by clicking below."));
331 return $display;
332 }else{
333 // 4. There is no PosixAccount
334 $display= $this->show_enable_header(_("Add environment extension"),
335 _("Environment extension disabled. You have to setup a posix account before you can enable this feature."));
336 return $display;
337 }
338 }
339 }else{
340 /* Editing from Usermenu
341 * Tell smarty that this accoutn is enabled
342 */
343 $smarty->assign("is_account","true");
345 /* Change state if needed */
346 if (isset($_POST['modify_state'])){
347 if(($this->acl_is_createable() && !$this->is_account) ||
348 ($this->acl_is_removeable() && $this->is_account)){
349 $this->is_account= !$this->is_account;
350 }
351 }
353 if(isset($this->parent)){
355 // 3. Account enabled . Editing from adminmenu
356 if ($this->is_account){
357 $display= $this->show_disable_header(_("Remove environment extension"),
358 _("Environment extension enabled. You can disable it by clicking below."));
359 } else {
361 if($this->parent->by_object['posixAccount']->is_account==true){
362 // 4. There is a PosixAccount
363 $display= $this->show_disable_header(_("Add environment extension"),
364 _("Environment extension disabled. You can enable it by clicking below."));
365 return $display;
366 }else{
367 // 4. There is a PosixAccount
368 $display= $this->show_disable_header(_("Add environment extension"),
369 _("Environment extension disabled. You have to setup a posix account before you can enable this feature."),TRUE,TRUE);
370 return $display;
371 }
372 }
373 }
374 }
375 /* Account is Account : is_accounbt=true.
376 * Else we won't reach this.
377 */
379 /* Prepare all variables for smarty */
380 foreach($this->attributes as $s_attr){
381 /* Set value*/
382 $smarty->assign($s_attr,$this->$s_attr);
384 /* Set checkbox state*/
385 if(empty($this->$s_attr)){
386 $smarty->assign($s_attr."CHK","");
387 }else{
388 $smarty->assign($s_attr."CHK"," checked ");
389 }
391 /* Prepare ACL settings*/
392 $smarty->assign($s_attr."ACL",$this->getacl($s_attr,$WriteOnly));
393 }
395 foreach(array("gotoHotplugDevice","gotoProfileFlagC","gotoProfileFlagL") as $s_attr){
396 $smarty->assign($s_attr."ACL",$this->getacl($s_attr,$WriteOnly));
397 }
399 if($WriteOnly) {
400 $smarty->assign("gotoPrinterACL","r");
401 }else{
402 $smarty->assign("gotoPrinterACL","rw");
403 }
405 if(empty($this->useProfile)){
406 $smarty->assign("useProfileCHK","");
407 $smarty->assign("gotoProfileServerACL" , preg_replace("/w/","",$this->getacl("gotoProfileServer",$WriteOnly)));
408 $smarty->assign("gotoProfileQuotaACL" , preg_replace("/w/","",$this->getacl("gotoProfileQuota",$WriteOnly)));
409 $smarty->assign("gotoProfileFlagCACL" , preg_replace("/w/","",$this->getacl("gotoProfileFlagC",$WriteOnly)));
410 }else{
411 $smarty->assign("useProfileCHK"," checked ");
412 }
415 $smarty->assign("gotoProfileACL", $this->getacl("gotoProfileServer",$WriteOnly).$this->getacl("gotoProfileQuota",$WriteOnly));
417 /* HANDLE Profile Settings here
418 * Assign available Quota and resolution settings
419 * Get all available profile server
420 * Get cache checkbox
421 * Assign this all to Smarty
422 */
424 if(empty($this->gotoProfileFlagL)){
425 $smarty->assign("gotoProfileFlagLCHK"," ");
426 }else{
427 $smarty->assign("gotoProfileFlagLCHK"," checked ");
428 }
430 if(empty($this->gotoProfileFlagC)){
431 $smarty->assign("gotoProfileFlagCCHK"," ");
432 }else{
433 $smarty->assign("gotoProfileFlagCCHK"," checked ");
434 }
437 $smarty->assign("gotoXResolutions" , $this->gotoXResolutions);
438 $smarty->assign("gotoXResolutionKeys" , array_flip($this->gotoXResolutions));
440 $smarty->assign("gotoProfileServers",$this->gotoProfileServers);
441 if(!is_array($this->gotoProfileServers)){
442 $this->gotoProfileServers =array();
443 }
444 $smarty->assign("gotoProfileServerKeys",array_flip($this->gotoProfileServers));
446 /* Handle kiosk profiles
447 * Read available from filesystem
448 * Open management if post is transmitted
449 */
451 /* Save */
452 if(isset($_POST['KioskClose'])){
453 $this->newKioskProfiles = array_merge($this->newKioskProfiles,$this->dialog->save());
455 unset($this->dialog);
456 $this->dialog=NULL;
457 $this->is_dialog = false;
458 }
460 /* Reassign help class */
461 $_SESSION['current_class_for_help'] = get_class($this);
463 /* Open Management Dialog */
464 if(isset($_POST['KioskManagementDialog'])){
465 $this->dialog = new kioskManagementDialog($this->config,$this->dn,$this->newKioskProfiles);
466 $this->dialog->parent= $this;
467 $this->dialog->acl = $this->acl;
468 $this->is_dialog = true;
469 }
470 $tmp = new kioskManagementDialog($this->config,$this->dn);
471 $list = $tmp->getKioskProfiles($this->newKioskProfiles);
472 $list['none']=_("None");
473 $list = array_reverse($list);
474 $smarty->assign("gotoKioskProfiles",$list);
475 $smarty->assign("gotoKioskProfileKeys",array_flip($list));
477 /* Logonscript Management
478 * Get available LogonScripts (possibly grey out (or mark) these script that are defined for the group)
479 * Perform add Delete edit Posts
480 */
482 /* Dialog Save */
483 if(isset($_POST['LogonSave'])){
485 if(!$this->acl_is_writeable("gotoLogonScript")){
486 print_red(_("You are not allowed to write Logon scripts."));
487 unset($this->dialog);
488 $this->dialog=NULL;
489 $this->is_dialog=false;
490 }else{
491 $this->dialog->save_object();
492 if(count($this->dialog->check())!=0){
493 foreach($this->dialog->check() as $msg){
494 print_red($msg);
495 }
496 }else{
497 $tmp = $this->dialog->save();
498 unset($this->dialog);
499 $this->dialog=NULL;
500 $this->is_dialog=false;
501 $this->gotoLogonScripts[$tmp['LogonName']]=$tmp;
502 }
503 }
504 }
507 /* Dialog Quit without saving */
508 if(isset($_POST['LogonCancel'])){
509 $this->is_dialog= false;
510 unset($this->dialog);
511 $this->dialog= NULL;
512 }
514 /* Check Edit Del New Posts for a selected LogonScript */
515 if($this->acl_is_writeable("gotoLogonScript") &&
516 (isset($_POST['gotoLogonScriptNew'])) || isset($_POST['gotoLogonScriptEdit']) ||isset($_POST['gotoLogonScriptDel'])){
518 /* New Logon Script: Open an edit dialog, we don't need a $_POST['gotoLogonScript'] here.
519 * In this case we create a new Logon Script.
520 */
521 if(isset($_POST['gotoLogonScriptNew'])){
522 $this->is_dialog = true;
523 $this->dialog = new logonManagementDialog($this->config,$this->dn);
524 }
526 /* If we receive a Delete request and there is a Script selected in the selectbox, delete this one.
527 * We only can delete if there is an entry selected.
528 */
529 if((isset($_POST['gotoLogonScriptDel']))&&(isset($_POST['gotoLogonScript']))){
530 unset($this->gotoLogonScripts[$_POST['gotoLogonScript']]);
531 }
533 /* In this case we want to edit an existing entry, we open a new Dialog to allow editing.
534 * There must be an entry selected to perform edit request.
535 */
536 if((isset($_POST['gotoLogonScriptEdit']))&&(isset($_POST['gotoLogonScript']))){
537 $is_entry = $this->gotoLogonScripts[$_POST['gotoLogonScript']];
538 $this->is_dialog = true;
539 $this->dialog = new logonManagementDialog($this->config,$this->dn,$is_entry);
540 }
541 }
543 /* Append List to smarty*/
544 $smarty->assign("gotoLogonScripts", $this->printOutLogonScripts());
545 $smarty->assign("gotoLogonScriptKeys",array_flip($this->printOutLogonScripts()));
547 /* In this section server shares will be defined
548 * A user can select one of the given shares and a mount point
549 * and attach this combination to his setup.
550 */
552 $smarty->assign("gotoShareSelections", $this->gotoShareSelections);
553 if(!is_array($this->gotoShareSelections)){
554 print $this->gotoShareSelections;
555 $this->gotoShareSelections = array();
556 }
557 $smarty->assign("gotoShareSelectionKeys", array_flip($this->gotoShareSelections));
559 /* if $_POST['gotoShareAdd'] is set, we will try to add a new entry
560 * This entry will be, a combination of mountPoint and sharedefinitions
561 */
562 if(isset($_POST['gotoShareAdd']) && $this->acl_is_writeable("gotoShare")){
563 /* We assign a share to this user, if we don't know where to mount the share */
564 if((!isset($_POST['gotoShareMountPoint']))||(empty($_POST['gotoShareMountPoint']))||(preg_match("/[\|]/i",$_POST['gotoShareMountPoint']))){
565 print_red(_("You must specify a valid mount point."));
566 }elseif(!(
567 preg_match("/^\//",$_POST['gotoShareMountPoint']) ||
568 preg_match("/^~/",$_POST['gotoShareMountPoint']) ||
569 preg_match("/^\$HOME/",$_POST['gotoShareMountPoint']) ||
570 preg_match("/^.HOME/",$_POST['gotoShareMountPoint']) ||
571 preg_match("/^\$USER/",$_POST['gotoShareMountPoint']) ||
572 preg_match("/^.USER/",$_POST['gotoShareMountPoint']) ||
573 preg_match("/^%/",$_POST['gotoShareMountPoint'])
574 )
575 ){
576 print_red(_("You must specify a valid mount point."));
577 }else{
578 $a_share = $this->gotoAvailableShares[$_POST['gotoShareSelection']];
579 $s_mount = $_POST['gotoShareMountPoint'];
580 $s_user = $_POST['ShareUser'];
581 /* Preparing the new assignment */
582 $this->gotoShares[$a_share['name']."|".$a_share['server']]=$a_share;
583 $this->gotoShares[$a_share['name']."|".$a_share['server']]['Username']=$s_user;
584 $this->gotoShares[$a_share['name']."|".$a_share['server']]['PwdHash']="";
585 $this->gotoShares[$a_share['name']."|".$a_share['server']]['mountPoint']=$s_mount;
586 }
587 }
589 /* if the Post gotoShareDel is set, someone asked GOsa to delete the selected entry (if there is one selected)
590 * If there is no defined share selected, we will abort the deletion without any message
591 */
592 $once = true;
593 if($this->acl_is_writeable("gotoShare")){
594 foreach($_POST as $name => $value){
595 if((preg_match("/^gotoShareDel_/",$name)) && ($once)){
596 $once = false;
597 $key = preg_replace("/^gotoShareDel_/","",$name);
598 $key = preg_replace("/_+[xy]$/","",$key);
599 $key = base64_decode($key);
600 if(isset($this->gotoShares[$key])) {
601 unset($this->gotoShares[$key]);
602 }
604 /* Remove corresponding password entry, too. This is a workaround
605 to get rid of old-style entries. */
606 $key= preg_replace("/\|/", "|!", $key);
607 if(isset($this->gotoShares[$key])) {
608 unset($this->gotoShares[$key]);
609 }
610 }
611 if((preg_match("/^gotoShareResetPwd_/",$name)) && ($once)){
612 $once = false;
613 $key = preg_replace("/^gotoShareResetPwd_/","",$name);
614 $key = preg_replace("/_+[xy]$/","",$key);
615 $key = base64_decode($key);
616 $this->gotoShares[$key]['PwdHash'] = "";
617 if(preg_match("/^!/",$this->gotoShares[$key]['server'])){
618 unset($this->gotoShares[$key]);
619 }
620 }
621 }
622 }
623 $divlistShares = new divSelectBox("gotoShares");
624 $divlistShares->SetHeight(100);
625 $tmp = $this->printOutAssignedShares();
627 foreach($tmp as $key => $value){
628 $img = "";
630 /* Check if entry starts with an ! */
631 if(preg_match("/^!/",$this->gotoShares[$key]['server'])){
633 /* If we are currently editing groups environment, skip those ! entries */
634 if($this->is_group) continue;
636 /* Create pwd reset images */
637 if($this->gotoShares[$key]['PwdHash'] != ""){
638 $img.= "<input type='image' name='gotoShareResetPwd_".base64_encode($key)." 'src='images/list_reset_password.png' alt='"._("Reset password hash")."'
639 title='"._("Reset password hash")."'>";
640 }
641 $field1 = array("string" => "<font style=\"color:#C0C0C0\">".$value."</font>" );
642 $field2 = array("string" => $img , "attach" => "style='border-right:0px;'");
643 }else{
645 /* Create pwd reset img && delete image */
646 if($this->gotoShares[$key]['PwdHash'] != ""){
647 $img.= "<input type='image' name='gotoShareResetPwd_".base64_encode($key)." 'src='images/list_reset_password.png' alt='"._("Reset password hash")."'
648 title='"._("Reset password hash")."'>";
649 $img.= " ";
650 }
651 $img.= "<input type='image' name='gotoShareDel_".base64_encode($key)." 'src='images/edittrash.png' alt='"._("Delete")."'
652 title='"._("Delete share entry")."'>";
653 $field1 = array("string" => $value);
654 $field2 = array("string" => $img , "attach" => "style='border-right:0px;'");
655 }
656 $divlistShares->AddEntry(array($field1,$field2));
657 }
658 $smarty->assign("divlistShares",$divlistShares->DrawList());
660 /* Hotplug devices will be handled here
661 * There are 3 possible methods for this feature
662 * Create a new Hotplug, A Dialog will open where you can specify some hotplug information
663 * Delete will erase an entry, the entry must be selcted in the ListBox first
664 * Editing an entry will open a dialog where the informations about the selcted entry can be changed
665 */
667 /* If there is a new entry wanted, open a new entry by initilising the dialog */
668 if((isset($_POST['gotoHotplugDeviceNew'])) && ($this->acl_is_writeable("gotoHotplugDevice"))){
669 $this->dialog = new hotplugDialog($this->config,$this->dn);
670 $this->is_dialog = true;
671 }
673 /* We have to delete the selected hotplug from the list*/
674 if((isset($_POST['gotoHotplugDeviceDel']))&&(isset($_POST['gotoHotplugDevice'])) && $this->acl_is_writeable("gotoHotplugDevice")){
675 if($this->acl_is_writeable("gotoHotplugDevice")){
676 foreach($_POST['gotoHotplugDevice'] as $name){
677 unset($this->gotoHotplugDevices[$name]);
678 }
679 }
680 }
682 /* There are already defined hotplugs from other users we could use */
683 if(isset($_POST['gotoHotplugDeviceUse']) && $this->acl_is_writeable("gotoHotplugDevice")){
684 $tmp =array();
685 foreach($this->gotoHotplugDevices as $plugs){
686 $tmp[] = $plugs['name'];
687 }
688 $this->dialog = new hotplugDialog($this->config,$this->dn,true,$tmp);
689 $this->is_dialog = true;
690 }
692 /* Dialog Aborted */
693 if(isset($_POST['HotPlugCancel'])){
694 unset($this->dialog);
695 $this->dialog= NULL;
696 $this->is_dialog = false;
697 }
699 /* Dialod saved */
700 if(isset($_POST['HotPlugSave'])){
702 $this->dialog->save_object();
703 if(count($this->dialog->check())!=0){
704 foreach($this->dialog->check() as $msg){
705 print_red($msg);
706 }
707 }else{
708 $this->dialog->save_object();
709 $a_tmp = $this->dialog->save();
711 if(is_array($a_tmp)){
712 foreach($a_tmp as $name => $hotplug){
713 $this->gotoHotplugDevices[$name]= $hotplug;
714 }
715 }
716 unset($this->dialog);
717 $this->dialog= NULL;
718 $this->is_dialog = false;
719 }
720 }
721 $smarty->assign("gotoHotplugDevices",$this->printOutHotPlugDevices());
722 $smarty->assign("gotoHotplugDeviceKeys",array_flip($this->printOutHotPlugDevices()));
724 /* Printer Assignment will managed below
725 * A printer can be assigned in two different ways and two different types
726 * There are 2 types of users assigned to a printer : user and admin
727 * They only differ in the member attribute they will be assigned to. user: gotoUserPrinter admin: gotoadminPrinter
728 * The different types of assigning a user are : 1 assigning a user to a printer 2. assigning a group to a printer
729 */
731 /* First handle Add Post. Open a dialog that allows us to select a printer or two */
732 if(isset($_POST['gotoPrinterAdd'])){
734 $this->is_dialog=true;
735 $this->dialog = new selectPrinterDialog($this->config,$this->dn,$this->gotoPrinter);
736 }
738 if(isset($_POST['PrinterCancel'])){
739 $this->is_dialog=false;
740 unset($this->dialog);
741 $this->dialog=NULL;
742 }
744 if(isset($_POST['PrinterSave'])){
745 if(count($this->dialog->check())!=0){
746 $tmp = $this->dialog->check();
747 foreach($tmp as $msg){
748 print_red($msg);
749 }
750 }else{
751 $this->dialog->save_object();
752 $tmp = $this->dialog->save();
753 $tmp2= $this->dialog->getPrinter(true);
755 foreach($tmp as $pname){
756 $printerObj = new printtabs($this->config,$this->config->data['TABS']['PRINTTABS'],$tmp2[$pname]['dn'],"printer");
757 $printerObj->set_acl_base($tmp2[$pname]['dn']);
759 $type = false;
761 if($this->is_group){
763 if(isset($this->NewDeletedPrinters[$pname])){
764 $type = "AddGroup";
765 }elseif($printerObj->by_object['printgeneric']->AddMember("AddGroup",$this->dn)){
766 $type = "AddGroup";
767 }
768 }else{
769 if(isset($this->NewDeletedPrinters[$pname])){
770 $type = "AddUser";
771 }elseif($printerObj->by_object['printgeneric']->AddMember("AddUser",$this->dn)){
772 $type = "AddUser";
773 }
774 }
776 if($type){
777 $this->gotoPrinter[$pname]=$tmp2[$pname];
778 $this->gotoPrinter[$pname]['mode']="user";
779 $this->add_del_printer_member_was_called = true;
781 $this->NewAddedPrinters[$pname] = $pname;
782 if(isset($this->NewDeletedPrinters[$pname])){
783 unset($this->NewDeletedPrinters[$pname]);
784 }
785 }
786 }
788 $this->is_dialog=false;
789 unset($this->dialog);
790 $this->dialog =NULL;
791 }
792 }
794 if((isset($_POST['gotoPrinterDel']))&&(isset($_POST['gotoPrinterSel']))&&(!empty($_POST['gotoPrinterSel']))){
795 $printer = $_POST['gotoPrinterSel'];
796 foreach($printer as $pname){
798 $printerObj = new printtabs($this->config,$this->config->data['TABS']['PRINTTABS'],$this->gotoPrinter[$pname]['dn'],"printer");
799 $printerObj->set_acl_base($this->gotoPrinter[$pname]['dn']);
801 $type = false;
802 if($this->is_group){
803 if(isset($this->NewAddedPrinters[$pname])){
804 $type = "Group";
805 }elseif($printerObj->by_object['printgeneric']->DelMember("AddGroup",$this->cn)){
806 $type = "Group";
807 }
808 }else{
809 if(isset($this->NewAddedPrinters[$pname])){
810 $type = "User";
811 }elseif($printerObj->by_object['printgeneric']->DelMember("AddUser",$this->uid)){
812 $type = "User";
813 }
814 }
815 if($type){
816 $this->add_del_printer_member_was_called = true;
817 unset($this->gotoPrinter[$pname]);
819 $this->NewDeletedPrinters[$pname] = $pname;
820 if(isset($this->NewAddedPrinters[$pname])){
821 UNSET($this->NewAddedPrinters[$pname]);
822 }
823 }
824 }
825 }
827 if((isset($_POST['gotoPrinterEdit']))&&(isset($_POST['gotoPrinterSel']))&&(!empty($_POST['gotoPrinterSel']))){
828 $printers = $_POST['gotoPrinterSel'];
829 $this->add_del_printer_member_was_called = true;
830 foreach($printers as $printer){
831 if($this->gotoPrinter[$printer]['mode']=="user"){
832 $this->gotoPrinter[$printer]['mode']="admin";
833 }else{
834 $this->gotoPrinter[$printer]['mode']="user";
835 }
836 }
837 }
839 if((isset($_POST['gotoPrinterDefault']))&&(isset($_POST['gotoPrinterSel']))&&(!empty($_POST['gotoPrinterSel']))){
840 if($this->is_group){
841 print_red(_("GOsa default printer flag is not allowed within groups."));
842 }else{
843 if ($this->gosaDefaultPrinter == $_POST['gotoPrinterSel'][0]){
844 $this->gosaDefaultPrinter= "";
845 } else {
846 $this->gosaDefaultPrinter= $_POST['gotoPrinterSel'][0];
847 }
848 }
849 }
851 $smarty->assign("gotoPrinter",$this->printOutPrinterDevices());
852 $smarty->assign("gotoPrinterKeys",array_flip($this->printOutPrinterDevices()));
854 /* General behavior */
855 if($this->acl_is_writeable("gotoKioskProfile")){
856 if((isset($this->dialog))&&($this->dialog!=NULL)&&(!empty($this->dialog))){
857 $this->dialog->save_object();
858 $disp =$this->dialog->execute();
860 $tmp = new kioskManagementDialog($this->config,$this->dn);
861 $list = $tmp->getKioskProfiles($this->newKioskProfiles);
862 $list['none']=_("None");
863 $list = array_reverse($list);
864 if(!isset($list[$this->gotoKioskProfile])){
865 print_red(sprintf(_("The selected kiosk profile '%s' is no longer available, setting current profile to 'none'."),$this->gotoKioskProfile));
866 $this->gotoKioskProfile = 'none';
867 }
868 return($disp);
869 }
870 }
872 /* Als smarty vars are set. Get smarty template and generate output */
873 $display.= $smarty->fetch(get_template_path('environment.tpl', TRUE,dirname(__FILE__)));
874 return($display);
875 }
877 function remove_from_parent()
878 {
879 /* only if it was an account*/
880 if (!$this->initially_was_account){
881 return;
882 }
884 /* include global link_info */
885 $ldap= $this->config->get_ldap_link();
887 /* Remove and write to LDAP */
888 plugin::remove_from_parent();
890 /* Don't save our template variables */
891 $skip = array("uid","gotoLogonScripts","gotoPrinter","gotoShares","gotoKioskProfiles","gotoHotplugDevices" );
893 /* Skip all these attributes */
894 foreach($skip as $del){
895 unset($this->attrs[$del]);
896 }
898 @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__,$this->attributes, "Save");
900 $ldap->cd($this->dn);
901 $this->cleanup();
902 $ldap->modify ($this->attrs);
904 show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/environment account with dn '%s' failed."),$this->dn));
906 /* Optionally execute a command after we're done */
907 $this->handle_post_events("remove");
908 }
911 /* Save data to object */
912 function save_object()
913 {
914 /* Get all Posted vars
915 * Setup checkboxes
916 */
917 $WriteOnly = (!isset($this->parent)|| !$this->parent) && !isset($_SESSION['edit']);
918 if(isset($_POST['iamposted'])){
920 $PACL = $this->getacl("gotoProfileServer",$WriteOnly).$this->getacl("gotoProfileQuota",$WriteOnly);
922 if(preg_match("/w/",$PACL)){
923 if(isset($_POST['useProfile'])){
924 $this->useProfile = true;
925 }else{
926 $this->useProfile = false;
927 }
928 }
930 if($this->acl_is_writeable("gotoProfileFlagC")){
931 if(isset($_POST['gotoProfileFlagC'])){
932 $this->gotoProfileFlagC = $_POST['gotoProfileFlagC'];
933 }else{
934 $this->gotoProfileFlagC = false;
935 }
936 }
938 if($this->acl_is_writeable("gotoProfileFlagL")){
939 if(isset($_POST['gotoProfileFlagL'])){
940 $this->gotoProfileFlagL = $_POST['gotoProfileFlagL'];
941 }else{
942 $this->gotoProfileFlagL = false;
943 }
944 }
946 plugin::save_object();
947 foreach($this->attributes as $s_attr){
948 if((!isset($_POST[$s_attr])) ||
949 in_array($s_attr,array("gosaDefaultPrinter","gotoShares","gotoHotplugDevices","gotoPrinter","gotoLogonScripts","uid"))) continue;
950 if(!$this->acl_is_writeable($s_attr)){
951 continue;
952 }else{
953 if(isset($_POST[$s_attr])){
954 $this->$s_attr = $_POST[$s_attr];
955 }else{
956 $this->$s_attr = false;
957 }
958 }
959 }
960 }
961 }
964 /* Check supplied data */
965 function check()
966 {
967 /* Call common method to give check the hook */
968 $message= plugin::check();
970 $this->detect_grouptype();
972 if(preg_match("/[^0-9]/",$this->gotoProfileQuota)) {
973 $message[]=_("Please set a valid profile quota size.");
974 }
975 if(!isset($this->attrs['objectClass'])){
976 $this->attrs['objectClass']=array();
977 }
978 if(!$this->is_group){
979 if((!((in_array("posixAccount",$this->attrs['objectClass']))||($this->parent->by_object['posixAccount']->is_account==true)))&&(!$this->is_group)){
980 $message[]=(_("You need to setup a valid posix extension in order to enable evironment features."));
981 }
982 }
983 return ($message);
984 }
987 /* Save to LDAP */
988 function save()
989 {
990 /* If group was renamed, all printer settings get lost
991 */
992 /* only save changed variables ....*/
993 if ($this->gotoKioskProfile =="none") $this->gotoKioskProfile ="";
994 if((!empty($this->gotoKioskProfile))&&($this->gotoKioskProfile != "none")){
995 if(preg_match("/https/i",$_SERVER['HTTP_REFERER'])){
996 $method="https://";
997 }else{
998 $method="http://";
999 }
1001 $str = $method.str_replace("//","/",$_SERVER['SERVER_NAME']."/kiosk/");
1002 $this->gotoKioskProfile= $str.$this->gotoKioskProfile;
1003 }else{
1004 $this->gotoKioskProfile= array();
1005 }
1007 plugin::save();
1008 $ldap= $this->config->get_ldap_link();
1010 $realyUsedAttrs= array();
1012 $path = search_config($this->config->data,"environment", "KIOSKPATH");
1013 /* Creating Kiosk Profiles */
1014 foreach($this->newKioskProfiles as $file){
1015 $contents = $file['contents'];
1016 $fp = @fopen($path."/".$file['name'],"w");
1017 if(!$fp){
1018 print_red(_("Can't save new kiosk profiles, possibly permission denied for folder")." : ",$path);
1019 }else{
1020 fwrite($fp,$contents,strlen($contents));
1021 }
1022 @unlink($file['tmp_name']);
1023 }
1025 /* Save already used objectClasses */
1026 $ocs = $this->attrs['objectClass'];
1027 unset($ocs['count']);
1028 $this->attrs = array();
1029 $this->attrs['objectClass']= $ocs;
1030 foreach($this->objectclasses as $objc){
1031 if(!in_array($objc,$this->attrs['objectClass'])){
1032 $this->attrs['objectClass'][]=$objc;
1033 }
1034 }
1036 /* 1. Search all printers that have our uid/cn as member
1037 * 2. Delete this uid/cn from every single entry and save it again.
1038 * 2.1 There are different types of members: Users / Groups, this will be defined in $suffix
1039 * 2.2 And each type has two modes, Admin (e.g. 'gotoUserAdminPrinter') and Normal
1040 */
1042 $this->detect_grouptype();
1044 if($this->add_del_printer_member_was_called){
1046 $types = array( "gotoUserPrinter" => "AddUser",
1047 "gotoGroupPrinter" => "AddGroup",
1048 "gotoUserAdminPrinter" => "AddAdminUser",
1049 "gotoGroupAdminPrinter" => "AddAdminGroup");
1051 if($this->is_group){
1052 $s_suffix = "Group";
1053 $useVar = "cn";
1054 }else{
1055 $useVar = "uid";
1056 $s_suffix = "User";
1057 }
1059 /* Remove old entries */
1060 $ldap->search("(&(objectClass=gotoPrinter)(goto".$s_suffix."Printer=".$this->$useVar."))",array("*"));
1061 while($attr = $ldap->fetch()){
1062 $printerObj = NULL;
1063 $printerObj = new printtabs($this->config,$this->config->data['TABS']['PRINTTABS'],$attr['dn'],"printer");
1064 $printerObj->set_acl_base($attr['dn']);
1065 $printerObj->by_object['printgeneric']->DelMember($types["goto".$s_suffix."Printer"],$this->$useVar);
1066 $printerObj->by_object['printgeneric']->save();
1067 }
1069 $ldap->search("(&(objectClass=gotoPrinter)(goto".$s_suffix."AdminPrinter=".$this->$useVar."))",array("*"));
1070 while($attr = $ldap->fetch()){
1071 $printerObj = NULL;
1072 $printerObj = new printtabs($this->config,$this->config->data['TABS']['PRINTTABS'],$attr['dn'],"printer");
1073 $printerObj->set_acl_base($attr['dn']);
1074 $printerObj->by_object['printgeneric']->DelMember($types["goto".$s_suffix."AdminPrinter"],$this->$useVar);
1075 $printerObj->by_object['printgeneric']->save();
1076 }
1078 foreach($this->gotoPrinter as $printer){
1079 $printerObj = NULL;
1080 $printerObj = new printtabs($this->config,$this->config->data['TABS']['PRINTTABS'],$printer['dn'],"printer");
1081 $printerObj->set_acl_base($printer['dn']);
1084 if($printer['mode'] == "admin") {
1085 $attribute = "goto".$s_suffix."AdminPrinter";
1086 }else{
1087 $attribute = "goto".$s_suffix."Printer";
1088 }
1090 $printerObj->by_object['printgeneric']->AddMember($types[$attribute],$this->dn);
1091 $printerObj->by_object['printgeneric']->save();
1092 }
1093 }
1095 /* Prepare HotPlug devices */
1096 $this->attrs['gotoHotplugDevice'] = array();
1097 foreach($this->gotoHotplugDevices as $name => $device){
1098 $this->attrs['gotoHotplugDevice'][] = $device['name']."|".$device['description']."|".$device['id'].
1099 "|".$device['produkt']."|".$device['vendor'];
1100 }
1102 /* Prepare LogonScripts */
1103 $this->attrs['gotoLogonScript'] = array();
1104 foreach($this->gotoLogonScripts as $name => $script){
1105 $this->attrs['gotoLogonScript'][] = $script['LogonName']."|".
1106 $script['LogonOverload'].$script['LogonLast']."|".
1107 $script['LogonPriority']."|".
1108 base64_encode($script['LogonData'])."|".
1109 $script['LogonDescription'];
1110 }
1112 /* Prepare Shares */
1113 $this->attrs['gotoShare']=array();
1114 foreach($this->gotoShares as $name => $share){
1115 $mntp= $share['mountPoint'];
1116 if (!preg_match('=^[a-z0-9+\._/%-]+$=i', $mntp)){
1117 $mntp= base64_encode($mntp);
1118 }
1119 $this->attrs['gotoShare'][] =$share['server']."|".$share['name']."|".$mntp."|".$share['PwdHash']."|".$share['Username'];
1120 }
1123 if($this->gotoXResolution == "auto") $this->gotoXResolution ="";
1124 $saveThis = array("gotoProfileQuota","gotoXResolution","gotoProfileServer","gotoKioskProfile","gosaDefaultPrinter");
1126 foreach($saveThis as $tosave){
1127 if(!empty($this->$tosave)){
1128 $this->attrs[$tosave]=$this->$tosave;
1129 }else{
1130 $this->attrs[$tosave]=array();
1131 }
1132 }
1134 /* Prepare Flags */
1135 $this->attrs['gotoProfileFlags'] = array($this->gotoProfileFlagC.$this->gotoProfileFlagL);
1136 if(empty($this->attrs['gotoProfileFlags'][0])){
1137 $this->attrs['gotoProfileFlags']=array();
1138 }
1140 if($this->useProfile == false){
1141 $this->attrs['gotoProfileFlags'] = preg_replace("/C/i","",$this->attrs['gotoProfileFlags']);
1142 $this->attrs['gotoProfileServer']= array();
1143 }
1145 $ldap->cat ($this->dn, array('dn'));
1146 if ($ldap->fetch()){
1147 $mode= "modify";
1148 } else {
1149 $mode= "add";
1150 $ldap->cd($this->config->current['BASE']);
1151 $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
1152 }
1154 $ldap->cd($this->dn);
1155 $this->cleanup();
1156 $ldap->$mode($this->attrs);
1157 show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/environment account with dn '%s' failed."),$this->dn));
1158 $this->handle_post_events($mode);
1159 }
1161 /* Generate ListBox frindly output for the defined shares
1162 * Possibly Add or remove an attribute here,
1163 */
1164 function printOutAssignedShares()
1165 {
1166 $a_return = array();
1167 if(is_array($this->gotoShares)){
1168 foreach($this->gotoShares as $share){
1169 if(preg_match("/^!/",$share['server'])){
1170 $a_return[$share['name']."|".$share['server']]= preg_replace("/^!/","",$share['server'])."://".$share['name']." - "._("group share");
1171 }else{
1172 $a_return[$share['name']."|".$share['server']]= $share['server']."://".$share['name']." on ".$share['mountPoint']." as ".$share['Username'];
1173 }
1174 }
1175 natcasesort($a_return);
1176 }
1177 return($a_return);
1178 }
1180 /* Generate ListBox frindly output for the definedhotplugs
1181 * Possibly Add or remove an attribute here,
1182 */
1183 function printOutHotPlugDevices()
1184 {
1185 $a_return= array();
1186 if(is_array($this->gotoHotplugDevices)){
1187 foreach($this->gotoHotplugDevices as $key=>$device){
1188 $a_return[$key] = $device['name']." - ".$device['id'];
1189 }
1190 }
1191 return($a_return);
1192 }
1194 /* Generates ListBox frienly output of used printer devices
1195 * Append ' - admin' if printer is used in admin mode
1196 */
1197 function printOutPrinterDevices()
1198 {
1199 $a_return = array();
1200 if(is_array($this->gotoPrinter)){
1201 foreach($this->gotoPrinter as $printer){
1202 if($printer['mode'] == "admin"){
1203 $a_return[$printer['cn'][0]]= $printer['cn'][0]." - "._("Administrator");
1204 }else{
1205 $a_return[$printer['cn'][0]]= $printer['cn'][0];
1206 }
1207 if ($printer['cn'][0] == $this->gosaDefaultPrinter){
1208 $a_return[$printer['cn'][0]].=" - "._("Default printer");
1209 }
1210 }
1211 }
1212 return($a_return);
1213 }
1215 /* Generates ListBox frienly output of used logonscripts
1216 */
1217 function printOutLogonScripts()
1218 {
1219 $a_return = array();
1220 if(is_array($this->gotoLogonScripts)){
1221 foreach($this->gotoLogonScripts as $script){
1222 $a_return[$script['LogonName']]= $script['LogonPriority']." - ".$script['LogonName'];
1223 }
1224 }
1225 return($a_return);
1226 }
1229 /* Return plugin informations for acl handling
1230 #FIXME these ACLs should work for groups too */
1231 function plInfo()
1232 {
1233 return (array("plShortName" => _("Environment"),
1234 "plDescription" => _("Environment settings"), // Description
1235 "plSelfModify" => TRUE,
1236 "plDepends" => array("user", "posixAccount"), // This plugin depends on
1237 "plPriority" => 2, // Position in tabs
1238 "plSection" => "personal", // This belongs to personal
1239 "plCategory" => array("users", "groups"), // Add to following categories
1240 "plOptions" => array("resolution_hook" => array("type" => "string",
1241 "description" => _("Command to extend the list of possible screen resolutions"))),
1243 "plProvidedAcls" => array(
1245 "gotoProfileFlagL" => _("Resolution changeable during session") ,
1246 "gotoProfileFlagC" => _("Cache profile localy") ,
1248 "gotoProfileQuota" => _("Profile quota") ,
1249 "gotoProfileServer" => _("Profile server") ,
1251 "gotoXResolution" => _("Resolution") ,
1252 "gotoKioskProfile" => _("Kiosk profile") ,
1254 "gosaDefaultPrinter" => _("Default printer") ,
1255 "gotoLogonScript" => _("Logon script") ,
1256 "gotoHotplugDevice" => _("Hotplug devices"),
1257 "gotoShare" => _("Shares"))
1258 ));
1259 }
1260 }
1262 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
1263 ?>