tbrehm
2013-02-22 526b997c9891a796b152cdbab8e329b356b1f596
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).
4c28d9 32     
F 33     Search:
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
532ae5 37
L 38
39 */
40
222ea2 41 $form["title"]         = "Client";
C 42 $form["description"]    = "";
43 $form["name"]         = "client";
44 $form["action"]        = "client_edit.php";
45 $form["db_table"]    = "client";
532ae5 46 $form["db_table_idx"]    = "client_id";
222ea2 47 $form["db_history"]    = "yes";
532ae5 48 $form["tab_default"]    = "address";
L 49 $form["list_default"]    = "client_list.php";
222ea2 50 $form["auth"]        = 'yes';
532ae5 51
L 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 //* Languages
59 $language_list = array();
60 $handle = @opendir(ISPC_ROOT_PATH.'/lib/lang');
61 while ($file = @readdir ($handle)) {
62     if ($file != '.' && $file != '..') {
63         if(@is_file(ISPC_ROOT_PATH.'/lib/lang/'.$file) and substr($file,-4,4) == '.lng') {
64             $tmp = substr($file, 0, 2);
65             $language_list[$tmp] = $tmp;
66         }
67     }
68 }
69
70 //* Load themes
71 $themes_list = array();
72 $handle = @opendir(ISPC_THEMES_PATH); 
73 while ($file = @readdir ($handle)) { 
74     if (substr($file, 0, 1) != '.') {
75         if(@is_dir(ISPC_THEMES_PATH."/$file")) {
4bd960 76             if(!file_exists(ISPC_THEMES_PATH."/$file/ispconfig_version") || (@file_exists(ISPC_THEMES_PATH."/$file/ispconfig_version") && trim(@file_get_contents(ISPC_THEMES_PATH."/$file/ispconfig_version")) == ISPC_APP_VERSION)) {
5715f5 77                 $themes_list[$file] = $file;
M 78             }
532ae5 79         }
L 80     }
81 }
82
83 $form["tabs"]['address'] = array (
84     'title'     => "Address",
85     'width'     => 100,
86     'template'     => "templates/client_edit_address.htm",
87     'fields'     => array (
88     ##################################
89     # Begin Datatable fields
90     ##################################
91         'company_name' => array (
92             'datatype'    => 'VARCHAR',
93             'formtype'    => 'TEXT',
94             'default'    => '',
95             'value'        => '',
96             'separator'    => '',
97             'width'        => '30',
98             'maxlength'    => '255',
99             'rows'        => '',
4c28d9 100             'cols'        => '',
F 101             'searchable' => 2
532ae5 102         ),
L 103         'contact_name' => array (
104             'datatype'    => 'VARCHAR',
105             'formtype'    => 'TEXT',
222ea2 106             'validators'    => array ( 0 => array (    'type'    => 'NOTEMPTY',
C 107                                                                 'errmsg'=> 'contact_error_empty'),
108                                                 ),
532ae5 109             'default'    => '',
L 110             'value'        => '',
111             'separator'    => '',
112             'width'        => '30',
113             'maxlength'    => '255',
114             'rows'        => '',
4c28d9 115             'cols'        => '',
F 116             'searchable' => 1
532ae5 117         ),
L 118         'customer_no' => array (
119             'datatype'    => 'VARCHAR',
120             'formtype'    => 'TEXT',
4bd960 121             'validators'    => array (     0 => array (    'type'    => 'UNIQUE',
T 122                                                         'errmsg'=> 'customer_no_error_unique',
123                                                         'allowempty' => 'y'),
124                                     ),
532ae5 125             'default'    => '',
L 126             'value'        => '',
127             'separator'    => '',
128             'width'        => '30',
129             'maxlength'    => '255',
130             'rows'        => '',
4c28d9 131             'cols'        => '',
F 132             'searchable' => 2
532ae5 133         ),
L 134         'username' => array (
135             'datatype'    => 'VARCHAR',
136             'formtype'    => 'TEXT',
137             'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
222ea2 138                                                                         'errmsg'=> 'username_error_empty'),
C 139                                                         1 => array (    'type'    => 'CUSTOM',
140                                                                         'class' => 'validate_client',
141                                                                         'function' => 'username_unique',
142                                                                         'errmsg'=> 'username_error_unique'),
143                                                         2 => array (    'type'    => 'CUSTOM',
144                                                                         'class' => 'validate_client',
145                                                                         'function' => 'username_collision',
146                                                                         'errmsg'=> 'username_error_collision'),
147                                                         3 => array (    'type'    => 'REGEX',
148                                                                         'regex' => '/^[\w\.\-\_]{0,64}$/',
149                                                                         'errmsg'=> 'username_error_regex'),
150                                                         ),
532ae5 151             'default'    => '',
L 152             'value'        => '',
153             'separator'    => '',
154             'width'        => '30',
155             'maxlength'    => '255',
156             'rows'        => '',
4c28d9 157             'cols'        => '',
F 158             'searchable' => 2
532ae5 159         ),
L 160         'password' => array (
161             'datatype'    => 'VARCHAR',
162             'formtype'    => 'PASSWORD',
163             'encryption'=> 'CRYPT',
164             'default'    => '',
165             'value'        => '',
166             'separator'    => '',
167             'width'        => '30',
168             'maxlength'    => '255',
169             'rows'        => '',
170             'cols'        => ''
171         ),
172         'language' => array (
173             'datatype'    => 'VARCHAR',
174             'formtype'    => 'SELECT',
175             'default'    => $conf["language"],
176             'value'        => $language_list,
177             'separator'    => '',
178             'width'        => '30',
179             'maxlength'    => '255',
180             'rows'        => '',
181             'cols'        => ''
182         ),
183         'usertheme' => array (
184             'datatype'    => 'VARCHAR',
185             'formtype'    => 'SELECT',
87c1a0 186             'default'    => $conf["theme"],
532ae5 187             'value'        => $themes_list,
L 188             'separator'    => '',
189             'width'        => '30',
190             'maxlength'    => '255',
191             'rows'        => '',
192             'cols'        => ''
193         ),
194         'street' => array (
195             'datatype'    => 'VARCHAR',
196             'formtype'    => 'TEXT',
197             'default'    => '',
198             'value'        => '',
199             'separator'    => '',
200             'width'        => '30',
201             'maxlength'    => '255',
202             'rows'        => '',
4c28d9 203             'cols'        => '',
F 204             'searchable' => 2
532ae5 205         ),
L 206         'zip' => array (
207             'datatype'    => 'VARCHAR',
208             'formtype'    => 'TEXT',
209             'default'    => '',
210             'value'        => '',
211             'separator'    => '',
212             'width'        => '10',
213             'maxlength'    => '255',
214             'rows'        => '',
4c28d9 215             'cols'        => '',
F 216             'searchable' => 2
532ae5 217         ),
L 218         'city' => array (
219             'datatype'    => 'VARCHAR',
220             'formtype'    => 'TEXT',
221             'default'    => '',
222             'value'        => '',
223             'separator'    => '',
224             'width'        => '30',
225             'maxlength'    => '255',
226             'rows'        => '',
4c28d9 227             'cols'        => '',
F 228             'searchable' => 2
532ae5 229         ),
L 230         'state' => array (
231             'datatype'    => 'VARCHAR',
232             'formtype'    => 'TEXT',
233             'default'    => '',
234             'value'        => '',
235             'separator'    => '',
236             'width'        => '30',
237             'maxlength'    => '255',
238             'rows'        => '',
4c28d9 239             'cols'        => '',
F 240             'searchable' => 2
532ae5 241         ),
L 242         'country' => array (
243             'datatype'    => 'VARCHAR',
244             'formtype'    => 'SELECT',
833369 245             'default'    => (isset($conf['language']) ? strtoupper($conf['language']) : ''),
222ea2 246             'datasource'    => array (  'type'          => 'SQL',
C 247                                                     'querystring'   => 'SELECT iso,printable_name FROM country ORDER BY iso ASC',
248                                                     'keyfield'      => 'iso',
249                                                     'valuefield'    => 'printable_name'
250                                                 ),
532ae5 251             'value'        => ''
L 252         ),
253         'telephone' => array (
254             'datatype'    => 'VARCHAR',
255             'formtype'    => 'TEXT',
256             'default'    => '',
257             'value'        => '',
258             'separator'    => '',
259             'width'        => '30',
260             'maxlength'    => '255',
261             'rows'        => '',
4c28d9 262             'cols'        => '',
F 263             'searchable' => 2
532ae5 264         ),
L 265         'mobile' => array (
266             'datatype'    => 'VARCHAR',
267             'formtype'    => 'TEXT',
268             'default'    => '',
269             'value'        => '',
270             'separator'    => '',
271             'width'        => '30',
272             'maxlength'    => '255',
273             'rows'        => '',
4c28d9 274             'cols'        => '',
F 275             'searchable' => 2
532ae5 276         ),
L 277         'fax' => array (
278             'datatype'    => 'VARCHAR',
279             'formtype'    => 'TEXT',
280             'default'    => '',
281             'value'        => '',
282             'separator'    => '',
283             'width'        => '30',
284             'maxlength'    => '255',
285             'rows'        => '',
4c28d9 286             'cols'        => '',
F 287             'searchable' => 2
532ae5 288         ),
L 289         'email' => array (
290             'datatype'    => 'VARCHAR',
291             'formtype'    => 'TEXT',
8c1761 292             'filters'   => array( 0 => array( 'event' => 'SAVE',
M 293                                               'type' => 'IDNTOASCII'),
294                                   1 => array( 'event' => 'SHOW',
295                                               'type' => 'IDNTOUTF8'),
296                                   2 => array( 'event' => 'SAVE',
297                                               'type' => 'TOLOWER')
298                                 ),
a00888 299             'validators'    => array (     0 => array (    'type'    => 'REGEX',
T 300                                                         'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,1}$/i',
301                                                         'errmsg'=> 'email_error_isemail'),
302                                     ),
532ae5 303             'default'    => '',
L 304             'value'        => '',
305             'separator'    => '',
306             'width'        => '30',
307             'maxlength'    => '255',
308             'rows'        => '',
4c28d9 309             'cols'        => '',
F 310             'searchable' => 2
532ae5 311         ),
L 312         'internet' => array (
313             'datatype'    => 'VARCHAR',
314             'formtype'    => 'TEXT',
315             'default'    => 'http://',
316             'value'        => '',
317             'separator'    => '',
318             'width'        => '30',
319             'maxlength'    => '255',
320             'rows'        => '',
4c28d9 321             'cols'        => '',
F 322             'searchable' => 2
532ae5 323         ),
L 324         'icq' => array (
325             'datatype'    => 'VARCHAR',
326             'formtype'    => 'TEXT',
327             'default'    => '',
328             'value'        => '',
329             'separator'    => '',
330             'width'        => '30',
331             'maxlength'    => '255',
332             'rows'        => '',
333             'cols'        => ''
334         ),
335         'vat_id' => array (
336             'datatype'    => 'VARCHAR',
337             'formtype'    => 'TEXT',
338             'default'    => '',
339             'value'        => '',
340             'separator'    => '',
341             'width'        => '30',
342             'maxlength'    => '255',
343             'rows'        => '',
344             'cols'        => ''
345         ),
346         'company_id' => array (
347             'datatype'    => 'VARCHAR',
348             'formtype'    => 'TEXT',
349             'default'    => '',
350             'value'        => '',
351             'separator'    => '',
352             'width'        => '30',
353             'maxlength'    => '20',
354             'rows'        => '',
355             'cols'        => ''
356         ),
8d0c35 357         'bank_account_owner' => array (
M 358             'datatype'    => 'VARCHAR',
359             'formtype'    => 'TEXT',
360             'default'    => '',
361             'value'        => '',
362             'separator'    => '',
363             'width'        => '30',
364             'maxlength'    => '255',
365             'rows'        => '',
366             'cols'        => ''
367         ),
7ad91f 368         'bank_account_number' => array (
F 369             'datatype'    => 'VARCHAR',
370             'formtype'    => 'TEXT',
371             'default'    => '',
372             'value'        => '',
373             'separator'    => '',
374             'width'        => '30',
375             'maxlength'    => '255',
376             'rows'        => '',
377             'cols'        => ''
378         ),
379         'bank_code' => array (
380             'datatype'    => 'VARCHAR',
381             'formtype'    => 'TEXT',
382             'default'    => '',
383             'value'        => '',
384             'separator'    => '',
385             'width'        => '30',
386             'maxlength'    => '255',
387             'rows'        => '',
388             'cols'        => ''
389         ),
390         'bank_name' => array (
391             'datatype'    => 'VARCHAR',
392             'formtype'    => 'TEXT',
393             'default'    => '',
394             'value'        => '',
395             'separator'    => '',
396             'width'        => '30',
397             'maxlength'    => '255',
398             'rows'        => '',
399             'cols'        => ''
400         ),
401         'bank_account_iban' => array (
402             'datatype'    => 'VARCHAR',
403             'formtype'    => 'TEXT',
404             'default'    => '',
405             'value'        => '',
406             'separator'    => '',
407             'width'        => '30',
408             'maxlength'    => '255',
409             'rows'        => '',
410             'cols'        => ''
411         ),
412         'bank_account_swift' => array (
413             'datatype'    => 'VARCHAR',
414             'formtype'    => 'TEXT',
415             'default'    => '',
416             'value'        => '',
417             'separator'    => '',
418             'width'        => '30',
419             'maxlength'    => '255',
420             'rows'        => '',
421             'cols'        => ''
422         ),
532ae5 423         'notes' => array (
L 424             'datatype'    => 'TEXT',
425             'formtype'    => 'TEXTAREA',
426             'default'    => '',
427             'value'        => '',
428             'separator'    => '',
429             'width'        => '',
430             'maxlength'    => '',
431             'rows'        => '10',
432             'cols'        => '30'
433         ),
bfcdef 434         'paypal_email' => array (
T 435             'datatype'    => 'VARCHAR',
436             'formtype'    => 'TEXT',
437             'filters'   => array( 0 => array( 'event' => 'SAVE',
438                                               'type' => 'IDNTOASCII'),
439                                   1 => array( 'event' => 'SHOW',
440                                               'type' => 'IDNTOUTF8'),
441                                   2 => array( 'event' => 'SAVE',
442                                               'type' => 'TOLOWER')
443                                 ),
444             'validators'    => array (     0 => array (    'type'    => 'REGEX',
445                                                         'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,1}$/i',
446                                                         'errmsg'=> 'paypal_email_error_isemail'),
447                                     ),
448             'default'    => '',
449             'value'        => '',
450             'separator'    => '',
451             'width'        => '30',
452             'maxlength'    => '255',
453             'rows'        => '',
454             'cols'        => '',
455             'searchable' => 2
456         ),
532ae5 457     ##################################
L 458     # END Datatable fields
459     ##################################
460     )
461 );
462
463 $form["tabs"]['limits'] = array (
464     'title'     => "Limits",
465     'width'     => 80,
466     'template'     => "templates/client_edit_limits.htm",
467     'fields'     => array (
468     ##################################
469     # Begin Datatable fields
470     ##################################
471         'template_master' => array (
472             'datatype'    => 'INTEGER',
473             'formtype'    => 'SELECT',
474             'default'    => '1',
475             'datasource'    => array (     'type'    => 'CUSTOM',
476                                         'class'=> 'custom_datasource',
477                                         'function'=> 'master_templates'
478                                      ),
479             'value'        => ''
480         ),
481         'template_additional' => array (
482             'datatype'    => 'VARCHAR',
483             'formtype'    => 'TEXT',
484         ),
485         'default_mailserver' => array (
486             'datatype'    => 'INTEGER',
487             'formtype'    => 'SELECT',
488             'default'    => '1',
489             'datasource'    => array (     'type'    => 'CUSTOM',
490                                         'class'=> 'custom_datasource',
491                                         'function'=> 'client_servers'
492                                      ),
493             'value'        => '',
494             'name'        => 'default_mailserver'
495         ),
496         'limit_maildomain' => array (
497             'datatype'    => 'INTEGER',
498             'formtype'    => 'TEXT',
499             'validators'    => array (     0 => array (    'type'    => 'ISINT',
500                                                         'errmsg'=> 'limit_maildomain_error_notint'),
501                                     ),
502             'default'    => '-1',
503             'value'        => '',
504             'separator'    => '',
505             'width'        => '10',
506             'maxlength'    => '10',
507             'rows'        => '',
508             'cols'        => ''
509         ),
510         'limit_mailbox' => array (
511             'datatype'    => 'INTEGER',
512             'formtype'    => 'TEXT',
513             'validators'    => array (     0 => array (    'type'    => 'ISINT',
514                                                         'errmsg'=> 'limit_mailbox_error_notint'),
515                                     ),
516             'default'    => '-1',
517             'value'        => '',
518             'separator'    => '',
519             'width'        => '10',
520             'maxlength'    => '10',
521             'rows'        => '',
522             'cols'        => ''
523         ),
524         'limit_mailalias' => array (
525             'datatype'    => 'INTEGER',
526             'formtype'    => 'TEXT',
527             'validators'    => array (     0 => array (    'type'    => 'ISINT',
528                                                         'errmsg'=> 'limit_mailalias_error_notint'),
529                                     ),
530             'default'    => '-1',
531             'value'        => '',
532             'separator'    => '',
533             'width'        => '10',
534             'maxlength'    => '10',
535             'rows'        => '',
536             'cols'        => ''
537         ),
538         'limit_mailaliasdomain' => array (
539             'datatype'    => 'INTEGER',
540             'formtype'    => 'TEXT',
541             'validators'    => array (     0 => array (    'type'    => 'ISINT',
542                                                         'errmsg'=> 'limit_mailaliasdomain_error_notint'),
543                                     ),
544             'default'    => '-1',
545             'value'        => '',
546             'separator'    => '',
547             'width'        => '10',
548             'maxlength'    => '10',
549             'rows'        => '',
550             'cols'        => ''
551         ),
552         'limit_mailmailinglist' => array (
553             'datatype'    => 'INTEGER',
554             'formtype'    => 'TEXT',
555             'validators'    => array (     0 => array (    'type'    => 'ISINT',
556                                                         'errmsg'=> 'limit_mailmailinglist_error_notint'),
557                                     ),
558             'default'    => '-1',
559             'value'        => '',
560             'separator'    => '',
561             'width'        => '10',
562             'maxlength'    => '10',
563             'rows'        => '',
564             'cols'        => ''
565         ),
566         'limit_mailforward' => array (
567             'datatype'    => 'INTEGER',
568             'formtype'    => 'TEXT',
569             'validators'    => array (     0 => array (    'type'    => 'ISINT',
570                                                         'errmsg'=> 'limit_mailforward_error_notint'),
571                                     ),
572             'default'    => '-1',
573             'value'        => '',
574             'separator'    => '',
575             'width'        => '10',
576             'maxlength'    => '10',
577             'rows'        => '',
578             'cols'        => ''
579         ),
580         'limit_mailcatchall' => array (
581             'datatype'    => 'INTEGER',
582             'formtype'    => 'TEXT',
583             'validators'    => array (     0 => array (    'type'    => 'ISINT',
584                                                         'errmsg'=> 'limit_mailcatchall_error_notint'),
585                                     ),
586             'default'    => '-1',
587             'value'        => '',
588             'separator'    => '',
589             'width'        => '10',
590             'maxlength'    => '10',
591             'rows'        => '',
592             'cols'        => ''
593         ),
594         'limit_mailrouting' => array (
595             'datatype'    => 'INTEGER',
596             'formtype'    => 'TEXT',
597             'validators'    => array (     0 => array (    'type'    => 'ISINT',
598                                                         'errmsg'=> 'limit_mailrouting_error_notint'),
599                                     ),
600             'default'    => '0',
601             'value'        => '',
602             'separator'    => '',
603             'width'        => '10',
604             'maxlength'    => '10',
605             'rows'        => '',
606             'cols'        => ''
607         ),
608         'limit_mailfilter' => array (
609             'datatype'    => 'INTEGER',
610             'formtype'    => 'TEXT',
611             'validators'    => array (     0 => array (    'type'    => 'ISINT',
612                                                         'errmsg'=> 'limit_mailfilter_error_notint'),
613                                     ),
614             'default'    => '-1',
615             'value'        => '',
616             'separator'    => '',
617             'width'        => '10',
618             'maxlength'    => '10',
619             'rows'        => '',
620             'cols'        => ''
621         ),
622         'limit_fetchmail' => array (
623             'datatype'    => 'INTEGER',
624             'formtype'    => 'TEXT',
625             'validators'    => array (     0 => array (    'type'    => 'ISINT',
626                                                         'errmsg'=> 'limit_mailfetchmail_error_notint'),
627                                     ),
628             'default'    => '-1',
629             'value'        => '',
630             'separator'    => '',
631             'width'        => '10',
632             'maxlength'    => '10',
633             'rows'        => '',
634             'cols'        => ''
635         ),
636         'limit_mailquota' => array (
637             'datatype'    => 'INTEGER',
638             'formtype'    => 'TEXT',
639             'validators'    => array (     0 => array (    'type'    => 'ISINT',
640                                                         'errmsg'=> 'limit_mailquota_error_notint'),
641                                     ),
642             'default'    => '-1',
643             'value'        => '',
644             'separator'    => '',
645             'width'        => '10',
646             'maxlength'    => '10',
647             'rows'        => '',
648             'cols'        => ''
649         ),
650         'limit_spamfilter_wblist' => array (
651             'datatype'    => 'INTEGER',
652             'formtype'    => 'TEXT',
653             'validators'    => array (     0 => array (    'type'    => 'ISINT',
654                                                         'errmsg'=> 'limit_spamfilter_wblist_error_notint'),
655                                     ),
656             'default'    => '-1',
657             'value'        => '',
658             'separator'    => '',
659             'width'        => '10',
660             'maxlength'    => '10',
661             'rows'        => '',
662             'cols'        => ''
663         ),
664         'limit_spamfilter_user' => array (
665             'datatype'    => 'INTEGER',
666             'formtype'    => 'TEXT',
667             'validators'    => array (     0 => array (    'type'    => 'ISINT',
668                                                         'errmsg'=> 'limit_spamfilter_user_error_notint'),
669                                     ),
670             'default'    => '-1',
671             'value'        => '',
672             'separator'    => '',
673             'width'        => '10',
674             'maxlength'    => '10',
675             'rows'        => '',
676             'cols'        => ''
677         ),
678         'limit_spamfilter_policy' => array (
679             'datatype'    => 'INTEGER',
680             'formtype'    => 'TEXT',
681             'validators'    => array (     0 => array (    'type'    => 'ISINT',
682                                                         'errmsg'=> 'limit_spamfilter_policy_error_notint'),
683                                     ),
684             'default'    => '-1',
685             'value'        => '',
686             'separator'    => '',
687             'width'        => '10',
688             'maxlength'    => '10',
689             'rows'        => '',
690             'cols'        => ''
691         ),
692         'default_webserver' => array (
693             'datatype'    => 'INTEGER',
694             'formtype'    => 'SELECT',
695             'default'    => '1',
696             'datasource'    => array (     'type'    => 'CUSTOM',
697                                         'class'=> 'custom_datasource',
698                                         'function'=> 'client_servers'
699                                      ),
700             'value'        => '',
701             'name'        => 'default_webserver'
702         ),
703         'limit_web_domain' => array (
704             'datatype'    => 'INTEGER',
705             'formtype'    => 'TEXT',
706             'validators'    => array (     0 => array (    'type'    => 'ISINT',
707                                                         'errmsg'=> 'limit_web_domain_error_notint'),
708                                     ),
709             'default'    => '-1',
710             'value'        => '',
711             'separator'    => '',
712             'width'        => '10',
713             'maxlength'    => '10',
714             'rows'        => '',
715             'cols'        => ''
716         ),
717         'limit_web_quota' => array (
718             'datatype'    => 'INTEGER',
719             'formtype'    => 'TEXT',
720             'validators'    => array (     0 => array (    'type'    => 'ISINT',
721                                                         'errmsg'=> 'limit_web_quota_error_notint'),
722                                     ),
723             'default'    => '-1',
724             'value'        => '',
725             'separator'    => '',
726             'width'        => '10',
727             'maxlength'    => '10',
728             'rows'        => '',
729             'cols'        => ''
730         ),
731         'web_php_options' => array (
732             'datatype'    => 'VARCHAR',
733             'formtype'    => 'CHECKBOXARRAY',
8cf78b 734             'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
T 735                                                         'errmsg'=> 'web_php_options_notempty'),
736                                     ),
532ae5 737             'default'    => '',
L 738             'separator' => ',',
739             'valuelimit' => 'client:web_php_options',
c56ca0 740             'value'        => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP', 'php-fpm' => 'PHP-FPM')
532ae5 741         ),
ac099e 742         'limit_cgi' => array (
M 743             'datatype'    => 'VARCHAR',
744             'formtype'    => 'CHECKBOX',
745             'default'    => 'n',
746             'value'        => array(0 => 'n',1 => 'y')
747         ),
748         'limit_ssi' => array (
749             'datatype'    => 'VARCHAR',
750             'formtype'    => 'CHECKBOX',
751             'default'    => 'n',
752             'value'        => array(0 => 'n',1 => 'y')
753         ),
754         'limit_perl' => array (
755             'datatype'    => 'VARCHAR',
756             'formtype'    => 'CHECKBOX',
757             'default'    => 'n',
758             'value'        => array(0 => 'n',1 => 'y')
759         ),
760         'limit_ruby' => array (
761             'datatype'    => 'VARCHAR',
762             'formtype'    => 'CHECKBOX',
763             'default'    => 'n',
764             'value'        => array(0 => 'n',1 => 'y')
765         ),
766         'limit_python' => array (
767             'datatype'    => 'VARCHAR',
768             'formtype'    => 'CHECKBOX',
769             'default'    => 'n',
770             'value'        => array(0 => 'n',1 => 'y')
771         ),
772         'force_suexec' => array (
773             'datatype'    => 'VARCHAR',
774             'formtype'    => 'CHECKBOX',
775             'default'    => 'y',
776             'value'        => array(0 => 'n',1 => 'y')
777         ),
778         'limit_hterror' => array (
779             'datatype'    => 'VARCHAR',
780             'formtype'    => 'CHECKBOX',
781             'default'    => 'n',
782             'value'        => array(0 => 'n',1 => 'y')
783         ),
784         'limit_wildcard' => array (
785             'datatype'    => 'VARCHAR',
786             'formtype'    => 'CHECKBOX',
787             'default'    => 'n',
788             'value'        => array(0 => 'n',1 => 'y')
789         ),
790         'limit_ssl' => array (
791             'datatype'    => 'VARCHAR',
792             'formtype'    => 'CHECKBOX',
793             'default'    => 'n',
794             'value'        => array(0 => 'n',1 => 'y')
795         ),
532ae5 796         'limit_web_aliasdomain' => array (
L 797             'datatype'    => 'INTEGER',
798             'formtype'    => 'TEXT',
799             'validators'    => array (     0 => array (    'type'    => 'ISINT',
800                                                         'errmsg'=> 'limit_web_aliasdomain_error_notint'),
801                                     ),
802             'default'    => '-1',
803             'value'        => '',
804             'separator'    => '',
805             'width'        => '10',
806             'maxlength'    => '10',
807             'rows'        => '',
808             'cols'        => ''
809         ),
810         'limit_web_subdomain' => array (
811             'datatype'    => 'INTEGER',
812             'formtype'    => 'TEXT',
813             'validators'    => array (     0 => array (    'type'    => 'ISINT',
814                                                         'errmsg'=> 'limit_web_subdomain_error_notint'),
815                                     ),
816             'default'    => '-1',
817             'value'        => '',
818             'separator'    => '',
819             'width'        => '10',
820             'maxlength'    => '10',
821             'rows'        => '',
822             'cols'        => ''
823         ),
824         'limit_ftp_user' => array (
825             'datatype'    => 'INTEGER',
826             'formtype'    => 'TEXT',
827             'validators'    => array (     0 => array (    'type'    => 'ISINT',
828                                                         'errmsg'=> 'limit_ftp_user_error_notint'),
829                                     ),
830             'default'    => '-1',
831             'value'        => '',
832             'separator'    => '',
833             'width'        => '10',
834             'maxlength'    => '10',
835             'rows'        => '',
836             'cols'        => ''
837         ),
838         'limit_shell_user' => array (
839             'datatype'    => 'INTEGER',
840             'formtype'    => 'TEXT',
841             'validators'    => array (     0 => array (    'type'    => 'ISINT',
842                                                         'errmsg'=> 'limit_shell_user_error_notint'),
843                                     ),
844             'default'    => '-1',
845             'value'        => '',
846             'separator'    => '',
847             'width'        => '10',
848             'maxlength'    => '10',
849             'rows'        => '',
850             'cols'        => ''
851         ),
852         'ssh_chroot' => array (
853             'datatype'    => 'VARCHAR',
854             'formtype'    => 'CHECKBOXARRAY',
8cf78b 855             'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
T 856                                                         'errmsg'=> 'ssh_chroot_notempty'),
857                                     ),
532ae5 858             'default'    => '',
L 859             'separator' => ',',
860             'valuelimit' => 'client:ssh_chroot',
861             'value'        => array('no' => 'None', 'jailkit' => 'Jailkit')
862         ),
863         'limit_webdav_user' => array (
864             'datatype'    => 'INTEGER',
865             'formtype'    => 'TEXT',
866             'validators'    => array (     0 => array (    'type'    => 'ISINT',
867                                                         'errmsg'=> 'limit_webdav_user_error_notint'),
868                                     ),
869             'default'    => '-1',
870             'value'        => '',
871             'separator'    => '',
872             'width'        => '10',
873             'maxlength'    => '10',
874             'rows'        => '',
875             'cols'        => ''
876         ),
877         'default_dnsserver' => array (
878             'datatype'    => 'INTEGER',
879             'formtype'    => 'SELECT',
880             'default'    => '1',
881             'datasource'    => array (     'type'    => 'CUSTOM',
882                                         'class'=> 'custom_datasource',
883                                         'function'=> 'client_servers'
884                                      ),
885             'value'        => '',
886             'name'        => 'default_dnsserver'
887         ),
888         'limit_dns_zone' => array (
889             'datatype'    => 'INTEGER',
890             'formtype'    => 'TEXT',
891             'validators'    => array (     0 => array (    'type'    => 'ISINT',
892                                                         'errmsg'=> 'limit_dns_zone_error_notint'),
893                                     ),
894             'default'    => '-1',
895             'value'        => '',
896             'separator'    => '',
897             'width'        => '10',
898             'maxlength'    => '10',
899             'rows'        => '',
900             'cols'        => ''
901         ),
902                 'limit_dns_slave_zone' => array (
903                         'datatype'      => 'INTEGER',
904                         'formtype'      => 'TEXT',
905                         'validators'    => array (      0 => array (    'type'  => 'ISINT',
906                                                                                                                 'errmsg'=> 'limit_dns_slave_zone_error_notint'),
907                                                                         ),
908                         'default'       => '-1',
909                         'value'         => '',
910                         'separator'     => '',
911                         'width'         => '10',
912                         'maxlength'     => '10',
913                         'rows'          => '',
914                         'cols'          => ''
915                 ),
916         'limit_dns_record' => array (
917             'datatype'    => 'INTEGER',
918             'formtype'    => 'TEXT',
919             'validators'    => array (     0 => array (    'type'    => 'ISINT',
920                                                         'errmsg'=> 'limit_dns_record_error_notint'),
921                                     ),
922             'default'    => '-1',
923             'value'        => '',
924             'separator'    => '',
925             'width'        => '10',
926             'maxlength'    => '10',
927             'rows'        => '',
928             'cols'        => ''
929         ),
930         'limit_client' => array (
931             'datatype'    => 'INTEGER',
932             'formtype'    => 'TEXT',
933             'validators'    => array (     0 => array (    'type'    => 'ISINT',
934                                                         'errmsg'=> 'limit_client_error_notint'),
935                                     ),
936             'default'    => '0',
937             'value'        => '',
938             'separator'    => '',
939             'width'        => '10',
940             'maxlength'    => '10',
941             'rows'        => '',
942             'cols'        => ''
943         ),
944         'default_dbserver' => array (
945             'datatype'    => 'INTEGER',
946             'formtype'    => 'SELECT',
947             'default'    => '1',
948             'datasource'    => array (     'type'    => 'CUSTOM',
949                                         'class'=> 'custom_datasource',
950                                         'function'=> 'client_servers'
951                                      ),
952             'value'        => '',
953             'name'        => 'default_dbserver'
954         ),
955         'limit_database' => array (
956             'datatype'    => 'INTEGER',
957             'formtype'    => 'TEXT',
958             'validators'    => array (     0 => array (    'type'    => 'ISINT',
959                                                         'errmsg'=> 'limit_database_error_notint'),
960                                     ),
961             'default'    => '-1',
962             'value'        => '',
963             'separator'    => '',
964             'width'        => '10',
965             'maxlength'    => '10',
966             'rows'        => '',
967             'cols'        => ''
968         ),
969         'limit_cron' => array (
970             'datatype'  => 'INTEGER',
971             'formtype'  => 'TEXT',
972             'validators'    => array (  0 => array (    'type'  => 'ISINT',
973                                                         'errmsg'=> 'limit_cron_error_notint'),
974                                     ),
975             'default'   => '0',
976             'value'     => '',
977             'separator' => '',
978             'width'     => '10',
979             'maxlength' => '10',
980             'rows'      => '',
981             'cols'      => ''
982         ),
983         'limit_cron_type' => array (
984             'datatype'  => 'VARCHAR',
985             'formtype'  => 'SELECT',
986             'default'   => '',
987             'value'     => array('full' => 'Full Cron','chrooted' => 'Chrooted Cron','url' => 'URL Cron')
988         ),
989         'limit_cron_frequency' => array (
990             'datatype'  => 'INTEGER',
991             'formtype'  => 'TEXT',
992             'validators'    => array (  0 => array (    'type'  => 'ISINT',
993                                                         'errmsg'=> 'limit_cron_error_frequency'),
994                                     ),
995             'default'   => '-1',
996             'value'     => '',
997             'separator' => '',
998             'width'     => '10',
999             'maxlength' => '10',
1000             'rows'      => '',
1001             'cols'      => ''
1002         ),
1003         'limit_traffic_quota' => array (
1004             'datatype'    => 'INTEGER',
1005             'formtype'    => 'TEXT',
1006             'validators'    => array (     0 => array (    'type'    => 'ISINT',
1007                                                         'errmsg'=> 'limit_traffic_quota_error_notint'),
1008                                     ),
1009             'default'    => '-1',
1010             'value'        => '',
1011             'separator'    => '',
1012             'width'        => '10',
1013             'maxlength'    => '10',
1014             'rows'        => '',
1015             'cols'        => ''
1016         ),
f414ab 1017         'limit_openvz_vm' => array (
T 1018             'datatype'    => 'INTEGER',
1019             'formtype'    => 'TEXT',
1020             'validators'    => array (     0 => array (    'type'    => 'ISINT',
1021                                                         'errmsg'=> 'limit_openvz_vm_error_notint'),
1022                                     ),
1023             'default'    => '0',
1024             'value'        => '',
1025             'separator'    => '',
1026             'width'        => '10',
1027             'maxlength'    => '10',
1028             'rows'        => '',
1029             'cols'        => ''
1030         ),
1031         'limit_openvz_vm_template_id' => array (
1032             'datatype'    => 'INTEGER',
1033             'formtype'    => 'SELECT',
1034             'default'    => '',
1035             'datasource'    => array (     'type'    => 'SQL',
1036                                         'querystring' => 'SELECT template_id,template_name FROM openvz_template WHERE 1 ORDER BY template_name',
1037                                         'keyfield'=> 'template_id',
1038                                         'valuefield'=> 'template_name'
1039                                      ),
1040             'value'        => array(0 => ' ')
1041         ),
526b99 1042         'limit_aps' => array (
T 1043             'datatype'    => 'INTEGER',
1044             'formtype'    => 'TEXT',
1045             'validators'    => array (     0 => array (    'type'    => 'ISINT',
1046                                                         'errmsg'=> 'limit_aps_error_notint'),
1047                                     ),
1048             'default'    => '-1',
1049             'value'        => '',
1050             'separator'    => '',
1051             'width'        => '10',
1052             'maxlength'    => '10',
1053             'rows'        => '',
1054             'cols'        => ''
1055         ),
532ae5 1056     ##################################
L 1057     # END Datatable fields
1058     ##################################
1059     )
1060 );
1061
1062 /*
1063 $form["tabs"]['ipaddress'] = array (
1064     'title'     => "IP Addresses",
1065     'width'     => 100,
1066     'template'     => "templates/client_edit_ipaddress.htm",
1067     'fields'     => array (
1068     ##################################
1069     # Beginn Datatable fields
1070     ##################################
1071         'ip_address' => array (
1072             'datatype'    => 'TEXT',
1073             'formtype'    => 'CHECKBOXARRAY',
1074             'default'    => '',
1075             'value'        => array('192.168.0.1' => '192.168.0.1', '192.168.0.2' => '192.168.0.2'),
1076             'separator'    => ';'
1077         ),
1078     ##################################
1079     # ENDE Datatable fields
1080     ##################################
1081     )
1082 );
1083 */
1084
1085
1086 ?>