Till Brehm
2014-08-25 614b23b18053c58c3f85db5ceaa982484175d276
commit | author | age
6fb93d 1 <?php
M 2
3 /*
4     Form Definition
5
6     Tabledefinition
7
8     Datatypes:
9     - INTEGER (Forces the input to Int)
10     - DOUBLE
11     - CURRENCY (Formats the values to currency notation)
12     - VARCHAR (no format check, maxlength: 255)
13     - TEXT (no format check)
14     - DATE (Dateformat, automatic conversion to timestamps)
15
16     Formtype:
17     - TEXT (Textfield)
18     - TEXTAREA (Textarea)
19     - PASSWORD (Password textfield, input is not shown when edited)
20     - SELECT (Select option field)
21     - RADIO
22     - CHECKBOX
23     - CHECKBOXARRAY
24     - FILE
25
26     VALUE:
27     - Wert oder Array
28
29     Hint:
30     The ID field of the database table is not part of the datafield definition.
31     The ID field must be always auto incement (int or bigint).
7fe908 32
6fb93d 33     Search:
M 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
37
38
39 */
40
7fe908 41 $form["title"]    = "Subdomain";
MC 42 $form["description"]  = "";
43 $form["name"]    = "web_vhost_subdomain";
44 $form["action"]   = "web_vhost_subdomain_edit.php";
45 $form["db_table"]  = "web_domain";
46 $form["db_table_idx"] = "domain_id";
47 $form["db_history"]  = "yes";
48 $form["tab_default"] = "domain";
49 $form["list_default"] = "web_vhost_subdomain_list.php";
50 $form["auth"]   = 'yes'; // yes / no
6fb93d 51
M 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 $wildcard_available = false;
59 $ssl_available = true;
60 if(!$app->auth->is_admin()) {
7fe908 61     $client_group_id = $_SESSION["s"]["user"]["default_group"];
6fb93d 62     $client = $app->db->queryOneRecord("SELECT limit_wildcard, limit_ssl FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
7fe908 63
MC 64     if($client['limit_ssl'] != 'y') $ssl_available = false;
6fb93d 65 }
M 66
67 $form["tabs"]['domain'] = array (
7fe908 68     'title'  => "Domain",
MC 69     'width'  => 100,
70     'template'  => "templates/web_vhost_subdomain_edit.htm",
71     'readonly' => false,
72     'fields'  => array (
73         //#################################
74         // Begin Datatable fields
75         //#################################
6fb93d 76         'server_id' => array (
7fe908 77             'datatype' => 'INTEGER',
MC 78             'formtype' => 'SELECT',
79             'default' => '',
80             'datasource' => array (  'type' => 'SQL',
81                 'querystring' => 'SELECT server_id,server_name FROM server WHERE mirror_server_id = 0 AND web_server = 1 AND {AUTHSQL} ORDER BY server_name',
82                 'keyfield'=> 'server_id',
83                 'valuefield'=> 'server_name'
84             ),
85             'value'  => ''
6fb93d 86         ),
M 87         'ip_address' => array (
7fe908 88             'datatype' => 'VARCHAR',
MC 89             'formtype' => 'SELECT',
90             'default' => '',
6fb93d 91             /*'datasource'    => array (     'type'    => 'SQL',
M 92                                         'querystring' => "SELECT ip_address,ip_address FROM server_ip WHERE ip_type = 'IPv4' AND {AUTHSQL} ORDER BY ip_address",
93                                         'keyfield'=> 'ip_address',
94                                         'valuefield'=> 'ip_address'
95                                      ),*/
7fe908 96             'value'  => '',
6fb93d 97             'searchable' => 2
M 98         ),
99         'ipv6_address' => array (
7fe908 100             'datatype' => 'VARCHAR',
MC 101             'formtype' => 'SELECT',
102             'default' => '',
6fb93d 103             /*'datasource'    => array (     'type'    => 'SQL',
M 104                                         'querystring' => "SELECT ip_address,ip_address FROM server_ip WHERE ip_type = 'IPv6' AND {AUTHSQL} ORDER BY ip_address",
105                                         'keyfield'=> 'ip_address',
106                                         'valuefield'=> 'ip_address'
107                                      ),*/
7fe908 108             'value'  => '',
6fb93d 109             'searchable' => 2
M 110         ),
111         'domain' => array (
7fe908 112             'datatype' => 'VARCHAR',
MC 113             'formtype' => 'TEXT',
114             'filters'   => array( 0 => array( 'event' => 'SAVE',
115                     'type' => 'IDNTOASCII'),
116                 1 => array( 'event' => 'SHOW',
117                     'type' => 'IDNTOUTF8'),
118                 2 => array( 'event' => 'SAVE',
119                     'type' => 'TOLOWER')
120             ),
121             'validators'    => array (  0 => array (    'type'  => 'CUSTOM',
122                     'class' => 'validate_domain',
123                     'function' => 'sub_domain',
124                     'errmsg'=> 'domain_error_regex'),
125             ),
126             'default' => '',
127             'value'  => '',
128             'width'  => '30',
129             'maxlength' => '255',
6fb93d 130             'searchable' => 1
M 131         ),
132         'type' => array (
7fe908 133             'datatype' => 'VARCHAR',
MC 134             'formtype' => 'SELECT',
135             'default' => 'y',
136             'value'  => array('vhost' => 'Site', 'alias' => 'Alias', 'subdomain' => 'Subdomain', 'vhostsubdomain' => 'Subdomain')
6fb93d 137         ),
M 138         'parent_domain_id' => array (
7fe908 139             'datatype' => 'INTEGER',
MC 140             'formtype' => 'SELECT',
141             'default' => '',
142             'datasource' => array (  'type' => 'SQL',
143                 'querystring' => "SELECT web_domain.domain_id, CONCAT(web_domain.domain, ' :: ', server.server_name) AS parent_domain FROM web_domain, server WHERE web_domain.type = 'vhost' AND web_domain.server_id = server.server_id AND {AUTHSQL::web_domain} ORDER BY web_domain.domain",
144                 'keyfield'=> 'domain_id',
145                 'valuefield'=> 'parent_domain'
146             ),
147             'value'  => ''
6fb93d 148         ),
M 149         'web_folder' => array (
7fe908 150             'datatype' => 'VARCHAR',
MC 151             'validators' => array (  0 => array ( 'type' => 'REGEX',
152                     'regex' => '@^((?!.*\.\.)[\w/_\.\-]{1,100})$@',
153                     'errmsg'=> 'web_folder_error_regex'),
154             ),
155             'formtype' => 'TEXT',
156             'default' => '',
157             'value'  => '',
158             'width'  => '30',
159             'maxlength' => '255'
6fb93d 160         ),
M 161         'vhost_type' => array (
7fe908 162             'datatype' => 'VARCHAR',
MC 163             'formtype' => 'SELECT',
164             'default' => 'y',
165             'value'  => array('name' => 'Namebased', 'ip' => 'IP-Based')
6fb93d 166         ),
M 167         'hd_quota' => array (
7fe908 168             'datatype' => 'INTEGER',
MC 169             'formtype' => 'TEXT',
170             'default' => '0',
171             'value'  => '',
172             'width'  => '7',
173             'maxlength' => '7'
6fb93d 174         ),
M 175         'traffic_quota' => array (
7fe908 176             'datatype' => 'INTEGER',
MC 177             'formtype' => 'TEXT',
178             'validators' => array (  0 => array ( 'type' => 'NOTEMPTY',
179                     'errmsg'=> 'traffic_quota_error_empty'),
180                 1 => array ( 'type' => 'REGEX',
181                     'regex' => '/^(\-1|[0-9]{1,10})$/',
182                     'errmsg'=> 'traffic_quota_error_regex'),
183             ),
184             'default' => '-1',
185             'value'  => '',
186             'width'  => '7',
187             'maxlength' => '7'
6fb93d 188         ),
M 189         'cgi' => array (
7fe908 190             'datatype' => 'VARCHAR',
MC 191             'formtype' => 'CHECKBOX',
192             'default' => 'n',
193             'value'  => array(0 => 'n', 1 => 'y')
6fb93d 194         ),
M 195         'ssi' => array (
7fe908 196             'datatype' => 'VARCHAR',
MC 197             'formtype' => 'CHECKBOX',
198             'default' => 'n',
199             'value'  => array(0 => 'n', 1 => 'y')
6fb93d 200         ),
M 201         'suexec' => array (
7fe908 202             'datatype' => 'VARCHAR',
MC 203             'formtype' => 'CHECKBOX',
204             'default' => 'y',
205             'value'  => array(0 => 'n', 1 => 'y')
6fb93d 206         ),
M 207         'errordocs' => array (
7fe908 208             'datatype' => 'INTEGER',
MC 209             'formtype' => 'CHECKBOX',
210             'default' => '1',
211             'value'  => array(0 => '0', 1 => '1')
6fb93d 212         ),
M 213         'subdomain' => array (
7fe908 214             'datatype' => 'VARCHAR',
MC 215             'formtype' => 'SELECT',
216             'default' => 'www',
217             'value'  => ($wildcard_available ? array('none' => 'none_txt', 'www' => 'www.', '*' => '*.') : array('none' => 'none_txt', 'www' => 'www.'))
6fb93d 218         ),
M 219         'ssl' => array (
7fe908 220             'datatype' => 'VARCHAR',
MC 221             'formtype' => 'CHECKBOX',
222             'default' => 'n',
223             'value'  => array(0 => 'n', 1 => 'y')
6fb93d 224         ),
M 225         'php' => array (
7fe908 226             'datatype' => 'VARCHAR',
MC 227             'formtype' => 'SELECT',
228             'default' => 'fast-cgi',
6fb93d 229             'valuelimit' => 'client:web_php_options',
7fe908 230             'value'  => array('no' => 'disabled_txt', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP', 'php-fpm' => 'PHP-FPM'),
6fb93d 231             'searchable' => 2
M 232         ),
233         'fastcgi_php_version' => array (
7fe908 234             'datatype' => 'VARCHAR',
MC 235             'formtype' => 'SELECT',
236             'default' => '',
6fb93d 237             /*'datasource'    => array (     'type'    => 'SQL',
M 238                                         'querystring' => "SELECT ip_address,ip_address FROM server_ip WHERE ip_type = 'IPv4' AND {AUTHSQL} ORDER BY ip_address",
239                                         'keyfield'=> 'ip_address',
240                                         'valuefield'=> 'ip_address'
241                                      ),*/
7fe908 242             'value'  => ''
6fb93d 243         ),
M 244         'perl' => array (
7fe908 245             'datatype' => 'VARCHAR',
MC 246             'formtype' => 'CHECKBOX',
247             'default' => 'n',
248             'value'  => array(0 => 'n', 1 => 'y')
6fb93d 249         ),
M 250         'ruby' => array (
7fe908 251             'datatype' => 'VARCHAR',
MC 252             'formtype' => 'CHECKBOX',
253             'default' => 'n',
254             'value'  => array(0 => 'n', 1 => 'y')
6fb93d 255         ),
M 256         'python' => array (
7fe908 257             'datatype' => 'VARCHAR',
MC 258             'formtype' => 'CHECKBOX',
259             'default' => 'n',
260             'value'  => array(0 => 'n', 1 => 'y')
6fb93d 261         ),
M 262         'active' => array (
7fe908 263             'datatype' => 'VARCHAR',
MC 264             'formtype' => 'CHECKBOX',
265             'default' => 'y',
266             'value'  => array(0 => 'n', 1 => 'y')
6fb93d 267         ),
7fe908 268         //#################################
MC 269         // ENDE Datatable fields
270         //#################################
6fb93d 271     )
M 272 );
273
274
275 $form["tabs"]['redirect'] = array (
7fe908 276     'title'  => "Redirect",
MC 277     'width'  => 100,
278     'template'  => "templates/web_vhost_subdomain_redirect.htm",
279     'readonly' => false,
280     'fields'  => array (
281         //#################################
282         // Begin Datatable fields
283         //#################################
6fb93d 284         'redirect_type' => array (
7fe908 285             'datatype' => 'VARCHAR',
MC 286             'formtype' => 'SELECT',
287             'default' => '',
288             'value'  => array('' => 'no_redirect_txt', 'no' => 'no_flag_txt', 'R' => 'R', 'L' => 'L', 'R,L' => 'R,L', 'R=301,L' => 'R=301,L', 'last' => 'last', 'break' => 'break', 'redirect' => 'redirect', 'permanent' => 'permanent', 'proxy' => 'proxy')
6fb93d 289         ),
M 290         'redirect_path' => array (
7fe908 291             'datatype' => 'VARCHAR',
MC 292             'validators' => array (  0 => array ( 'type' => 'REGEX',
293                     'regex' => '@^(([\.]{0})|((ftp|https?)://([-\w\.]+)+(:\d+)?(/([\w/_\.\,\-\+\?\~!:%]*(\?\S+)?)?)?)|(\[scheme\]://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,\+\?\~!:%]*(\?\S+)?)?)?)|(/(?!.*\.\.)[\w/_\.\-]{1,255}/))$@',
294                     'errmsg'=> 'redirect_error_regex'),
295             ),
296             'formtype' => 'TEXT',
297             'default' => '',
298             'value'  => '',
299             'width'  => '30',
300             'maxlength' => '255'
6fb93d 301         ),
M 302         'seo_redirect' => array (
7fe908 303             'datatype' => 'VARCHAR',
MC 304             'formtype' => 'SELECT',
305             'default' => '',
306             'value'  => array('' => 'no_redirect_txt', 'non_www_to_www' => 'domain.tld => www.domain.tld', 'www_to_non_www' => 'www.domain.tld => domain.tld', '*_domain_tld_to_domain_tld' => '*.doman.tld => domain.tld', '*_domain_tld_to_www_domain_tld' => '*.domain.tld => www.domain.tld', '*_to_domain_tld' => '* => domain.tld', '*_to_www_domain_tld' => '* => www.domain.tld')
6fb93d 307         ),
992797 308         'rewrite_rules' => array (
7fe908 309             'datatype' => 'TEXT',
MC 310             'formtype' => 'TEXT',
311             'default' => '',
312             'value'  => '',
313             'width'  => '30',
314             'maxlength' => '255'
992797 315         ),
7fe908 316         //#################################
MC 317         // ENDE Datatable fields
318         //#################################
6fb93d 319     )
M 320 );
321
322 if($ssl_available) {
7fe908 323     $form["tabs"]['ssl'] = array (
MC 324         'title'  => "SSL",
325         'width'  => 100,
326         'template'  => "templates/web_vhost_subdomain_ssl.htm",
327         'readonly' => false,
328         'fields'  => array (
329             //#################################
330             // Begin Datatable fields
331             //#################################
332             'ssl_state' => array (
333                 'datatype' => 'VARCHAR',
334                 'formtype' => 'TEXT',
335                 'validators' => array (  0 => array ( 'type' => 'REGEX',
336                         'regex' => '/^(([\.]{0})|([a-zA-Z0-9\ \.\-\_\,]{1,255}))$/',
337                         'errmsg'=> 'ssl_state_error_regex'),
338                 ),
339                 'default' => '',
340                 'value'  => '',
341                 'width'  => '30',
342                 'maxlength' => '255'
343             ),
344             'ssl_locality' => array (
345                 'datatype' => 'VARCHAR',
346                 'formtype' => 'TEXT',
347                 'validators' => array (  0 => array ( 'type' => 'REGEX',
348                         'regex' => '/^(([\.]{0})|([a-zA-Z0-9\ \.\-\_\,]{1,255}))$/',
349                         'errmsg'=> 'ssl_locality_error_regex'),
350                 ),
351                 'default' => '',
352                 'value'  => '',
353                 'width'  => '30',
354                 'maxlength' => '255'
355             ),
356             'ssl_organisation' => array (
357                 'datatype' => 'VARCHAR',
358                 'formtype' => 'TEXT',
359                 'validators' => array (  0 => array ( 'type' => 'REGEX',
360                         'regex' => '/^(([\.]{0})|([a-zA-Z0-9\ \.\-\_\,]{1,255}))$/',
361                         'errmsg'=> 'ssl_organisation_error_regex'),
362                 ),
363                 'default' => '',
364                 'value'  => '',
365                 'width'  => '30',
366                 'maxlength' => '255'
367             ),
368             'ssl_organisation_unit' => array (
369                 'datatype' => 'VARCHAR',
370                 'formtype' => 'TEXT',
371                 'validators' => array (  0 => array ( 'type' => 'REGEX',
372                         'regex' => '/^(([\.]{0})|([a-zA-Z0-9\ \.\-\_\,]{1,255}))$/',
373                         'errmsg'=> 'ssl_organistaion_unit_error_regex'),
374                 ),
375                 'default' => '',
376                 'value'  => '',
377                 'width'  => '30',
378                 'maxlength' => '255'
379             ),
380             /*
6fb93d 381         'ssl_country' => array (
M 382             'datatype'    => 'VARCHAR',
383             'formtype'    => 'TEXT',
384             'validators'    => array (     0 => array (    'type'    => 'REGEX',
385                                                         'regex' => '/^(([\.]{0})|([A-Z]{2,2}))$/',
386                                                         'errmsg'=> 'ssl_country_error_regex'),
387                                     ),
388             'default'    => '',
389             'value'        => '',
390             'width'        => '2',
391             'maxlength'    => '2'
392         ),
393         */
7fe908 394             'ssl_country' => array (
MC 395                 'datatype' => 'VARCHAR',
396                 'formtype' => 'SELECT',
397                 'default' => '',
398                 'datasource' => array (  'type' => 'SQL',
399                     'querystring' => 'SELECT iso,printable_name FROM country ORDER BY printable_name',
400                     'keyfield'=> 'iso',
401                     'valuefield'=> 'printable_name'
402                 ),
403                 'value'  => ''
404             ),
405             'ssl_domain' => array (
406                 'datatype' => 'VARCHAR',
407                 'formtype' => 'TEXT',
408                 'default' => '',
409                 'value'  => '',
410                 'width'  => '30',
411                 'maxlength' => '255'
412             ),
413             'ssl_key' => array (
414                 'datatype' => 'TEXT',
415                 'formtype' => 'TEXTAREA',
416                 'default' => '',
417                 'value'  => '',
418                 'cols'  => '30',
419                 'rows'  => '10'
420             ),
421             'ssl_request' => array (
422                 'datatype' => 'TEXT',
423                 'formtype' => 'TEXTAREA',
424                 'default' => '',
425                 'value'  => '',
426                 'cols'  => '30',
427                 'rows'  => '10'
428             ),
429             'ssl_cert' => array (
430                 'datatype' => 'TEXT',
431                 'formtype' => 'TEXTAREA',
432                 'default' => '',
433                 'value'  => '',
434                 'cols'  => '30',
435                 'rows'  => '10'
436             ),
437             'ssl_bundle' => array (
438                 'datatype' => 'TEXT',
439                 'formtype' => 'TEXTAREA',
440                 'default' => '',
441                 'value'  => '',
442                 'cols'  => '30',
443                 'rows'  => '10'
444             ),
445             'ssl_action' => array (
446                 'datatype' => 'VARCHAR',
447                 'formtype' => 'SELECT',
448                 'default' => '',
449                 'value'  => array('' => 'none_txt', 'save' => 'save_certificate_txt', 'create' => 'create_certificate_txt', 'del' => 'delete_certificate_txt')
450             ),
451             //#################################
452             // ENDE Datatable fields
453             //#################################
454         )
455     );
6fb93d 456 }
M 457
458 //* Statistics
459 $form["tabs"]['stats'] = array (
7fe908 460     'title'  => "Stats",
MC 461     'width'  => 100,
462     'template'  => "templates/web_vhost_subdomain_stats.htm",
463     'readonly' => false,
464     'fields'  => array (
465         //#################################
466         // Begin Datatable fields
467         //#################################
6fb93d 468         'stats_password' => array (
7fe908 469             'datatype' => 'VARCHAR',
MC 470             'formtype' => 'PASSWORD',
7b9388 471             'validators' => array(
MC 472                 0 => array(
473                     'type' => 'CUSTOM',
474                     'class' => 'validate_password',
475                     'function' => 'password_check',
476                     'errmsg' => 'weak_password_txt'
477                 )
478             ),
6fb93d 479             'encryption' => 'CRYPT',
7fe908 480             'default' => '',
MC 481             'value'  => '',
482             'width'  => '30',
483             'maxlength' => '255'
6fb93d 484         ),
M 485         'stats_type' => array (
7fe908 486             'datatype' => 'VARCHAR',
MC 487             'formtype' => 'SELECT',
488             'default' => 'webalizer',
e23c47 489             'value'  => array('webalizer' => 'Webalizer', 'awstats' => 'AWStats', '' => 'None')
6fb93d 490         ),
7fe908 491         //#################################
MC 492         // ENDE Datatable fields
493         //#################################
6fb93d 494     )
M 495 );
496
497 // if($_SESSION["s"]["user"]["typ"] == 'admin') {
498
499 //* Backup
500 $form["tabs"]['backup'] = array (
7fe908 501     'title'  => "Backup",
MC 502     'width'  => 100,
503     'template'  => "templates/web_vhost_subdomain_backup.htm",
504     'readonly' => false,
505     'fields'  => array (
506         //#################################
507         // Begin Datatable fields
508         //#################################
6fb93d 509         'backup_interval' => array (
7fe908 510             'datatype' => 'VARCHAR',
MC 511             'formtype' => 'SELECT',
512             'default' => '',
513             'value'  => array('none' => 'No backup', 'daily' => 'Daily', 'weekly' => 'Weekly', 'monthly' => 'Monthly')
6fb93d 514         ),
M 515         'backup_copies' => array (
7fe908 516             'datatype' => 'INTEGER',
MC 517             'formtype' => 'SELECT',
518             'default' => '',
519             'value'  => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10')
6fb93d 520         ),
fe5f53 521         'backup_excludes' => array (
FT 522             'datatype' => 'VARCHAR',
523             'validators' => array (  0 => array ( 'type' => 'REGEX',
14fe6d 524                     'regex' => '@^(?!.*\.\.)[-a-zA-Z0-9_/.~,*]*$@',
fe5f53 525                     'errmsg'=> 'backup_excludes_error_regex'),
FT 526             ),
527             'formtype' => 'TEXT',
528             'default' => '',
529             'value'  => '',
530             'width'  => '30',
531             'maxlength' => '255'
532         ),
7fe908 533         //#################################
MC 534         // ENDE Datatable fields
535         //#################################
6fb93d 536     ),
M 537     'plugins' => array (
7fe908 538         'backup_records' => array (
MC 539             'class'   => 'plugin_backuplist',
540             'options' => array(
6fb93d 541             )
7fe908 542         )
6fb93d 543     )
M 544 );
545
546 // }
547
992797 548 if($_SESSION["s"]["user"]["typ"] == 'admin') {
6fb93d 549
7fe908 550     $form["tabs"]['advanced'] = array (
MC 551         'title'  => "Options",
552         'width'  => 100,
553         'template'  => "templates/web_vhost_subdomain_advanced.htm",
554         'readonly' => false,
555         'fields'  => array (
556             //#################################
557             // Begin Datatable fields
558             //#################################
559             'document_root' => array (
560                 'datatype' => 'VARCHAR',
561                 'formtype' => 'TEXT',
562                 'validators' => array (  0 => array ( 'type' => 'NOTEMPTY',
563                         'errmsg'=> 'documentroot_error_empty'),
564                 ),
565                 'default' => '',
566                 'value'  => '',
567                 'width'  => '30',
568                 'maxlength' => '255'
569             ),
570             'system_user' => array (
571                 'datatype' => 'VARCHAR',
572                 'formtype' => 'TEXT',
573                 'validators' => array (  0 => array ( 'type' => 'NOTEMPTY',
574                         'errmsg'=> 'sysuser_error_empty'),
575                 ),
576                 'default' => '',
577                 'value'  => '',
578                 'width'  => '30',
579                 'maxlength' => '255'
580             ),
581             'system_group' => array (
582                 'datatype' => 'VARCHAR',
583                 'formtype' => 'TEXT',
584                 'validators' => array (  0 => array ( 'type' => 'NOTEMPTY',
585                         'errmsg'=> 'sysgroup_error_empty'),
586                 ),
587                 'default' => '',
588                 'value'  => '',
589                 'width'  => '30',
590                 'maxlength' => '255'
591             ),
592             'allow_override' => array (
593                 'datatype' => 'VARCHAR',
594                 'formtype' => 'TEXT',
595                 'validators' => array (  0 => array ( 'type' => 'NOTEMPTY',
596                         'errmsg'=> 'allow_override_error_empty'),
597                 ),
598                 'default' => 'All',
599                 'value'  => '',
600                 'width'  => '30',
601                 'maxlength' => '255'
602             ),
603             'php_fpm_use_socket' => array (
604                 'datatype' => 'VARCHAR',
605                 'formtype' => 'CHECKBOX',
606                 'default' => 'n',
607                 'value'  => array(0 => 'n', 1 => 'y')
608             ),
609             'pm' => array (
610                 'datatype' => 'VARCHAR',
611                 'formtype' => 'SELECT',
612                 'default' => 'dynamic',
613                 'value'  => array('static' => 'static', 'dynamic' => 'dynamic', 'ondemand' => 'ondemand (PHP Version >= 5.3.9)')
614             ),
615             'pm_max_children' => array (
616                 'datatype' => 'INTEGER',
617                 'formtype' => 'TEXT',
618                 'validators' => array (  0 => array ( 'type' => 'REGEX',
619                         'regex' => '/^([1-9][0-9]{0,10})$/',
620                         'errmsg'=> 'pm_max_children_error_regex'),
621                 ),
622                 'default' => '10',
623                 'value'  => '',
624                 'width'  => '3',
625                 'maxlength' => '3'
626             ),
627             'pm_start_servers' => array (
628                 'datatype' => 'INTEGER',
629                 'formtype' => 'TEXT',
630                 'validators' => array (  0 => array ( 'type' => 'REGEX',
631                         'regex' => '/^([1-9][0-9]{0,10})$/',
632                         'errmsg'=> 'pm_start_servers_error_regex'),
633                 ),
634                 'default' => '2',
635                 'value'  => '',
636                 'width'  => '3',
637                 'maxlength' => '3'
638             ),
639             'pm_min_spare_servers' => array (
640                 'datatype' => 'INTEGER',
641                 'formtype' => 'TEXT',
642                 'validators' => array (  0 => array ( 'type' => 'REGEX',
643                         'regex' => '/^([1-9][0-9]{0,10})$/',
644                         'errmsg'=> 'pm_min_spare_servers_error_regex'),
645                 ),
646                 'default' => '1',
647                 'value'  => '',
648                 'width'  => '3',
649                 'maxlength' => '3'
650             ),
651             'pm_max_spare_servers' => array (
652                 'datatype' => 'INTEGER',
653                 'formtype' => 'TEXT',
654                 'validators' => array (  0 => array ( 'type' => 'REGEX',
655                         'regex' => '/^([1-9][0-9]{0,10})$/',
656                         'errmsg'=> 'pm_max_spare_servers_error_regex'),
657                 ),
658                 'default' => '5',
659                 'value'  => '',
660                 'width'  => '3',
661                 'maxlength' => '3'
662             ),
663             'pm_process_idle_timeout' => array (
664                 'datatype' => 'INTEGER',
665                 'formtype' => 'TEXT',
666                 'validators' => array (  0 => array ( 'type' => 'REGEX',
667                         'regex' => '/^([1-9][0-9]{0,10})$/',
668                         'errmsg'=> 'pm_process_idle_timeout_error_regex'),
669                 ),
670                 'default' => '10',
671                 'value'  => '',
672                 'width'  => '3',
673                 'maxlength' => '6'
674             ),
675             'pm_max_requests' => array (
676                 'datatype' => 'INTEGER',
677                 'formtype' => 'TEXT',
678                 'validators' => array (  0 => array ( 'type' => 'REGEX',
679                         'regex' => '/^([0-9]{1,11})$/',
680                         'errmsg'=> 'pm_max_requests_error_regex'),
681                 ),
682                 'default' => '0',
683                 'value'  => '',
684                 'width'  => '3',
685                 'maxlength' => '6'
686             ),
687             'php_open_basedir' => array (
688                 'datatype' => 'VARCHAR',
689                 'formtype' => 'TEXT',
690                 /*'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
6fb93d 691                                                         'errmsg'=> 'php_open_basedir_error_empty'),
M 692                                     ),   */
7fe908 693                 'default' => 'All',
MC 694                 'value'  => '',
695                 'width'  => '30',
696                 'maxlength' => '255'
697             ),
698             'custom_php_ini' => array (
699                 'datatype' => 'TEXT',
700                 'formtype' => 'TEXT',
701                 'default' => '',
702                 'value'  => '',
703                 'width'  => '30',
704                 'maxlength' => '255'
705             ),
706             'apache_directives' => array (
707                 'datatype' => 'TEXT',
708                 'formtype' => 'TEXT',
614b23 709                 'validators' => array (  0 => array(
TB 710                             'type' => 'CUSTOM',
711                             'class' => 'validate_domain',
712                             'function' => 'web_apache_directives',
713                             'errmsg' => 'apache_directive_blockd_error'
714                         ),
715                 ),
7fe908 716                 'default' => '',
MC 717                 'value'  => '',
718                 'width'  => '30',
719                 'maxlength' => '255'
720             ),
721             'nginx_directives' => array (
722                 'datatype' => 'TEXT',
723                 'formtype' => 'TEXT',
724                 'default' => '',
725                 'value'  => '',
726                 'width'  => '30',
727                 'maxlength' => '255'
728             ),
729             'proxy_directives' => array (
730                 'datatype' => 'TEXT',
731                 'formtype' => 'TEXT',
732                 'default' => '',
733                 'value'  => '',
734                 'width'  => '30',
735                 'maxlength' => '255'
736             ),
737             //#################################
738             // ENDE Datatable fields
739             //#################################
740         )
741     );
6fb93d 742
M 743 }
744
745
746 ?>