1+ <?php
2+
3+ /*
4+ Form Definition
5+
6+ Tabledefinition
7+
8+ Datatypes:
9+ - INTEGER (Forces the input to Int)
10+ - DOUBLE
11+ - CURRENCY (Formats the values to currency notation)
12+ - VARCHAR (no format check, maxlength: 255)
13+ - TEXT (no format check)
14+ - DATE (Dateformat, automatic conversion to timestamps)
15+
16+ Formtype:
17+ - TEXT (Textfield)
18+ - TEXTAREA (Textarea)
19+ - PASSWORD (Password textfield, input is not shown when edited)
20+ - SELECT (Select option field)
21+ - RADIO
22+ - CHECKBOX
23+ - CHECKBOXARRAY
24+ - FILE
25+
26+ VALUE:
27+ - Wert oder Array
28+
29+ Hint:
30+ The ID field of the database table is not part of the datafield definition.
31+ The ID field must be always auto incement (int or bigint).
32+
33+
34+ */
35+
36+ $ form ["title " ] = "Spamfilter Config " ;
37+ $ form ["description " ] = "" ;
38+ $ form ["name " ] = "spamfilter_config " ;
39+ $ form ["action " ] = "spamfilter_config_edit.php " ;
40+ $ form ["db_table " ] = "server " ;
41+ $ form ["db_table_idx " ] = "server_id " ;
42+ $ form ["db_history " ] = "yes " ;
43+ $ form ["tab_default " ] = "mail " ;
44+ $ form ["list_default " ] = "spamfilter_config_list.php " ;
45+ $ form ["auth " ] = 'yes ' ; // yes / no
46+
47+ $ form ["auth_preset " ]["userid " ] = 0 ; // 0 = id of the user, > 0 id must match with id of current user
48+ $ form ["auth_preset " ]["groupid " ] = 0 ; // 0 = default groupid of the user, > 0 id must match with groupid of current user
49+ $ form ["auth_preset " ]["perm_user " ] = 'riud ' ; //r = read, i = insert, u = update, d = delete
50+ $ form ["auth_preset " ]["perm_group " ] = 'riud ' ; //r = read, i = insert, u = update, d = delete
51+ $ form ["auth_preset " ]["perm_other " ] = '' ; //r = read, i = insert, u = update, d = delete
52+
53+ $ form ["tabs " ]['mail ' ] = array (
54+ 'title ' => "Mailserver " ,
55+ 'width ' => 100 ,
56+ 'template ' => "templates/spamfilter_config_mail_edit.htm " ,
57+ 'fields ' => array (
58+ ##################################
59+ # Begin Datatable fields
60+ ##################################
61+ 'module ' => array (
62+ 'datatype ' => 'VARCHAR ' ,
63+ 'formtype ' => 'SELECT ' ,
64+ 'default ' => '' ,
65+ 'value ' => array ('postfix_mysql ' => 'postfix_mysql ' )
66+ ),
67+ 'maildir_path ' => array (
68+ 'datatype ' => 'VARCHAR ' ,
69+ 'formtype ' => 'TEXT ' ,
70+ 'default ' => '/home/vmail/[domain]/[localpart]/ ' ,
71+ 'validators ' => array ( 0 => array ( 'type ' => 'NOTEMPTY ' ,
72+ 'errmsg ' => 'maildir_path_error_empty ' ),
73+ ),
74+ 'value ' => '' ,
75+ 'width ' => '40 ' ,
76+ 'maxlength ' => '255 '
77+ ),
78+ 'homedir_path ' => array (
79+ 'datatype ' => 'VARCHAR ' ,
80+ 'formtype ' => 'TEXT ' ,
81+ 'default ' => '/home/vmail/ ' ,
82+ 'validators ' => array ( 0 => array ( 'type ' => 'NOTEMPTY ' ,
83+ 'errmsg ' => 'homedir_path_error_empty ' ),
84+ ),
85+ 'value ' => '' ,
86+ 'width ' => '40 ' ,
87+ 'maxlength ' => '255 '
88+ ),
89+ 'mailuser_uid ' => array (
90+ 'datatype ' => 'INTEGER ' ,
91+ 'formtype ' => 'TEXT ' ,
92+ 'default ' => '5000 ' ,
93+ 'validators ' => array ( 0 => array ( 'type ' => 'NOTEMPTY ' ,
94+ 'errmsg ' => 'mailuser_uid_error_empty ' ),
95+ ),
96+ 'value ' => '' ,
97+ 'width ' => '10 ' ,
98+ 'maxlength ' => '255 '
99+ ),
100+ 'mailuser_gid ' => array (
101+ 'datatype ' => 'INTEGER ' ,
102+ 'formtype ' => 'TEXT ' ,
103+ 'default ' => '5000 ' ,
104+ 'validators ' => array ( 0 => array ( 'type ' => 'NOTEMPTY ' ,
105+ 'errmsg ' => 'mailuser_gid_error_empty ' ),
106+ ),
107+ 'value ' => '' ,
108+ 'width ' => '10 ' ,
109+ 'maxlength ' => '255 '
110+ ),
111+ 'mailuser_name ' => array (
112+ 'datatype ' => 'VARCHAR ' ,
113+ 'formtype ' => 'TEXT ' ,
114+ 'default ' => 'vmail ' ,
115+ 'validators ' => array ( 0 => array ( 'type ' => 'NOTEMPTY ' ,
116+ 'errmsg ' => 'mailuser_name_error_empty ' ),
117+ ),
118+ 'value ' => '' ,
119+ 'width ' => '10 ' ,
120+ 'maxlength ' => '255 '
121+ ),
122+ 'mailuser_group ' => array (
123+ 'datatype ' => 'VARCHAR ' ,
124+ 'formtype ' => 'TEXT ' ,
125+ 'default ' => 'vmail ' ,
126+ 'validators ' => array ( 0 => array ( 'type ' => 'NOTEMPTY ' ,
127+ 'errmsg ' => 'mailuser_group_error_empty ' ),
128+ ),
129+ 'value ' => '' ,
130+ 'width ' => '10 ' ,
131+ 'maxlength ' => '255 '
132+ ),
133+ 'relayhost ' => array (
134+ 'datatype ' => 'VARCHAR ' ,
135+ 'formtype ' => 'TEXT ' ,
136+ 'default ' => '' ,
137+ 'value ' => '' ,
138+ 'width ' => '40 ' ,
139+ 'maxlength ' => '255 '
140+ ),
141+ 'relayhost_user ' => array (
142+ 'datatype ' => 'VARCHAR ' ,
143+ 'formtype ' => 'TEXT ' ,
144+ 'default ' => '' ,
145+ 'value ' => '' ,
146+ 'width ' => '40 ' ,
147+ 'maxlength ' => '255 '
148+ ),
149+ 'relayhost_password ' => array (
150+ 'datatype ' => 'VARCHAR ' ,
151+ 'formtype ' => 'TEXT ' ,
152+ 'default ' => '' ,
153+ 'value ' => '' ,
154+ 'width ' => '40 ' ,
155+ 'maxlength ' => '255 '
156+ ),
157+ 'mailbox_size_limit ' => array (
158+ 'datatype ' => 'INTEGER ' ,
159+ 'formtype ' => 'TEXT ' ,
160+ 'default ' => '0 ' ,
161+ 'value ' => '' ,
162+ 'width ' => '10 ' ,
163+ 'maxlength ' => '15 '
164+ ),
165+ 'message_size_limit ' => array (
166+ 'datatype ' => 'INTEGER ' ,
167+ 'formtype ' => 'TEXT ' ,
168+ 'default ' => '0 ' ,
169+ 'value ' => '' ,
170+ 'width ' => '10 ' ,
171+ 'maxlength ' => '15 '
172+ ),
173+ ##################################
174+ # ENDE Datatable fields
175+ ##################################
176+ )
177+ );
178+
179+
180+ ?>
0 commit comments