Merge branch 'master' of http://git.ispconfig.org/ispconfig/ispconfig3
21 files modified
1 files added
New file |
| | |
| | | ALTER TABLE `web_domain` ADD COLUMN `enable_spdy` ENUM('y','n') NULL DEFAULT 'n' AFTER `proxy_directives`; |
| | |
| | | `traffic_quota_lock` enum('n','y') NOT NULL default 'n', |
| | | `fastcgi_php_version` varchar(255) DEFAULT NULL, |
| | | `proxy_directives` mediumtext, |
| | | `enable_spdy` ENUM('y','n') NULL DEFAULT 'n', |
| | | `last_quota_notification` date NULL default NULL, |
| | | `rewrite_rules` mediumtext, |
| | | `added_date` date NOT NULL DEFAULT '0000-00-00', |
| | |
| | | php_ini_path_cgi=/etc/php5/cgi/php.ini |
| | | check_apache_config=y |
| | | enable_sni=y |
| | | enable_spdy=n |
| | | enable_ip_wildcard=y |
| | | overtraffic_notify_admin=y |
| | | overtraffic_notify_client=y |
| | |
| | | } |
| | | } |
| | | |
| | | function check_vat_id ($field_name, $field_value, $validator){ |
| | | global $app, $page; |
| | | |
| | | $vatid = trim($field_value); |
| | | if(isset($app->remoting_lib->primary_id)) { |
| | | $country = $app->remoting_lib->dataRecord['country']; |
| | | } else { |
| | | $country = $page->dataRecord['country']; |
| | | } |
| | | |
| | | // check if country is member of EU |
| | | $country_details = $app->db->queryOneRecord("SELECT * FROM country WHERE iso = '".$country."'"); |
| | | if($country_details['eu'] == 'y' && $vatid != ''){ |
| | | |
| | | $vatid = preg_replace('/\s+/', '', $vatid); |
| | | $vatid = str_replace(array('.', '-', ','), '', $vatid); |
| | | $cc = substr($vatid, 0, 2); |
| | | $vn = substr($vatid, 2); |
| | | |
| | | // Test if the country of the VAT-ID matches the country of the customer |
| | | if($country != ''){ |
| | | if(strtoupper($cc) != $country){ |
| | | $errmsg = $validator['errmsg']; |
| | | if(isset($app->tform->wordbook[$errmsg])) { |
| | | return $app->tform->wordbook[$errmsg]."<br>\r\n"; |
| | | } else { |
| | | return $errmsg."<br>\r\n"; |
| | | } |
| | | } |
| | | } |
| | | |
| | | $client = new SoapClient("http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl"); |
| | | |
| | | if($client){ |
| | | $params = array('countryCode' => $cc, 'vatNumber' => $vn); |
| | | try{ |
| | | $r = $client->checkVat($params); |
| | | if($r->valid == true){ |
| | | } else { |
| | | $errmsg = $validator['errmsg']; |
| | | if(isset($app->tform->wordbook[$errmsg])) { |
| | | return $app->tform->wordbook[$errmsg]."<br>\r\n"; |
| | | } else { |
| | | return $errmsg."<br>\r\n"; |
| | | } |
| | | } |
| | | |
| | | // This foreach shows every single line of the returned information |
| | | /* |
| | | foreach($r as $k=>$prop){ |
| | | echo $k . ': ' . $prop; |
| | | } |
| | | */ |
| | | |
| | | } catch(SoapFault $e) { |
| | | //echo 'Error, see message: '.$e->faultstring; |
| | | switch ($e->faultstring) { |
| | | case 'INVALID_INPUT': |
| | | $errmsg = $validator['errmsg']; |
| | | if(isset($app->tform->wordbook[$errmsg])) { |
| | | return $app->tform->wordbook[$errmsg]."<br>\r\n"; |
| | | } else { |
| | | return $errmsg."<br>\r\n"; |
| | | } |
| | | break; |
| | | // the following cases shouldn't be the user's fault, so we return no error |
| | | case 'SERVICE_UNAVAILABLE': |
| | | case 'MS_UNAVAILABLE': |
| | | case 'TIMEOUT': |
| | | case 'SERVER_BUSY': |
| | | break; |
| | | } |
| | | } |
| | | } else { |
| | | // Connection to host not possible, europe.eu down? |
| | | // this shouldn't be the user's fault, so we return no error |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | 'width' => '40', |
| | | 'maxlength' => '255' |
| | | ), |
| | | 'enable_spdy' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array ( |
| | | 0 => 'n', |
| | | 1 => 'y' |
| | | ) |
| | | ), |
| | | 'apps_vhost_port' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | |
| | | $wb['php_ini_check_minutes_error_empty'] = 'Bitte geben Sie einen Wert an, wie oft die php.ini auf Änderungen geprüft werden soll.'; |
| | | $wb['php_ini_check_minutes_info_txt'] = '0 = keine Prüfung'; |
| | | $wb['php_handler_txt'] = 'Standard-PHP-Handler'; |
| | | $wb['enable_spdy_txt'] = 'Stellt SPDY zur Verfügung'; |
| | | ?> |
| | |
| | | $wb['php_ini_check_minutes_txt'] = 'Check php.ini every X minutes for changes'; |
| | | $wb['php_ini_check_minutes_error_empty'] = 'Please specify a value how often php.ini should be checked for changes.'; |
| | | $wb['php_ini_check_minutes_info_txt'] = '0 = no check'; |
| | | $wb['enable_spdy_txt'] = 'Makes SPDY available'; |
| | | ?> |
| | |
| | | {tmpl_var name='enable_sni'} |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <p class="label"> |
| | | <tmpl_var name="enable_spdy_txt"> |
| | | </p> |
| | | <div class="multiField"> |
| | | <tmpl_var name="enable_spdy"> |
| | | </div> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="CA_path">{tmpl_var name='CA_path_txt'}</label> |
| | | <input name="CA_path" id="CA_path" value="{tmpl_var name='CA_path'}" size="40" maxlength="255" type="text" autocomplete="off" class="textInput" /> |
| | |
| | | 'width' => '30', |
| | | 'maxlength' => '255', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | 'cols' => '', |
| | | 'validators' => array ( 0 => array ( 'type' => 'CUSTOM', |
| | | 'class' => 'validate_client', |
| | | 'function' => 'check_vat_id', |
| | | 'errmsg'=> 'invalid_vat_id'), |
| | | ), |
| | | ), |
| | | 'company_id' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | |
| | | 'width' => '30', |
| | | 'maxlength' => '255', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | 'cols' => '', |
| | | 'validators' => array ( 0 => array ( 'type' => 'CUSTOM', |
| | | 'class' => 'validate_client', |
| | | 'function' => 'check_vat_id', |
| | | 'errmsg'=> 'invalid_vat_id'), |
| | | ), |
| | | ), |
| | | 'company_id' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | |
| | | $wb['limit_backup_txt'] = 'Backupfunktion verfügbar'; |
| | | $wb['limit_dns_slave_zone_error_notint'] = 'Das Secondary DNS Zonen Limit muss eine Zahl sein.'; |
| | | $wb['customer_no_txt'] = 'Kundennummer'; |
| | | $wb['vat_id_txt'] = 'USt-ID'; |
| | | $wb['vat_id_txt'] = 'USt.-ID'; |
| | | $wb['required_fields_txt'] = '* Benötigte Felder'; |
| | | $wb['limit_mailmailinglist_txt'] = 'Max. Anzahl an Mailinglisten'; |
| | | $wb['limit_mailmailinglist_error_notint'] = 'Das Mailinglisten Limit muss eine Zahl sein.'; |
| | |
| | | $wb['reseller_txt'] = 'Reseller'; |
| | | $wb['btn_save_txt'] = 'Speichern'; |
| | | $wb['btn_cancel_txt'] = 'Abbrechen'; |
| | | $wb['invalid_vat_id'] = 'Die USt.-ID ist ungültig.'; |
| | | ?> |
| | |
| | | $wb['limit_dns_slave_zone_error_notint'] = 'Das Secondary DNS Zonen Limit muss eine Zahl sein.'; |
| | | $wb['limit_dns_record_error_notint'] = 'Das DNS Eintrag Limit muss eine Zahl sein.'; |
| | | $wb['customer_no_txt'] = 'Kundennummer'; |
| | | $wb['vat_id_txt'] = 'USt-ID'; |
| | | $wb['vat_id_txt'] = 'USt.-ID'; |
| | | $wb['required_fields_txt'] = '* Benötigte Felder'; |
| | | $wb['limit_webdav_user_txt'] = 'Max. Anzahl an WebDAV Benutzern'; |
| | | $wb['limit_webdav_user_error_notint'] = 'Das WebDAV Benutzer Limit muss eine Zahl sein.'; |
| | |
| | | $wb['limit_domainmodule_txt'] = 'Domainmodule Limit'; |
| | | $wb['client_limits_txt'] = 'Client Limits'; |
| | | $wb['err_msg_master_tpl_set'] = 'All custom limit settings are ignored if any master template other than \\"custom\\" is selected.'; |
| | | $wb['invalid_vat_id'] = 'Die USt.-ID ist ungültig.'; |
| | | ?> |
| | |
| | | $wb['reseller_txt'] = 'Reseller'; |
| | | $wb['btn_save_txt'] = "Save"; |
| | | $wb['btn_cancel_txt'] = "Cancel"; |
| | | $wb['invalid_vat_id'] = 'The VAT ID is invalid.'; |
| | | ?> |
| | |
| | | $wb['limit_domainmodule_txt'] = 'Domainmodule Limit'; |
| | | $wb['client_limits_txt'] = 'Client Limits'; |
| | | $wb['err_msg_master_tpl_set'] = 'All custom limit settings are ignored if any master template other than "custom" is selected.'; |
| | | $wb['invalid_vat_id'] = 'The VAT ID is invalid.'; |
| | | ?> |
| | |
| | | 'default' => '', |
| | | 'value' => array('' => 'none_txt', 'save' => 'save_certificate_txt', 'create' => 'create_certificate_txt', 'del' => 'delete_certificate_txt') |
| | | ), |
| | | 'enable_spdy' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array ( |
| | | 0 => 'n', |
| | | 1 => 'y' |
| | | ) |
| | | ), |
| | | //################################# |
| | | // ENDE Datatable fields |
| | | //################################# |
| | |
| | | $wb['apache_directive_blocked_error'] = 'Die Apache Direktive wurde durch die Sicherheitsrichtline blockiert:'; |
| | | $wb['btn_save_txt'] = 'Speichern'; |
| | | $wb['btn_cancel_txt'] = 'Abbrechen'; |
| | | $wb['enable_spdy_txt'] = 'Aktiviere SPDY'; |
| | | ?> |
| | |
| | | $wb['subdomain_error_empty'] = 'The subdommain field is empty or contains invalid characters.'; |
| | | $wb['btn_save_txt'] = "Save"; |
| | | $wb['btn_cancel_txt'] = "Cancel"; |
| | | $wb['enable_spdy_txt'] = 'Enable SPDY'; |
| | | ?> |
| | |
| | | }); |
| | | } |
| | | |
| | | </script> |
| | | </script> |
| | |
| | | {tmpl_var name='ssl_action'} |
| | | </select> |
| | | </div> |
| | | {tmpl_if name="is_spdy_enabled"} |
| | | <div class="ctrlHolder"> |
| | | <p class="label">{tmpl_var name='enable_spdy_txt'}</p> |
| | | <div class="multiField"> |
| | | {tmpl_var name="enable_spdy"} |
| | | </div> |
| | | </div> |
| | | {/tmpl_if} |
| | | </fieldset> |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | $app->tpl->setVar('vhostdomain_type', $this->_vhostdomain_type); |
| | | |
| | | $app->tpl->setVar('is_spdy_enabled', ($web_config['enable_spdy'] === 'y')); |
| | | |
| | | parent::onShowEnd(); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | if($web_config['enable_spdy'] === 'n') { |
| | | unset($app->tform->formDef["tabs"]['ssl']['fields']['enable_spdy']); |
| | | } |
| | | |
| | | parent::onSubmit(); |
| | | } |
| | | |
| | |
| | | <VirtualHost {tmpl_var name='apps_vhost_ip'}:{tmpl_var name='apps_vhost_port'}> |
| | | ServerAdmin webmaster@localhost |
| | | {tmpl_var name='apps_vhost_servername'} |
| | | |
| | | |
| | | <FilesMatch "\.ph(p3?|tml)$"> |
| | | SetHandler None |
| | | </FilesMatch> |
| | | |
| | | |
| | | {tmpl_if name="enable_spdy" op="==" value="y"} |
| | | <IfModule spdy_module> |
| | | SpdyEnabled on |
| | | </IfModule> |
| | | {/tmpl_if} |
| | | |
| | | <IfModule mod_php5.c> |
| | | DocumentRoot {tmpl_var name='apps_vhost_dir'} |
| | | AddType application/x-httpd-php .php |
| | |
| | | </tmpl_if> |
| | | |
| | | <tmpl_if name='ssl_enabled'> |
| | | listen <tmpl_var name='ip_address'>:443 ssl; |
| | | listen <tmpl_var name='ip_address'>:443 ssl{tmpl_if name='enable_spdy' op='==' value='y'} spdy{/tmpl_if}; |
| | | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |
| | | <tmpl_if name='ipv6_enabled'> |
| | | listen [<tmpl_var name='ipv6_address'>]:443 ssl; |
| | | listen [<tmpl_var name='ipv6_address'>]:443 ssl{tmpl_if name='enable_spdy' op='==' value='y'} spdy{/tmpl_if};; |
| | | </tmpl_if> |
| | | ssl_certificate <tmpl_var name='document_root'>/ssl/<tmpl_var name='ssl_domain'>.crt; |
| | | ssl_certificate_key <tmpl_var name='document_root'>/ssl/<tmpl_var name='ssl_domain'>.key; |
| | |
| | | } |
| | | </tmpl_if> |
| | | } |
| | | </tmpl_loop> |
| | | </tmpl_loop> |