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 " ] = "Get Email " ;
37+ $ form ["description " ] = "" ;
38+ $ form ["name " ] = "mail_get " ;
39+ $ form ["action " ] = "mail_get_edit.php " ;
40+ $ form ["db_table " ] = "mail_get " ;
41+ $ form ["db_table_idx " ] = "mailget_id " ;
42+ $ form ["db_history " ] = "yes " ;
43+ $ form ["tab_default " ] = "mailget " ;
44+ $ form ["list_default " ] = "mail_get_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 " ]['mailget ' ] = array (
54+ 'title ' => "Get email " ,
55+ 'width ' => 100 ,
56+ 'template ' => "templates/mail_get_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+ 'type ' => array (
73+ 'datatype ' => 'VARCHAR ' ,
74+ 'formtype ' => 'SELECT ' ,
75+ 'default ' => '' ,
76+ 'value ' => array ('pop3 ' => 'POP3 ' ,'imap ' =>'IMAP ' )
77+ ),
78+ 'source_server ' => array (
79+ 'datatype ' => 'VARCHAR ' ,
80+ 'formtype ' => 'TEXT ' ,
81+ 'validators ' => array ( 0 => array ( 'type ' => 'NOTEMPTY ' ,
82+ 'errmsg ' => 'source_server_error_isempty ' ),
83+ ),
84+ 'default ' => '' ,
85+ 'value ' => '' ,
86+ 'width ' => '30 ' ,
87+ 'maxlength ' => '255 '
88+ ),
89+ 'source_username ' => array (
90+ 'datatype ' => 'VARCHAR ' ,
91+ 'formtype ' => 'TEXT ' ,
92+ 'validators ' => array ( 0 => array ( 'type ' => 'NOTEMPTY ' ,
93+ 'errmsg ' => 'source_username_error_isempty ' ),
94+ ),
95+ 'default ' => '' ,
96+ 'value ' => '' ,
97+ 'width ' => '30 ' ,
98+ 'maxlength ' => '255 '
99+ ),
100+ 'source_password ' => array (
101+ 'datatype ' => 'VARCHAR ' ,
102+ 'formtype ' => 'TEXT ' ,
103+ 'validators ' => array ( 0 => array ( 'type ' => 'NOTEMPTY ' ,
104+ 'errmsg ' => 'source_password_error_isempty ' ),
105+ ),
106+ 'default ' => '' ,
107+ 'value ' => '' ,
108+ 'width ' => '30 ' ,
109+ 'maxlength ' => '255 '
110+ ),
111+ 'source_delete ' => array (
112+ 'datatype ' => 'VARCHAR ' ,
113+ 'formtype ' => 'CHECKBOX ' ,
114+ 'default ' => 'y ' ,
115+ 'value ' => array (0 => 'n ' ,1 => 'y ' )
116+ ),
117+ 'destination ' => array (
118+ 'datatype ' => 'VARCHAR ' ,
119+ 'formtype ' => 'SELECT ' ,
120+ 'default ' => '' ,
121+ 'datasource ' => array ( 'type ' => 'SQL ' ,
122+ 'querystring ' => 'SELECT email FROM mail_user WHERE {AUTHSQL} ORDER BY email ' ,
123+ 'keyfield ' => 'email ' ,
124+ 'valuefield ' => 'email '
125+ ),
126+ 'validators ' => array ( 0 => array ( 'type ' => 'ISEMAIL ' ,
127+ 'errmsg ' => 'destination_error_isemail ' ),
128+ ),
129+ 'value ' => ''
130+ ),
131+ 'active ' => array (
132+ 'datatype ' => 'VARCHAR ' ,
133+ 'formtype ' => 'CHECKBOX ' ,
134+ 'default ' => 'y ' ,
135+ 'value ' => array (0 => 'n ' ,1 => 'y ' )
136+ ),
137+ ##################################
138+ # ENDE Datatable fields
139+ ##################################
140+ )
141+ );
142+
143+
144+
145+ ?>
0 commit comments