Marius Cramer
2013-10-14 d9bcf68e395d6156645a7974b1a992aa6e6c00aa
interface/web/sites/form/web_vhost_subdomain.tform.php
@@ -111,14 +111,18 @@
      'domain' => array (
         'datatype'   => 'VARCHAR',
         'formtype'   => 'TEXT',
         'validators'   => array (    0 => array (   'type'   => 'NOTEMPTY',
                                          'errmsg'=> 'domain_error_empty'),
                              1 => array (   'type'   => 'UNIQUE',
                                          'errmsg'=> 'domain_error_unique'),
                              2 => array (   'type'   => 'REGEX',
                                          'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z0-9\-]{2,30}$/',
                                          'errmsg'=> 'domain_error_regex'),
                           ),
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (  0 => array (    'type'  => 'CUSTOM',
                                                        'class' => 'validate_domain',
                                                        'function' => 'sub_domain',
                                                        'errmsg'=> 'domain_error_regex'),
                                    ),
         'default'   => '',
         'value'      => '',
         'width'      => '30',
@@ -145,7 +149,7 @@
      'web_folder' => array (
         'datatype'   => 'VARCHAR',
         'validators'   => array (    0 => array (   'type'   => 'REGEX',
                                          'regex' => '@^([\w/_\.\-]{1,100})$@',
                                          'regex' => '@^((?!.*\.\.)[\w/_\.\-]{1,100})$@',
                                          'errmsg'=> 'web_folder_error_regex'),
                           ),
         'formtype'   => 'TEXT',
@@ -163,13 +167,7 @@
      'hd_quota' => array (
         'datatype'   => 'INTEGER',
         'formtype'   => 'TEXT',
         'validators'   => array (    0 => array (   'type'   => 'NOTEMPTY',
                                          'errmsg'=> 'hd_quota_error_empty'),
                              1 => array (   'type'   => 'REGEX',
                                          'regex' => '/^(\-1|[0-9]{1,10})$/',
                                          'errmsg'=> 'hd_quota_error_regex'),
                           ),
         'default'   => '-1',
         'default'   => '0',
         'value'      => '',
         'width'      => '7',
         'maxlength'   => '7'
@@ -277,7 +275,7 @@
$form["tabs"]['redirect'] = array (
   'title'    => "Redirect",
   'width'    => 100,
   'template'    => "templates/web_domain_redirect.htm",
   'template'    => "templates/web_vhost_subdomain_redirect.htm",
   'readonly'   => false,
   'fields'    => array (
   ##################################
@@ -287,12 +285,12 @@
         'datatype'   => 'VARCHAR',
         'formtype'   => 'SELECT',
         'default'   => '',
         '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')
         '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')
      ),
      'redirect_path' => array (
         'datatype'   => 'VARCHAR',
         'validators'   => array (    0 => array (   'type'   => 'REGEX',
                                          'regex' => '@^(([\.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.\,\-\+\?\~]*(\?\S+)?)?)?)|(\[scheme\]://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,\+\?\~]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@',
                                          'regex' => '@^(([\.]{0})|((ftp|https?)://([-\w\.]+)+(:\d+)?(/([\w/_\.\,\-\+\?\~!:%]*(\?\S+)?)?)?)|(\[scheme\]://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,\+\?\~!:%]*(\?\S+)?)?)?)|(/(?!.*\.\.)[\w/_\.\-]{1,255}/))$@',
                                          'errmsg'=> 'redirect_error_regex'),
                           ),
         'formtype'   => 'TEXT',
@@ -305,7 +303,15 @@
         'datatype'   => 'VARCHAR',
         'formtype'   => 'SELECT',
         'default'   => '',
         'value'      => array('' => 'no_redirect_txt', 'non_www_to_www' => 'non_www_to_www_txt', 'www_to_non_www' => 'www_to_non_www_txt')
         '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')
      ),
      'rewrite_rules' => array (
         'datatype'   => 'TEXT',
         'formtype'   => 'TEXT',
         'default'   => '',
         'value'      => '',
         'width'      => '30',
         'maxlength'   => '255'
      ),
   ##################################
   # ENDE Datatable fields
@@ -317,7 +323,7 @@
$form["tabs"]['ssl'] = array (
   'title'    => "SSL",
   'width'    => 100,
   'template'    => "templates/web_domain_ssl.htm",
   'template'    => "templates/web_vhost_subdomain_ssl.htm",
   'readonly'   => false,
   'fields'    => array (
   ##################################
@@ -453,7 +459,7 @@
$form["tabs"]['stats'] = array (
   'title'    => "Stats",
   'width'    => 100,
   'template'    => "templates/web_domain_stats.htm",
   'template'    => "templates/web_vhost_subdomain_stats.htm",
   'readonly'   => false,
   'fields'    => array (
   ##################################
@@ -486,7 +492,7 @@
$form["tabs"]['backup'] = array (
   'title'    => "Backup",
   'width'    => 100,
   'template'    => "templates/web_domain_backup.htm",
   'template'    => "templates/web_vhost_subdomain_backup.htm",
   'readonly'   => false,
   'fields'    => array (
   ##################################
@@ -524,7 +530,7 @@
$form["tabs"]['advanced'] = array (
   'title'    => "Options",
   'width'    => 100,
   'template'    => "templates/web_domain_advanced.htm",
   'template'    => "templates/web_vhost_subdomain_advanced.htm",
   'readonly'   => false,
   'fields'    => array (
   ##################################
@@ -692,7 +698,15 @@
         'value'      => '',
         'width'      => '30',
         'maxlength'   => '255'
      )
      ),
      'proxy_directives' => array (
         'datatype'   => 'TEXT',
         'formtype'   => 'TEXT',
         'default'   => '',
         'value'      => '',
         'width'      => '30',
         'maxlength'   => '255'
      ),
   ##################################
   # ENDE Datatable fields
   ##################################