1 <?php
3 /*
4 This code is part of GOsa (https://gosa.gonicus.de)
5 Copyright (C) 2007 Fabian Hickert
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
23 class setup_step extends plugin
24 {
25 var $s_title = "Still undefined";
26 var $s_title_long = "This is a still undefined long title";
27 var $s_info = "This info is still undefined. This setup step detect the type of your ldap. This is a basic requirement for gosa.";
28 var $is_active = false;
29 var $is_enabled = false;
30 var $is_completed = false;
32 var $header_image = "images/personal.png";
34 var $attributes = array();
35 var $parent = NULL;
36 var $dialog = FALSE;
38 function setup_step()
39 {
40 }
42 function execute()
43 {
44 }
46 function save_object()
47 {
48 /* Do not call plugin::save_object. This causes acl trouble */
49 }
51 function get_title()
52 {
53 return($this->s_title);
54 }
56 function get_long_title()
57 {
58 return($this->s_title_long);
59 }
61 function get_small_info()
62 {
63 return($this->s_info);
64 }
66 function is_active()
67 {
68 return($this->is_active);
69 }
71 function is_enabled()
72 {
73 return($this->is_enabled);
74 }
76 function is_completed()
77 {
78 return($this->is_completed);
79 }
81 function set_active($value = TRUE)
82 {
83 if($value){
84 $this->is_active = TRUE;
85 }else{
86 $this->is_active = FALSE;
87 }
88 }
90 function set_enabled($value = TRUE)
91 {
92 if($value){
93 $this->is_enabled = TRUE;
94 }else{
95 $this->is_enabled = FALSE;
96 }
97 }
99 function set_completed($value = TRUE)
100 {
101 if($value){
102 $this->is_completed = TRUE;
103 }else{
104 $this->is_completed = FALSE;
105 }
106 }
108 /* Return attributes handled by this setup step */
109 function get_attributes()
110 {
111 $tmp = array();
112 foreach($this->attributes as $attr){
113 $tmp[$attr] = $this->$attr;
114 }
115 return($tmp);
116 }
118 function print_header()
119 {
120 $image= get_template_path($this->header_image);
121 $display= "<div style='padding:3px;'>";
122 $display.= " <p class=\"center\" style=\"margin:0px 0px 0px 5px;padding:0px;font-size:24px;\"><img class=\"center\" src=\"$image\" align=\"middle\" alt=\"*\"> ".$this->s_title_long."</p>\n";
123 $display.= "</div>\n";
125 return($display);
126 }
127 }
129 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
130 ?>