2eaa67e2164a5f6e906e5efd81d892148ab12257
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 if($str = $this->CopyPasteHandler->execute()) {
250 return($str);
251 }
252 }
255 /* Copy current object to CopyHandler
256 */
257 if($s_action == "copy"){
258 $this->CopyPasteHandler->Clear();
259 $dn = $this->applications[$s_entry]['dn'];
260 $obj = new apptabs($this->config, $this->config->data['TABS']['APPSTABS'], $dn);
261 $objNew = new apptabs($this->config, $this->config->data['TABS']['APPSTABS'], "new");
262 $this->CopyPasteHandler->Copy($obj,$objNew);
263 }
266 /* Copy current object to CopyHandler
267 */
268 if($s_action == "cut"){
269 $this->CopyPasteHandler->Clear();
270 $dn = $this->applications[$s_entry]['dn'];
271 $obj = new apptabs($this->config, $this->config->data['TABS']['APPSTABS'], $dn);
272 $this->CopyPasteHandler->Cut($obj);
273 }
274 }
276 /* New application? */
277 if ($s_action=="new"){
279 /* By default we set 'dn' to 'new', all relevant plugins will
280 react on this. */
281 $this->dn= "new";
283 /* Create new usertab object */
284 $this->apptabs= new apptabs($this->config,
285 $this->config->data['TABS']['APPSTABS'], $this->dn);
286 $this->apptabs->set_acl(array(':all'));
287 }
289 /* Cancel dialogs */
290 if (isset($_POST['edit_cancel']) || isset($_POST['password_cancel'])){
291 del_lock ($this->apptabs->dn);
292 unset ($this->apptabs);
293 $this->apptabs= NULL;
294 unset ($_SESSION['objectinfo']);
295 }
297 /* Finish apps edit is triggered by the tabulator dialog, so
298 the user wants to save edited data. Check and save at this
299 point. */
300 if ((isset($_POST['edit_finish'])) && (isset($this->apptabs->config))){
302 /* Check tabs, will feed message array */
303 $this->apptabs->last= $this->apptabs->current;
304 $this->apptabs->save_object();
305 $message= $this->apptabs->check();
307 /* Save, or display error message? */
308 if (count($message) == 0){
310 /* Save data data to ldap */
311 $this->apptabs->set_release($this->Release);
312 $this->apptabs->save();
313 gosa_log ("Application object'".$this->dn."' has been saved");
315 /* Application has been saved successfully, remove lock from
316 LDAP. */
317 if ($this->dn != "new"){
318 del_lock ($this->dn);
319 }
321 /* There's no page reload so we have to read new apps at
322 this point. */
323 $this->reload ();
324 unset ($this->apptabs);
325 $this->apptabs= NULL;
326 unset ($_SESSION['objectinfo']);
327 } else {
328 /* Ok. There seem to be errors regarding to the tab data,
329 show message and continue as usual. */
330 show_errors($message);
331 }
332 }
334 /* User wants to edit data? */
335 if (($s_action=="edit") && (!isset($this->apptabs->config))){
337 /* Get 'dn' from posted 'applist', must be unique */
338 $this->dn= $this->applications[$s_entry]['dn'];
340 /* Check locking, save current plugin in 'back_plugin', so
341 the dialog knows where to return. */
342 if (($user= get_lock($this->dn)) != ""){
343 return(gen_locked_message ($user, $this->dn));
344 }
346 /* Lock the current entry, so everyone will get the
347 above dialog */
348 add_lock ($this->dn, $this->ui->dn);
350 /* Set up the users ACL's for this 'dn' */
351 $acl= get_permissions ($this->dn, $this->ui->subtreeACL);
353 /* Register apptabs to trigger edit dialog */
354 $this->apptabs= new apptabs($this->config,
355 $this->config->data['TABS']['APPSTABS'], $this->dn);
356 $this->apptabs->set_acl($acl);
357 $_SESSION['objectinfo']= $this->dn;
358 }
360 /* Remove user was requested */
361 if ($s_action == "del"){
363 /* Get 'dn' from posted 'uid' */
364 $this->dn= $this->applications[$s_entry]['dn'];
366 /* Load permissions for selected 'dn' and check if
367 we're allowed to remove this 'dn' */
368 $acl= get_permissions ($this->dn, $this->ui->subtreeACL);
369 $this->acl= get_module_permission($acl, "application", $this->dn);
370 if (chkacl($this->acl, "delete") == ""){
372 /* Check locking, save current plugin in 'back_plugin', so
373 the dialog knows where to return. */
374 if (($user= get_lock($this->dn)) != ""){
375 return (gen_locked_message ($user, $this->dn));
376 }
378 /* Lock the current entry, so nobody will edit it during deletion */
379 add_lock ($this->dn, $this->ui->dn);
380 $smarty= get_smarty();
381 $smarty->assign("intro", sprintf(_("You're about to delete the application '%s'."), @LDAP::fix($this->dn)));
382 return($smarty->fetch (get_template_path('remove.tpl', TRUE)));
383 } else {
385 /* Obviously the user isn't allowed to delete. Show message and
386 clean session. */
387 print_red (_("You are not allowed to delete this application!"));
388 }
389 }
391 /* Confirmation for deletion has been passed. Group should be deleted. */
392 if (isset($_POST['delete_app_confirm'])){
394 /* Some nice guy may send this as POST, so we've to check
395 for the permissions again. */
396 if (chkacl($this->acl, "delete") == ""){
398 /* Delete request is permitted, perform LDAP action */
399 $this->apptabs= new apptabs($this->config,
400 $this->config->data['TABS']['APPSTABS'], $this->dn);
401 $this->apptabs->set_acl(array($this->acl));
402 $this->apptabs->delete ();
403 gosa_log ("Application object'".$this->dn."' has been removed");
404 unset ($this->apptabs);
405 $this->apptabs= NULL;
407 /* Group list has changed, reload it. */
408 $this->reload ();
409 } else {
411 /* Normally this shouldn't be reached, send some extra
412 logs to notify the administrator */
413 print_red (_("You are not allowed to delete this application!"));
414 gosa_log ("Warning: '".$this->ui->uid."' tried to trick group deletion.");
415 }
417 /* Remove lock file after successfull deletion */
418 del_lock ($this->dn);
419 }
422 /* Delete application canceled? */
423 if (isset($_POST['delete_cancel'])){
424 del_lock ($this->dn);
425 unset($_SESSION['objectinfo']);
426 }
428 /* Show tab dialog if object is present */
429 if (($this->apptabs) && (isset($this->apptabs->config))){
430 $display= $this->apptabs->execute();
432 /* Don't show buttons if tab dialog requests this */
433 if (!$this->apptabs->by_object[$this->apptabs->current]->dialog){
434 $display.= "<p style=\"text-align:right\">\n";
435 $display.= "<input type=\"submit\" name=\"edit_finish\" value=\""._("Save")."\">\n";
436 $display.= " \n";
437 $display.= "<input type=\"submit\" name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
438 $display.= "</p>";
439 }
440 return ($display);
441 }
443 /* Show main page */
445 /* Prepare departments */
446 $options= "";
447 foreach ($this->config->idepartments as $key => $value){
448 if ($_SESSION['CurrentMainBase']== $key){
449 $options.= "<option selected='selected' value='$key'>$value</option>";
450 } else {
451 $options.= "<option value='$key'>$value</option>";
452 }
453 }
455 if($this->enableCopyPaste){
456 $Copy_Paste = " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ";
458 if($this->CopyPasteHandler->isCurrentObjectPastAble()){
460 if($this->CopyPasteHandler->isCurrentCutted()){
461 $img = "images/cutpaste.png";
462 }else{
463 $img = "images/copypaste.png";
464 }
466 $Copy_Paste .= "<input type='image' name='editPaste' class='center'
467 src='".$img."' alt='"._("Paste")."' title='".$this->CopyPasteHandler->GetCurrentDn()."'> ";
468 }else{
469 $Copy_Paste .= "<img class='center' src='images/cant_editpaste.png' alt='"._("Can't paste")."'> ";
470 }
471 }else{
472 $Copy_Paste ="";
473 }
475 // Managment
476 $listhead = "<div style='background:#F0F0F9;padding:5px;'>".
477 " <input class='center' type='image' src='images/list_root.png' align='middle' title='"._("Go to root department")."' name='dep_root' alt='"._("Root")."'> ".
478 " <input class='center' type='image' align='middle' src='images/list_back.png' title='"._("Go up one department")."' alt='"._("Up")."' name='dep_back'> ".
479 " <input class='center' type='image' align='middle' src='images/list_home.png' title='"._("Go to users department")."' alt='"._("Home")."' name='dep_home'> ".
480 " <input class='center' type='image' src='images/list_reload.png' align='middle' title='"._("Reload list")."' name='submit_department' alt='"._("Submit")."'> ".
481 " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ".
482 " <input class='center' type='image' align='middle' src='images/list_new_app.png' alt='"._("new")."' title='"._("Create new application")."' name='appl_new'> ".
483 $Copy_Paste.
484 " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ".
485 _("Base")." <select name='CurrentMainBase' onChange='mainform.submit()' class='center'>$options</select>".
486 " <input class='center' type='image' src='images/list_submit.png' align='middle' title='"._("Submit department")."' name='submit_department' alt='"._("Submit")."'> ".
487 "</div>";
491 if($this->enableCopyPaste){
492 $actions = "<input class='center' type='image'
493 src='images/editcut.png' alt='"._("cut")."' name='cut_%KEY%' title='"._("Cut this entry")."'> ";
494 $actions.= "<input class='center' type='image'
495 src='images/editcopy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'> ";
496 $actions.= "<input class='center' type='image'
497 src='images/edit.png' alt='"._("edit")."' name='appl_edit_%KEY%' title='"._("Edit this entry")."'>";
498 $actions.= "<input class='center' type='image'
499 src='images/edittrash.png' alt='"._("delete")."' name='appl_del_%KEY%' title='"._("Delete this entry")."'>";
500 }else{
502 $actions = "<input class='center' type='image'
503 src='images/edit.png' alt='"._("edit")."' name='appl_edit_%KEY%' title='"._("Edit this entry")."'>";
504 $actions.= "<input class='center' type='image'
505 src='images/edittrash.png' alt='"._("delete")."' name='appl_del_%KEY%' title='"._("Delete this entry")."'>";
506 }
509 // Defining Links
510 $linkopen = "<a href='?plug=".$_GET['plug']."&act=dep_open&dep_id=%s'>%s</a>";
512 // image Buttons
513 $editlink = "<a href='?plug=".$_GET['plug']."&id=%s&act=edit_entry'>%s</a>";
514 $userimg = "<img class='center' src='images/select_groups.png' alt='User' title='%s'>";
516 // Extension images
517 $applimg = "<img class='center' src='images/select_application.png' alt='A' title='"._("Application")."'>";
519 // Space
520 $empty = "<img class='center' src='images/empty.png' style='width:16px;height:16px;' alt=''>";
523 $divlist = new divlist("applicationtabs");
524 $divlist->SetHeader(array(
525 array("string" => " ", "attach" => "style='text-align:center;width:20px;'"),
526 array("string" => _("Application name")." / "._("Department"), "attach" => "style=''"),
527 array("string" => _("Actions"), "attach" => "style='width:80px;border-right:0px;text-align:right;'")
528 ));
531 $divlist->SetSummary(_("This table displays all groups, in the selected tree."));
532 $divlist->SetEntriesPerPage(0);
534 foreach($this->departments as $key=> $val){
536 if(!isset($this->config->departments[trim($key)])){
537 $this->config->departments[trim($key)]="";
538 }
540 $non_empty="";
541 $keys= str_replace("/","\/",$key);
542 foreach($this->config->departments as $keyd=>$vald ){
543 if(preg_match("/".$keys."\/.*/",$keyd)){
544 $non_empty="full";
545 }
546 }
548 $field1 = array("string" => "<img src='images/".$non_empty."folder.png' alt='department'>", "attach" => "style='text-align:center;width:20px;'");
549 $field2 = array("string" => sprintf($linkopen,base64_encode($key),$val), "attach" => "style=''");
550 $field3 = array("string" => " ", "attach" => "style='width:80px;border-right:0px;text-align:right;'");
552 $divlist->AddEntry(array($field1,$field2,$field3));
553 }
555 foreach($this->applications as $key => $val){
556 $title = "title='dn: ".@LDAP::fix($val['dn'])."'";
558 if(!isset($val['description'][0])){
559 $desc = "";
560 }else{
561 $desc = " - [ ".$val['description'][0]." ]";
562 }
563 $field1 = array("string" => sprintf($applimg,$val['dn']), "attach" => "style='text-align:center;width:20px;'");
564 $field2 = array("string" => sprintf($editlink,$key,($val['cn']['0'].$desc)), "attach" => "style='' ".$title);
565 $field3 = array("string" => preg_replace("/%KEY%/", $key, $actions), "attach" => "style='width:80px;border-right:0px;text-align:right;'");
567 $divlist->AddEntry(array($field1,$field2,$field3));
568 }
570 $smarty->assign("applicationshead", $listhead);
571 $smarty->assign("applications", $divlist->DrawList());
572 $smarty->assign("search_image", get_template_path('images/search.png'));
573 $smarty->assign("tree_image", get_template_path('images/tree.png'));
574 $smarty->assign("infoimage", get_template_path('images/info.png'));
575 $smarty->assign("launchimage", get_template_path('images/launch.png'));
576 $smarty->assign("releaseimage" , get_template_path('images/branch.png'));
577 $smarty->assign("deplist", $this->config->idepartments);
578 $smarty->assign("regex", $appfilter['regex']);
580 if($this->enableReleaseManagement){
581 $smarty->assign("releases", $this->Releases );
582 $smarty->assign("releaseKeys", array_flip($this->Releases));
583 $smarty->assign("select_release",$this->Release);
584 }
586 $smarty->assign("enableReleaseManagement",$this->enableReleaseManagement);
588 /* Extend if we are not using javascript */
589 $smarty->assign("apply", apply_filter());
590 $smarty->assign("alphabet", generate_alphabet());
591 $smarty->assign("hint", print_sizelimit_warning());
593 return($smarty->fetch(get_template_path('headpage.tpl', TRUE)));
594 }
597 function reload()
598 {
599 /* Get config */
600 $appfilter= get_global('appfilter');
602 /* Set base for all searches */
603 $base= $this->Release;
605 /* Regex filter? */
606 if ($appfilter['regex'] != ""){
607 $regex= $appfilter['regex'];
608 } else {
609 $regex= "*";
610 }
612 /* Generate application list */
613 //FIXME: No GL_SIZELIMIT?
614 $res= get_list("(&(cn=$regex)(objectClass=gosaApplication))", $this->ui->subtreeACL,
615 $base, array("*"), GL_NONE);
616 $this->applications= array();
617 foreach ($res as $value){
618 $this->applications[]= $value;
619 }
620 reset ($this->applications);
624 /* NEW LIST MANAGMENT
625 * We also need to search for the departments
626 * So we are able to navigate like in konquerer
627 */
628 $peopleOU = get_people_ou();
629 $base2 = $_SESSION['CurrentMainBase'];
631 /* Get all departments within this subtree */
632 $deps= get_list("(&(|(ou=$regex)(description=$regex))(objectClass=gosaDepartment))", $this->ui->subtreeACL,
633 $base2, array("ou", "description"), GL_SIZELIMIT | GL_CONVERT);
635 $this->departments = array();
636 foreach($deps as $value){
637 if(isset($value['description'][0])){
638 $this->departments[$value['dn']]= get_sub_department($value['dn'])." - [".$value["description"][0]."]";
639 }else{
640 $this->departments[$value['dn']]= get_sub_department($value['dn']);
641 }
642 }
643 natcasesort($this->departments);
644 /* END NEW LIST MANAGMENT
645 */
647 $tmp=array();
648 foreach($this->applications as $tkey => $val ){
649 $tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$val;
650 }
651 ksort($tmp);
652 $this->applications=array();
653 foreach($tmp as $val){
654 $this->applications[]=$val;
655 }
656 reset ($this->applications);
659 }
661 function remove_from_parent()
662 {
663 /* Optionally execute a command after we're done */
664 $this->postremove();
665 }
668 /* Save data to object */
669 function save_object()
670 {
671 }
674 /* Check values */
675 function check()
676 {
677 }
680 /* Save to LDAP */
681 function save()
682 {
683 /* Optionally execute a command after we're done */
684 $this->postcreate();
685 }
687 function adapt_from_template($dn)
688 {
689 }
691 function password_change_needed()
692 {
693 }
695 function show_header($button_text, $text, $disabled= FALSE)
696 {
697 }
699 function remove_lock()
700 {
701 if (isset($this->apptabs->dn)){
702 del_lock ($this->apptabs->dn);
703 }
704 }
706 }
707 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
708 ?>