Marius Cramer
2014-08-13 31230cb7cda673db7a96fb14d93dfaf9262c74cf
commit | author | age
8896ab 1 <?php
N 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
7fe908 36 $form["title"]   = "System Config";
MC 37 $form["description"]  = "system_config_desc_txt";
38 $form["name"]   = "system_config";
39 $form["action"]  = "system_config_edit.php";
40 $form["db_table"] = "sys_ini";
41 $form["db_table_idx"] = "sysini_id";
42 $form["db_history"] = "yes";
43 $form["tab_default"] = "sites";
44 $form["list_default"] = "server_list.php";
45 $form["auth"]  = 'yes'; // yes / no
8896ab 46
N 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"]['sites'] = array (
7fe908 54     'title'  => "Sites",
MC 55     'width'  => 70,
56     'template'  => "templates/system_config_sites_edit.htm",
57     'fields'  => array (
58         //#################################
59         // Begin Datatable fields
60         //#################################
8896ab 61         'dbname_prefix' => array (
7fe908 62             'datatype' => 'VARCHAR',
MC 63             'formtype' => 'TEXT',
64             'validators' => array ( 0 => array ( 'type' => 'REGEX',
7dd923 65                     'regex' => '/^[a-zA-Z0-9\-\_\[\]]{0,50}$/',
7fe908 66                     'errmsg'=> 'dbname_prefix_error_regex'),
MC 67             ),
68             'default' => '',
69             'value'  => '',
70             'width'  => '30',
71             'maxlength' => '255'
8896ab 72         ),
N 73         'dbuser_prefix' => array (
7fe908 74             'datatype' => 'VARCHAR',
MC 75             'formtype' => 'TEXT',
76             'validators' => array ( 0 => array ( 'type' => 'REGEX',
7dd923 77                     'regex' => '/^[a-zA-Z0-9\-\_\[\]]{0,50}$/',
7fe908 78                     'errmsg'=> 'dbuser_prefix_error_regex'),
MC 79             ),
80             'default' => '',
81             'value'  => '',
82             'width'  => '30',
83             'maxlength' => '255'
8896ab 84         ),
N 85         'ftpuser_prefix' => array (
7fe908 86             'datatype' => 'VARCHAR',
MC 87             'formtype' => 'TEXT',
88             'validators' => array ( 0 => array ( 'type' => 'REGEX',
7dd923 89                     'regex' => '/^[a-zA-Z0-9\-\_\[\]]{0,50}$/',
7fe908 90                     'errmsg'=> 'ftpuser_prefix_error_regex'),
MC 91             ),
92             'default' => '',
93             'value'  => '',
94             'width'  => '30',
95             'maxlength' => '255'
8896ab 96         ),
N 97         'shelluser_prefix' => array (
7fe908 98             'datatype' => 'VARCHAR',
MC 99             'formtype' => 'TEXT',
100             'validators' => array ( 0 => array ( 'type' => 'REGEX',
7dd923 101                     'regex' => '/^[a-zA-Z0-9\-\_\[\]]{0,50}$/',
7fe908 102                     'errmsg'=> 'shelluser_prefix_error_regex'),
MC 103             ),
104             'default' => '',
105             'value'  => '',
106             'width'  => '30',
107             'maxlength' => '255'
8896ab 108         ),
N 109         'webdavuser_prefix' => array (
7fe908 110             'datatype' => 'VARCHAR',
MC 111             'formtype' => 'TEXT',
112             'validators' => array ( 0 => array ( 'type' => 'REGEX',
7dd923 113                     'regex' => '/^[a-zA-Z0-9\-\_\[\]]{0,50}$/',
7fe908 114                     'errmsg'=> 'webdavuser_prefix_error_regex'),
MC 115             ),
116             'default' => '',
117             'value'  => '',
118             'width'  => '30',
119             'maxlength' => '255'
8896ab 120         ),
N 121         'dblist_phpmyadmin_link' => array (
7fe908 122             'datatype' => 'VARCHAR',
MC 123             'formtype' => 'CHECKBOX',
124             'default' => 'n',
125             'value'  => array(0 => 'n', 1 => 'y')
8896ab 126         ),
N 127         'phpmyadmin_url' => array (
7fe908 128             'datatype' => 'VARCHAR',
MC 129             'formtype' => 'TEXT',
130             'validators' => array ( 0 => array ( 'type' => 'REGEX',
dc19c4 131                     'regex' => '/^[0-9a-zA-Z\:\/\-\.\_\[\]\?\=\&]{0,255}$/',
7fe908 132                     'errmsg'=> 'phpmyadmin_url_error_regex'),
MC 133             ),
134             'default' => '',
135             'value'  => '',
136             'width'  => '30',
137             'maxlength' => '255'
8896ab 138         ),
N 139         'webftp_url' => array (
7fe908 140             'datatype' => 'VARCHAR',
MC 141             'formtype' => 'TEXT',
142             'validators' => array ( 0 => array ( 'type' => 'REGEX',
143                     'regex' => '/^[0-9a-zA-Z\:\/\-\.]{0,255}$/',
144                     'errmsg'=> 'webftp_url_error_regex'),
145             ),
146             'default' => '',
147             'value'  => '',
148             'width'  => '30',
149             'maxlength' => '255'
8896ab 150         ),
6fb93d 151         'vhost_subdomains' => array (
7fe908 152             'datatype' => 'VARCHAR',
MC 153             'formtype' => 'CHECKBOX',
154             'default' => 'n',
155             'value'  => array(0 => 'n', 1 => 'y')
6fb93d 156         ),
10b4c8 157         'client_username_web_check_disabled' => array (
7fe908 158             'datatype' => 'VARCHAR',
MC 159             'formtype' => 'CHECKBOX',
160             'default' => 'n',
161             'value'  => array(0 => 'n', 1 => 'y')
10b4c8 162         ),
7fe908 163         //#################################
MC 164         // ENDE Datatable fields
165         //#################################
8896ab 166     )
N 167 );
168
169 $form["tabs"]['mail'] = array (
7fe908 170     'title'  => "Mail",
MC 171     'width'  => 70,
172     'template'  => "templates/system_config_mail_edit.htm",
173     'fields'  => array (
174         //#################################
175         // Begin Datatable fields
176         //#################################
177         'enable_custom_login' => array(
178             'datatype' => 'VARCHAR',
179             'formtype' => 'CHECKBOX',
180             'default' => 'n',
181             'value' => array(0 => 'n', 1 => 'y')
182         ),
8896ab 183         'mailboxlist_webmail_link' => array (
7fe908 184             'datatype' => 'VARCHAR',
MC 185             'formtype' => 'CHECKBOX',
186             'default' => 'n',
187             'value'  => array(0 => 'n', 1 => 'y')
8896ab 188         ),
N 189         'webmail_url' => array (
7fe908 190             'datatype' => 'VARCHAR',
MC 191             'formtype' => 'TEXT',
192             'validators' => array ( 0 => array ( 'type' => 'REGEX',
193                     /*'regex' => '/^[0-9a-zA-Z\:\/\-\.]{0,255}(\?.+)?$/',*/
194                     'regex' => '/^[0-9a-zA-Z\:\/\-\.\[\]]{0,255}$/',
195                     'errmsg'=> 'webmail_url_error_regex'),
196             ),
197             'default' => '',
198             'value'  => '',
199             'width'  => '30',
200             'maxlength' => '255'
8896ab 201         ),
N 202         'mailmailinglist_link' => array (
7fe908 203             'datatype' => 'VARCHAR',
MC 204             'formtype' => 'CHECKBOX',
205             'default' => 'n',
206             'value'  => array(0 => 'n', 1 => 'y')
8896ab 207         ),
N 208         'mailmailinglist_url' => array (
7fe908 209             'datatype' => 'VARCHAR',
MC 210             'formtype' => 'TEXT',
211             'validators' => array ( 0 => array ( 'type' => 'REGEX',
212                     'regex' => '/^[0-9a-zA-Z\:\/\-\.]{0,255}$/',
213                     'errmsg'=> 'mailinglist_url_error_regex'),
214             ),
215             'default' => '',
216             'value'  => '',
217             'width'  => '30',
218             'maxlength' => '255'
8896ab 219         ),
N 220         'admin_mail' => array (
7fe908 221             'datatype' => 'VARCHAR',
MC 222             'filters'   => array( 0 => array( 'event' => 'SAVE',
223                     'type' => 'IDNTOASCII'),
224                 1 => array( 'event' => 'SHOW',
225                     'type' => 'IDNTOUTF8'),
226                 2 => array( 'event' => 'SAVE',
227                     'type' => 'TOLOWER')
228             ),
229             'formtype' => 'TEXT',
230             'default' => '',
231             'value'  => '',
232             'width'  => '30',
233             'maxlength' => '255'
8896ab 234         ),
N 235         'admin_name' => array (
7fe908 236             'datatype' => 'VARCHAR',
MC 237             'formtype' => 'TEXT',
238             'default' => '',
239             'value'  => '',
240             'width'  => '30',
241             'maxlength' => '255'
8896ab 242         ),
a59498 243         'smtp_enabled' => array (
7fe908 244             'datatype' => 'VARCHAR',
MC 245             'formtype' => 'CHECKBOX',
246             'default' => 'n',
247             'value'  => array(0 => 'n', 1 => 'y')
a59498 248         ),
M 249         'smtp_host' => array (
7fe908 250             'datatype' => 'VARCHAR',
MC 251             'filters'   => array( 0 => array( 'event' => 'SAVE',
252                     'type' => 'IDNTOASCII'),
253                 1 => array( 'event' => 'SHOW',
254                     'type' => 'IDNTOUTF8'),
255                 2 => array( 'event' => 'SAVE',
256                     'type' => 'TOLOWER')
257             ),
258             'formtype' => 'TEXT',
259             'default' => '',
260             'value'  => '',
261             'width'  => '30',
262             'maxlength' => '255'
a59498 263         ),
M 264         'smtp_port' => array (
7fe908 265             'datatype' => 'VARCHAR',
MC 266             'formtype' => 'TEXT',
267             'default' => '25',
268             'value'  => '',
269             'width'  => '30',
270             'maxlength' => '255'
a59498 271         ),
M 272         'smtp_user' => array (
7fe908 273             'datatype' => 'VARCHAR',
MC 274             'formtype' => 'TEXT',
275             'default' => '',
276             'value'  => '',
277             'width'  => '30',
278             'maxlength' => '255'
a59498 279         ),
M 280         'smtp_pass' => array (
7fe908 281             'datatype' => 'VARCHAR',
MC 282             'formtype' => 'TEXT',
283             'default' => '',
284             'value'  => '',
285             'width'  => '30',
286             'maxlength' => '255'
a59498 287         ),
M 288         'smtp_crypt' => array (
7fe908 289             'datatype' => 'VARCHAR',
7ffd14 290             'formtype' => 'SELECT',
MC 291             'default' => '',
292             'value'  => array('' => 'No', 'ssl' => 'SSL', 'tls' => 'STARTTLS')
a59498 293         ),
7fe908 294         //#################################
MC 295         // ENDE Datatable fields
296         //#################################
8896ab 297     )
N 298 );
299
300 $form["tabs"]['domains'] = array (
7fe908 301     'title'  => "Domains",
MC 302     'width'  => 70,
303     'template'  => "templates/system_config_domains_edit.htm",
304     'fields'  => array (
305         //#################################
306         // Begin Datatable fields
307         //#################################
8896ab 308         'use_domain_module' => array (
7fe908 309             'datatype' => 'VARCHAR',
MC 310             'formtype' => 'CHECKBOX',
311             'default' => 'n',
312             'value'  => array(0 => 'n', 1 => 'y')
8896ab 313         ),
N 314         'new_domain_html' => array (
7fe908 315             'datatype' => 'VARCHAR',
MC 316             'formtype' => 'TEXT',
317             'default' => '',
318             'value'  => ''
8896ab 319         ),
7fe908 320         //#################################
MC 321         // ENDE Datatable fields
322         //#################################
8896ab 323     )
N 324 );
325
5df605 326 /* TODO_ BEGIN: Branding
C 327
328 $form["tabs"]['domains'] = array (
329     'title'     => "Branding",
330     'width'     => 70,
331     'template'     => "templates/system_config_branding_edit.htm",
332     'fields'     => array (
333     ##################################
334     # Begin Datatable fields
335     ##################################
336                 'allow_themechange' => array (
337                         'datatype'    => 'VARCHAR',
338                         'formtype'    => 'CHECKBOX',
339                         'default'    => 'N',
340                         'value'         => array(0 => 'n',1 => 'y')
341                 ),
342     ##################################
343     # ENDE Datatable fields
344     ##################################
345     )
346 );
347
348
349  END: Branding */
8896ab 350 $form["tabs"]['misc'] = array (
7fe908 351     'title'  => "Misc",
MC 352     'width'  => 70,
353     'template'  => "templates/system_config_misc_edit.htm",
354     'fields'  => array (
355         //#################################
356         // Begin Datatable fields
357         //#################################
8896ab 358         'dashboard_atom_url_admin' => array (
7fe908 359             'datatype' => 'VARCHAR',
MC 360             'formtype' => 'TEXT',
361             'default' => 'http://www.ispconfig.org/atom',
362             'value'  => ''
8896ab 363         ),
N 364         'dashboard_atom_url_reseller' => array (
7fe908 365             'datatype' => 'VARCHAR',
MC 366             'formtype' => 'TEXT',
367             'default' => 'http://www.ispconfig.org/atom',
368             'value'  => ''
8896ab 369         ),
N 370         'dashboard_atom_url_client' => array (
7fe908 371             'datatype' => 'VARCHAR',
MC 372             'formtype' => 'TEXT',
373             'default' => 'http://www.ispconfig.org/atom',
374             'value'  => ''
8896ab 375         ),
N 376         'monitor_key' => array (
7fe908 377             'datatype' => 'VARCHAR',
MC 378             'formtype' => 'TEXT',
379             'default' => '',
380             'value'  => ''
8896ab 381         ),
73ec6b 382         'tab_change_discard' => array (
7fe908 383             'datatype' => 'VARCHAR',
MC 384             'formtype' => 'CHECKBOX',
385             'default' => 'n',
386             'value'  => array(0 => 'n', 1 => 'y')
73ec6b 387         ),
M 388         'tab_change_warning' => array (
7fe908 389             'datatype' => 'VARCHAR',
MC 390             'formtype' => 'CHECKBOX',
391             'default' => 'n',
392             'value'  => array(0 => 'n', 1 => 'y')
73ec6b 393         ),
10b4c8 394         'use_loadindicator' => array (
7fe908 395             'datatype' => 'VARCHAR',
MC 396             'formtype' => 'CHECKBOX',
397             'default' => 'y',
398             'value'  => array(0 => 'n', 1 => 'y')
10b4c8 399         ),
T 400         'use_combobox' => array (
7fe908 401             'datatype' => 'VARCHAR',
MC 402             'formtype' => 'CHECKBOX',
403             'default' => 'y',
404             'value'  => array(0 => 'n', 1 => 'y')
10b4c8 405         ),
bf7d95 406         'maintenance_mode' => array (
7fe908 407             'datatype' => 'VARCHAR',
MC 408             'formtype' => 'CHECKBOX',
409             'default' => 'n',
410             'value'  => array(0 => 'n', 1 => 'y')
bf7d95 411         ),
7b47c0 412         'admin_dashlets_left' => array (
7fe908 413             'datatype' => 'VARCHAR',
MC 414             'formtype' => 'TEXT',
415             'default' => '',
416             'value'  => ''
7b47c0 417         ),
T 418         'admin_dashlets_right' => array (
7fe908 419             'datatype' => 'VARCHAR',
MC 420             'formtype' => 'TEXT',
421             'default' => '',
422             'value'  => ''
7b47c0 423         ),
T 424         'reseller_dashlets_left' => array (
7fe908 425             'datatype' => 'VARCHAR',
MC 426             'formtype' => 'TEXT',
427             'default' => '',
428             'value'  => ''
7b47c0 429         ),
T 430         'reseller_dashlets_right' => array (
7fe908 431             'datatype' => 'VARCHAR',
MC 432             'formtype' => 'TEXT',
433             'default' => '',
434             'value'  => ''
7b47c0 435         ),
T 436         'client_dashlets_left' => array (
7fe908 437             'datatype' => 'VARCHAR',
MC 438             'formtype' => 'TEXT',
439             'default' => '',
440             'value'  => ''
7b47c0 441         ),
T 442         'client_dashlets_right' => array (
7fe908 443             'datatype' => 'VARCHAR',
MC 444             'formtype' => 'TEXT',
445             'default' => '',
446             'value'  => ''
7b47c0 447         ),
7550de 448         'customer_no_template' => array (
TB 449             'datatype' => 'VARCHAR',
450             'formtype' => 'TEXT',
451             'validators' => array ( 0 => array ( 'type' => 'REGEX',
452                     'regex' => '/^[a-zA-Z0-0\-\_\[\]]{0,50}$/',
453                     'errmsg'=> 'customer_no_template_error_regex'),
454             ),
455             'default' => '',
456             'value'  => '',
457             'width'  => '30',
458             'maxlength' => '255'
459         ),
460         'customer_no_start' => array (
461             'datatype' => 'INTEGER',
462             'formtype' => 'TEXT',
463             'default' => '',
464             'value'  => '',
465             'width'  => '30',
466             'maxlength' => '255'
467         ),
468         'customer_no_counter' => array (
469             'datatype' => 'INTEGER',
470             'formtype' => 'TEXT',
471             'default' => '',
472             'value'  => '',
473             'width'  => '30',
474             'maxlength' => '255'
475         ),
c951bb 476         'session_timeout' => array (
MC 477             'datatype' => 'INTEGER',
478             'formtype' => 'TEXT',
479             'default' => '',
480             'value'  => '',
481             'width'  => '30',
482             'maxlength' => '255'
483         ),
de0256 484         'session_allow_endless' => array (
MC 485             'datatype' => 'VARCHAR',
486             'formtype' => 'CHECKBOX',
487             'default' => 'n',
488             'value'  => array(0 => 'n', 1 => 'y')
489         ),
7b9388 490         'min_password_length' => array(
MC 491             'datatype' => 'INTEGER',
492             'formtype' => 'TEXT',
493             'default' => '5',
494             'value'  => '',
495             'width'  => '30',
496             'maxlength' => '255'
497         ),
498         'min_password_strength' => array(
499             'datatype' => 'VARCHAR',
500             'formtype' => 'SELECT',
501             'default' => '',
502             'value'  => array('' => 'None', '1' => 'strength_1', '2' => 'strength_2', '3' => 'strength_3', '4' => 'strength_4', '5' => 'strength_5')
503         )
7fe908 504         //#################################
MC 505         // ENDE Datatable fields
506         //#################################
8896ab 507     )
N 508 );
509
510
511 ?>