55b16c7df4ed6135bc32ec4a0db1c6bedec8783d
1 <?php
2 class logonManagementDialog extends plugin
3 {
4 /* CLI vars */
5 var $cli_summary = "Manage server basic objects";
6 var $cli_description = "Some longer text\nfor help";
7 var $cli_parameters = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
9 /* attribute list for save action */
10 var $ignore_account = TRUE;
11 var $attributes = array("LogonName","LogonPriority","LogonLast","LogonOverload","LogonData");
12 var $objectclasses = array("whatever");
13 var $use_existing = false;
15 var $LogonName =""; // Name for the LogonScript
16 var $LogonPriority =""; // Priority defines the order in which the scripts will be processed
17 var $LogonLast =""; // Is this script marked as the last, all following scripts will be skipped
18 var $LogonOverload =""; // If Overload is activated this script is overlaodable by a group script with same prio
19 var $LogonData =""; // The script itself
21 function logonManagementDialog ($config, $dn= NULL,$use_existing=false )
22 {
23 $this->use_existing = $use_existing;
24 plugin::plugin ($config, $dn);
25 }
27 function execute()
28 {
29 $smarty= get_smarty();
30 $display= "";
32 foreach($this->attributes as $attr){
33 $smarty->assign($attr,$this->$attr);
34 if($this->$attr){
35 $smarty->assign($attr."CHK"," checked ");
36 }else{
37 $smarty->assign($attr."CHK","");
38 }
39 }
40 $prios=array(1,2,3,4,5,6,7,8,9,10);
41 $smarty->assign("LogonPrioritys",$prios);
42 $smarty->assign("LogonPriorityKeys",$prios);
43 $display.= $smarty->fetch(get_template_path('logonManagement.tpl', TRUE,dirname(__FILE__)));
44 return($display);
45 }
47 function save_object()
48 {
49 if(isset($_POST['dialogissubmitted'])){
50 foreach($this->attributes as $attr){
51 if(isset($_POST[$attr])){
52 $this->$attr= $_POST[$attr];
53 }else{
54 $this->$attr = false;
55 }
56 }
57 }
58 }
60 function save()
61 {
62 $a_return= array();
63 foreach($this->attributes as $attr){
64 $a_return[$attr]=$this->$attr;
65 }
66 return($a_return);
67 }
69 }
70 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
71 ?>