tbrehm
2012-04-16 84569173c9a21ebab5ecdb662d9b4fb98b7c336b
commit | author | age
532ae5 1 <?php
L 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 //* Languages
54 $language_list = array();
55 $handle = @opendir(ISPC_ROOT_PATH.'/lib/lang');
56 while ($file = @readdir ($handle)) {
57     if ($file != '.' && $file != '..') {
58         if(@is_file(ISPC_ROOT_PATH.'/lib/lang/'.$file) and substr($file,-4,4) == '.lng') {
59             $tmp = substr($file, 0, 2);
60             $language_list[$tmp] = $tmp;
61         }
62     }
63 }
64
65 //* Load themes
66 $themes_list = array();
67 $handle = @opendir(ISPC_THEMES_PATH); 
68 while ($file = @readdir ($handle)) { 
69     if (substr($file, 0, 1) != '.') {
70         if(@is_dir(ISPC_THEMES_PATH."/$file")) {
71             $themes_list[$file] = $file;
72         }
73     }
74 }
75
76 $form["tabs"]['address'] = array (
77     'title'     => "Address",
78     'width'     => 100,
79     'template'     => "templates/client_edit_address.htm",
80     'fields'     => array (
81     ##################################
82     # Begin Datatable fields
83     ##################################
84         'company_name' => array (
85             'datatype'    => 'VARCHAR',
86             'formtype'    => 'TEXT',
87             'default'    => '',
88             'value'        => '',
89             'separator'    => '',
90             'width'        => '30',
91             'maxlength'    => '255',
92             'rows'        => '',
93             'cols'        => ''
94         ),
95         'contact_name' => array (
96             'datatype'    => 'VARCHAR',
97             'formtype'    => 'TEXT',
98             'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
99                                                         'errmsg'=> 'contact_error_empty'),
100                                         ),
101             'default'    => '',
102             'value'        => '',
103             'separator'    => '',
104             'width'        => '30',
105             'maxlength'    => '255',
106             'rows'        => '',
107             'cols'        => ''
108         ),
109         'customer_no' => array (
110             'datatype'    => 'VARCHAR',
111             'formtype'    => 'TEXT',
112             'default'    => '',
113             'value'        => '',
114             'separator'    => '',
115             'width'        => '30',
116             'maxlength'    => '255',
117             'rows'        => '',
118             'cols'        => ''
119         ),
120         'username' => array (
121             'datatype'    => 'VARCHAR',
122             'formtype'    => 'TEXT',
123             'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
124                                                         'errmsg'=> 'username_error_empty'),
125                                         1 => array (    'type'    => 'CUSTOM',
126                                                         'class' => 'validate_client',
127                                                         'function' => 'username_unique',
128                                                         'errmsg'=> 'username_error_unique'),
845691 129                                         2 => array (    'type'    => 'CUSTOM',
T 130                                                         'class' => 'validate_client',
131                                                         'function' => 'username_collision',
132                                                         'errmsg'=> 'username_error_collision'),
133                                         3 => array (    'type'    => 'REGEX',
532ae5 134                                                         'regex' => '/^[\w\.\-\_]{0,64}$/',
L 135                                                         'errmsg'=> 'username_error_regex'),
136                                         ),
137             'default'    => '',
138             'value'        => '',
139             'separator'    => '',
140             'width'        => '30',
141             'maxlength'    => '255',
142             'rows'        => '',
143             'cols'        => ''
144         ),
145         'password' => array (
146             'datatype'    => 'VARCHAR',
147             'formtype'    => 'PASSWORD',
148             'encryption'=> 'CRYPT',
149             'default'    => '',
150             'value'        => '',
151             'separator'    => '',
152             'width'        => '30',
153             'maxlength'    => '255',
154             'rows'        => '',
155             'cols'        => ''
156         ),
157         'language' => array (
158             'datatype'    => 'VARCHAR',
159             'formtype'    => 'SELECT',
160             'default'    => $conf["language"],
161             'value'        => $language_list,
162             'separator'    => '',
163             'width'        => '30',
164             'maxlength'    => '255',
165             'rows'        => '',
166             'cols'        => ''
167         ),
168         'usertheme' => array (
169             'datatype'    => 'VARCHAR',
170             'formtype'    => 'SELECT',
87c1a0 171             'default'    => $conf["theme"],
532ae5 172             'value'        => $themes_list,
L 173             'separator'    => '',
174             'width'        => '30',
175             'maxlength'    => '255',
176             'rows'        => '',
177             'cols'        => ''
178         ),
179         'street' => array (
180             'datatype'    => 'VARCHAR',
181             'formtype'    => 'TEXT',
182             'default'    => '',
183             'value'        => '',
184             'separator'    => '',
185             'width'        => '30',
186             'maxlength'    => '255',
187             'rows'        => '',
188             'cols'        => ''
189         ),
190         'zip' => array (
191             'datatype'    => 'VARCHAR',
192             'formtype'    => 'TEXT',
193             'default'    => '',
194             'value'        => '',
195             'separator'    => '',
196             'width'        => '10',
197             'maxlength'    => '255',
198             'rows'        => '',
199             'cols'        => ''
200         ),
201         'city' => array (
202             'datatype'    => 'VARCHAR',
203             'formtype'    => 'TEXT',
204             'default'    => '',
205             'value'        => '',
206             'separator'    => '',
207             'width'        => '30',
208             'maxlength'    => '255',
209             'rows'        => '',
210             'cols'        => ''
211         ),
212         'state' => array (
213             'datatype'    => 'VARCHAR',
214             'formtype'    => 'TEXT',
215             'default'    => '',
216             'value'        => '',
217             'separator'    => '',
218             'width'        => '30',
219             'maxlength'    => '255',
220             'rows'        => '',
221             'cols'        => ''
222         ),
223         'country' => array (
224             'datatype'    => 'VARCHAR',
225
226             'formtype'    => 'SELECT',
4dd2c0 227             'default'    => $conf["country"],
532ae5 228             'datasource'    => array (     'type'    => 'SQL',
L 229                                         'querystring' => 'SELECT iso,printable_name FROM country ORDER BY printable_name',
230                                         'keyfield'=> 'iso',
231                                         'valuefield'=> 'printable_name'
232                                      ),
233             'value'        => ''
234         ),
235         'telephone' => array (
236             'datatype'    => 'VARCHAR',
237             'formtype'    => 'TEXT',
238             'default'    => '',
239             'value'        => '',
240             'separator'    => '',
241             'width'        => '30',
242             'maxlength'    => '255',
243             'rows'        => '',
244             'cols'        => ''
245         ),
246         'mobile' => array (
247             'datatype'    => 'VARCHAR',
248             'formtype'    => 'TEXT',
249             'default'    => '',
250             'value'        => '',
251             'separator'    => '',
252             'width'        => '30',
253             'maxlength'    => '255',
254             'rows'        => '',
255             'cols'        => ''
256         ),
257         'fax' => array (
258             'datatype'    => 'VARCHAR',
259             'formtype'    => 'TEXT',
260             'default'    => '',
261             'value'        => '',
262             'separator'    => '',
263             'width'        => '30',
264             'maxlength'    => '255',
265             'rows'        => '',
266             'cols'        => ''
267         ),
268         'email' => array (
269             'datatype'    => 'VARCHAR',
270             'formtype'    => 'TEXT',
271             'default'    => '',
272             'value'        => '',
273             'separator'    => '',
274             'width'        => '30',
275             'maxlength'    => '255',
276             'rows'        => '',
277             'cols'        => ''
278         ),
279         'internet' => array (
280             'datatype'    => 'VARCHAR',
281             'formtype'    => 'TEXT',
282             'default'    => 'http://',
283             'value'        => '',
284             'separator'    => '',
285             'width'        => '30',
286             'maxlength'    => '255',
287             'rows'        => '',
288             'cols'        => ''
289         ),
290         'icq' => array (
291             'datatype'    => 'VARCHAR',
292             'formtype'    => 'TEXT',
293             'default'    => '',
294             'value'        => '',
295             'separator'    => '',
296             'width'        => '30',
297             'maxlength'    => '255',
298             'rows'        => '',
299             'cols'        => ''
300         ),
301         'vat_id' => array (
302             'datatype'    => 'VARCHAR',
303             'formtype'    => 'TEXT',
304             'default'    => '',
305             'value'        => '',
306             'separator'    => '',
307             'width'        => '30',
308             'maxlength'    => '255',
309             'rows'        => '',
310             'cols'        => ''
311         ),
312         'company_id' => array (
313             'datatype'    => 'VARCHAR',
314             'formtype'    => 'TEXT',
315             'default'    => '',
316             'value'        => '',
317             'separator'    => '',
318             'width'        => '30',
319             'maxlength'    => '20',
320             'rows'        => '',
321             'cols'        => ''
322         ),
323         'notes' => array (
324             'datatype'    => 'TEXT',
325             'formtype'    => 'TEXTAREA',
326             'default'    => '',
327             'value'        => '',
328             'separator'    => '',
329             'width'        => '',
330             'maxlength'    => '',
331             'rows'        => '10',
332             'cols'        => '30'
333         ),
334     ##################################
335     # END Datatable fields
336     ##################################
337     )
338 );
339
340 $form["tabs"]['limits'] = array (
341     'title'     => "Limits",
342     'width'     => 80,
343     'template'     => "templates/client_edit_limits.htm",
344     'fields'     => array (
345     ##################################
346     # Begin Datatable fields
347     ##################################
348         'template_master' => array (
349             'datatype'    => 'INTEGER',
350             'formtype'    => 'SELECT',
351             'default'    => '1',
352             'datasource'    => array (     'type'    => 'CUSTOM',
353                                         'class'=> 'custom_datasource',
354                                         'function'=> 'master_templates'
355                                      ),
356             'value'        => ''
357         ),
358         'template_additional' => array (
359             'datatype'    => 'VARCHAR',
360             'formtype'    => 'TEXT',
361         ),
362         'default_mailserver' => array (
363             'datatype'    => 'INTEGER',
364             'formtype'    => 'SELECT',
365             'default'    => '1',
366             'datasource'    => array (     'type'    => 'CUSTOM',
367                                         'class'=> 'custom_datasource',
368                                         'function'=> 'client_servers'
369                                      ),
370             'value'        => '',
371             'name'        => 'default_mailserver'
372         ),
373         'limit_maildomain' => array (
374             'datatype'    => 'INTEGER',
375             'formtype'    => 'TEXT',
376             'validators'    => array (     0 => array (    'type'    => 'ISINT',
377                                                         'errmsg'=> 'limit_maildomain_error_notint'),
378                                     ),
379             'default'    => '-1',
380             'value'        => '',
381             'separator'    => '',
382             'width'        => '10',
383             'maxlength'    => '10',
384             'rows'        => '',
385             'cols'        => ''
386         ),
387         'limit_mailbox' => array (
388             'datatype'    => 'INTEGER',
389             'formtype'    => 'TEXT',
390             'validators'    => array (     0 => array (    'type'    => 'ISINT',
391                                                         'errmsg'=> 'limit_mailbox_error_notint'),
392                                     ),
393             'default'    => '-1',
394             'value'        => '',
395             'separator'    => '',
396             'width'        => '10',
397             'maxlength'    => '10',
398             'rows'        => '',
399             'cols'        => ''
400         ),
401         'limit_mailalias' => array (
402             'datatype'    => 'INTEGER',
403             'formtype'    => 'TEXT',
404             'validators'    => array (     0 => array (    'type'    => 'ISINT',
405                                                         'errmsg'=> 'limit_mailalias_error_notint'),
406                                     ),
407             'default'    => '-1',
408             'value'        => '',
409             'separator'    => '',
410             'width'        => '10',
411             'maxlength'    => '10',
412             'rows'        => '',
413             'cols'        => ''
414         ),
415         'limit_mailaliasdomain' => array (
416             'datatype'    => 'INTEGER',
417             'formtype'    => 'TEXT',
418             'validators'    => array (     0 => array (    'type'    => 'ISINT',
419                                                         'errmsg'=> 'limit_mailaliasdomain_error_notint'),
420                                     ),
421             'default'    => '-1',
422             'value'        => '',
423             'separator'    => '',
424             'width'        => '10',
425             'maxlength'    => '10',
426             'rows'        => '',
427             'cols'        => ''
428         ),
429         'limit_mailmailinglist' => array (
430             'datatype'    => 'INTEGER',
431             'formtype'    => 'TEXT',
432             'validators'    => array (     0 => array (    'type'    => 'ISINT',
433                                                         'errmsg'=> 'limit_mailmailinglist_error_notint'),
434                                     ),
435             'default'    => '-1',
436             'value'        => '',
437             'separator'    => '',
438             'width'        => '10',
439             'maxlength'    => '10',
440             'rows'        => '',
441             'cols'        => ''
442         ),
443         'limit_mailforward' => array (
444             'datatype'    => 'INTEGER',
445             'formtype'    => 'TEXT',
446             'validators'    => array (     0 => array (    'type'    => 'ISINT',
447                                                         'errmsg'=> 'limit_mailforward_error_notint'),
448                                     ),
449             'default'    => '-1',
450             'value'        => '',
451             'separator'    => '',
452             'width'        => '10',
453             'maxlength'    => '10',
454             'rows'        => '',
455             'cols'        => ''
456         ),
457         'limit_mailcatchall' => array (
458             'datatype'    => 'INTEGER',
459             'formtype'    => 'TEXT',
460             'validators'    => array (     0 => array (    'type'    => 'ISINT',
461                                                         'errmsg'=> 'limit_mailcatchall_error_notint'),
462                                     ),
463             'default'    => '-1',
464             'value'        => '',
465             'separator'    => '',
466             'width'        => '10',
467             'maxlength'    => '10',
468             'rows'        => '',
469             'cols'        => ''
470         ),
471         'limit_mailrouting' => array (
472             'datatype'    => 'INTEGER',
473             'formtype'    => 'TEXT',
474             'validators'    => array (     0 => array (    'type'    => 'ISINT',
475                                                         'errmsg'=> 'limit_mailrouting_error_notint'),
476                                     ),
477             'default'    => '0',
478             'value'        => '',
479             'separator'    => '',
480             'width'        => '10',
481             'maxlength'    => '10',
482             'rows'        => '',
483             'cols'        => ''
484         ),
485         'limit_mailfilter' => array (
486             'datatype'    => 'INTEGER',
487             'formtype'    => 'TEXT',
488             'validators'    => array (     0 => array (    'type'    => 'ISINT',
489                                                         'errmsg'=> 'limit_mailfilter_error_notint'),
490                                     ),
491             'default'    => '-1',
492             'value'        => '',
493             'separator'    => '',
494             'width'        => '10',
495             'maxlength'    => '10',
496             'rows'        => '',
497             'cols'        => ''
498         ),
499         'limit_fetchmail' => array (
500             'datatype'    => 'INTEGER',
501             'formtype'    => 'TEXT',
502             'validators'    => array (     0 => array (    'type'    => 'ISINT',
503                                                         'errmsg'=> 'limit_mailfetchmail_error_notint'),
504                                     ),
505             'default'    => '-1',
506             'value'        => '',
507             'separator'    => '',
508             'width'        => '10',
509             'maxlength'    => '10',
510             'rows'        => '',
511             'cols'        => ''
512         ),
513         'limit_mailquota' => array (
514             'datatype'    => 'INTEGER',
515             'formtype'    => 'TEXT',
516             'validators'    => array (     0 => array (    'type'    => 'ISINT',
517                                                         'errmsg'=> 'limit_mailquota_error_notint'),
518                                     ),
519             'default'    => '-1',
520             'value'        => '',
521             'separator'    => '',
522             'width'        => '10',
523             'maxlength'    => '10',
524             'rows'        => '',
525             'cols'        => ''
526         ),
527         'limit_spamfilter_wblist' => array (
528             'datatype'    => 'INTEGER',
529             'formtype'    => 'TEXT',
530             'validators'    => array (     0 => array (    'type'    => 'ISINT',
531                                                         'errmsg'=> 'limit_spamfilter_wblist_error_notint'),
532                                     ),
533             'default'    => '-1',
534             'value'        => '',
535             'separator'    => '',
536             'width'        => '10',
537             'maxlength'    => '10',
538             'rows'        => '',
539             'cols'        => ''
540         ),
541         'limit_spamfilter_user' => array (
542             'datatype'    => 'INTEGER',
543             'formtype'    => 'TEXT',
544             'validators'    => array (     0 => array (    'type'    => 'ISINT',
545                                                         'errmsg'=> 'limit_spamfilter_user_error_notint'),
546                                     ),
547             'default'    => '-1',
548             'value'        => '',
549             'separator'    => '',
550             'width'        => '10',
551             'maxlength'    => '10',
552             'rows'        => '',
553             'cols'        => ''
554         ),
555         'limit_spamfilter_policy' => array (
556             'datatype'    => 'INTEGER',
557             'formtype'    => 'TEXT',
558             'validators'    => array (     0 => array (    'type'    => 'ISINT',
559                                                         'errmsg'=> 'limit_spamfilter_policy_error_notint'),
560                                     ),
561             'default'    => '-1',
562             'value'        => '',
563             'separator'    => '',
564             'width'        => '10',
565             'maxlength'    => '10',
566             'rows'        => '',
567             'cols'        => ''
568         ),
569         'default_webserver' => array (
570             'datatype'    => 'INTEGER',
571             'formtype'    => 'SELECT',
572             'default'    => '1',
573             'datasource'    => array (     'type'    => 'CUSTOM',
574                                         'class'=> 'custom_datasource',
575                                         'function'=> 'client_servers'
576                                      ),
577             'value'        => '',
578             'name'        => 'default_webserver'
579         ),
580         'limit_web_domain' => array (
581             'datatype'    => 'INTEGER',
582             'formtype'    => 'TEXT',
583             'validators'    => array (     0 => array (    'type'    => 'ISINT',
584                                                         'errmsg'=> 'limit_web_domain_error_notint'),
585                                     ),
586             'default'    => '-1',
587             'value'        => '',
588             'separator'    => '',
589             'width'        => '10',
590             'maxlength'    => '10',
591             'rows'        => '',
592             'cols'        => ''
593         ),
594         'limit_web_quota' => array (
595             'datatype'    => 'INTEGER',
596             'formtype'    => 'TEXT',
597             'validators'    => array (     0 => array (    'type'    => 'ISINT',
598                                                         'errmsg'=> 'limit_web_quota_error_notint'),
599                                     ),
600             'default'    => '-1',
601             'value'        => '',
602             'separator'    => '',
603             'width'        => '10',
604             'maxlength'    => '10',
605             'rows'        => '',
606             'cols'        => ''
607         ),
608         'web_php_options' => array (
609             'datatype'    => 'VARCHAR',
610             'formtype'    => 'CHECKBOXARRAY',
a046bf 611             'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
T 612                                                         'errmsg'=> 'web_php_options_notempty'),
613                                     ),
532ae5 614             'default'    => '',
L 615             'separator' => ',',
616             'valuelimit' => 'client:web_php_options',
617             'value'        => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP')
618         ),
619         'limit_web_aliasdomain' => array (
620             'datatype'    => 'INTEGER',
621             'formtype'    => 'TEXT',
622             'validators'    => array (     0 => array (    'type'    => 'ISINT',
623                                                         'errmsg'=> 'limit_web_aliasdomain_error_notint'),
624                                     ),
625             'default'    => '-1',
626             'value'        => '',
627             'separator'    => '',
628             'width'        => '10',
629             'maxlength'    => '10',
630             'rows'        => '',
631             'cols'        => ''
632         ),
633         'limit_web_subdomain' => array (
634             'datatype'    => 'INTEGER',
635             'formtype'    => 'TEXT',
636             'validators'    => array (     0 => array (    'type'    => 'ISINT',
637                                                         'errmsg'=> 'limit_web_subdomain_error_notint'),
638                                     ),
639             'default'    => '-1',
640             'value'        => '',
641             'separator'    => '',
642             'width'        => '10',
643             'maxlength'    => '10',
644             'rows'        => '',
645             'cols'        => ''
646         ),
647         'limit_ftp_user' => array (
648             'datatype'    => 'INTEGER',
649             'formtype'    => 'TEXT',
650             'validators'    => array (     0 => array (    'type'    => 'ISINT',
651                                                         'errmsg'=> 'limit_ftp_user_error_notint'),
652                                     ),
653             'default'    => '-1',
654             'value'        => '',
655             'separator'    => '',
656             'width'        => '10',
657             'maxlength'    => '10',
658             'rows'        => '',
659             'cols'        => ''
660         ),
661         'limit_shell_user' => array (
662             'datatype'    => 'INTEGER',
663             'formtype'    => 'TEXT',
664             'validators'    => array (     0 => array (    'type'    => 'ISINT',
665                                                         'errmsg'=> 'limit_shell_user_error_notint'),
666                                     ),
667             'default'    => '-1',
668             'value'        => '',
669             'separator'    => '',
670             'width'        => '10',
671             'maxlength'    => '10',
672             'rows'        => '',
673             'cols'        => ''
674         ),
675         'ssh_chroot' => array (
676             'datatype'    => 'VARCHAR',
677             'formtype'    => 'CHECKBOXARRAY',
a046bf 678             'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
T 679                                                         'errmsg'=> 'ssh_chroot_notempty'),
680                                     ),
532ae5 681             'default'    => '',
L 682             'separator' => ',',
683             'valuelimit' => 'client:ssh_chroot',
684             'value'        => array('no' => 'None', 'jailkit' => 'Jailkit')
685         ),
686         'limit_webdav_user' => array (
687             'datatype'    => 'INTEGER',
688             'formtype'    => 'TEXT',
689             'validators'    => array (     0 => array (    'type'    => 'ISINT',
690                                                         'errmsg'=> 'limit_webdav_user_error_notint'),
691                                     ),
692             'default'    => '-1',
693             'value'        => '',
694             'separator'    => '',
695             'width'        => '10',
696             'maxlength'    => '10',
697             'rows'        => '',
698             'cols'        => ''
699         ),
700         'default_dnsserver' => array (
701             'datatype'    => 'INTEGER',
702             'formtype'    => 'SELECT',
703             'default'    => '1',
704             'datasource'    => array (     'type'    => 'CUSTOM',
705                                         'class'=> 'custom_datasource',
706                                         'function'=> 'client_servers'
707                                      ),
708             'value'        => '',
709             'name'        => 'default_dnsserver'
710         ),
711         'limit_dns_zone' => array (
712             'datatype'    => 'INTEGER',
713             'formtype'    => 'TEXT',
714             'validators'    => array (     0 => array (    'type'    => 'ISINT',
715                                                         'errmsg'=> 'limit_dns_zone_error_notint'),
716                                     ),
717             'default'    => '-1',
718             'value'        => '',
719             'separator'    => '',
720             'width'        => '10',
721             'maxlength'    => '10',
722             'rows'        => '',
723             'cols'        => ''
724         ),
725                 'limit_dns_slave_zone' => array (
726                         'datatype'      => 'INTEGER',
727                         'formtype'      => 'TEXT',
728                         'validators'    => array (      0 => array (    'type'  => 'ISINT',
729                                                                                                                 'errmsg'=> 'limit_dns_slave_zone_error_notint'),
730                                                                         ),
731                         'default'       => '-1',
732                         'value'         => '',
733                         'separator'     => '',
734                         'width'         => '10',
735                         'maxlength'     => '10',
736                         'rows'          => '',
737                         'cols'          => ''
738                 ),
739         'limit_dns_record' => array (
740             'datatype'    => 'INTEGER',
741             'formtype'    => 'TEXT',
742             'validators'    => array (     0 => array (    'type'    => 'ISINT',
743                                                         'errmsg'=> 'limit_dns_record_error_notint'),
744                                     ),
745             'default'    => '-1',
746             'value'        => '',
747             'separator'    => '',
748             'width'        => '10',
749             'maxlength'    => '10',
750             'rows'        => '',
751             'cols'        => ''
752         ),
753         'limit_client' => array (
754             'datatype'    => 'INTEGER',
755             'formtype'    => 'TEXT',
756             'validators'    => array (     0 => array (    'type'    => 'ISINT',
757                                                         'errmsg'=> 'limit_client_error_notint'),
758                                     ),
759             'default'    => '0',
760             'value'        => '',
761             'separator'    => '',
762             'width'        => '10',
763             'maxlength'    => '10',
764             'rows'        => '',
765             'cols'        => ''
766         ),
767         'default_dbserver' => array (
768             'datatype'    => 'INTEGER',
769             'formtype'    => 'SELECT',
770             'default'    => '1',
771             'datasource'    => array (     'type'    => 'CUSTOM',
772                                         'class'=> 'custom_datasource',
773                                         'function'=> 'client_servers'
774                                      ),
775             'value'        => '',
776             'name'        => 'default_dbserver'
777         ),
778         'limit_database' => array (
779             'datatype'    => 'INTEGER',
780             'formtype'    => 'TEXT',
781             'validators'    => array (     0 => array (    'type'    => 'ISINT',
782                                                         'errmsg'=> 'limit_database_error_notint'),
783                                     ),
784             'default'    => '-1',
785             'value'        => '',
786             'separator'    => '',
787             'width'        => '10',
788             'maxlength'    => '10',
789             'rows'        => '',
790             'cols'        => ''
791         ),
792         'limit_cron' => array (
793             'datatype'  => 'INTEGER',
794             'formtype'  => 'TEXT',
795             'validators'    => array (  0 => array (    'type'  => 'ISINT',
796                                                         'errmsg'=> 'limit_cron_error_notint'),
797                                     ),
798             'default'   => '0',
799             'value'     => '',
800             'separator' => '',
801             'width'     => '10',
802             'maxlength' => '10',
803             'rows'      => '',
804             'cols'      => ''
805         ),
806         'limit_cron_type' => array (
807             'datatype'  => 'VARCHAR',
808             'formtype'  => 'SELECT',
809             'default'   => '',
810             'value'     => array('full' => 'Full Cron','chrooted' => 'Chrooted Cron','url' => 'URL Cron')
811         ),
812         'limit_cron_frequency' => array (
813             'datatype'  => 'INTEGER',
814             'formtype'  => 'TEXT',
815             'validators'    => array (  0 => array (    'type'  => 'ISINT',
816                                                         'errmsg'=> 'limit_cron_error_frequency'),
817                                     ),
818             'default'   => '-1',
819             'value'     => '',
820             'separator' => '',
821             'width'     => '10',
822             'maxlength' => '10',
823             'rows'      => '',
824             'cols'      => ''
825         ),
826         'limit_traffic_quota' => array (
827             'datatype'    => 'INTEGER',
828             'formtype'    => 'TEXT',
829             'validators'    => array (     0 => array (    'type'    => 'ISINT',
830                                                         'errmsg'=> 'limit_traffic_quota_error_notint'),
831                                     ),
832             'default'    => '-1',
833             'value'        => '',
834             'separator'    => '',
835             'width'        => '10',
836             'maxlength'    => '10',
837             'rows'        => '',
838             'cols'        => ''
839         ),
f414ab 840         'limit_openvz_vm' => array (
T 841             'datatype'    => 'INTEGER',
842             'formtype'    => 'TEXT',
843             'validators'    => array (     0 => array (    'type'    => 'ISINT',
844                                                         'errmsg'=> 'limit_openvz_vm_error_notint'),
845                                     ),
846             'default'    => '0',
847             'value'        => '',
848             'separator'    => '',
849             'width'        => '10',
850             'maxlength'    => '10',
851             'rows'        => '',
852             'cols'        => ''
853         ),
854         'limit_openvz_vm_template_id' => array (
855             'datatype'    => 'INTEGER',
856             'formtype'    => 'SELECT',
857             'default'    => '',
858             'datasource'    => array (     'type'    => 'SQL',
859                                         'querystring' => 'SELECT template_id,template_name FROM openvz_template WHERE 1 ORDER BY template_name',
860                                         'keyfield'=> 'template_id',
861                                         'valuefield'=> 'template_name'
862                                      ),
863             'value'        => array(0 => ' ')
864         ),
532ae5 865     ##################################
L 866     # END Datatable fields
867     ##################################
868     )
869 );
870
871 /*
872 $form["tabs"]['ipaddress'] = array (
873     'title'     => "IP Addresses",
874     'width'     => 100,
875     'template'     => "templates/client_edit_ipaddress.htm",
876     'fields'     => array (
877     ##################################
878     # Beginn Datatable fields
879     ##################################
880         'ip_address' => array (
881             'datatype'    => 'TEXT',
882             'formtype'    => 'CHECKBOXARRAY',
883             'default'    => '',
884             'value'        => array('192.168.0.1' => '192.168.0.1', '192.168.0.2' => '192.168.0.2'),
885             'separator'    => ';'
886         ),
887     ##################################
888     # ENDE Datatable fields
889     ##################################
890     )
891 );
892 */
893
894
895 ?>