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