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 policy " ;
37+ $ form ["description " ] = "" ;
38+ $ form ["name " ] = "spamfilter_policy " ;
39+ $ form ["action " ] = "spamfilter_policy_edit.php " ;
40+ $ form ["db_table " ] = "spamfilter_policy " ;
41+ $ form ["db_table_idx " ] = "id " ;
42+ $ form ["db_history " ] = "yes " ;
43+ $ form ["tab_default " ] = "policy " ;
44+ $ form ["list_default " ] = "spamfilter_policy_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 " ]['policy ' ] = array (
54+ 'title ' => "Policy " ,
55+ 'width ' => 100 ,
56+ 'template ' => "templates/spamfilter_policy_edit.htm " ,
57+ 'fields ' => array (
58+ ##################################
59+ # Begin Datatable fields
60+ ##################################
61+ 'policy_name ' => array (
62+ 'datatype ' => 'VARCHAR ' ,
63+ 'formtype ' => 'TEXT ' ,
64+ 'default ' => '' ,
65+ 'validators ' => array ( 0 => array ( 'type ' => 'NOTEMPTY ' ,
66+ 'errmsg ' => 'policyname_error_notempty ' ),
67+ ),
68+ 'value ' => '' ,
69+ 'width ' => '30 ' ,
70+ 'maxlength ' => '255 '
71+ ),
72+ 'virus_lover ' => array (
73+ 'datatype ' => 'VARCHAR ' ,
74+ 'formtype ' => 'SELECT ' ,
75+ 'default ' => 'N ' ,
76+ 'value ' => array ('N ' => 'No ' ,'Y ' => 'Yes ' )
77+ ),
78+ 'spam_lover ' => array (
79+ 'datatype ' => 'VARCHAR ' ,
80+ 'formtype ' => 'SELECT ' ,
81+ 'default ' => 'N ' ,
82+ 'value ' => array ('N ' => 'No ' ,'Y ' => 'Yes ' )
83+ ),
84+ 'banned_files_lover ' => array (
85+ 'datatype ' => 'VARCHAR ' ,
86+ 'formtype ' => 'SELECT ' ,
87+ 'default ' => 'N ' ,
88+ 'value ' => array ('N ' => 'No ' ,'Y ' => 'Yes ' )
89+ ),
90+ 'bad_header_lover ' => array (
91+ 'datatype ' => 'VARCHAR ' ,
92+ 'formtype ' => 'SELECT ' ,
93+ 'default ' => 'N ' ,
94+ 'value ' => array ('N ' => 'No ' ,'Y ' => 'Yes ' )
95+ ),
96+ 'bypass_virus_checks ' => array (
97+ 'datatype ' => 'VARCHAR ' ,
98+ 'formtype ' => 'SELECT ' ,
99+ 'default ' => 'N ' ,
100+ 'value ' => array ('N ' => 'No ' ,'Y ' => 'Yes ' )
101+ ),
102+ 'bypass_banned_checks ' => array (
103+ 'datatype ' => 'VARCHAR ' ,
104+ 'formtype ' => 'SELECT ' ,
105+ 'default ' => 'N ' ,
106+ 'value ' => array ('N ' => 'No ' ,'Y ' => 'Yes ' )
107+ ),
108+ 'bypass_header_checks ' => array (
109+ 'datatype ' => 'VARCHAR ' ,
110+ 'formtype ' => 'SELECT ' ,
111+ 'default ' => 'N ' ,
112+ 'value ' => array ('N ' => 'No ' ,'Y ' => 'Yes ' )
113+ ),
114+ ##################################
115+ # ENDE Datatable fields
116+ ##################################
117+ )
118+ );
119+
120+
121+ $ form ["tabs " ]['quarantine ' ] = array (
122+ 'title ' => "Quarantine " ,
123+ 'width ' => 100 ,
124+ 'template ' => "templates/spamfilter_quarantine_edit.htm " ,
125+ 'fields ' => array (
126+ ##################################
127+ # Begin Datatable fields
128+ ##################################
129+ 'virus_quarantine_to ' => array (
130+ 'datatype ' => 'VARCHAR ' ,
131+ 'formtype ' => 'TEXT ' ,
132+ 'default ' => '' ,
133+ 'value ' => '' ,
134+ 'width ' => '30 ' ,
135+ 'maxlength ' => '255 '
136+ ),
137+ 'spam_quarantine_to ' => array (
138+ 'datatype ' => 'VARCHAR ' ,
139+ 'formtype ' => 'TEXT ' ,
140+ 'default ' => '' ,
141+ 'value ' => '' ,
142+ 'width ' => '30 ' ,
143+ 'maxlength ' => '255 '
144+ ),
145+ 'banned_quarantine_to ' => array (
146+ 'datatype ' => 'VARCHAR ' ,
147+ 'formtype ' => 'TEXT ' ,
148+ 'default ' => '' ,
149+ 'value ' => '' ,
150+ 'width ' => '30 ' ,
151+ 'maxlength ' => '255 '
152+ ),
153+ 'bad_header_quarantine_to ' => array (
154+ 'datatype ' => 'VARCHAR ' ,
155+ 'formtype ' => 'TEXT ' ,
156+ 'default ' => '' ,
157+ 'value ' => '' ,
158+ 'width ' => '30 ' ,
159+ 'maxlength ' => '255 '
160+ ),
161+ 'clean_quarantine_to ' => array (
162+ 'datatype ' => 'VARCHAR ' ,
163+ 'formtype ' => 'TEXT ' ,
164+ 'default ' => '' ,
165+ 'value ' => '' ,
166+ 'width ' => '30 ' ,
167+ 'maxlength ' => '255 '
168+ ),
169+ 'other_quarantine_to ' => array (
170+ 'datatype ' => 'VARCHAR ' ,
171+ 'formtype ' => 'TEXT ' ,
172+ 'default ' => '' ,
173+ 'value ' => '' ,
174+ 'width ' => '30 ' ,
175+ 'maxlength ' => '255 '
176+ ),
177+ ##################################
178+ # ENDE Datatable fields
179+ ##################################
180+ )
181+ );
182+
183+ $ form ["tabs " ]['taglevel ' ] = array (
184+ 'title ' => "Tag-Level " ,
185+ 'width ' => 100 ,
186+ 'template ' => "templates/spamfilter_taglevel_edit.htm " ,
187+ 'fields ' => array (
188+ ##################################
189+ # Begin Datatable fields
190+ ##################################
191+ 'spam_tag_level ' => array (
192+ 'datatype ' => 'DOUBLE ' ,
193+ 'formtype ' => 'TEXT ' ,
194+ 'default ' => '0 ' ,
195+ 'value ' => '' ,
196+ 'width ' => '10 ' ,
197+ 'maxlength ' => '255 '
198+ ),
199+ 'spam_tag2_level ' => array (
200+ 'datatype ' => 'DOUBLE ' ,
201+ 'formtype ' => 'TEXT ' ,
202+ 'default ' => '0 ' ,
203+ 'value ' => '' ,
204+ 'width ' => '10 ' ,
205+ 'maxlength ' => '255 '
206+ ),
207+ 'spam_kill_level ' => array (
208+ 'datatype ' => 'DOUBLE ' ,
209+ 'formtype ' => 'TEXT ' ,
210+ 'default ' => '0 ' ,
211+ 'value ' => '' ,
212+ 'width ' => '10 ' ,
213+ 'maxlength ' => '255 '
214+ ),
215+ 'spam_dsn_cutoff_level ' => array (
216+ 'datatype ' => 'DOUBLE ' ,
217+ 'formtype ' => 'TEXT ' ,
218+ 'default ' => '0 ' ,
219+ 'value ' => '' ,
220+ 'width ' => '10 ' ,
221+ 'maxlength ' => '255 '
222+ ),
223+ 'spam_quarantine_cutoff_level ' => array (
224+ 'datatype ' => 'DOUBLE ' ,
225+ 'formtype ' => 'TEXT ' ,
226+ 'default ' => '0 ' ,
227+ 'value ' => '' ,
228+ 'width ' => '10 ' ,
229+ 'maxlength ' => '255 '
230+ ),
231+ 'spam_modifies_subj ' => array (
232+ 'datatype ' => 'VARCHAR ' ,
233+ 'formtype ' => 'SELECT ' ,
234+ 'default ' => 'N ' ,
235+ 'value ' => array ('N ' => 'No ' ,'Y ' => 'Yes ' )
236+ ),
237+ 'spam_subject_tag ' => array (
238+ 'datatype ' => 'VARCHAR ' ,
239+ 'formtype ' => 'TEXT ' ,
240+ 'default ' => '' ,
241+ 'value ' => '' ,
242+ 'width ' => '30 ' ,
243+ 'maxlength ' => '255 '
244+ ),
245+ 'spam_subject_tag2 ' => array (
246+ 'datatype ' => 'VARCHAR ' ,
247+ 'formtype ' => 'TEXT ' ,
248+ 'default ' => '' ,
249+ 'value ' => '' ,
250+ 'width ' => '30 ' ,
251+ 'maxlength ' => '255 '
252+ ),
253+ ##################################
254+ # ENDE Datatable fields
255+ ##################################
256+ )
257+ );
258+
259+
260+ $ form ["tabs " ]['other ' ] = array (
261+ 'title ' => "Other " ,
262+ 'width ' => 100 ,
263+ 'template ' => "templates/spamfilter_other_edit.htm " ,
264+ 'fields ' => array (
265+ ##################################
266+ # Begin Datatable fields
267+ ##################################
268+ 'addr_extension_virus ' => array (
269+ 'datatype ' => 'VARCHAR ' ,
270+ 'formtype ' => 'TEXT ' ,
271+ 'default ' => '' ,
272+ 'value ' => '' ,
273+ 'width ' => '30 ' ,
274+ 'maxlength ' => '255 '
275+ ),
276+ 'addr_extension_spam ' => array (
277+ 'datatype ' => 'VARCHAR ' ,
278+ 'formtype ' => 'TEXT ' ,
279+ 'default ' => '' ,
280+ 'value ' => '' ,
281+ 'width ' => '30 ' ,
282+ 'maxlength ' => '255 '
283+ ),
284+ 'addr_extension_banned ' => array (
285+ 'datatype ' => 'VARCHAR ' ,
286+ 'formtype ' => 'TEXT ' ,
287+ 'default ' => '' ,
288+ 'value ' => '' ,
289+ 'width ' => '30 ' ,
290+ 'maxlength ' => '255 '
291+ ),
292+ 'addr_extension_bad_header ' => array (
293+ 'datatype ' => 'VARCHAR ' ,
294+ 'formtype ' => 'TEXT ' ,
295+ 'default ' => '' ,
296+ 'value ' => '' ,
297+ 'width ' => '30 ' ,
298+ 'maxlength ' => '255 '
299+ ),
300+ 'warnvirusrecip ' => array (
301+ 'datatype ' => 'VARCHAR ' ,
302+ 'formtype ' => 'SELECT ' ,
303+ 'default ' => 'N ' ,
304+ 'value ' => array ('N ' => 'No ' ,'Y ' => 'Yes ' )
305+ ),
306+ 'warnbannedrecip ' => array (
307+ 'datatype ' => 'VARCHAR ' ,
308+ 'formtype ' => 'SELECT ' ,
309+ 'default ' => 'N ' ,
310+ 'value ' => array ('N ' => 'No ' ,'Y ' => 'Yes ' )
311+ ),
312+ 'warnbadhrecip ' => array (
313+ 'datatype ' => 'VARCHAR ' ,
314+ 'formtype ' => 'SELECT ' ,
315+ 'default ' => 'N ' ,
316+ 'value ' => array ('N ' => 'No ' ,'Y ' => 'Yes ' )
317+ ),
318+ 'newvirus_admin ' => array (
319+ 'datatype ' => 'VARCHAR ' ,
320+ 'formtype ' => 'TEXT ' ,
321+ 'default ' => '' ,
322+ 'value ' => '' ,
323+ 'width ' => '30 ' ,
324+ 'maxlength ' => '255 '
325+ ),
326+ 'virus_admin ' => array (
327+ 'datatype ' => 'VARCHAR ' ,
328+ 'formtype ' => 'TEXT ' ,
329+ 'default ' => '' ,
330+ 'value ' => '' ,
331+ 'width ' => '30 ' ,
332+ 'maxlength ' => '255 '
333+ ),
334+ 'banned_admin ' => array (
335+ 'datatype ' => 'VARCHAR ' ,
336+ 'formtype ' => 'TEXT ' ,
337+ 'default ' => '' ,
338+ 'value ' => '' ,
339+ 'width ' => '30 ' ,
340+ 'maxlength ' => '255 '
341+ ),
342+ 'bad_header_admin ' => array (
343+ 'datatype ' => 'VARCHAR ' ,
344+ 'formtype ' => 'TEXT ' ,
345+ 'default ' => '' ,
346+ 'value ' => '' ,
347+ 'width ' => '30 ' ,
348+ 'maxlength ' => '255 '
349+ ),
350+ 'spam_admin ' => array (
351+ 'datatype ' => 'VARCHAR ' ,
352+ 'formtype ' => 'TEXT ' ,
353+ 'default ' => '' ,
354+ 'value ' => '' ,
355+ 'width ' => '30 ' ,
356+ 'maxlength ' => '255 '
357+ ),
358+
359+ 'message_size_limit ' => array (
360+ 'datatype ' => 'INTEGER ' ,
361+ 'formtype ' => 'TEXT ' ,
362+ 'default ' => '' ,
363+ 'value ' => '' ,
364+ 'width ' => '10 ' ,
365+ 'maxlength ' => '255 '
366+ ),
367+ 'banned_rulenames ' => array (
368+ 'datatype ' => 'VARCHAR ' ,
369+ 'formtype ' => 'TEXT ' ,
370+ 'default ' => '' ,
371+ 'value ' => '' ,
372+ 'width ' => '30 ' ,
373+ 'maxlength ' => '255 '
374+ ),
375+
376+ ##################################
377+ # ENDE Datatable fields
378+ ##################################
379+ )
380+ );
381+
382+ ?>
0 commit comments