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 users " ;
37+ $ form ["description " ] = "" ;
38+ $ form ["name " ] = "spamfilter_users " ;
39+ $ form ["action " ] = "spamfilter_users_edit.php " ;
40+ $ form ["db_table " ] = "spamfilter_users " ;
41+ $ form ["db_table_idx " ] = "id " ;
42+ $ form ["db_history " ] = "yes " ;
43+ $ form ["tab_default " ] = "users " ;
44+ $ form ["list_default " ] = "spamfilter_users_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 " ]['users ' ] = array (
54+ 'title ' => "Users " ,
55+ 'width ' => 100 ,
56+ 'template ' => "templates/spamfilter_users_edit.htm " ,
57+ 'fields ' => array (
58+ ##################################
59+ # Begin Datatable fields
60+ ##################################
61+ 'server_id ' => array (
62+ 'datatype ' => 'INTEGER ' ,
63+ 'formtype ' => 'SELECT ' ,
64+ 'default ' => '' ,
65+ 'datasource ' => array ( 'type ' => 'SQL ' ,
66+ 'querystring ' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name ' ,
67+ 'keyfield ' => 'server_id ' ,
68+ 'valuefield ' => 'server_name '
69+ ),
70+ 'value ' => ''
71+ ),
72+ 'priority ' => array (
73+ 'datatype ' => 'INTEGER ' ,
74+ 'formtype ' => 'SELECT ' ,
75+ 'default ' => 5 ,
76+ 'value ' => array (1 => 1 , 2 => 2 , 3 => 3 , 4 => 4 , 5 => 5 , 6 => 6 , 7 => 7 , 8 => 8 , 9 => 9 , 10 => 10 )
77+ ),
78+ 'policy_id ' => array (
79+ 'datatype ' => 'INTEGER ' ,
80+ 'formtype ' => 'SELECT ' ,
81+ 'default ' => '' ,
82+ 'datasource ' => array ( 'type ' => 'SQL ' ,
83+ 'querystring ' => 'SELECT id,policy_name FROM spamfilter_policy WHERE {AUTHSQL} ORDER BY policy_name ' ,
84+ 'keyfield ' => 'id ' ,
85+ 'valuefield ' => 'policy_name '
86+ ),
87+ 'value ' => ''
88+ ),
89+ 'email ' => array (
90+ 'datatype ' => 'VARCHAR ' ,
91+ 'formtype ' => 'TEXT ' ,
92+ 'default ' => '' ,
93+ 'validators ' => array ( 0 => array ( 'type ' => 'NOTEMPTY ' ,
94+ 'errmsg ' => 'email_error_notempty ' ),
95+ ),
96+ 'value ' => '' ,
97+ 'width ' => '30 ' ,
98+ 'maxlength ' => '255 '
99+ ),
100+ 'fullname ' => array (
101+ 'datatype ' => 'VARCHAR ' ,
102+ 'formtype ' => 'TEXT ' ,
103+ 'default ' => '' ,
104+ 'validators ' => array ( 0 => array ( 'type ' => 'NOTEMPTY ' ,
105+ 'errmsg ' => 'fullname_error_notempty ' ),
106+ ),
107+ 'value ' => '' ,
108+ 'width ' => '30 ' ,
109+ 'maxlength ' => '255 '
110+ ),
111+ 'local ' => array (
112+ 'datatype ' => 'VARCHAR ' ,
113+ 'formtype ' => 'SELECT ' ,
114+ 'default ' => 'Y ' ,
115+ 'value ' => array ('N ' => 'No ' ,'Y ' => 'Yes ' )
116+ ),
117+
118+ ##################################
119+ # ENDE Datatable fields
120+ ##################################
121+ )
122+ );
123+
124+
125+ ?>
0 commit comments