commit | author | age
|
32b40d
|
1 |
<?php |
T |
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). |
7fe908
|
32 |
|
59118c
|
33 |
Search: |
F |
34 |
- searchable = 1 or searchable = 2 include the field in the search |
|
35 |
- searchable = 1: this field will be the title of the search result |
|
36 |
- searchable = 2: this field will be included in the description of the search result |
32b40d
|
37 |
|
T |
38 |
|
|
39 |
*/ |
|
40 |
|
7fe908
|
41 |
$form["title"] = "Get Email"; |
MC |
42 |
$form["description"] = ""; |
|
43 |
$form["name"] = "mail_get"; |
|
44 |
$form["action"] = "mail_get_edit.php"; |
|
45 |
$form["db_table"] = "mail_get"; |
|
46 |
$form["db_table_idx"] = "mailget_id"; |
|
47 |
$form["db_history"] = "yes"; |
|
48 |
$form["tab_default"] = "mailget"; |
|
49 |
$form["list_default"] = "mail_get_list.php"; |
|
50 |
$form["auth"] = 'yes'; // yes / no |
32b40d
|
51 |
|
T |
52 |
$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user |
|
53 |
$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user |
|
54 |
$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete |
|
55 |
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete |
|
56 |
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete |
|
57 |
|
|
58 |
$form["tabs"]['mailget'] = array ( |
7fe908
|
59 |
'title' => "Get Email", |
MC |
60 |
'width' => 100, |
|
61 |
'template' => "templates/mail_get_edit.htm", |
|
62 |
'fields' => array ( |
|
63 |
//################################# |
|
64 |
// Begin Datatable fields |
|
65 |
//################################# |
32b40d
|
66 |
'server_id' => array ( |
7fe908
|
67 |
'datatype' => 'INTEGER', |
MC |
68 |
'formtype' => 'SELECT', |
|
69 |
'default' => '', |
|
70 |
'datasource' => array ( 'type' => 'SQL', |
d15bce
|
71 |
'querystring' => 'SELECT server_id,server_name FROM server WHERE mail_server = 1 AND mirror_server_id = 0 AND {AUTHSQL} ORDER BY server_name', |
7fe908
|
72 |
'keyfield'=> 'server_id', |
MC |
73 |
'valuefield'=> 'server_name' |
|
74 |
), |
|
75 |
'value' => '' |
32b40d
|
76 |
), |
T |
77 |
'type' => array ( |
7fe908
|
78 |
'datatype' => 'VARCHAR', |
MC |
79 |
'formtype' => 'SELECT', |
|
80 |
'default' => '', |
|
81 |
'value' => array('pop3' => 'POP3', 'imap'=>'IMAP', 'pop3ssl' => 'POP3SSL', 'imapssl'=>'IMAPSSL'), |
59118c
|
82 |
'searchable' => 2 |
32b40d
|
83 |
), |
T |
84 |
'source_server' => array ( |
7fe908
|
85 |
'datatype' => 'VARCHAR', |
MC |
86 |
'formtype' => 'TEXT', |
|
87 |
'filters' => array( 0 => array( 'event' => 'SAVE', |
|
88 |
'type' => 'IDNTOASCII'), |
|
89 |
1 => array( 'event' => 'SHOW', |
|
90 |
'type' => 'IDNTOUTF8'), |
|
91 |
2 => array( 'event' => 'SAVE', |
|
92 |
'type' => 'TOLOWER') |
|
93 |
), |
|
94 |
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
|
95 |
'errmsg'=> 'source_server_error_isempty'), |
|
96 |
1 => array ( 'type' => 'REGEX', |
91b6ac
|
97 |
'regex' => '/^([\w\.\-]{2,64}\.[a-zA-Z\-]{2,10}|(?:[0-9]{1,3}\.){3}[0-9]{1,3})$/', |
7fe908
|
98 |
'errmsg'=> 'source_server_error_regex'), |
MC |
99 |
), |
|
100 |
'default' => '', |
|
101 |
'value' => '', |
|
102 |
'width' => '30', |
|
103 |
'maxlength' => '255', |
59118c
|
104 |
'searchable' => 2 |
32b40d
|
105 |
), |
T |
106 |
'source_username' => array ( |
7fe908
|
107 |
'datatype' => 'VARCHAR', |
MC |
108 |
'formtype' => 'TEXT', |
|
109 |
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
|
110 |
'errmsg'=> 'source_username_error_isempty'), |
|
111 |
), |
|
112 |
'default' => '', |
|
113 |
'value' => '', |
|
114 |
'width' => '30', |
|
115 |
'maxlength' => '255', |
59118c
|
116 |
'searchable' => 2 |
32b40d
|
117 |
), |
T |
118 |
'source_password' => array ( |
7fe908
|
119 |
'datatype' => 'VARCHAR', |
MC |
120 |
'formtype' => 'TEXT', |
|
121 |
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
|
122 |
'errmsg'=> 'source_password_error_isempty'), |
|
123 |
), |
|
124 |
'default' => '', |
|
125 |
'value' => '', |
|
126 |
'width' => '30', |
|
127 |
'maxlength' => '255' |
32b40d
|
128 |
), |
T |
129 |
'source_delete' => array ( |
7fe908
|
130 |
'datatype' => 'VARCHAR', |
MC |
131 |
'formtype' => 'CHECKBOX', |
a246ff
|
132 |
'default' => 'n', |
7fe908
|
133 |
'value' => array(0 => 'n', 1 => 'y') |
32b40d
|
134 |
), |
1fbea9
|
135 |
'source_read_all' => array ( |
7fe908
|
136 |
'datatype' => 'VARCHAR', |
MC |
137 |
'formtype' => 'CHECKBOX', |
|
138 |
'default' => 'y', |
|
139 |
'value' => array(0 => 'n', 1 => 'y') |
1fbea9
|
140 |
), |
32b40d
|
141 |
'destination' => array ( |
7fe908
|
142 |
'datatype' => 'VARCHAR', |
MC |
143 |
'formtype' => 'SELECT', |
|
144 |
'filters' => array( 0 => array( 'event' => 'SAVE', |
|
145 |
'type' => 'IDNTOASCII'), |
|
146 |
1 => array( 'event' => 'SHOW', |
|
147 |
'type' => 'IDNTOUTF8'), |
|
148 |
2 => array( 'event' => 'SAVE', |
|
149 |
'type' => 'TOLOWER') |
|
150 |
), |
|
151 |
'default' => '', |
|
152 |
'datasource' => array ( 'type' => 'SQL', |
|
153 |
'querystring' => 'SELECT email FROM mail_user WHERE {AUTHSQL} ORDER BY email', |
|
154 |
'keyfield' => 'email', |
|
155 |
'valuefield' => 'email' |
|
156 |
), |
|
157 |
'validators' => array ( 0 => array ( 'type' => 'ISEMAIL', |
|
158 |
'errmsg'=> 'destination_error_isemail'), |
|
159 |
), |
|
160 |
'value' => '', |
59118c
|
161 |
'searchable' => 1 |
32b40d
|
162 |
), |
T |
163 |
'active' => array ( |
7fe908
|
164 |
'datatype' => 'VARCHAR', |
MC |
165 |
'formtype' => 'CHECKBOX', |
|
166 |
'default' => 'y', |
|
167 |
'value' => array(0 => 'n', 1 => 'y') |
32b40d
|
168 |
), |
7fe908
|
169 |
//################################# |
MC |
170 |
// ENDE Datatable fields |
|
171 |
//################################# |
32b40d
|
172 |
) |
T |
173 |
); |
|
174 |
|
|
175 |
|
|
176 |
|
7fe908
|
177 |
?> |