commit | author | age
|
acbf53
|
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). |
|
32 |
|
|
33 |
|
|
34 |
*/ |
|
35 |
|
|
36 |
$form["title"] = "Client"; |
|
37 |
$form["description"] = ""; |
|
38 |
$form["name"] = "client"; |
|
39 |
$form["action"] = "client_edit.php"; |
|
40 |
$form["db_table"] = "client"; |
|
41 |
$form["db_table_idx"] = "client_id"; |
|
42 |
$form["db_history"] = "yes"; |
|
43 |
$form["tab_default"] = "address"; |
|
44 |
$form["list_default"] = "client_list.php"; |
|
45 |
$form["auth"] = 'yes'; |
|
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"]['address'] = array ( |
|
54 |
'title' => "Address", |
|
55 |
'width' => 100, |
|
56 |
'template' => "templates/client_edit_address.htm", |
|
57 |
'fields' => array ( |
|
58 |
################################## |
|
59 |
# Begin Datatable fields |
|
60 |
################################## |
|
61 |
'company_name' => array ( |
|
62 |
'datatype' => 'VARCHAR', |
|
63 |
'formtype' => 'TEXT', |
|
64 |
'default' => '', |
|
65 |
'value' => '', |
|
66 |
'separator' => '', |
|
67 |
'width' => '30', |
|
68 |
'maxlength' => '255', |
|
69 |
'rows' => '', |
|
70 |
'cols' => '' |
|
71 |
), |
|
72 |
'contact_name' => array ( |
|
73 |
'datatype' => 'VARCHAR', |
|
74 |
'formtype' => 'TEXT', |
|
75 |
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
|
76 |
'errmsg'=> 'contact_error_empty'), |
|
77 |
), |
|
78 |
'default' => '', |
|
79 |
'value' => '', |
|
80 |
'separator' => '', |
|
81 |
'width' => '30', |
|
82 |
'maxlength' => '255', |
|
83 |
'rows' => '', |
|
84 |
'cols' => '' |
|
85 |
), |
|
86 |
'street' => array ( |
|
87 |
'datatype' => 'VARCHAR', |
|
88 |
'formtype' => 'TEXT', |
|
89 |
'default' => '', |
|
90 |
'value' => '', |
|
91 |
'separator' => '', |
|
92 |
'width' => '30', |
|
93 |
'maxlength' => '255', |
|
94 |
'rows' => '', |
|
95 |
'cols' => '' |
|
96 |
), |
|
97 |
'zip' => array ( |
|
98 |
'datatype' => 'VARCHAR', |
|
99 |
'formtype' => 'TEXT', |
|
100 |
'default' => '', |
|
101 |
'value' => '', |
|
102 |
'separator' => '', |
|
103 |
'width' => '10', |
|
104 |
'maxlength' => '255', |
|
105 |
'rows' => '', |
|
106 |
'cols' => '' |
|
107 |
), |
|
108 |
'city' => array ( |
|
109 |
'datatype' => 'VARCHAR', |
|
110 |
'formtype' => 'TEXT', |
|
111 |
'default' => '', |
|
112 |
'value' => '', |
|
113 |
'separator' => '', |
|
114 |
'width' => '30', |
|
115 |
'maxlength' => '255', |
|
116 |
'rows' => '', |
|
117 |
'cols' => '' |
|
118 |
), |
|
119 |
'state' => array ( |
|
120 |
'datatype' => 'VARCHAR', |
|
121 |
'formtype' => 'TEXT', |
|
122 |
'default' => '', |
|
123 |
'value' => '', |
|
124 |
'separator' => '', |
|
125 |
'width' => '30', |
|
126 |
'maxlength' => '255', |
|
127 |
'rows' => '', |
|
128 |
'cols' => '' |
|
129 |
), |
|
130 |
'country' => array ( |
|
131 |
'datatype' => 'VARCHAR', |
|
132 |
'formtype' => 'TEXT', |
|
133 |
'default' => '', |
|
134 |
'value' => '', |
|
135 |
'separator' => '', |
|
136 |
'width' => '30', |
|
137 |
'maxlength' => '255', |
|
138 |
'rows' => '', |
|
139 |
'cols' => '' |
|
140 |
), |
|
141 |
'telephone' => array ( |
|
142 |
'datatype' => 'VARCHAR', |
|
143 |
'formtype' => 'TEXT', |
|
144 |
'default' => '', |
|
145 |
'value' => '', |
|
146 |
'separator' => '', |
|
147 |
'width' => '30', |
|
148 |
'maxlength' => '255', |
|
149 |
'rows' => '', |
|
150 |
'cols' => '' |
|
151 |
), |
|
152 |
'mobile' => array ( |
|
153 |
'datatype' => 'VARCHAR', |
|
154 |
'formtype' => 'TEXT', |
|
155 |
'default' => '', |
|
156 |
'value' => '', |
|
157 |
'separator' => '', |
|
158 |
'width' => '30', |
|
159 |
'maxlength' => '255', |
|
160 |
'rows' => '', |
|
161 |
'cols' => '' |
|
162 |
), |
|
163 |
'fax' => array ( |
|
164 |
'datatype' => 'VARCHAR', |
|
165 |
'formtype' => 'TEXT', |
|
166 |
'default' => '', |
|
167 |
'value' => '', |
|
168 |
'separator' => '', |
|
169 |
'width' => '30', |
|
170 |
'maxlength' => '255', |
|
171 |
'rows' => '', |
|
172 |
'cols' => '' |
|
173 |
), |
|
174 |
'email' => array ( |
|
175 |
'datatype' => 'VARCHAR', |
|
176 |
'formtype' => 'TEXT', |
|
177 |
'default' => '', |
|
178 |
'value' => '', |
|
179 |
'separator' => '', |
|
180 |
'width' => '30', |
|
181 |
'maxlength' => '255', |
|
182 |
'rows' => '', |
|
183 |
'cols' => '' |
|
184 |
), |
|
185 |
'internet' => array ( |
|
186 |
'datatype' => 'VARCHAR', |
|
187 |
'formtype' => 'TEXT', |
|
188 |
'default' => 'http://', |
|
189 |
'value' => '', |
|
190 |
'separator' => '', |
|
191 |
'width' => '30', |
|
192 |
'maxlength' => '255', |
|
193 |
'rows' => '', |
|
194 |
'cols' => '' |
|
195 |
), |
|
196 |
'icq' => array ( |
|
197 |
'datatype' => 'VARCHAR', |
|
198 |
'formtype' => 'TEXT', |
|
199 |
'default' => '', |
|
200 |
'value' => '', |
|
201 |
'separator' => '', |
|
202 |
'width' => '30', |
|
203 |
'maxlength' => '255', |
|
204 |
'rows' => '', |
|
205 |
'cols' => '' |
|
206 |
), |
|
207 |
'notes' => array ( |
|
208 |
'datatype' => 'TEXT', |
|
209 |
'formtype' => 'TEXTAREA', |
|
210 |
'default' => '', |
|
211 |
'value' => '', |
|
212 |
'separator' => '', |
|
213 |
'width' => '', |
|
214 |
'maxlength' => '', |
|
215 |
'rows' => '10', |
|
216 |
'cols' => '30' |
|
217 |
), |
|
218 |
################################## |
|
219 |
# END Datatable fields |
|
220 |
################################## |
|
221 |
) |
|
222 |
); |
|
223 |
|
|
224 |
$form["tabs"]['limits'] = array ( |
|
225 |
'title' => "Limits", |
|
226 |
'width' => 80, |
|
227 |
'template' => "templates/client_edit_limits.htm", |
|
228 |
'fields' => array ( |
|
229 |
################################## |
|
230 |
# Begin Datatable fields |
|
231 |
################################## |
|
232 |
'limit_maildomain' => array ( |
|
233 |
'datatype' => 'INTEGER', |
|
234 |
'formtype' => 'TEXT', |
|
235 |
'validators' => array ( 0 => array ( 'type' => 'ISINT', |
|
236 |
'errmsg'=> 'limit_maildomain_error_notint'), |
|
237 |
), |
|
238 |
'default' => '-1', |
|
239 |
'value' => '', |
|
240 |
'separator' => '', |
|
241 |
'width' => '10', |
|
242 |
'maxlength' => '10', |
|
243 |
'rows' => '', |
|
244 |
'cols' => '' |
|
245 |
), |
|
246 |
'limit_mailbox' => array ( |
|
247 |
'datatype' => 'INTEGER', |
|
248 |
'formtype' => 'TEXT', |
|
249 |
'validators' => array ( 0 => array ( 'type' => 'ISINT', |
|
250 |
'errmsg'=> 'limit_mailbox_error_notint'), |
|
251 |
), |
|
252 |
'default' => '-1', |
|
253 |
'value' => '', |
|
254 |
'separator' => '', |
|
255 |
'width' => '10', |
|
256 |
'maxlength' => '10', |
|
257 |
'rows' => '', |
|
258 |
'cols' => '' |
|
259 |
), |
|
260 |
'limit_mailalias' => array ( |
|
261 |
'datatype' => 'INTEGER', |
|
262 |
'formtype' => 'TEXT', |
|
263 |
'validators' => array ( 0 => array ( 'type' => 'ISINT', |
|
264 |
'errmsg'=> 'limit_mailalias_error_notint'), |
|
265 |
), |
|
266 |
'default' => '-1', |
|
267 |
'value' => '', |
|
268 |
'separator' => '', |
|
269 |
'width' => '10', |
|
270 |
'maxlength' => '10', |
|
271 |
'rows' => '', |
|
272 |
'cols' => '' |
|
273 |
), |
|
274 |
'limit_mailcatchall' => array ( |
|
275 |
'datatype' => 'INTEGER', |
|
276 |
'formtype' => 'TEXT', |
|
277 |
'validators' => array ( 0 => array ( 'type' => 'ISINT', |
|
278 |
'errmsg'=> 'limit_mailcatchall_error_notint'), |
|
279 |
), |
|
280 |
'default' => '-1', |
|
281 |
'value' => '', |
|
282 |
'separator' => '', |
|
283 |
'width' => '10', |
|
284 |
'maxlength' => '10', |
|
285 |
'rows' => '', |
|
286 |
'cols' => '' |
|
287 |
), |
|
288 |
'limit_mailrouting' => array ( |
|
289 |
'datatype' => 'INTEGER', |
|
290 |
'formtype' => 'TEXT', |
|
291 |
'validators' => array ( 0 => array ( 'type' => 'ISINT', |
|
292 |
'errmsg'=> 'limit_mailrouting_error_notint'), |
|
293 |
), |
|
294 |
'default' => '-1', |
|
295 |
'value' => '', |
|
296 |
'separator' => '', |
|
297 |
'width' => '10', |
|
298 |
'maxlength' => '10', |
|
299 |
'rows' => '', |
|
300 |
'cols' => '' |
|
301 |
), |
|
302 |
'limit_mailfilter' => array ( |
|
303 |
'datatype' => 'INTEGER', |
|
304 |
'formtype' => 'TEXT', |
|
305 |
'validators' => array ( 0 => array ( 'type' => 'ISINT', |
|
306 |
'errmsg'=> 'limit_mailfilter_error_notint'), |
|
307 |
), |
|
308 |
'default' => '-1', |
|
309 |
'value' => '', |
|
310 |
'separator' => '', |
|
311 |
'width' => '10', |
|
312 |
'maxlength' => '10', |
|
313 |
'rows' => '', |
|
314 |
'cols' => '' |
|
315 |
), |
|
316 |
'limit_fetchmail' => array ( |
|
317 |
'datatype' => 'INTEGER', |
|
318 |
'formtype' => 'TEXT', |
|
319 |
'validators' => array ( 0 => array ( 'type' => 'ISINT', |
|
320 |
'errmsg'=> 'limit_mailfetchmail_error_notint'), |
|
321 |
), |
|
322 |
'default' => '-1', |
|
323 |
'value' => '', |
|
324 |
'separator' => '', |
|
325 |
'width' => '10', |
|
326 |
'maxlength' => '10', |
|
327 |
'rows' => '', |
|
328 |
'cols' => '' |
|
329 |
), |
|
330 |
'limit_mailquota' => array ( |
|
331 |
'datatype' => 'INTEGER', |
|
332 |
'formtype' => 'TEXT', |
|
333 |
'validators' => array ( 0 => array ( 'type' => 'ISINT', |
|
334 |
'errmsg'=> 'limit_mailquota_error_notint'), |
|
335 |
), |
|
336 |
'default' => '-1', |
|
337 |
'value' => '', |
|
338 |
'separator' => '', |
|
339 |
'width' => '10', |
|
340 |
'maxlength' => '10', |
|
341 |
'rows' => '', |
|
342 |
'cols' => '' |
|
343 |
), |
|
344 |
################################## |
|
345 |
# END Datatable fields |
|
346 |
################################## |
|
347 |
) |
|
348 |
); |
|
349 |
|
|
350 |
$form["tabs"]['login'] = array ( |
|
351 |
'title' => "Login", |
|
352 |
'width' => 100, |
|
353 |
'template' => "templates/client_edit_login.htm", |
|
354 |
'fields' => array ( |
|
355 |
################################## |
|
356 |
# Begin Datatable fields |
|
357 |
################################## |
|
358 |
'username' => array ( |
|
359 |
'datatype' => 'VARCHAR', |
|
360 |
'formtype' => 'TEXT', |
|
361 |
'default' => '', |
|
362 |
'value' => '', |
|
363 |
'separator' => '', |
|
364 |
'width' => '30', |
|
365 |
'maxlength' => '255', |
|
366 |
'rows' => '', |
|
367 |
'cols' => '' |
|
368 |
), |
|
369 |
'password' => array ( |
|
370 |
'datatype' => 'VARCHAR', |
|
371 |
'formtype' => 'PASSWORD', |
|
372 |
'default' => '', |
|
373 |
'value' => '', |
|
374 |
'separator' => '', |
|
375 |
'width' => '30', |
|
376 |
'maxlength' => '255', |
|
377 |
'rows' => '', |
|
378 |
'cols' => '' |
|
379 |
), |
|
380 |
'language' => array ( |
|
381 |
'datatype' => 'VARCHAR', |
|
382 |
'formtype' => 'SELECT', |
|
383 |
'default' => $conf["language"], |
|
384 |
'value' => array('en' => 'en'), |
|
385 |
'separator' => '', |
|
386 |
'width' => '30', |
|
387 |
'maxlength' => '255', |
|
388 |
'rows' => '', |
|
389 |
'cols' => '' |
|
390 |
), |
1f6ae2
|
391 |
'usertheme' => array ( |
acbf53
|
392 |
'datatype' => 'VARCHAR', |
T |
393 |
'formtype' => 'SELECT', |
|
394 |
'default' => 'default', |
1f6ae2
|
395 |
'value' => array('default' => 'default','grey' => 'grey'), |
acbf53
|
396 |
'separator' => '', |
T |
397 |
'width' => '30', |
|
398 |
'maxlength' => '255', |
|
399 |
'rows' => '', |
|
400 |
'cols' => '' |
|
401 |
), |
|
402 |
################################## |
|
403 |
# END Datatable fields |
|
404 |
################################## |
|
405 |
), |
|
406 |
); |
|
407 |
|
|
408 |
/* |
|
409 |
$form["tabs"]['ipaddress'] = array ( |
|
410 |
'title' => "IP Addresses", |
|
411 |
'width' => 100, |
|
412 |
'template' => "templates/client_edit_ipaddress.htm", |
|
413 |
'fields' => array ( |
|
414 |
################################## |
|
415 |
# Beginn Datatable fields |
|
416 |
################################## |
|
417 |
'ip_address' => array ( |
|
418 |
'datatype' => 'TEXT', |
|
419 |
'formtype' => 'CHECKBOXARRAY', |
|
420 |
'default' => '', |
|
421 |
'value' => array('192.168.0.1' => '192.168.0.1', '192.168.0.2' => '192.168.0.2'), |
|
422 |
'separator' => ';' |
|
423 |
), |
|
424 |
################################## |
|
425 |
# ENDE Datatable fields |
|
426 |
################################## |
|
427 |
) |
|
428 |
); |
|
429 |
*/ |
|
430 |
|
|
431 |
|
b5a2f8
|
432 |
?> |