e1a4dd820079df0e2cf30344eb15b6ea8d021db6
1 <?php
2 /*
3 This code is part of GOsa (https://gosa.gonicus.de)
4 Copyright (C) 2003 Cajus Pollmeier
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20 require "tabs_application.inc";
22 class applicationManagement extends plugin
23 {
24 /* Definitions */
25 var $plHeadline= "Applications";
26 var $plDescription= "This does something";
28 /* Dialog attributes */
29 var $apptabs= NULL;
30 var $applications= array();
31 var $ui= NULL;
32 var $acl= "";
34 var $CopyPasteHandler ;
36 var $Release = "";
37 var $Releases = array();
39 var $enableCopyPaste = false;
40 var $enableReleaseManagement = false;
43 function applicationManagement ($config, $ui)
44 {
45 /* Save configuration for internal use */
46 $this->config= $config;
47 $this->ui= $ui;
49 if( (isset($this->config->data['MAIN']['ENABLECOPYPASTE']))
50 &&
51 (preg_match("/true/i",$this->config->data['MAIN']['ENABLECOPYPASTE'] ))){
52 $this->enableCopyPaste = true;
53 }
55 $this->CopyPasteHandler = new CopyPasteHandler($this->config);
57 /* Check if we should enable the release selection */
58 $tmp = search_config($this->config->data,"faiManagement","CLASS");
59 if(!empty($tmp)){
60 $this->enableReleaseManagement = true;
61 }
63 /* Get global filter config */
64 if (!is_global("appfilter")){
65 $base= get_base_from_people($ui->dn);
67 $appfilter= array("regex" => "*" ,
68 "release" => "ou=apps,".$base);
69 register_global("appfilter", $appfilter);
70 }
72 $appfilter = get_global("appfilter");
73 if(!isset($_SESSION['CurrentMainBase'])){
74 $_SESSION['CurrentMainBase'] = get_base_from_people($ui->dn);
75 }
77 $this->Releases = $this->getReleases($_SESSION['CurrentMainBase']);
78 asort($this->Releases);
79 $this->Release = $appfilter['release'];
80 }
82 function getReleases($base)
83 {
84 $dn = "ou=apps,".$base;
86 $ret = array();
88 $ret ["ou=apps,".$base] = "/";
90 $ldap = $this->config->get_ldap_link();
91 $ldap->cd($dn);
93 $ldap->search("objectClass=organizationalUnit",array("ou"));
95 while($attrs = $ldap->fetch()){
96 $str = str_replace($dn,"",$attrs['dn']);
97 $tmp = array_reverse( split("ou=",$str));
98 $str = "";
99 foreach($tmp as $val){
100 $val = trim(preg_replace("/,/","",$val));
101 if(empty($val)) break;
102 $str .= "/".$val;
103 }
104 if(!empty($str)){
105 $ret[$attrs['dn']]= preg_replace("/^\//","",$str);
106 }
107 }
108 return($ret);
109 }
111 function execute()
112 {
113 /* Call parent execute */
114 plugin::execute();
116 $_SESSION['LOCK_VARS_TO_USE'] = array("/^act$/","/^id$/","/^appl_edit_/","/^appl_del_/");
118 /* Save data */
119 $appfilter = get_global("appfilter");
120 $smarty = get_smarty(); // Smarty instance
121 $s_action = ""; // Contains the action to proceed
122 $s_entry = ""; // The value for s_action
123 $base_back = ""; // The Link for Backbutton
125 /* Start for New List Managment */
126 if(isset($_GET['act'])&&($_GET['act']=="dep_open")){
127 $s_action="open";
128 $s_entry = base64_decode($_GET['dep_id']);
129 $_SESSION['CurrentMainBase']= "".$this->config->departments[trim($s_entry)];
130 }
132 /* Get posted release */
133 if(isset($_POST['select_release'])){
134 $r = $_POST['select_release'];
135 if((isset($this->Releases[$r])) && ($this->Release != $r)){
136 $this->Release = $r;
137 $appfilter = get_global("appfilter");
138 $appfilter['release'] = $r;
139 register_global("appfilter",$appfilter);
140 }
141 }
143 /* Test Posts */
144 foreach($_POST as $key => $val){
145 // Post for delete
146 if(preg_match("/appl_del.*/",$key)){
147 $s_action = "del";
148 $s_entry = preg_replace("/appl_".$s_action."_/i","",$key);
149 // Post for edit
150 }elseif(preg_match("/appl_edit_.*/",$key)){
151 $s_action="edit";
152 $s_entry = preg_replace("/appl_".$s_action."_/i","",$key);
153 // Post for new
154 }elseif(preg_match("/^copy_.*/",$key)){
155 $s_action="copy";
156 $s_entry = preg_replace("/^copy_/i","",$key);
157 }elseif(preg_match("/^cut_.*/",$key)){
158 $s_action="cut";
159 $s_entry = preg_replace("/^cut_/i","",$key);
160 // Post for new
161 }elseif(preg_match("/^dep_back.*/i",$key)){
162 $s_action="back";
163 }elseif(preg_match("/^appl_new.*/",$key)){
164 $s_action="new";
165 }elseif(preg_match("/^dep_home.*/i",$key)){
166 $s_action="home";
167 }elseif(preg_match("/^dep_root.*/i",$key)){
168 $s_action="root";
169 }elseif(preg_match("/^editPaste.*/i",$key)){
170 $s_action="editPaste";
171 }
172 }
174 if((isset($_GET['act']))&&($_GET['act']=="edit_entry")){
175 $s_action ="edit";
176 $s_entry = $_GET['id'];
177 }
179 $s_entry = preg_replace("/_.$/","",$s_entry);
181 /* Department changed? */
182 if(isset($_POST['CurrentMainBase']) && $_POST['CurrentMainBase']){
183 $_SESSION['CurrentMainBase']= $_POST['CurrentMainBase'];
184 }
186 /* Homebutton is posted */
187 if($s_action=="home"){
188 $_SESSION['CurrentMainBase']=(preg_replace("/^[^,]+,/","",$this->ui->dn));
189 $_SESSION['CurrentMainBase']=(preg_replace("/^[^,]+,/","",$_SESSION['CurrentMainBase']));
190 }
192 if($s_action=="root"){
193 $_SESSION['CurrentMainBase']=($this->config->current['BASE']);
194 }
196 /* If Backbutton is Posted */
197 if($s_action=="back"){
198 $base_back = preg_replace("/^[^,]+,/","",$_SESSION['CurrentMainBase']);
199 $base_back = convert_department_dn($base_back);
201 if(isset($this->config->departments[trim($base_back)])){
202 $_SESSION['CurrentMainBase']= $this->config->departments[trim($base_back)];
203 }else{
204 $_SESSION['CurrentMainBase']= $this->config->departments["/"];
205 }
206 }
208 if (isset($_POST['regex'])){
209 $appfilter['regex']= $_POST['regex'];
210 }
211 if (isset($_GET['search'])){
212 $s= mb_substr($_GET['search'], 0, 1, "UTF8")."*";
213 if ($s == "**"){
214 $s= "*";
215 }
216 $appfilter['regex']= $s;
217 }
219 $this->Releases = $this->getReleases($_SESSION['CurrentMainBase']);
220 asort($this->Releases);
221 if(!isset($this->Releases[$this->Release])){
222 $this->Release = key($this->Releases);
223 $appfilter['release'] = $this->Release;
224 register_global("appfilter",$appfilter);
225 }
227 register_global("appfilter", $appfilter);
229 /* Check sorting variable */
230 $this->reload();
231 $smarty= get_smarty();
233 /* Check for exeeded sizelimit */
234 if (($message= check_sizelimit()) != ""){
235 return($message);
236 }
239 /* Only perform copy / paste if it is enabled
240 */
241 if($this->enableCopyPaste){
243 /* Paste copied/cutted object in here
244 */
245 if(($s_action == "editPaste") || ($this->CopyPasteHandler->stillOpen())){
246 $this->CopyPasteHandler->save_object();
247 $this->CopyPasteHandler->SetVar("base", $_SESSION['CurrentMainBase']);
249 return($this->CopyPasteHandler->execute());
250 }
253 /* Copy current object to CopyHandler
254 */
255 if($s_action == "copy"){
256 $this->CopyPasteHandler->Clear();
257 $dn = $this->applications[$s_entry]['dn'];
258 $obj = new apptabs($this->config, $this->config->data['TABS']['APPSTABS'], $dn);
259 $objNew = new apptabs($this->config, $this->config->data['TABS']['APPSTABS'], "new");
260 $this->CopyPasteHandler->Copy($obj,$objNew);
261 }
264 /* Copy current object to CopyHandler
265 */
266 if($s_action == "cut"){
267 $this->CopyPasteHandler->Clear();
268 $dn = $this->applications[$s_entry]['dn'];
269 $obj = new apptabs($this->config, $this->config->data['TABS']['APPSTABS'], $dn);
270 $this->CopyPasteHandler->Cut($obj);
271 }
272 }
274 /* New application? */
275 if ($s_action=="new"){
277 /* By default we set 'dn' to 'new', all relevant plugins will
278 react on this. */
279 $this->dn= "new";
281 /* Create new usertab object */
282 $this->apptabs= new apptabs($this->config,
283 $this->config->data['TABS']['APPSTABS'], $this->dn);
284 $this->apptabs->set_acl(array(':all'));
285 }
287 /* Cancel dialogs */
288 if (isset($_POST['edit_cancel']) || isset($_POST['password_cancel'])){
289 del_lock ($this->apptabs->dn);
290 unset ($this->apptabs);
291 $this->apptabs= NULL;
292 unset ($_SESSION['objectinfo']);
293 }
295 /* Finish apps edit is triggered by the tabulator dialog, so
296 the user wants to save edited data. Check and save at this
297 point. */
298 if ((isset($_POST['edit_finish'])) && (isset($this->apptabs->config))){
300 /* Check tabs, will feed message array */
301 $this->apptabs->last= $this->apptabs->current;
302 $this->apptabs->save_object();
303 $message= $this->apptabs->check();
305 /* Save, or display error message? */
306 if (count($message) == 0){
308 /* Save data data to ldap */
309 $this->apptabs->set_release($this->Release);
310 $this->apptabs->save();
311 gosa_log ("Application object'".$this->dn."' has been saved");
313 /* Application has been saved successfully, remove lock from
314 LDAP. */
315 if ($this->dn != "new"){
316 del_lock ($this->dn);
317 }
319 /* There's no page reload so we have to read new apps at
320 this point. */
321 $this->reload ();
322 unset ($this->apptabs);
323 $this->apptabs= NULL;
324 unset ($_SESSION['objectinfo']);
325 } else {
326 /* Ok. There seem to be errors regarding to the tab data,
327 show message and continue as usual. */
328 show_errors($message);
329 }
330 }
332 /* User wants to edit data? */
333 if (($s_action=="edit") && (!isset($this->apptabs->config))){
335 /* Get 'dn' from posted 'applist', must be unique */
336 $this->dn= $this->applications[$s_entry]['dn'];
338 /* Check locking, save current plugin in 'back_plugin', so
339 the dialog knows where to return. */
340 if (($user= get_lock($this->dn)) != ""){
341 return(gen_locked_message ($user, $this->dn));
342 }
344 /* Lock the current entry, so everyone will get the
345 above dialog */
346 add_lock ($this->dn, $this->ui->dn);
348 /* Set up the users ACL's for this 'dn' */
349 $acl= get_permissions ($this->dn, $this->ui->subtreeACL);
351 /* Register apptabs to trigger edit dialog */
352 $this->apptabs= new apptabs($this->config,
353 $this->config->data['TABS']['APPSTABS'], $this->dn);
354 $this->apptabs->set_acl($acl);
355 $_SESSION['objectinfo']= $this->dn;
356 }
358 /* Remove user was requested */
359 if ($s_action == "del"){
361 /* Get 'dn' from posted 'uid' */
362 $this->dn= $this->applications[$s_entry]['dn'];
364 /* Load permissions for selected 'dn' and check if
365 we're allowed to remove this 'dn' */
366 $acl= get_permissions ($this->dn, $this->ui->subtreeACL);
367 $this->acl= get_module_permission($acl, "application", $this->dn);
368 if (chkacl($this->acl, "delete") == ""){
370 /* Check locking, save current plugin in 'back_plugin', so
371 the dialog knows where to return. */
372 if (($user= get_lock($this->dn)) != ""){
373 return (gen_locked_message ($user, $this->dn));
374 }
376 /* Lock the current entry, so nobody will edit it during deletion */
377 add_lock ($this->dn, $this->ui->dn);
378 $smarty= get_smarty();
379 $smarty->assign("intro", sprintf(_("You're about to delete the application '%s'."), @LDAP::fix($this->dn)));
380 return($smarty->fetch (get_template_path('remove.tpl', TRUE)));
381 } else {
383 /* Obviously the user isn't allowed to delete. Show message and
384 clean session. */
385 print_red (_("You are not allowed to delete this application!"));
386 }
387 }
389 /* Confirmation for deletion has been passed. Group should be deleted. */
390 if (isset($_POST['delete_app_confirm'])){
392 /* Some nice guy may send this as POST, so we've to check
393 for the permissions again. */
394 if (chkacl($this->acl, "delete") == ""){
396 /* Delete request is permitted, perform LDAP action */
397 $this->apptabs= new apptabs($this->config,
398 $this->config->data['TABS']['APPSTABS'], $this->dn);
399 $this->apptabs->set_acl(array($this->acl));
400 $this->apptabs->delete ();
401 gosa_log ("Application object'".$this->dn."' has been removed");
402 unset ($this->apptabs);
403 $this->apptabs= NULL;
405 /* Group list has changed, reload it. */
406 $this->reload ();
407 } else {
409 /* Normally this shouldn't be reached, send some extra
410 logs to notify the administrator */
411 print_red (_("You are not allowed to delete this application!"));
412 gosa_log ("Warning: '".$this->ui->uid."' tried to trick group deletion.");
413 }
415 /* Remove lock file after successfull deletion */
416 del_lock ($this->dn);
417 }
420 /* Delete application canceled? */
421 if (isset($_POST['delete_cancel'])){
422 del_lock ($this->dn);
423 unset($_SESSION['objectinfo']);
424 }
426 /* Show tab dialog if object is present */
427 if (($this->apptabs) && (isset($this->apptabs->config))){
428 $display= $this->apptabs->execute();
430 /* Don't show buttons if tab dialog requests this */
431 if (!$this->apptabs->by_object[$this->apptabs->current]->dialog){
432 $display.= "<p style=\"text-align:right\">\n";
433 $display.= "<input type=\"submit\" name=\"edit_finish\" value=\""._("Save")."\">\n";
434 $display.= " \n";
435 $display.= "<input type=\"submit\" name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
436 $display.= "</p>";
437 }
438 return ($display);
439 }
441 /* Show main page */
443 /* Prepare departments */
444 $options= "";
445 foreach ($this->config->idepartments as $key => $value){
446 if ($_SESSION['CurrentMainBase']== $key){
447 $options.= "<option selected='selected' value='$key'>$value</option>";
448 } else {
449 $options.= "<option value='$key'>$value</option>";
450 }
451 }
453 if($this->enableCopyPaste){
454 $Copy_Paste = " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ";
456 if($this->CopyPasteHandler->isCurrentObjectPastAble()){
458 if($this->CopyPasteHandler->isCurrentCutted()){
459 $img = "images/cutpaste.png";
460 }else{
461 $img = "images/copypaste.png";
462 }
464 $Copy_Paste .= "<input type='image' name='editPaste' class='center'
465 src='".$img."' alt='"._("Paste")."' title='".$this->CopyPasteHandler->GetCurrentDn()."'> ";
466 }else{
467 $Copy_Paste .= "<img class='center' src='images/cant_editpaste.png' alt='"._("Can't paste")."'> ";
468 }
469 }else{
470 $Copy_Paste ="";
471 }
473 // Managment
474 $listhead = "<div style='background:#F0F0F9;padding:5px;'>".
475 " <input class='center' type='image' src='images/list_root.png' align='middle' title='"._("Go to root department")."' name='dep_root' alt='"._("Root")."'> ".
476 " <input class='center' type='image' align='middle' src='images/list_back.png' title='"._("Go up one department")."' alt='"._("Up")."' name='dep_back'> ".
477 " <input class='center' type='image' align='middle' src='images/list_home.png' title='"._("Go to users department")."' alt='"._("Home")."' name='dep_home'> ".
478 " <input class='center' type='image' src='images/list_reload.png' align='middle' title='"._("Reload list")."' name='submit_department' alt='"._("Submit")."'> ".
479 " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ".
480 " <input class='center' type='image' align='middle' src='images/list_new_app.png' alt='"._("new")."' title='"._("Create new application")."' name='appl_new'> ".
481 $Copy_Paste.
482 " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ".
483 _("Base")." <select name='CurrentMainBase' onChange='mainform.submit()' class='center'>$options</select>".
484 " <input class='center' type='image' src='images/list_submit.png' align='middle' title='"._("Submit department")."' name='submit_department' alt='"._("Submit")."'> ".
485 "</div>";
489 if($this->enableCopyPaste){
490 $actions = "<input class='center' type='image'
491 src='images/editcut.png' alt='"._("cut")."' name='cut_%KEY%' title='"._("Cut this entry")."'> ";
492 $actions.= "<input class='center' type='image'
493 src='images/editcopy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'> ";
494 $actions.= "<input class='center' type='image'
495 src='images/edit.png' alt='"._("edit")."' name='appl_edit_%KEY%' title='"._("Edit this entry")."'>";
496 $actions.= "<input class='center' type='image'
497 src='images/edittrash.png' alt='"._("delete")."' name='appl_del_%KEY%' title='"._("Delete this entry")."'>";
498 }else{
500 $actions = "<input class='center' type='image'
501 src='images/edit.png' alt='"._("edit")."' name='appl_edit_%KEY%' title='"._("Edit this entry")."'>";
502 $actions.= "<input class='center' type='image'
503 src='images/edittrash.png' alt='"._("delete")."' name='appl_del_%KEY%' title='"._("Delete this entry")."'>";
504 }
507 // Defining Links
508 $linkopen = "<a href='?plug=".$_GET['plug']."&act=dep_open&dep_id=%s'>%s</a>";
510 // image Buttons
511 $editlink = "<a href='?plug=".$_GET['plug']."&id=%s&act=edit_entry'>%s</a>";
512 $userimg = "<img class='center' src='images/select_groups.png' alt='User' title='%s'>";
514 // Extension images
515 $applimg = "<img class='center' src='images/select_application.png' alt='A' title='"._("Application")."'>";
517 // Space
518 $empty = "<img class='center' src='images/empty.png' style='width:16px;height:16px;' alt=''>";
521 $divlist = new divlist("applicationtabs");
522 $divlist->SetHeader(array(
523 array("string" => " ", "attach" => "style='text-align:center;width:20px;'"),
524 array("string" => _("Application name")." / "._("Department"), "attach" => "style=''"),
525 array("string" => _("Actions"), "attach" => "style='width:80px;border-right:0px;text-align:right;'")
526 ));
529 $divlist->SetSummary(_("This table displays all groups, in the selected tree."));
530 $divlist->SetEntriesPerPage(0);
532 foreach($this->departments as $key=> $val){
534 if(!isset($this->config->departments[trim($key)])){
535 $this->config->departments[trim($key)]="";
536 }
538 $non_empty="";
539 $keys= str_replace("/","\/",$key);
540 foreach($this->config->departments as $keyd=>$vald ){
541 if(preg_match("/".$keys."\/.*/",$keyd)){
542 $non_empty="full";
543 }
544 }
546 $field1 = array("string" => "<img src='images/".$non_empty."folder.png' alt='department'>", "attach" => "style='text-align:center;width:20px;'");
547 $field2 = array("string" => sprintf($linkopen,base64_encode($key),$val), "attach" => "style=''");
548 $field3 = array("string" => " ", "attach" => "style='width:80px;border-right:0px;text-align:right;'");
550 $divlist->AddEntry(array($field1,$field2,$field3));
551 }
553 foreach($this->applications as $key => $val){
554 $title = "title='dn: ".@LDAP::fix($val['dn'])."'";
556 if(!isset($val['description'][0])){
557 $desc = "";
558 }else{
559 $desc = " - [ ".$val['description'][0]." ]";
560 }
561 $field1 = array("string" => sprintf($applimg,$val['dn']), "attach" => "style='text-align:center;width:20px;'");
562 $field2 = array("string" => sprintf($editlink,$key,($val['cn']['0'].$desc)), "attach" => "style='' ".$title);
563 $field3 = array("string" => preg_replace("/%KEY%/", $key, $actions), "attach" => "style='width:80px;border-right:0px;text-align:right;'");
565 $divlist->AddEntry(array($field1,$field2,$field3));
566 }
568 $smarty->assign("applicationshead", $listhead);
569 $smarty->assign("applications", $divlist->DrawList());
570 $smarty->assign("search_image", get_template_path('images/search.png'));
571 $smarty->assign("tree_image", get_template_path('images/tree.png'));
572 $smarty->assign("infoimage", get_template_path('images/info.png'));
573 $smarty->assign("launchimage", get_template_path('images/launch.png'));
574 $smarty->assign("releaseimage" , get_template_path('images/branch.png'));
575 $smarty->assign("deplist", $this->config->idepartments);
576 $smarty->assign("regex", $appfilter['regex']);
578 if($this->enableReleaseManagement){
579 $smarty->assign("releases", $this->Releases );
580 $smarty->assign("releaseKeys", array_flip($this->Releases));
581 $smarty->assign("select_release",$this->Release);
582 }
584 $smarty->assign("enableReleaseManagement",$this->enableReleaseManagement);
586 /* Extend if we are not using javascript */
587 $smarty->assign("apply", apply_filter());
588 $smarty->assign("alphabet", generate_alphabet());
589 $smarty->assign("hint", print_sizelimit_warning());
591 return($smarty->fetch(get_template_path('headpage.tpl', TRUE)));
592 }
595 function reload()
596 {
597 /* Get config */
598 $appfilter= get_global('appfilter');
600 /* Set base for all searches */
601 $base= $this->Release;
603 /* Regex filter? */
604 if ($appfilter['regex'] != ""){
605 $regex= $appfilter['regex'];
606 } else {
607 $regex= "*";
608 }
610 /* Generate application list */
611 //FIXME: No GL_SIZELIMIT?
612 $res= get_list("(&(cn=$regex)(objectClass=gosaApplication))", $this->ui->subtreeACL,
613 $base, array("*"), GL_NONE);
614 $this->applications= array();
615 foreach ($res as $value){
616 $this->applications[]= $value;
617 }
618 reset ($this->applications);
622 /* NEW LIST MANAGMENT
623 * We also need to search for the departments
624 * So we are able to navigate like in konquerer
625 */
626 $peopleOU = get_people_ou();
627 $base2 = $_SESSION['CurrentMainBase'];
629 /* Get all departments within this subtree */
630 $deps= get_list("(&(|(ou=$regex)(description=$regex))(objectClass=gosaDepartment))", $this->ui->subtreeACL,
631 $base2, array("ou", "description"), GL_SIZELIMIT | GL_CONVERT);
633 $this->departments = array();
634 foreach($deps as $value){
635 if(isset($value['description'][0])){
636 $this->departments[$value['dn']]= get_sub_department($value['dn'])." - [".$value["description"][0]."]";
637 }else{
638 $this->departments[$value['dn']]= get_sub_department($value['dn']);
639 }
640 }
641 natcasesort($this->departments);
642 /* END NEW LIST MANAGMENT
643 */
645 $tmp=array();
646 foreach($this->applications as $tkey => $val ){
647 $tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$val;
648 }
649 ksort($tmp);
650 $this->applications=array();
651 foreach($tmp as $val){
652 $this->applications[]=$val;
653 }
654 reset ($this->applications);
657 }
659 function remove_from_parent()
660 {
661 /* Optionally execute a command after we're done */
662 $this->postremove();
663 }
666 /* Save data to object */
667 function save_object()
668 {
669 }
672 /* Check values */
673 function check()
674 {
675 }
678 /* Save to LDAP */
679 function save()
680 {
681 /* Optionally execute a command after we're done */
682 $this->postcreate();
683 }
685 function adapt_from_template($dn)
686 {
687 }
689 function password_change_needed()
690 {
691 }
693 function show_header($button_text, $text, $disabled= FALSE)
694 {
695 }
697 function remove_lock()
698 {
699 if (isset($this->apptabs->dn)){
700 del_lock ($this->apptabs->dn);
701 }
702 }
704 }
705 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
706 ?>