diff --git a/helper_scripts/ubuntu-amavisd-new-2.11.patch b/helper_scripts/ubuntu-amavisd-new-2.11.patch new file mode 100644 index 0000000000000000000000000000000000000000..ac0ecb2dc0512b6fe91c2ba905bd0797fd2edc5b --- /dev/null +++ b/helper_scripts/ubuntu-amavisd-new-2.11.patch @@ -0,0 +1,18 @@ +--- amavisd-new.orig 2017-11-16 11:51:19.000000000 +0100 ++++ amavisd-new 2018-05-25 16:53:45.623398108 +0200 +@@ -22829,6 +22829,7 @@ + } + # load policy banks from the 'client_ipaddr_policy' lookup + Amavis::load_policy_bank($_,$msginfo) for @bank_names_cl; ++ $msginfo->originating(c('originating')); + + $msginfo->client_addr($cl_ip); # ADDR + $msginfo->client_port($cl_port); # PORT +@@ -34361,6 +34362,7 @@ + $sig_ind++; + } + Amavis::load_policy_bank($_,$msginfo) for @bank_names; ++ $msginfo->originating(c('originating')); + $msginfo->dkim_signatures_valid(\@signatures_valid) if @signatures_valid; + # if (ll(5) && $sig_ind > 0) { + # # show which header fields are covered by which signature diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 686621f9214bfb44e087ef7d97308b7cced4692b..36b0ed022e9af4e9de757af54a7aeb9daf479a5c 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -2371,9 +2371,9 @@ class installer_base { $content = str_replace('{ssl_comment}', '#', $content); // Fix socket path on PHP 7 systems - if(file_exists('/var/run/php/php7.0-fpm.sock')) { - $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.0-fpm.sock', $content); - } + if(file_exists('/var/run/php/php7.0-fpm.sock')) $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.0-fpm.sock', $content); + if(file_exists('/var/run/php/php7.1-fpm.sock')) $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.1-fpm.sock', $content); + if(file_exists('/var/run/php/php7.2-fpm.sock')) $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.2-fpm.sock', $content); wf($vhost_conf_dir.'/apps.vhost', $content); diff --git a/install/tpl/server.ini.master b/install/tpl/server.ini.master index 8a8661801c36266a95c66dd9d9d52af680c8fb9d..b6a8b8b42cfdee1f02047708f9cc7dc90d256d92 100644 --- a/install/tpl/server.ini.master +++ b/install/tpl/server.ini.master @@ -103,6 +103,7 @@ php_fpm_ini_path=/etc/php5/fpm/php.ini php_fpm_pool_dir=/etc/php5/fpm/pool.d php_fpm_start_port=9010 php_fpm_socket_dir=/var/lib/php5-fpm +php_default_name=Default set_folder_permissions_on_update=n add_web_users_to_sshusers_group=y connect_userid_to_webid=n diff --git a/interface/lib/classes/functions.inc.php b/interface/lib/classes/functions.inc.php index 3ee0556226758989ce3b21c48af98767f370e8c6..a86057a0647c0544849b97e6d6107c3d33663943 100644 --- a/interface/lib/classes/functions.inc.php +++ b/interface/lib/classes/functions.inc.php @@ -513,6 +513,29 @@ class functions { return $out; } + + // Function to check paths before we use it as include. Use with absolute paths only. + public function check_include_path($path) { + if(strpos($path,'//') !== false) die('Include path seems to be an URL: '.$this->htmlentities($path)); + if(strpos($path,'..') !== false) die('Two dots are not allowed in include path: '.$this->htmlentities($path)); + if(!preg_match("/^[a-zA-Z0-9_\/\.\-]+$/", $path)) die('Wrong chars in include path: '.$this->htmlentities($path)); + $path = realpath($path); + if($path == '') die('Include path does not exist.'); + if(substr($path,0,strlen(ISPC_ROOT_PATH)) != ISPC_ROOT_PATH) die('Path '.$this->htmlentities($path).' is outside of ISPConfig installation directory.'); + return $path; + } + + // Function to check language strings + public function check_language($language) { + global $app; + if(preg_match('/^[a-z]{2}$/',$language)) { + return $language; + } else { + $app->log('Wrong language string: '.$this->htmlentities($language),1); + return 'en'; + } + } + } ?> diff --git a/interface/lib/classes/listform.inc.php b/interface/lib/classes/listform.inc.php index 15a1a53add169892e4aaba3e1b7d4dcb775d398c..4b92daa73c2cba5cc8b7ec01ee170a452e20a3c8 100644 --- a/interface/lib/classes/listform.inc.php +++ b/interface/lib/classes/listform.inc.php @@ -60,7 +60,7 @@ class listform { } //* Set local Language File - $lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_'.$this->listDef['name'].'_list.lng'; + $lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_'.$this->listDef['name'].'_list.lng'; if(!file_exists($lng_file)) $lng_file = 'lib/lang/en_'.$this->listDef['name'].'_list.lng'; include $lng_file; diff --git a/interface/lib/classes/listform_actions.inc.php b/interface/lib/classes/listform_actions.inc.php index b4366feaa6535782c082cee801ecbf08924f224b..a13c3fdb739691b6f49f494a1d0de15f1aa406a6 100644 --- a/interface/lib/classes/listform_actions.inc.php +++ b/interface/lib/classes/listform_actions.inc.php @@ -249,7 +249,7 @@ class listform_actions { global $app; //* Set global Language File - $lng_file = ISPC_LIB_PATH.'/lang/'.$_SESSION['s']['language'].'.lng'; + $lng_file = ISPC_LIB_PATH.'/lang/'.$app->functions->check_language($_SESSION['s']['language']).'.lng'; if(!file_exists($lng_file)) $lng_file = ISPC_LIB_PATH.'/lang/en.lng'; include $lng_file; diff --git a/interface/lib/classes/listform_tpl_generator.inc.php b/interface/lib/classes/listform_tpl_generator.inc.php index 0cb158bb39ee6666738b9c28d9bee673030ecd80..031f7a1e564516f037d4f81a4ca6180ba351f673 100644 --- a/interface/lib/classes/listform_tpl_generator.inc.php +++ b/interface/lib/classes/listform_tpl_generator.inc.php @@ -153,10 +153,10 @@ class listform_tpl_generator { } function lng_add($lang, $listDef, $module = '') { - global $go_api, $go_info, $conf; + global $app, $conf; if($module == '') { - $lng_file = "lib/lang/".$conf["language"]."_".$listDef['name']."_list.lng"; + $lng_file = "lib/lang/".$app->functions->check_language($conf["language"])."_".$listDef['name']."_list.lng"; } else { $lng_file = '../'.$module."/lib/lang/en_".$listDef['name']."_list.lng"; } diff --git a/interface/lib/classes/plugin_backuplist.inc.php b/interface/lib/classes/plugin_backuplist.inc.php index 8e62589f76e5de1c3dcfe01cbb4dddb6bae9ec6f..e96be012e3d6847d43ba990cd9b79c82c3f247f3 100644 --- a/interface/lib/classes/plugin_backuplist.inc.php +++ b/interface/lib/classes/plugin_backuplist.inc.php @@ -45,7 +45,7 @@ class plugin_backuplist extends plugin_base { $listTpl->newTemplate('templates/web_backup_list.htm'); //* Loading language file - $lng_file = "lib/lang/".$_SESSION["s"]["language"]."_web_backup_list.lng"; + $lng_file = "lib/lang/".$app->functions->check_language($_SESSION["s"]["language"])."_web_backup_list.lng"; include $lng_file; $listTpl->setVar($wb); diff --git a/interface/lib/classes/plugin_backuplist_mail.inc.php b/interface/lib/classes/plugin_backuplist_mail.inc.php index 512fb8c9f05a6de50e0b54a1745cbce031d8f483..af133556097d4d329132a31199900eec004f2e70 100644 --- a/interface/lib/classes/plugin_backuplist_mail.inc.php +++ b/interface/lib/classes/plugin_backuplist_mail.inc.php @@ -46,7 +46,7 @@ class plugin_backuplist_mail extends plugin_base { $listTpl->newTemplate('templates/mail_user_backup_list.htm'); //* Loading language file - $lng_file = "lib/lang/".$_SESSION["s"]["language"]."_mail_backup_list.lng"; + $lng_file = "lib/lang/".$app->functions->check_language($_SESSION["s"]["language"])."_mail_backup_list.lng"; include($lng_file); $listTpl->setVar($wb); diff --git a/interface/lib/classes/plugin_directive_snippets.inc.php b/interface/lib/classes/plugin_directive_snippets.inc.php index 41138bca1e5891723289a548b9edb9c4ccf19789..555526444692816837a52bfbd393da77edefce57 100644 --- a/interface/lib/classes/plugin_directive_snippets.inc.php +++ b/interface/lib/classes/plugin_directive_snippets.inc.php @@ -18,7 +18,7 @@ class plugin_directive_snippets extends plugin_base $listTpl->newTemplate('templates/web_directive_snippets.htm'); //* Loading language file - $lng_file = "lib/lang/".$_SESSION["s"]["language"]."_web_directive_snippets.lng"; + $lng_file = "lib/lang/".$app->functions->check_language($_SESSION["s"]["language"])."_web_directive_snippets.lng"; include $lng_file; $listTpl->setVar($wb); diff --git a/interface/lib/classes/plugin_listview.inc.php b/interface/lib/classes/plugin_listview.inc.php index c9d8340e02e290de97bedba9a4edb530aca6a7b4..bd0aa0e160105701a956f69780c95daa6b18dc2a 100644 --- a/interface/lib/classes/plugin_listview.inc.php +++ b/interface/lib/classes/plugin_listview.inc.php @@ -120,7 +120,7 @@ class plugin_listview extends plugin_base { } // Loading language field - $lng_file = "lib/lang/".$_SESSION["s"]["language"]."_".$app->listform->listDef['name']."_list.lng"; + $lng_file = "lib/lang/".$app->functions->check_language($_SESSION["s"]["language"])."_".$app->listform->listDef['name']."_list.lng"; include $lng_file; $listTpl->setVar($wb); diff --git a/interface/lib/classes/remote.d/admin.inc.php b/interface/lib/classes/remote.d/admin.inc.php index 347f8520b7490a3cc9502c2be072c629e2b6a40d..8b0c4730e80a0d4e0587baacc6772a227198a750 100644 --- a/interface/lib/classes/remote.d/admin.inc.php +++ b/interface/lib/classes/remote.d/admin.inc.php @@ -156,6 +156,122 @@ class remoting_admin extends remoting { return false; } } + + // config_value_* functions --------------------------------------------------------------------------------------- + + //* Get config_value details + public function config_value_get($session_id, $group, $name) + { + global $app; + + if(!$this->checkPerm($session_id, 'config_value_get')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + // validate fields + if($group == '' || $name == '') { + throw new SoapFault('field_empty_error', 'Group and name parameter may not be empty.'); + return false; + } + + return $app->db->queryOneRecord('SELECT * FROM sys_config WHERE `group` = ? AND `name` = ?', $group, $name); + } + + //* Add a config_value record + public function config_value_add($session_id, $group, $name, $value) + { + global $app; + + if(!$this->checkPerm($session_id, 'config_value_add')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + // validate fields + if($group == '' || $name == '' || $value == '') { + throw new SoapFault('field_empty_error', 'Group, name, and value parameter may not be empty.'); + return false; + } + + if(is_array($app->db->queryOneRecord('SELECT * FROM sys_config WHERE `group` = ? AND `name` = ?', $group, $name))) { + throw new SoapFault('record_unique_error', 'Group plus name field combination is not unique.'); + return false; + } + + return $app->db->query('INSERT INTO sys_config (`group`,`name`,`value`) VALUES (?,?,?)',$group,$name,$value); + } + + //* Update config_value record + public function config_value_update($session_id, $group, $name, $value) + { + global $app; + + if(!$this->checkPerm($session_id, 'config_value_update')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + // validate fields + if($group == '' || $name == '' || $value == '') { + throw new SoapFault('field_empty_error', 'Group, name, and value parameter may not be empty.'); + return false; + } + + if(!is_array($app->db->queryOneRecord('SELECT * FROM sys_config WHERE `group` = ? AND `name` = ?', $group, $name))) { + throw new SoapFault('record_nonexist_error', 'There is no record with this group plus name field combination.'); + return false; + } + + return $app->db->query('UPDATE sys_config SET `value` = ? WHERE `group` = ? AND `name` = ?',$value,$group,$name); + } + + //* Replace config_value record + public function config_value_replace($session_id, $group, $name, $value) + { + global $app; + + if(!$this->checkPerm($session_id, 'config_value_replace')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + // validate fields + if($group == '' || $name == '' || $value == '') { + throw new SoapFault('field_empty_error', 'Group, name, and value parameter may not be empty.'); + return false; + } + + if(is_array($app->db->queryOneRecord('SELECT * FROM sys_config WHERE `group` = ? AND `name` = ?', $group, $name))) { + return $app->db->query('UPDATE sys_config SET `value` = ? WHERE `group` = ? AND `name` = ?',$value,$group,$name); + } else { + return $app->db->query('INSERT INTO sys_config (`group`,`name`,`value`) VALUES (?,?,?)',$group,$name,$value); + } + } + + //* Delete config_value record + public function config_value_delete($session_id, $group, $name) + { + global $app; + + if(!$this->checkPerm($session_id, 'config_value_delete')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + // validate fields + if($group == '' || $name == '') { + throw new SoapFault('field_empty_error', 'Group and name parameter may not be empty.'); + return false; + } + + if(!is_array($app->db->queryOneRecord('SELECT * FROM sys_config WHERE `group` = ? AND `name` = ?', $group, $name))) { + throw new SoapFault('record_nonexist_error', 'There is no record with this group plus name field combination.'); + return false; + } + + return $app->db->query('DELETE FROM sys_config WHERE `group` = ? AND `name` = ?',$group,$name); + } } diff --git a/interface/lib/classes/remote.d/dns.inc.php b/interface/lib/classes/remote.d/dns.inc.php index 49209b183636ed76bc876d0090144bc918d97cb5..f7b0d139747eb4217056a417e3f1e98e72cf4d82 100644 --- a/interface/lib/classes/remote.d/dns.inc.php +++ b/interface/lib/classes/remote.d/dns.inc.php @@ -333,7 +333,7 @@ class remoting_dns extends remoting { return false; } $affected_rows = $this->deleteQuery('../dns/form/dns_aaaa.tform.php', $primary_id); - if($update_serial) $this->increase_serial($session_id, $client_id, $params); + if($update_serial) $this->increase_serial($session_id, $client_id, array('dns_rr_id' => $primary_id)); return $affected_rows; } @@ -384,7 +384,7 @@ class remoting_dns extends remoting { return false; } $affected_rows = $this->deleteQuery('../dns/form/dns_a.tform.php', $primary_id); - if($update_serial) $this->increase_serial($session_id, $client_id, $params); + if($update_serial) $this->increase_serial($session_id, $client_id, array('dns_rr_id' => $primary_id)); return $affected_rows; } @@ -435,7 +435,7 @@ class remoting_dns extends remoting { return false; } $affected_rows = $this->deleteQuery('../dns/form/dns_alias.tform.php', $primary_id); - if($update_serial) $this->increase_serial($session_id, $client_id, $params); + if($update_serial) $this->increase_serial($session_id, $client_id, array('dns_rr_id' => $primary_id)); return $affected_rows; } @@ -486,7 +486,7 @@ class remoting_dns extends remoting { return false; } $affected_rows = $this->deleteQuery('../dns/form/dns_cname.tform.php', $primary_id); - if($update_serial) $this->increase_serial($session_id, $client_id, $params); + if($update_serial) $this->increase_serial($session_id, $client_id, array('dns_rr_id' => $primary_id)); return $affected_rows; } @@ -537,7 +537,7 @@ class remoting_dns extends remoting { return false; } $affected_rows = $this->deleteQuery('../dns/form/dns_hinfo.tform.php', $primary_id); - if($update_serial) $this->increase_serial($session_id, $client_id, $params); + if($update_serial) $this->increase_serial($session_id, $client_id, array('dns_rr_id' => $primary_id)); return $affected_rows; } @@ -588,7 +588,7 @@ class remoting_dns extends remoting { return false; } $affected_rows = $this->deleteQuery('../dns/form/dns_mx.tform.php', $primary_id); - if($update_serial) $this->increase_serial($session_id, $client_id, $params); + if($update_serial) $this->increase_serial($session_id, $client_id, array('dns_rr_id' => $primary_id)); return $affected_rows; } @@ -639,7 +639,7 @@ class remoting_dns extends remoting { return false; } $affected_rows = $this->deleteQuery('../dns/form/dns_ns.tform.php', $primary_id); - if($update_serial) $this->increase_serial($session_id, $client_id, $params); + if($update_serial) $this->increase_serial($session_id, $client_id, array('dns_rr_id' => $primary_id)); return $affected_rows; } @@ -690,7 +690,7 @@ class remoting_dns extends remoting { return false; } $affected_rows = $this->deleteQuery('../dns/form/dns_ptr.tform.php', $primary_id); - if($update_serial) $this->increase_serial($session_id, $client_id, $params); + if($update_serial) $this->increase_serial($session_id, $client_id, array('dns_rr_id' => $primary_id)); return $affected_rows; } @@ -741,7 +741,7 @@ class remoting_dns extends remoting { return false; } $affected_rows = $this->deleteQuery('../dns/form/dns_rp.tform.php', $primary_id); - if($update_serial) $this->increase_serial($session_id, $client_id, $params); + if($update_serial) $this->increase_serial($session_id, $client_id, array('dns_rr_id' => $primary_id)); return $affected_rows; } @@ -792,7 +792,7 @@ class remoting_dns extends remoting { return false; } $affected_rows = $this->deleteQuery('../dns/form/dns_srv.tform.php', $primary_id); - if($update_serial) $this->increase_serial($session_id, $client_id, $params); + if($update_serial) $this->increase_serial($session_id, $client_id, array('dns_rr_id' => $primary_id)); return $affected_rows; } @@ -843,7 +843,7 @@ class remoting_dns extends remoting { return false; } $affected_rows = $this->deleteQuery('../dns/form/dns_txt.tform.php', $primary_id); - if($update_serial) $this->increase_serial($session_id, $client_id, $params); + if($update_serial) $this->increase_serial($session_id, $client_id, array('dns_rr_id' => $primary_id)); return $affected_rows; } @@ -918,6 +918,12 @@ class remoting_dns extends remoting { } private function increase_serial($session_id, $client_id, $params) { + global $app; + if(!isset($params['zone']) && isset($params['dns_rr_id'])) { + $tmp = $app->db->queryOneRecord('SELECT zone FROM dns_rr WHERE id = ?',$params['dns_rr_id']); + $params['zone'] = $tmp['zone']; + unset($tmp); + } $soa = $this->dns_zone_get($session_id, $params['zone']); $serial=$soa['serial']; $serial_date = intval(substr($serial, 0, 8)); diff --git a/interface/lib/classes/remoting_lib.inc.php b/interface/lib/classes/remoting_lib.inc.php index 0f313de6bded35da1314350a971861a9609f276c..a5a5d0c31c49c647f33d5a0eca3310133820e05c 100644 --- a/interface/lib/classes/remoting_lib.inc.php +++ b/interface/lib/classes/remoting_lib.inc.php @@ -308,7 +308,9 @@ class remoting_lib extends tform_base { global $app; $username = $params["username"]; $clear_password = $params["password"]; + $language = $params['language']; $client_id = $app->functions->intval($client_id); + if(!isset($params['_ispconfig_pw_crypted']) || $params['_ispconfig_pw_crypted'] != 1) $password = $app->auth->crypt_password(stripslashes($clear_password)); else $password = $clear_password; $params = array($username); @@ -318,8 +320,15 @@ class remoting_lib extends tform_base { } else { $pwstring ="" ; } + + $langstring = ''; + if (!empty($language)) { + $langstring = ', language = ?'; + $params[] = $language; + } + $params[] = $client_id; - $sql = "UPDATE sys_user set username = ? $pwstring WHERE client_id = ?"; + $sql = "UPDATE sys_user set username = ? $pwstring $langstring WHERE client_id = ?"; $app->db->query($sql, true, $params); } diff --git a/interface/lib/classes/searchform_actions.inc.php b/interface/lib/classes/searchform_actions.inc.php index e48eb8544de5bfbfe2c5efd2fd419ba1eb184e08..c4372982c0ae5fbd0a7d94683b57d9dd1e96a538 100644 --- a/interface/lib/classes/searchform_actions.inc.php +++ b/interface/lib/classes/searchform_actions.inc.php @@ -151,10 +151,10 @@ class searchform_actions { global $app; // Language File setzen - $lng_file = ISPC_WEB_PATH.'/lang/lib/lang/'.$_SESSION['s']['language'].'_list.lng'; + $lng_file = ISPC_WEB_PATH.'/lang/lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_list.lng'; if(!file_exists($lng_file)) $lng_file = ISPC_WEB_PATH.'/lang/lib/lang/en_'.'_list.lng'; include $lng_file; - $lng_file = "lib/lang/".$_SESSION["s"]["language"]."_".$app->searchform->listDef['name']."_search.lng"; + $lng_file = "lib/lang/".$app->functions->check_language($_SESSION["s"]["language"])."_".$app->searchform->listDef['name']."_search.lng"; if(!file_exists($lng_file)) $lng_file = 'lib/lang/en_'.$app->searchform->listDef['name']."_search.lng"; include $lng_file; $app->tpl->setVar($wb); diff --git a/interface/lib/classes/tform.inc.php b/interface/lib/classes/tform.inc.php index b28e50322454c93df811dc94a70549d0a23931a2..920541cacc9cc9eb71c8051c1660467de43d1094 100644 --- a/interface/lib/classes/tform.inc.php +++ b/interface/lib/classes/tform.inc.php @@ -132,20 +132,25 @@ class tform extends tform_base { function isReadonlyTab($tab, $primary_id) { global $app, $conf; + + if(isset($this->formDef['tabs'][$tab]['readonly']) && $this->formDef['tabs'][$tab]['readonly'] == true) { - // Add backticks for incomplete table names. - if(stristr($this->formDef['db_table'], '.')) { - $escape = ''; - } else { - $escape = '`'; - } + // Add backticks for incomplete table names. + if(stristr($this->formDef['db_table'], '.')) { + $escape = ''; + } else { + $escape = '`'; + } - $sql = "SELECT sys_userid FROM ?? WHERE ?? = ?"; - $record = $app->db->queryOneRecord($sql, $this->formDef['db_table'], $this->formDef['db_table_idx'], $primary_id); + $sql = "SELECT sys_userid FROM ?? WHERE ?? = ?"; + $record = $app->db->queryOneRecord($sql, $this->formDef['db_table'], $this->formDef['db_table_idx'], $primary_id); - // return true if the readonly flag of the form is set and the current loggedin user is not the owner of the record. - if(isset($this->formDef['tabs'][$tab]['readonly']) && $this->formDef['tabs'][$tab]['readonly'] == true && $record['sys_userid'] != $_SESSION["s"]["user"]["userid"]) { - return true; + // return true if the readonly flag of the form is set and the current loggedin user is not the owner of the record. + if($record['sys_userid'] != $_SESSION["s"]["user"]["userid"]) { + return true; + } else { + return false; + } } else { return false; } diff --git a/interface/lib/classes/tform_base.inc.php b/interface/lib/classes/tform_base.inc.php index 12583e210dbf951a0b659f99ac68293e9d29b623..3b82b48376a9f111e767633b63fae0874290431c 100644 --- a/interface/lib/classes/tform_base.inc.php +++ b/interface/lib/classes/tform_base.inc.php @@ -134,7 +134,7 @@ class tform_base { $this->module = $module; $wb = array(); - include_once ISPC_ROOT_PATH.'/lib/lang/'.$_SESSION['s']['language'].'.lng'; + include_once ISPC_ROOT_PATH.'/lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'.lng'; if(is_array($wb)) $wb_global = $wb; @@ -143,7 +143,7 @@ class tform_base { if(!file_exists($lng_file)) $lng_file = "lib/lang/en_".$this->formDef["name"].".lng"; include $lng_file; } else { - $lng_file = "../$module/lib/lang/".$_SESSION["s"]["language"]."_".$this->formDef["name"].".lng"; + $lng_file = "../$module/lib/lang/".$app->functions->check_language($_SESSION["s"]["language"])."_".$this->formDef["name"].".lng"; if(!file_exists($lng_file)) $lng_file = "../$module/lib/lang/en_".$this->formDef["name"].".lng"; include $lng_file; } diff --git a/interface/lib/classes/tform_tpl_generator.inc.php b/interface/lib/classes/tform_tpl_generator.inc.php index f841a09a69f2a08e0c6e46dbdb6dc3cf59642b1d..f0d9649b9c8aed746d46177bf02ddc1e6d483038 100644 --- a/interface/lib/classes/tform_tpl_generator.inc.php +++ b/interface/lib/classes/tform_tpl_generator.inc.php @@ -298,7 +298,7 @@ class tform_tpl_generator { function lng_add($lang, $formDef) { global $go_api, $go_info, $conf; - $lng_file = "lib/lang/".$conf["language"]."_".$formDef['name'].".lng"; + $lng_file = "lib/lang/".$app->functions->check_language($conf["language"])."_".$formDef['name'].".lng"; if(is_file($lng_file)) { include $lng_file; } else { diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php index ad4171c3168bc0a3539b3b27413917ddd0dc8c83..a1a4dfb19a28e1ed7baa2c7724adf1b831e8b128 100644 --- a/interface/web/admin/form/server_config.tform.php +++ b/interface/web/admin/form/server_config.tform.php @@ -1128,6 +1128,24 @@ $form["tabs"]['web'] = array( 'width' => '40', 'maxlength' => '255' ), + 'php_default_name' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => 'Default', + 'validators' => array( 0 => array('type' => 'NOTEMPTY', + 'errmsg' => 'php_default_name_error_empty'), + ), + 'filters' => array( + 0 => array( 'event' => 'SAVE', + 'type' => 'TRIM'), + 1 => array( 'event' => 'SAVE', + 'type' => 'STRIPTAGS'), + 2 => array( 'event' => 'SAVE', + 'type' => 'STRIPNL') + ), + 'width' => '40', + 'maxlength' => '255' + ), 'php_fpm_init_script' => array( 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', diff --git a/interface/web/admin/language_add.php b/interface/web/admin/language_add.php index f58a2db16dbb6ce159149a8a6e17e86e9a7b6ddc..f36fd946d2de8523279c47286deae3f2617044d4 100644 --- a/interface/web/admin/language_add.php +++ b/interface/web/admin/language_add.php @@ -104,7 +104,7 @@ $app->tpl->setVar('_csrf_id',$csrf_token['csrf_id']); $app->tpl->setVar('_csrf_key',$csrf_token['csrf_key']); //* load language file -$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_language_add.lng'; +$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_language_add.lng'; include $lng_file; $app->tpl->setVar($wb); diff --git a/interface/web/admin/language_complete.php b/interface/web/admin/language_complete.php index d28e89aa2576ee51d8b6e41030c10fdbded2c3c4..234685498d0486e8b7086e34e69e7c91f5e84d10 100644 --- a/interface/web/admin/language_complete.php +++ b/interface/web/admin/language_complete.php @@ -166,7 +166,7 @@ $app->tpl->setVar('_csrf_id',$csrf_token['csrf_id']); $app->tpl->setVar('_csrf_key',$csrf_token['csrf_key']); //* load language file -$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_language_complete.lng'; +$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_language_complete.lng'; include $lng_file; $app->tpl->setVar($wb); diff --git a/interface/web/admin/language_edit.php b/interface/web/admin/language_edit.php index c94a5eb2804ed1ef0323a960d49ef58e2c621f5e..f17c4ae9a8477c0e0792701bef2ef0c9090f934a 100644 --- a/interface/web/admin/language_edit.php +++ b/interface/web/admin/language_edit.php @@ -104,7 +104,7 @@ $app->tpl->setVar('_csrf_key',$csrf_token['csrf_key']); //* load language file -$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_language_edit.lng'; +$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_language_edit.lng'; include $lng_file; $app->tpl->setVar($wb); diff --git a/interface/web/admin/language_export.php b/interface/web/admin/language_export.php index 44bc787bd33eefdc29a28f5f3ee00bba9cddd921..3f54e53af8f590e1fa071ba5cd622c19b9e882d5 100644 --- a/interface/web/admin/language_export.php +++ b/interface/web/admin/language_export.php @@ -111,7 +111,7 @@ if(isset($_POST['lng_select']) && $error == '') { $app->tpl->setVar('msg', $msg); //* load language file -$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_language_export.lng'; +$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_language_export.lng'; include $lng_file; $app->tpl->setVar($wb); diff --git a/interface/web/admin/language_import.php b/interface/web/admin/language_import.php index 2e702198048a1de1fdb5a787d9aebe0b6d16a496..6a2d0b5ba65a2e14afb0a8a0f756439388209fb1 100644 --- a/interface/web/admin/language_import.php +++ b/interface/web/admin/language_import.php @@ -194,7 +194,7 @@ $app->tpl->setVar('_csrf_id',$csrf_token['csrf_id']); $app->tpl->setVar('_csrf_key',$csrf_token['csrf_key']); //* load language file -$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_language_import.lng'; +$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_language_import.lng'; include $lng_file; $app->tpl->setVar($wb); diff --git a/interface/web/admin/language_list.php b/interface/web/admin/language_list.php index 2cb28dc187f1a7f2649715029ae4b584df690576..b935bddd9599bd13d645f3e23af4a35fd2c68127 100644 --- a/interface/web/admin/language_list.php +++ b/interface/web/admin/language_list.php @@ -97,7 +97,7 @@ $app->tpl->setLoop('records', $language_files_list); //* load language file -$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_language_list.lng'; +$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_language_list.lng'; include $lng_file; $app->tpl->setVar($wb); diff --git a/interface/web/admin/lib/lang/ar_server_config.lng b/interface/web/admin/lib/lang/ar_server_config.lng index 683efce3126486df43aa775c95635b3cf5d47b3e..55d4c4ffc0f07577c9687a2e1bb96e5a9d9ae4ec 100644 --- a/interface/web/admin/lib/lang/ar_server_config.lng +++ b/interface/web/admin/lib/lang/ar_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/bg_server_config.lng b/interface/web/admin/lib/lang/bg_server_config.lng index 277cee8b9f9e736b000bd14856674982c4558f9a..74e0405cd765e9ee362fdb5432281b6a9027313d 100644 --- a/interface/web/admin/lib/lang/bg_server_config.lng +++ b/interface/web/admin/lib/lang/bg_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/br_server_config.lng b/interface/web/admin/lib/lang/br_server_config.lng index a46db9f1c9868b1d79ea11c5c4351606c04143b3..70512ea93501c02f335ce9e271d1ee1cdfc37d51 100644 --- a/interface/web/admin/lib/lang/br_server_config.lng +++ b/interface/web/admin/lib/lang/br_server_config.lng @@ -291,4 +291,5 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; ?> diff --git a/interface/web/admin/lib/lang/ca_server_config.lng b/interface/web/admin/lib/lang/ca_server_config.lng index 3d8491cf99db921477932d6479447299cc3db38d..fbd3e1ea0a0937e785f22b3eae55a81580fa95ab 100644 --- a/interface/web/admin/lib/lang/ca_server_config.lng +++ b/interface/web/admin/lib/lang/ca_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/cz_server_config.lng b/interface/web/admin/lib/lang/cz_server_config.lng index 204828d7a63a156065d1cc8d053f04ec2fcfd4d8..54acda96fc3cf05a86b3f35a0cfe55c174a14b1c 100644 --- a/interface/web/admin/lib/lang/cz_server_config.lng +++ b/interface/web/admin/lib/lang/cz_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/de_server_config.lng b/interface/web/admin/lib/lang/de_server_config.lng index fd8cbc40b85c0fd23dc9c16cead465883f73b53e..e3ac6988871a5612049edec159b0795325853602 100644 --- a/interface/web/admin/lib/lang/de_server_config.lng +++ b/interface/web/admin/lib/lang/de_server_config.lng @@ -297,4 +297,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Beschreibung Standard PHP'; +$wb['php_default_name_error_empty'] = 'Beschreibung Standard PHP ist leer.'; ?> diff --git a/interface/web/admin/lib/lang/de_server_php_list.lng b/interface/web/admin/lib/lang/de_server_php_list.lng index d775fc6c00b535376441399a9c4d6f3b016b3e43..fe9a72ea150a4fc513dfea3f1ddf6c1ad1933f9b 100644 --- a/interface/web/admin/lib/lang/de_server_php_list.lng +++ b/interface/web/admin/lib/lang/de_server_php_list.lng @@ -4,4 +4,5 @@ $wb['server_id_txt'] = 'Server'; $wb['add_new_record_txt'] = 'Neue PHP Version hinzufügen'; $wb['client_id_txt'] = 'Kunde'; $wb['name_txt'] = 'PHP Name'; +$wb['active_txt'] = 'Aktiv'; ?> diff --git a/interface/web/admin/lib/lang/dk_server_config.lng b/interface/web/admin/lib/lang/dk_server_config.lng index fcf4d2007e790f81479e79b3e071542c49d9b1a2..61139aa544cfb396dbee72d51f90d6256fe3b0c8 100644 --- a/interface/web/admin/lib/lang/dk_server_config.lng +++ b/interface/web/admin/lib/lang/dk_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/el_server_config.lng b/interface/web/admin/lib/lang/el_server_config.lng index f7c475c5705cbe2e6868f0613bcdaa0ed70a5d91..38600769ce8e64dbcab8cda133d041916dbe9ec7 100644 --- a/interface/web/admin/lib/lang/el_server_config.lng +++ b/interface/web/admin/lib/lang/el_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/en_server_config.lng b/interface/web/admin/lib/lang/en_server_config.lng index d6c0737c3a4d6ccab012b61fe53fcf709687668b..7a960e552a3e2df861d67ac2de26079fe9929913 100644 --- a/interface/web/admin/lib/lang/en_server_config.lng +++ b/interface/web/admin/lib/lang/en_server_config.lng @@ -299,4 +299,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/en_server_php_list.lng b/interface/web/admin/lib/lang/en_server_php_list.lng index b402fd1ed19978b32027a9ed16e7b44f241db93e..62cbe6168714b18ba4fca490280c30c945e09e7c 100644 --- a/interface/web/admin/lib/lang/en_server_php_list.lng +++ b/interface/web/admin/lib/lang/en_server_php_list.lng @@ -4,4 +4,5 @@ $wb['server_id_txt'] = 'Server'; $wb['add_new_record_txt'] = 'Add new PHP version'; $wb['client_id_txt'] = 'Client'; $wb['name_txt'] = 'PHP Name'; +$wb['active_txt'] = 'Active'; ?> diff --git a/interface/web/admin/lib/lang/es_server_config.lng b/interface/web/admin/lib/lang/es_server_config.lng index aaee15ec0b2f19324c89a682f71d068731fcd16d..cb0fbf121ac88f7d846ac7a74e228214e0350da8 100755 --- a/interface/web/admin/lib/lang/es_server_config.lng +++ b/interface/web/admin/lib/lang/es_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/fi_server_config.lng b/interface/web/admin/lib/lang/fi_server_config.lng index 99c1524dc56c8df911061b98f08d30c4f573e5a6..6e08e9841199ac1a2e9391b22d4ef2dfa3000ccf 100755 --- a/interface/web/admin/lib/lang/fi_server_config.lng +++ b/interface/web/admin/lib/lang/fi_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/fr_server_config.lng b/interface/web/admin/lib/lang/fr_server_config.lng index 43e67450ec7bce990aa648c8a2230c41a8e0cffd..2045dbb8bd3d07e4dddb2ab791cdb20fa3c67073 100644 --- a/interface/web/admin/lib/lang/fr_server_config.lng +++ b/interface/web/admin/lib/lang/fr_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/hr_server_config.lng b/interface/web/admin/lib/lang/hr_server_config.lng index 797f0eb71f0e209ba2688a43a10aba55d22d07b7..99d69fec0c464f1e6e70a17539b9fde86154debe 100644 --- a/interface/web/admin/lib/lang/hr_server_config.lng +++ b/interface/web/admin/lib/lang/hr_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/hu_server_config.lng b/interface/web/admin/lib/lang/hu_server_config.lng index 04370d1b4d021e6e1a53676ed04f6bcba770623e..24d2fcb054c3e6465092e9dc78d02be0fad107ff 100644 --- a/interface/web/admin/lib/lang/hu_server_config.lng +++ b/interface/web/admin/lib/lang/hu_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/id_server_config.lng b/interface/web/admin/lib/lang/id_server_config.lng index 2993c5c5993d9d2ee0ea558363abdfcee01c2ae2..8abd5d6be0b158d94055d0c230a910183e81ad2b 100644 --- a/interface/web/admin/lib/lang/id_server_config.lng +++ b/interface/web/admin/lib/lang/id_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/it_server_config.lng b/interface/web/admin/lib/lang/it_server_config.lng index 5db4de114c93400f2fc30484725e6791b67953a3..b29ea017565da2ee11070a32551b5f66941e8e21 100644 --- a/interface/web/admin/lib/lang/it_server_config.lng +++ b/interface/web/admin/lib/lang/it_server_config.lng @@ -292,4 +292,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/ja_server_config.lng b/interface/web/admin/lib/lang/ja_server_config.lng index 353aaa809effdd4fd6299782c811f94a7c8ee149..f915e860703517f053ed5890eaeb7931a017c002 100644 --- a/interface/web/admin/lib/lang/ja_server_config.lng +++ b/interface/web/admin/lib/lang/ja_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/nl_server_config.lng b/interface/web/admin/lib/lang/nl_server_config.lng index b51c089632a4e0daa0c4a2f867c2024b3d2e97eb..b7326ad523e05ea897be66d6613930ccac265f7b 100644 --- a/interface/web/admin/lib/lang/nl_server_config.lng +++ b/interface/web/admin/lib/lang/nl_server_config.lng @@ -297,4 +297,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/pl_server_config.lng b/interface/web/admin/lib/lang/pl_server_config.lng index e2288f905071568df751efad9e132c19d11ccb5e..6f00d524e07c8d15afc445b04fc03645532cacb1 100644 --- a/interface/web/admin/lib/lang/pl_server_config.lng +++ b/interface/web/admin/lib/lang/pl_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/pt_server_config.lng b/interface/web/admin/lib/lang/pt_server_config.lng index 9d7fa04cde58088111acc1de90e7ab4394ce5565..62a8a340111c0c5fe909c641e53414940767530f 100644 --- a/interface/web/admin/lib/lang/pt_server_config.lng +++ b/interface/web/admin/lib/lang/pt_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/ro_server_config.lng b/interface/web/admin/lib/lang/ro_server_config.lng index e7787e186649a1219b4909ba63766987ad3ca562..f7c4c570388d4077e9afdd137176259f3513be6a 100644 --- a/interface/web/admin/lib/lang/ro_server_config.lng +++ b/interface/web/admin/lib/lang/ro_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/ru_server_config.lng b/interface/web/admin/lib/lang/ru_server_config.lng index eb004bcfc71fdeeeb6fd4b00a42c3111e9be7abe..a95d6e70c907587df74b24c11d12b965745e4bc8 100644 --- a/interface/web/admin/lib/lang/ru_server_config.lng +++ b/interface/web/admin/lib/lang/ru_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/se_server_config.lng b/interface/web/admin/lib/lang/se_server_config.lng index a38c3e6d12f18148f3eb0148d345a03a6bcb30b1..97d3c9f802f7c73211d5c0771409ff4b0eb5db57 100644 --- a/interface/web/admin/lib/lang/se_server_config.lng +++ b/interface/web/admin/lib/lang/se_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/sk_server_config.lng b/interface/web/admin/lib/lang/sk_server_config.lng index f20c681e23a14d4f5fa4b7506a28f394a54bb53a..cfc0b3ab7d00870deadd8bbe02318aee4da991f7 100644 --- a/interface/web/admin/lib/lang/sk_server_config.lng +++ b/interface/web/admin/lib/lang/sk_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/lang/tr_server_config.lng b/interface/web/admin/lib/lang/tr_server_config.lng index 59a11a28cc352933abaea4e7fc79baef6821fce6..ccf1ed5b9be78e18ad3ff10d9ac67204fdc78e25 100644 --- a/interface/web/admin/lib/lang/tr_server_config.lng +++ b/interface/web/admin/lib/lang/tr_server_config.lng @@ -291,4 +291,6 @@ $wb['logging_txt'] = 'Store website access and error logs'; $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.'; $wb['log_retention_txt'] = 'Log retention (days)'; $wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0'; +$wb['php_default_name_txt'] = 'Description Default PHP-Version'; +$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty'; ?> diff --git a/interface/web/admin/lib/remote.conf.php b/interface/web/admin/lib/remote.conf.php index 01e03695f839720f73ea61e233d97c54a88f7d8c..a1067a992f8c035e727355e503e517180430f540 100644 --- a/interface/web/admin/lib/remote.conf.php +++ b/interface/web/admin/lib/remote.conf.php @@ -1,6 +1,6 @@ diff --git a/interface/web/admin/list/server_php.list.php b/interface/web/admin/list/server_php.list.php index ee4ad1ab918c17271d847b9dfad76fbe3963252a..a4a38901ab4565bf9f704265e240b280f2c5bacb 100644 --- a/interface/web/admin/list/server_php.list.php +++ b/interface/web/admin/list/server_php.list.php @@ -44,6 +44,15 @@ $liste['auth'] = 'no'; * Suchfelder *****************************************************/ +$liste['item'][] = array( 'field' => 'active', + 'datatype' => 'VARCHAR', + 'formtype' => 'SELECT', + 'op' => '=', + 'prefix' => '', + 'suffix' => '', + 'width' => '', + 'value' => array('y' => $app->lng('yes_txt'), 'n' => $app->lng('no_txt'))); + $liste['item'][] = array( 'field' => 'server_id', 'datatype' => 'INTEGER', 'formtype' => 'SELECT', diff --git a/interface/web/admin/remote_action_ispcupdate.php b/interface/web/admin/remote_action_ispcupdate.php index f22661e1d47282215c4921f04241f7bfe9407154..938f25a1a37259a0ea229fe1124a27c1f9c0ea7b 100644 --- a/interface/web/admin/remote_action_ispcupdate.php +++ b/interface/web/admin/remote_action_ispcupdate.php @@ -44,7 +44,7 @@ $app->tpl->newTemplate('form.tpl.htm'); $app->tpl->setInclude('content_tpl', 'templates/remote_action_ispcupdate.htm'); //* load language file -$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_remote_action.lng'; +$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_remote_action.lng'; include $lng_file; /* diff --git a/interface/web/admin/remote_action_osupdate.php b/interface/web/admin/remote_action_osupdate.php index 5e73cdfd0f874bccc5d3ee780112ea56113cff35..e39cf0eedfe5c0925e14bc2cf1b7cdd0bbd10b62 100644 --- a/interface/web/admin/remote_action_osupdate.php +++ b/interface/web/admin/remote_action_osupdate.php @@ -43,7 +43,7 @@ $app->tpl->newTemplate('form.tpl.htm'); $app->tpl->setInclude('content_tpl', 'templates/remote_action_osupdate.htm'); //* load language file -$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_remote_action.lng'; +$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_remote_action.lng'; include $lng_file; /* diff --git a/interface/web/admin/server_config_edit.php b/interface/web/admin/server_config_edit.php index 4c03e7ee431ef77f8358bfee0b98d1b59048f49b..e446bf3adde88b8b46ddef61e7f6f6df90916108 100644 --- a/interface/web/admin/server_config_edit.php +++ b/interface/web/admin/server_config_edit.php @@ -72,6 +72,14 @@ class page_action extends tform_actions { $app->tpl->setVar($record); } + function onShowEnd() { + global $app; + + $app->tpl->setVar('server_name', $app->functions->htmlentities($app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ? AND ((SELECT COUNT(*) FROM server) > 1)", $this->id)['server_name'])); + + parent::onShowEnd(); + } + function onUpdateSave($sql) { global $app, $conf; diff --git a/interface/web/admin/software_package_list.php b/interface/web/admin/software_package_list.php index 5e552dbee7b9497c26bf17571c561cb85c4efbe9..b6664d4234ce27fdfc398877ad77e31f80d7e181 100644 --- a/interface/web/admin/software_package_list.php +++ b/interface/web/admin/software_package_list.php @@ -184,7 +184,7 @@ if(is_array($packages) && count($packages) > 0) { $app->tpl->setLoop('records', $packages); $language = (isset($_SESSION['s']['language']))?$_SESSION['s']['language']:$conf['language']; -include_once 'lib/lang/'.$language.'_software_package_list.lng'; +include_once 'lib/lang/'.$app->functions->check_language($language).'_software_package_list.lng'; $app->tpl->setVar($wb); diff --git a/interface/web/admin/software_update_list.php b/interface/web/admin/software_update_list.php index c987e9e04bebe9606a45cbac217d5c40925a7947..6d680c0ec1ce613db0e448866dbd0036a30c78fa 100644 --- a/interface/web/admin/software_update_list.php +++ b/interface/web/admin/software_update_list.php @@ -193,7 +193,7 @@ if(is_array($installed_packages)) { $app->tpl->setLoop('records', $records_out); $language = (isset($_SESSION['s']['language']))?$_SESSION['s']['language']:$conf['language']; -include_once 'lib/lang/'.$language.'_software_update_list.lng'; +include_once 'lib/lang/'.$app->functions->check_language($language).'_software_update_list.lng'; $app->tpl->setVar($wb); diff --git a/interface/web/admin/templates/server_config_cron_edit.htm b/interface/web/admin/templates/server_config_cron_edit.htm index 908e6246b2d5abeffd864d2f5242d34bab3bd0c8..62e6efea76bc85d734cf1d214c38b40f4e22a80d 100644 --- a/interface/web/admin/templates/server_config_cron_edit.htm +++ b/interface/web/admin/templates/server_config_cron_edit.htm @@ -1,5 +1,5 @@

@@ -21,4 +21,4 @@
-
\ No newline at end of file + diff --git a/interface/web/admin/templates/server_config_dns_edit.htm b/interface/web/admin/templates/server_config_dns_edit.htm index b2b79665748f8f0d7815a33333123fb7dc8ab499..a4f7a26adef5ebe754dde5c9afe1fa95376ced93 100644 --- a/interface/web/admin/templates/server_config_dns_edit.htm +++ b/interface/web/admin/templates/server_config_dns_edit.htm @@ -1,5 +1,5 @@

diff --git a/interface/web/admin/templates/server_config_fastcgi_edit.htm b/interface/web/admin/templates/server_config_fastcgi_edit.htm index b4c5cac19eb79b9f93c6103e1d45d30b87ef5344..c36b482e725b69399afc657065c3b0ade563ca02 100644 --- a/interface/web/admin/templates/server_config_fastcgi_edit.htm +++ b/interface/web/admin/templates/server_config_fastcgi_edit.htm @@ -1,5 +1,5 @@

@@ -39,4 +39,4 @@
-
\ No newline at end of file + diff --git a/interface/web/admin/templates/server_config_getmail_edit.htm b/interface/web/admin/templates/server_config_getmail_edit.htm index 406dff412d5e04ee5938c8373411d50385d76278..84ca1ec73ffbac9a7f4901a2e75a39d220eabb2c 100644 --- a/interface/web/admin/templates/server_config_getmail_edit.htm +++ b/interface/web/admin/templates/server_config_getmail_edit.htm @@ -1,5 +1,5 @@

@@ -15,4 +15,4 @@
-
\ No newline at end of file + diff --git a/interface/web/admin/templates/server_config_jailkit_edit.htm b/interface/web/admin/templates/server_config_jailkit_edit.htm index 3371fd8a30063ac6b3aa6c29d54059564e3a29cb..b7a749147654c6fab6105400cafb7ec691d980c8 100644 --- a/interface/web/admin/templates/server_config_jailkit_edit.htm +++ b/interface/web/admin/templates/server_config_jailkit_edit.htm @@ -1,5 +1,5 @@

@@ -24,4 +24,4 @@
-
\ No newline at end of file + diff --git a/interface/web/admin/templates/server_config_mail_edit.htm b/interface/web/admin/templates/server_config_mail_edit.htm index 499a47f5985f0f51beca75fb74cb69959869050f..1e01dc760be7c5f74d2714f9cd202ce1fc1ba64e 100644 --- a/interface/web/admin/templates/server_config_mail_edit.htm +++ b/interface/web/admin/templates/server_config_mail_edit.htm @@ -1,5 +1,5 @@

diff --git a/interface/web/admin/templates/server_config_rescue_edit.htm b/interface/web/admin/templates/server_config_rescue_edit.htm index 435449bf2413729d048abdf6bb8aaecab9c914c2..df8aa97c0714ce4e5ac94a73e978c8a2e71d1f03 100644 --- a/interface/web/admin/templates/server_config_rescue_edit.htm +++ b/interface/web/admin/templates/server_config_rescue_edit.htm @@ -1,5 +1,5 @@

diff --git a/interface/web/admin/templates/server_config_server_edit.htm b/interface/web/admin/templates/server_config_server_edit.htm index b69d7c9347afbfa33c9f72bd7c10beb90410e182..7c300124577f35e95aaae9a7e3e02c55d5b5a4c9 100644 --- a/interface/web/admin/templates/server_config_server_edit.htm +++ b/interface/web/admin/templates/server_config_server_edit.htm @@ -1,5 +1,5 @@

diff --git a/interface/web/admin/templates/server_config_ufw_edit.htm b/interface/web/admin/templates/server_config_ufw_edit.htm index e84260bc7aabf0868fc979e0f00bae5bac3bec72..85e9c782973dc69cc465323d4ac2d6e22440374d 100644 --- a/interface/web/admin/templates/server_config_ufw_edit.htm +++ b/interface/web/admin/templates/server_config_ufw_edit.htm @@ -1,5 +1,5 @@

@@ -60,4 +60,4 @@
-
\ No newline at end of file + diff --git a/interface/web/admin/templates/server_config_vlogger_edit.htm b/interface/web/admin/templates/server_config_vlogger_edit.htm index edcbaeda84dc1304c81a7e16f4243dc950d54d55..a53ab7667682a6942b3733525f87929c33a17749 100644 --- a/interface/web/admin/templates/server_config_vlogger_edit.htm +++ b/interface/web/admin/templates/server_config_vlogger_edit.htm @@ -1,5 +1,5 @@

@@ -15,4 +15,4 @@
-
\ No newline at end of file + diff --git a/interface/web/admin/templates/server_config_web_edit.htm b/interface/web/admin/templates/server_config_web_edit.htm index c1bae44c06f042850131ebe915062840ad7c7bad..bb61d866ca0a64b5381ecb51d94a9c7ac04d24a8 100644 --- a/interface/web/admin/templates/server_config_web_edit.htm +++ b/interface/web/admin/templates/server_config_web_edit.htm @@ -1,5 +1,5 @@

@@ -256,7 +256,10 @@
-
+
+ +
+
diff --git a/interface/web/admin/templates/server_config_xmpp_edit.htm b/interface/web/admin/templates/server_config_xmpp_edit.htm index 737b452c19c17492de330287e8ecbb17d0ce8b3c..70dedd1d484400336ef059baf92c55bce4bde618 100644 --- a/interface/web/admin/templates/server_config_xmpp_edit.htm +++ b/interface/web/admin/templates/server_config_xmpp_edit.htm @@ -1,5 +1,5 @@

diff --git a/interface/web/admin/templates/server_php_list.htm b/interface/web/admin/templates/server_php_list.htm index 0fb98965bdd58931a6463933919b5fc8a3e76c6d..5a6392eea33a18664e1d9459ba05142d38c3768b 100644 --- a/interface/web/admin/templates/server_php_list.htm +++ b/interface/web/admin/templates/server_php_list.htm @@ -15,12 +15,14 @@ + + @@ -32,6 +34,7 @@ + @@ -54,4 +57,4 @@
{tmpl_var name='search_limit'}
{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="client_id"} {tmpl_var name="name"}
- \ No newline at end of file + diff --git a/interface/web/client/client_del.php b/interface/web/client/client_del.php index dfb4e7464909dfe4d31724ec844b4e064230953d..2bddd02a0750294de606cb335e7710987c585f15 100644 --- a/interface/web/client/client_del.php +++ b/interface/web/client/client_del.php @@ -97,7 +97,7 @@ class page_action extends tform_actions { $app->tpl->setLoop('records', $table_list); //* load language file - $lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_client_del.lng'; + $lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_client_del.lng'; include $lng_file; $app->tpl->setVar($wb); diff --git a/interface/web/client/client_message.php b/interface/web/client/client_message.php index b4638bd2151ce076df7d96970166e163552d21ea..2617bbe67d9408a711933d6a68229022be4ed64b 100644 --- a/interface/web/client/client_message.php +++ b/interface/web/client/client_message.php @@ -42,7 +42,7 @@ $app->tpl->newTemplate('form.tpl.htm'); $app->tpl->setInclude('content_tpl', 'templates/client_message.htm'); //* load language file -$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_client_message.lng'; +$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_client_message.lng'; include $lng_file; $app->tpl->setVar($wb); diff --git a/interface/web/client/domain_del.php b/interface/web/client/domain_del.php index 701b4494b8f92a1885a45ca750931a1f30a852f2..1165f3f936c141288955268a18b9d2080195f8c5 100644 --- a/interface/web/client/domain_del.php +++ b/interface/web/client/domain_del.php @@ -54,7 +54,7 @@ class page_action extends tform_actions { global $app; $conf; //* load language file - $lng_file = 'lib/lang/'.$_SESSION['s']['language'].'.lng'; + $lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'.lng'; include $lng_file; /* diff --git a/interface/web/client/domain_edit.php b/interface/web/client/domain_edit.php index 8867e295783b6280bd6d26bff8c6f5e22a29b544..094e1899be3b8b7eb16f0c1b322d092884d5e851 100644 --- a/interface/web/client/domain_edit.php +++ b/interface/web/client/domain_edit.php @@ -49,7 +49,7 @@ $app->uses('tpl,tform,tform_actions'); $app->load('tform_actions'); //* load language file -$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'.lng'; +$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'.lng'; include $lng_file; diff --git a/interface/web/client/lib/lang/de_client_template_list.lng b/interface/web/client/lib/lang/de_client_template_list.lng index 552035fd702e2a09d76ec7fb147245d6b2324616..cd5f339eea8c209b26267116db9ae9275e9237af 100644 --- a/interface/web/client/lib/lang/de_client_template_list.lng +++ b/interface/web/client/lib/lang/de_client_template_list.lng @@ -3,4 +3,5 @@ $wb['list_head_txt'] = 'Kundenvorlagen'; $wb['template_type_txt'] = 'Typ'; $wb['template_name_txt'] = 'Vorlagenname'; $wb['template_id_txt'] = 'Template ID'; +$wb['sys_groupid_txt'] = 'Reseller'; ?> diff --git a/interface/web/client/lib/lang/en_client_template_list.lng b/interface/web/client/lib/lang/en_client_template_list.lng index 1906cefc469e063b01a1ea409cb7fe311f964977..a0442c835c152dbc00b79613abeae1bc5732c025 100644 --- a/interface/web/client/lib/lang/en_client_template_list.lng +++ b/interface/web/client/lib/lang/en_client_template_list.lng @@ -3,4 +3,5 @@ $wb["list_head_txt"] = 'Client and Reseller Templates'; $wb["template_type_txt"] = 'Type'; $wb["template_name_txt"] = 'Template name'; $wb['template_id_txt'] = 'Template ID'; +$wb['sys_groupid_txt'] = 'Reseller'; ?> diff --git a/interface/web/client/list/client_template.list.php b/interface/web/client/list/client_template.list.php index cb37eb3f22161167320587721363af4f991040a3..a63776ff88d5394298bd745d61c9ecccbf6a2ca3 100644 --- a/interface/web/client/list/client_template.list.php +++ b/interface/web/client/list/client_template.list.php @@ -44,6 +44,22 @@ $liste["auth"] = "yes"; /***************************************************** * Suchfelder *****************************************************/ +if($_SESSION['s']['user']['typ'] == 'admin') { + $liste["item"][] = array( 'field' => 'sys_groupid', + 'datatype' => 'INTEGER', + 'formtype' => 'SELECT', + 'op' => '=', + 'prefix' => '', + 'suffix' => '', + 'datasource' => array ( 'type' => 'SQL', + 'querystring' => "SELECT sys_group.groupid,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), IF(client.contact_firstname != '', CONCAT(client.contact_firstname, ' '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM sys_group, client WHERE sys_group.groupid != 1 AND sys_group.client_id = client.client_id ORDER BY client.company_name, client.contact_name", + 'keyfield'=> 'groupid', + 'valuefield'=> 'name' + ), + 'width' => '', + 'value' => '' + ); +} $liste["item"][] = array( 'field' => "template_id", 'datatype' => "INTEGER", diff --git a/interface/web/client/templates/client_template_list.htm b/interface/web/client/templates/client_template_list.htm index 16176b131cec403d2f02ed595c13ad17a1b36c82..37564f7197c2f6c01749cd6ee8b00f61da0c7b0c 100644 --- a/interface/web/client/templates/client_template_list.htm +++ b/interface/web/client/templates/client_template_list.htm @@ -17,12 +17,14 @@ + {tmpl_var name='search_limit'} + {tmpl_var name='search_template_type'} @@ -34,6 +36,7 @@ {tmpl_var name="template_id"} + {tmpl_var name="sys_groupid"} {tmpl_var name="template_type"} {tmpl_var name="template_name"} @@ -43,16 +46,16 @@ - {tmpl_var name='globalsearch_noresults_text_txt'} + {tmpl_var name='globalsearch_noresults_text_txt'} - +
- \ No newline at end of file + diff --git a/interface/web/dashboard/dashboard.php b/interface/web/dashboard/dashboard.php index 59320bedbdc45ce9f5b6a19842043e020f07c954..93c7dcf872ae830babaf3fbd9ceeba7c24a7dfd1 100644 --- a/interface/web/dashboard/dashboard.php +++ b/interface/web/dashboard/dashboard.php @@ -51,7 +51,7 @@ $app->uses('tpl'); $app->tpl->newTemplate("templates/dashboard.htm"); //* load language file -$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'.lng'; +$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'.lng'; include $lng_file; $app->tpl->setVar($wb); diff --git a/interface/web/dashboard/dashlets/modules.php b/interface/web/dashboard/dashlets/modules.php index da1eb0be77be2dc60f6368fd437c105f1135d189..5c1f15149da70a328f922ab18a79bb3f2bab9a57 100644 --- a/interface/web/dashboard/dashlets/modules.php +++ b/interface/web/dashboard/dashlets/modules.php @@ -47,7 +47,7 @@ class dashlet_modules { } else { if(strlen($module_title) > 8) $module_title = substr($module_title, 0, 7).'..'; } - $mod[$module['order']] = array( 'modules_title' => $module_title, + $mod[$module['order'].'-'.$module['name']] = array( 'modules_title' => $module_title, 'modules_startpage' => $module['startpage'], 'modules_name' => $module['name']); } diff --git a/interface/web/dns/dns_import.php b/interface/web/dns/dns_import.php index 49c14185d016fca3462697b918983c8ebb0fe3d4..540a731ba24d53f805d35838b801ef2f83ad16d1 100644 --- a/interface/web/dns/dns_import.php +++ b/interface/web/dns/dns_import.php @@ -204,7 +204,7 @@ if ($settings['use_domain_module'] == 'y') { } } -$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_dns_import.lng'; +$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_dns_import.lng'; include $lng_file; $app->tpl->setVar($wb); diff --git a/interface/web/dns/dns_wizard.php b/interface/web/dns/dns_wizard.php index 32112560a48ba9747f18eee43570acb6c4a96493..17d767550c5555320bf8e5fe19481032c6d26864 100644 --- a/interface/web/dns/dns_wizard.php +++ b/interface/web/dns/dns_wizard.php @@ -465,7 +465,7 @@ $csrf_token = $app->auth->csrf_token_get('dns_wizard'); $app->tpl->setVar('_csrf_id',$csrf_token['csrf_id']); $app->tpl->setVar('_csrf_key',$csrf_token['csrf_key']); -$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_dns_wizard.lng'; +$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_dns_wizard.lng'; include $lng_file; $app->tpl->setVar($wb); diff --git a/interface/web/dns/templates/dns_dmarc_edit.htm b/interface/web/dns/templates/dns_dmarc_edit.htm index e7b113d11e5f361c67a0559adcbd6b93ac40c294..482e3a531229887df9a2136d72922ccd2a18d4b9 100644 --- a/interface/web/dns/templates/dns_dmarc_edit.htm +++ b/interface/web/dns/templates/dns_dmarc_edit.htm @@ -147,7 +147,7 @@
- +
diff --git a/interface/web/js/scrigo.js.php b/interface/web/js/scrigo.js.php index 7c6bf31cbf4dcf4fa56f26afd9f53e7eb05170be..4022454f5b4b3a395d3425f9c5af3755b04f1a0e 100644 --- a/interface/web/js/scrigo.js.php +++ b/interface/web/js/scrigo.js.php @@ -3,6 +3,7 @@ include '../../lib/config.inc.php'; header('Content-Type: text/javascript; charset=utf-8'); // the config file sets the content type header so we have to override it here! require_once '../../lib/app.inc.php'; $lang = (isset($_SESSION['s']['language']) && $_SESSION['s']['language'] != '')?$_SESSION['s']['language']:'en'; +$lang = $app->functions->check_language($lang); include_once ISPC_ROOT_PATH.'/web/strengthmeter/lib/lang/'.$lang.'_strengthmeter.lng'; $app->uses('ini_parser,getconf'); diff --git a/interface/web/login/index.php b/interface/web/login/index.php index 6fdeab35ee124aa08dbe3ceee2c429c17782a87b..5fb94d80062b1bfca38ead5d8f0a9518f5965913 100644 --- a/interface/web/login/index.php +++ b/interface/web/login/index.php @@ -229,12 +229,12 @@ if(count($_POST) > 0) { if ($loginAs) $_SESSION['s_old'] = $oldSession; // keep the way back! $_SESSION['s']['user'] = $user; $_SESSION['s']['user']['theme'] = isset($user['app_theme']) ? $user['app_theme'] : 'default'; - $_SESSION['s']['language'] = $user['language']; + $_SESSION['s']['language'] = $app->functions->check_language($user['language']); $_SESSION["s"]['theme'] = $_SESSION['s']['user']['theme']; if ($loginAs) $_SESSION['s']['plugin_cache'] = $_SESSION['s_old']['plugin_cache']; if(is_file(ISPC_WEB_PATH . '/' . $_SESSION['s']['user']['startmodule'].'/lib/module.conf.php')) { - include_once ISPC_WEB_PATH . '/' . $_SESSION['s']['user']['startmodule'].'/lib/module.conf.php'; + include_once $app->functions->check_include_path(ISPC_WEB_PATH . '/' . $_SESSION['s']['user']['startmodule'].'/lib/module.conf.php'); $menu_dir = ISPC_WEB_PATH.'/' . $_SESSION['s']['user']['startmodule'] . '/lib/menu.d'; if (is_dir($menu_dir)) { if ($dh = opendir($menu_dir)) { diff --git a/interface/web/login/login_as.php b/interface/web/login/login_as.php index 4b78c6c41b530b1a9a3b10842b53e9e12e6c084a..159f15b77ea390805c8f4f8ba3e5a855cb421459 100644 --- a/interface/web/login/login_as.php +++ b/interface/web/login/login_as.php @@ -83,7 +83,7 @@ $dbData = $app->db->queryOneRecord( * TODO: move the login_as form to a template file -> themeability */ -$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_login_as.lng'; +$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_login_as.lng'; include $lng_file; echo ' diff --git a/interface/web/login/logout.php b/interface/web/login/logout.php index db5f3adbcc39396ee054a77a2bd48eb5c937b850..931b66931f51e07284208b63601fd310e24aa08b 100644 --- a/interface/web/login/logout.php +++ b/interface/web/login/logout.php @@ -43,7 +43,7 @@ if (isset($_GET['l']) && ($_GET['l']== 1)) $forceLogout = true; if ((isset($_SESSION['s_old']) && ($_SESSION['s_old']['user']['typ'] == 'admin' || $app->auth->has_clients($_SESSION['s_old']['user']['userid']))) && (!$forceLogout)){ $utype = ($_SESSION['s_old']['user']['typ'] == 'admin' ? 'admin' : 'reseller'); - $lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_login_as.lng'; + $lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_login_as.lng'; include $lng_file; echo '



diff --git a/interface/web/login/password_reset.php b/interface/web/login/password_reset.php index e6976bff734798d0c5ee59440c161f072465540c..02c71f2948383a02202dfc4b53e83f2a5a2bbc46 100644 --- a/interface/web/login/password_reset.php +++ b/interface/web/login/password_reset.php @@ -43,7 +43,7 @@ $app->tpl->setInclude('content_tpl', 'templates/password_reset.htm'); $app->tpl_defaults(); -include ISPC_ROOT_PATH.'/web/login/lib/lang/'.$_SESSION['s']['language'].'.lng'; +include ISPC_ROOT_PATH.'/web/login/lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'.lng'; $app->tpl->setVar($wb); $continue = true; diff --git a/interface/web/mail/ajax_get_json.php b/interface/web/mail/ajax_get_json.php index 153b3e87e956040789166cd534c1637ef94c899b..2a1a7561677d8195e823e0ed487f8d71447d7c75 100644 --- a/interface/web/mail/ajax_get_json.php +++ b/interface/web/mail/ajax_get_json.php @@ -40,12 +40,11 @@ $domain_id = $_GET['domain_id']; if($type == 'create_dkim' && $domain_id != ''){ $dkim_public = $_GET['dkim_public']; $dkim_selector = $_GET['dkim_selector']; - $client_id = $_GET['client_group_id']; - $server_id = $_GET['server_id']; - - $domain=@(is_numeric($domain_id))?$app->db->queryOneRecord("SELECT domain FROM domain WHERE domain_id = ?", $domain_id)['domain']:$domain_id; - $maildomain = $app->db->queryOneRecord("SELECT domain FROM mail_domain WHERE domain = ?", $domain)['domain']; - + $domain=@(is_numeric($domain_id))?$app->db->queryOneRecord("SELECT domain FROM domain WHERE domain_id = ? AND ".$app->tform->getAuthSQL('r'), $domain_id)['domain']:$domain_id; + $rec = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = ?", $domain); + $server_id = $rec['server_id']; + $maildomain = $rec['domain']; + unset($rec); $mail_config = $app->getconf->get_server_config($server_id, 'mail'); $dkim_strength = $app->functions->intval($mail_config['dkim_strength']); if ($dkim_strength=='') $dkim_strength = 2048; @@ -75,6 +74,10 @@ if($type == 'create_dkim' && $domain_id != ''){ } else { $selector = 'invalid domain or selector'; } + unset($dkim_public); + exec('echo '.escapeshellarg($dkim_private).'|openssl rsa -pubout -outform PEM 2> /dev/null',$pubkey,$result); + foreach($pubkey as $values) $dkim_public=$dkim_public.$values."\n"; + $selector = $dkim_selector; } else { unset($dkim_public); exec('echo '.escapeshellarg($dkim_private).'|openssl rsa -pubout -outform PEM 2> /dev/null',$pubkey,$result); diff --git a/interface/web/mail/form/mail_transport.tform.php b/interface/web/mail/form/mail_transport.tform.php index ee3c52b447d311cf742977a6d558b7754c042a7e..f55541346ce171beba72964a13499e4a248c3722 100644 --- a/interface/web/mail/form/mail_transport.tform.php +++ b/interface/web/mail/form/mail_transport.tform.php @@ -68,7 +68,7 @@ $form["tabs"]['transport'] = array ( 'formtype' => 'SELECT', 'default' => '', 'datasource' => array ( 'type' => 'SQL', - 'querystring' => 'SELECT server_id,server_name FROM server WHERE mirror_server_id = 0 AND {AUTHSQL} ORDER BY server_name', + 'querystring' => 'SELECT server_id,server_name FROM server WHERE mirror_server_id = 0 AND mail_server = 1 AND {AUTHSQL} ORDER BY server_name', 'keyfield'=> 'server_id', 'valuefield'=> 'server_name' ), diff --git a/interface/web/mail/templates/mail_domain_edit.htm b/interface/web/mail/templates/mail_domain_edit.htm index ab02aa2ce24659fe67e13ea19440e49a80fa71a3..71a6655e80850a7bc1a733856ac20c1635f1301c 100644 --- a/interface/web/mail/templates/mail_domain_edit.htm +++ b/interface/web/mail/templates/mail_domain_edit.htm @@ -101,9 +101,6 @@
- {tmpl_var name='dkim_generate_txt'}
@@ -129,14 +126,10 @@ function getDKIM() { var domain_id = jQuery('#domain').val(); - var client_group_id = jQuery('#client_group_id').val(); - var server_id = jQuery('#server_id').val(); var dkim_selector = jQuery('#dkim_selector').val(); var dkim_public = jQuery('#dkim_public').val(); jQuery.getJSON('mail/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), { domain_id : domain_id, - client_group_id : client_group_id, - server_id : server_id, dkim_public : dkim_public, dkim_selector : dkim_selector, type : "create_dkim" diff --git a/interface/web/mailuser/index.php b/interface/web/mailuser/index.php index b7748ac1ccac8602b806abfc655ef75db125e2b5..c9541df2bd1919395946bcd1379cd16727cbeeb9 100644 --- a/interface/web/mailuser/index.php +++ b/interface/web/mailuser/index.php @@ -13,7 +13,7 @@ $msg = ''; $error = ''; //* load language file -$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_index.lng'; +$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_index.lng'; include $lng_file; $app->tpl->setVar($wb); diff --git a/interface/web/nav.php b/interface/web/nav.php index 68ceb898beafb15248fa6232b149f1236c8417ee..1091276b86153638719e3c248bb10dfca91d85ff 100644 --- a/interface/web/nav.php +++ b/interface/web/nav.php @@ -75,7 +75,7 @@ if(isset($_GET['nav']) && $_GET['nav'] == 'top') { } include_once $mt.'/lib/module.conf.php'; - $language = (isset($_SESSION['s']['user']['language']))?$_SESSION['s']['user']['language']:$conf['language']; + $language = $app->functions->check_language((isset($_SESSION['s']['user']['language']))?$_SESSION['s']['user']['language']:$conf['language']); $app->load_language_file('web/'.$mt.'/lib/'.$language.'.lng'); $active = ($module['name'] == $_SESSION['s']['module']['name']) ? 1 : 0; $topnav[$module['order'].'-'.$module['name']] = array( 'title' => $app->lng($module['title']), diff --git a/interface/web/sites/ajax_get_json.php b/interface/web/sites/ajax_get_json.php index fc41444e3f64eb78fd97180e8b88076d15d61c64..ff915e7808f5de4fbbc3c25cbcf5a608e50654db 100644 --- a/interface/web/sites/ajax_get_json.php +++ b/interface/web/sites/ajax_get_json.php @@ -97,6 +97,8 @@ if($type == 'getphpfastcgi'){ } elseif($php_type == 'fast-cgi'){ $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ? AND active = 'y' ORDER BY name".$sql_where, $server_id); } + $php_records[]=array('name' => $app->functions->htmlentities($web_config['php_default_name'])); + uasort($php_records, 'sort_php'); $php_select = ""; if(is_array($php_records) && !empty($php_records)) { foreach( $php_records as $php_record) { @@ -105,7 +107,11 @@ if($type == 'getphpfastcgi'){ } else { $php_version = $php_record['name'].':'.$php_record['php_fastcgi_binary'].':'.$php_record['php_fastcgi_ini_dir']; } - $json .= '"'.$php_version.'": "'.$php_record['name'].'",'; + if($php_record['name'] != $web_config['php_default_name']) { + $json .= '"'.$php_version.'": "'.$php_record['name'].'",'; + } else { + $json .= '"": "'.$php_record['name'].'",'; + } } } unset($php_records); @@ -243,4 +249,9 @@ if($type == 'getclientssldata'){ header('Content-type: application/json'); echo $json; + +function sort_php($a, $b) { + return strcmp($a['name'], $b['name']); +} + ?> diff --git a/interface/web/sites/aps_install_package.php b/interface/web/sites/aps_install_package.php index 19ab785c957d5df02db5f7ceb0275832fe524c84..4739e25b8a69798e2d253a059e10a12f0e2652c3 100644 --- a/interface/web/sites/aps_install_package.php +++ b/interface/web/sites/aps_install_package.php @@ -42,7 +42,7 @@ $app->tpl->newTemplate("form.tpl.htm"); $app->tpl->setInclude('content_tpl', 'templates/aps_install_package.htm'); // Load the language file -$lngfile = 'lib/lang/'.$_SESSION['s']['language'].'_aps.lng'; +$lngfile = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_aps.lng'; require_once $lngfile; $app->tpl->setVar($wb); $app->load_language_file('web/sites/'.$lngfile); diff --git a/interface/web/sites/aps_packagedetails_show.php b/interface/web/sites/aps_packagedetails_show.php index 1723ffbff207708acaf10077502f690dddc7c14e..d0503bf9f03faea2f1226cb2c7f5273d90427b1c 100644 --- a/interface/web/sites/aps_packagedetails_show.php +++ b/interface/web/sites/aps_packagedetails_show.php @@ -42,7 +42,7 @@ $app->tpl->newTemplate("listpage.tpl.htm"); $app->tpl->setInclude('content_tpl', 'templates/aps_packagedetails_show.htm'); // Load the language file -$lngfile = 'lib/lang/'.$_SESSION['s']['language'].'_aps.lng'; +$lngfile = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_aps.lng'; require_once $lngfile; $app->tpl->setVar($wb); diff --git a/interface/web/sites/aps_update_packagelist.php b/interface/web/sites/aps_update_packagelist.php index a1278d0ebe318fdb0b9ed5e836f62ad14ec79bd6..821da77bb9558f45ee545eb7b8219d5450824187 100644 --- a/interface/web/sites/aps_update_packagelist.php +++ b/interface/web/sites/aps_update_packagelist.php @@ -41,7 +41,7 @@ $msg = ''; $error = ''; //* load language file -$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_aps_update_packagelist.lng'; +$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_aps_update_packagelist.lng'; include $lng_file; $app->tpl->setVar($wb); diff --git a/interface/web/sites/form/web_vhost_domain.tform.php b/interface/web/sites/form/web_vhost_domain.tform.php index aedf76749992febaacc6fc6bb9bb6012bf7f6b9b..f47fe709fc6fbaa3d57433517a79516073bac6b0 100644 --- a/interface/web/sites/form/web_vhost_domain.tform.php +++ b/interface/web/sites/form/web_vhost_domain.tform.php @@ -349,6 +349,9 @@ if($vhostdomain_type == 'domain') { 'regex' => '@^((?!(.*\.\.)|(.*\./)|(.*//))[^/][\w/_\.\-]{1,100})?$@', 'errmsg'=> 'web_folder_error_regex'), ), + 'filters' => array( 0 => array( 'event' => 'SAVE', + 'type' => 'TRIM'), + ), 'formtype' => 'TEXT', 'default' => '', 'value' => '', @@ -368,6 +371,9 @@ if($vhostdomain_type == 'domain') { 'regex' => '@^((?!(.*\.\.)|(.*\./)|(.*//))[^/][\w/_\.\-]{1,100})?$@', 'errmsg'=> 'web_folder_error_regex'), ), + 'filters' => array( 0 => array( 'event' => 'SAVE', + 'type' => 'TRIM'), + ), 'formtype' => 'TEXT', 'default' => '', 'value' => '', diff --git a/interface/web/sites/templates/web_vhost_domain_advanced.htm b/interface/web/sites/templates/web_vhost_domain_advanced.htm index 2a19659d35f3bc7db4cc67ea8953dba0a5728d70..322748257b9ce85d989101de4925fe866c061dc1 100644 --- a/interface/web/sites/templates/web_vhost_domain_advanced.htm +++ b/interface/web/sites/templates/web_vhost_domain_advanced.htm @@ -104,13 +104,13 @@
- {tmpl_var name="available_apache_directive_snippets_txt"}

 {tmpl_var name="apache_directive_snippets_txt"}
----
 {tmpl_var name='variables_txt'}: {DOCROOT} + {tmpl_var name="available_apache_directive_snippets_txt"}

 {tmpl_var name="apache_directive_snippets_txt"}
----
 {tmpl_var name='variables_txt'}: {DOCROOT}, {DOCROOT_CLIENT}
- {tmpl_var name="available_nginx_directive_snippets_txt"}

 {tmpl_var name="nginx_directive_snippets_txt"}
----
 {tmpl_var name='variables_txt'}: {DOCROOT}, {FASTCGIPASS}, {PHPFALLBACKFASTCGIPASS} + {tmpl_var name="available_nginx_directive_snippets_txt"}

 {tmpl_var name="nginx_directive_snippets_txt"}
----
 {tmpl_var name='variables_txt'}: {DOCROOT}, {DOCROOT_CLIENT}, {FASTCGIPASS}, {PHPFALLBACKFASTCGIPASS}
diff --git a/interface/web/sites/templates/web_vhost_domain_edit.htm b/interface/web/sites/templates/web_vhost_domain_edit.htm index 86fd3b294f8f01120a7f20950394ad27b875607a..149d4308875af598dfb80c0165a7da816da68da0 100644 --- a/interface/web/sites/templates/web_vhost_domain_edit.htm +++ b/interface/web/sites/templates/web_vhost_domain_edit.htm @@ -444,8 +444,8 @@ function reloadFastcgiPHPVersions(noFormChange) { jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {server_id : serverId, php_type : jQuery('#php').val(), type : "getphpfastcgi", client_group_id : clientGroupId}, function(data) { - var options = ''; - //var options = ''; + //var options = ''; + var options = ''; var phpfastcgiselected = ''; $.each(data, function(key, val) { @@ -468,7 +468,7 @@ phpfastcgiselected = ''; - options += ''; + //options += ''; $('#fastcgi_php_version').html(options).change(); if(noFormChange) ISPConfig.resetFormChanged(); }); diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index 674d4c7b23d341e9d6af6a008f73aa72171f44d2..5d6aed2e4388d4f4d362ec4c88e87e1f8f798b18 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -257,7 +257,7 @@ class page_action extends tform_actions { $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ? AND (client_id = 0 OR client_id=?) AND active = 'y' ORDER BY name", $parent_domain['server_id'], $_SESSION['s']['user']['client_id']); } } - $php_select = ""; + $php_select = ""; if(is_array($php_records) && !empty($php_records)) { foreach( $php_records as $php_record) { if($this->dataRecord['php'] == 'php-fpm' || ($this->dataRecord['php'] == 'hhvm' && $server_type == 'nginx')){ @@ -404,7 +404,7 @@ class page_action extends tform_actions { $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ? AND (client_id = 0 OR client_id=?) AND active = 'y' ORDER BY name", $parent_domain['server_id'], $_SESSION['s']['user']['client_id']); } } - $php_select = ""; + $php_select = ""; if(is_array($php_records) && !empty($php_records)) { foreach( $php_records as $php_record) { if($this->dataRecord['php'] == 'php-fpm' || ($this->dataRecord['php'] == 'hhvm' && $server_type == 'nginx')){ @@ -624,7 +624,7 @@ class page_action extends tform_actions { $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ? AND active = 'y' ORDER BY name", $parent_domain['server_id']); } } - $php_select = ""; + $php_select = ""; if(is_array($php_records) && !empty($php_records)) { foreach( $php_records as $php_record) { if($this->dataRecord['php'] == 'php-fpm' || ($this->dataRecord['php'] == 'hhvm' && $server_type == 'nginx')){ @@ -952,7 +952,6 @@ class page_action extends tform_actions { function onSubmit() { global $app, $conf; - // Set a few fixed values $this->dataRecord["vhost_type"] = 'name'; if($this->_vhostdomain_type == 'domain') { diff --git a/interface/web/themes/default/assets/stylesheets/ispconfig.css b/interface/web/themes/default/assets/stylesheets/ispconfig.css index 23366e919d4644833b876825657cfca076b259ac..c4e4459e2002d65c05126ef722482a14353429ef 100644 --- a/interface/web/themes/default/assets/stylesheets/ispconfig.css +++ b/interface/web/themes/default/assets/stylesheets/ispconfig.css @@ -168,7 +168,6 @@ body { #select_server a { padding:0 10px; } - .page-header { margin: 20px 0; padding: 0; } diff --git a/interface/web/tools/import_ispconfig.php b/interface/web/tools/import_ispconfig.php index a1ab9e14a41b17e262c72060c75045f60fa03306..e2b8bad6479d43aeced846ebf2669da516276054 100644 --- a/interface/web/tools/import_ispconfig.php +++ b/interface/web/tools/import_ispconfig.php @@ -44,7 +44,7 @@ $msg = ''; $error = ''; //* load language file -$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_import_ispconfig.lng'; +$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_import_ispconfig.lng'; include $lng_file; $app->tpl->setVar($wb); @@ -109,16 +109,17 @@ if(isset($_POST['connected'])) { try { - //* Second connections to self signed SSL certs + //* Allow connections to self signed SSL certs $context = stream_context_create( array( - 'ssl' => array ( - 'verify_peer' => false, - 'verify_peer_name' => false, - 'allow_self_signed' => true - ) + 'ssl' => array ( + 'verify_peer' => false, + 'verify_peer_name' => false, + 'allow_self_signed' => true ) + ) ); + $client = new SoapClient(null, array('location' => $_POST['remote_server'], 'uri' => $_POST['remote_server'].'/index.php', 'trace' => 1, diff --git a/interface/web/tools/import_vpopmail.php b/interface/web/tools/import_vpopmail.php index 3ef87710e593cb37c6980e5cfa4e16c54052dc3d..0209c80e28d6dc43aff100acfaa0ac2d9d555f89 100644 --- a/interface/web/tools/import_vpopmail.php +++ b/interface/web/tools/import_vpopmail.php @@ -46,7 +46,7 @@ $msg = ''; $error = ''; //* load language file -$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_import_vpopmail.lng'; +$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_import_vpopmail.lng'; include $lng_file; $app->tpl->setVar($wb); diff --git a/interface/web/tools/index.php b/interface/web/tools/index.php index 05c7f71fbafee1d68e017102693f9738b59b8824..0e223b98a457789172c947c8d545eaa38edd460c 100644 --- a/interface/web/tools/index.php +++ b/interface/web/tools/index.php @@ -41,7 +41,7 @@ $app->uses('tpl'); $app->tpl->newTemplate('listpage.tpl.htm'); $app->tpl->setInclude('content_tpl', 'templates/index.htm'); -$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_index.lng'; +$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_index.lng'; include $lng_file; $app->tpl->setVar($wb); diff --git a/interface/web/tools/resync.php b/interface/web/tools/resync.php index 7e3e9b4da2f55410659ab6e92d8ca166dde5d2d8..e5958c064e388827fda93cee6617d28911b02e1e 100644 --- a/interface/web/tools/resync.php +++ b/interface/web/tools/resync.php @@ -74,8 +74,8 @@ class page_action extends tform_actions { //* check the database for existing records $server_data = $this->server_has_data($server_type, $server['server_id']); foreach ($search as $needle) -// if (in_array($needle, $server_data) && strpos($options_servers, $server['server_name']) === false) { - if (in_array($needle, $server_data)) { + if (in_array($needle, $server_data) && strpos($options_servers, $server['server_name']) === false) { +// if (in_array($needle, $server_data)) { $options_servers .= ""; $server_count++; } @@ -525,7 +525,7 @@ class page_action extends tform_actions { $this->dataRecord['db_server_id'] = $this->dataRecord['all_server_id']; $this->dataRecord['mail_server_id'] = $this->dataRecord['all_server_id']; $this->dataRecord['mailbox_server_id'] = $this->dataRecord['all_server_id']; - $this->dataRecord['verserver_server_id'] = $this->dataRecord['all_server_id']; + $this->dataRecord['vserver_server_id'] = $this->dataRecord['all_server_id']; $this->dataRecord['dns_server_id'] = $this->dataRecord['all_server_id']; } @@ -596,7 +596,7 @@ class page_action extends tform_actions { //* vserver if($this->dataRecord['resync_vserver'] == 1) - $msg .= $this->do_resync('openvz_vm', 'vm_id', 'vserver', $this->dataRecord['verserver_server_id'], 'hostname', $app->tform->wordbook['do_vserver_txt']); + $msg .= $this->do_resync('openvz_vm', 'vm_id', 'vserver', $this->dataRecord['vserver_server_id'], 'hostname', $app->tform->wordbook['do_vserver_txt']); //* dns if($this->dataRecord['resync_dns'] == 1) { diff --git a/interface/web/tools/tpl_default.php b/interface/web/tools/tpl_default.php index dacbeae9b271966565af0a4904ac4d59f740ad51..b4ac189daaec04d4dc3674af9f63611eabecf9f3 100644 --- a/interface/web/tools/tpl_default.php +++ b/interface/web/tools/tpl_default.php @@ -41,7 +41,7 @@ $app->uses('tpl'); $app->tpl->newTemplate('listpage.tpl.htm'); $app->tpl->setInclude('content_tpl', 'templates/tpl_default.htm'); -$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_tpl_default.lng'; +$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_tpl_default.lng'; include $lng_file; $app->tpl->setVar($wb); diff --git a/interface/web/tools/user_settings.php b/interface/web/tools/user_settings.php index ccf86adda98f9f6696696de24ec700de1fdf25a5..5c3876fb864d8036338dda594437adcf0208d765 100644 --- a/interface/web/tools/user_settings.php +++ b/interface/web/tools/user_settings.php @@ -86,12 +86,10 @@ class page_action extends tform_actions { if($_POST['passwort'] != $_POST['repeat_password']) { $app->tform->errorMessage = $app->tform->lng('password_mismatch'); } - if(preg_match('/[a-z]{2}/',$_POST['language'])) { - $_SESSION['s']['user']['language'] = $_POST['language']; - $_SESSION['s']['language'] = $_POST['language']; - } else { - $app->error('Invalid language.'); - } + + $language = $app->functions->check_language($_POST['language']); + $_SESSION['s']['user']['language'] = $language; + $_SESSION['s']['language'] = $language; } function onAfterUpdate() { diff --git a/interface/web/vm/openvz_action.php b/interface/web/vm/openvz_action.php index 4b429eb44d5cdd889a0f79f5b564e53eb89deb1a..c0bedf19be0ba9ff218f895c0cbd722c963beb62 100644 --- a/interface/web/vm/openvz_action.php +++ b/interface/web/vm/openvz_action.php @@ -32,7 +32,7 @@ $app->tpl->newTemplate('form.tpl.htm'); $app->tpl->setInclude('content_tpl', 'templates/openvz_action.htm'); //* load language file -$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_openvz_action.lng'; +$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_openvz_action.lng'; include_once $lng_file; $app->tpl->setVar($wb); diff --git a/security/ids.whitelist b/security/ids.whitelist index 42c0559ecbd118bb94d5ae41de65b73a627789e2..a9b045e15f52b2bb8d4d6d6d0d09b92bd3319d73 100644 --- a/security/ids.whitelist +++ b/security/ids.whitelist @@ -41,6 +41,7 @@ admin:/capp.php:SESSION.s.module.nav.1.items.0.title admin:/sites/web_vhost_subdomain_edit.php:POST.php_open_basedir admin:/sites/web_domain_edit.php:POST.php_open_basedir admin:/sites/web_domain_edit.php:POST.apache_directives +admin:/sites/web_vhost_domain_edit.php:POST.nginx_directives user:/sites/shell_user_edit.php:POST.ssh_rsa user:/sites/cron_edit.php:POST.command admin:/admin/server_config_edit.php:POST.jailkit_chroot_app_programs diff --git a/server/lib/classes/cron.d/100-monitor_disk_usage.inc.php b/server/lib/classes/cron.d/100-monitor_disk_usage.inc.php index 1bae04cc521c4ebd069cb83536a8f5ed564a09a5..1d03949a8cf1c7457fd9b7e96a51be5fe73b57f9 100644 --- a/server/lib/classes/cron.d/100-monitor_disk_usage.inc.php +++ b/server/lib/classes/cron.d/100-monitor_disk_usage.inc.php @@ -74,7 +74,7 @@ class cronjob_monitor_disk_usage extends cronjob { $app->uses('getconf'); $web_config = $app->getconf->get_server_config($conf['server_id'], 'web'); - $dfData = shell_exec('df -PhT -x simfs | awk \'!x[$1]++\' 2>/dev/null'); + $dfData = shell_exec('df -PhT -x simfs -x squashfs | awk \'!x[$1]++\' 2>/dev/null'); // split into array $df = explode("\n", $dfData); diff --git a/server/lib/classes/cron.d/200-logfiles.inc.php b/server/lib/classes/cron.d/200-logfiles.inc.php index 40778a8a13abcb96888b2eaf868bf97578fa9e15..6f38f0b403d66dee84f581dad70ed70e5bf21a5d 100644 --- a/server/lib/classes/cron.d/200-logfiles.inc.php +++ b/server/lib/classes/cron.d/200-logfiles.inc.php @@ -150,8 +150,8 @@ class cronjob_logfiles extends cronjob { $error_logfile = escapeshellcmd($rec['document_root'].'/' . $log_folder . '/error.log'); // rename older files (move up by one) $num = $log_retention; - while($num >= 1 && is_file($error_logfile . '.' . $num . '.gz')) { - rename($error_logfile . '.' . $num . '.gz', $error_logfile . '.' . ($num + 1) . '.gz'); + while($num >= 1) { + if(is_file($error_logfile . '.' . $num . '.gz')) rename($error_logfile . '.' . $num . '.gz', $error_logfile . '.' . ($num + 1) . '.gz'); $num--; } // compress current logfile diff --git a/server/lib/classes/letsencrypt.inc.php b/server/lib/classes/letsencrypt.inc.php index c3285a1c2eb6b3dded0e7f58498e2c082eb2f60f..4f681cc4852e5ed1b08ee6ec05f0769b4883f2c1 100644 --- a/server/lib/classes/letsencrypt.inc.php +++ b/server/lib/classes/letsencrypt.inc.php @@ -275,16 +275,16 @@ class letsencrypt { $letsencrypt = explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt /opt/eff.org/certbot/venv/bin/certbot')); $letsencrypt = reset($letsencrypt); if(is_executable($letsencrypt)) { - $letsencrypt_version = exec($letsencrypt . ' --version 2>&1', $ret, $val); - if(preg_match('/^(\S+|\w+)\s+(\d+(\.\d+)+)$/', $letsencrypt_version, $matches)) { - $letsencrypt_version = $matches[2]; - } - if ($letsencrypt_version >=0.22) { - $acme_version = 'https://acme-v02.api.letsencrypt.org/directory'; - } else { - $acme_version = 'https://acme-v01.api.letsencrypt.org/directory'; - } - $letsencrypt_cmd = $letsencrypt . " certonly -n --text --agree-tos --expand --authenticator webroot --server $acme_version --rsa-key-size 4096 --email postmaster@$domain $cli_domain_arg --webroot-path /usr/local/ispconfig/interface/acme"; + $letsencrypt_version = exec($letsencrypt . ' --version 2>&1', $ret, $val); + if(preg_match('/^(\S+|\w+)\s+(\d+(\.\d+)+)$/', $letsencrypt_version, $matches)) { + $letsencrypt_version = $matches[2]; + } + if ($letsencrypt_version >=0.22) { + $acme_version = 'https://acme-v02.api.letsencrypt.org/directory'; + } else { + $acme_version = 'https://acme-v01.api.letsencrypt.org/directory'; + } + $letsencrypt_cmd = $letsencrypt . " certonly -n --text --agree-tos --expand --authenticator webroot --server $acme_version --rsa-key-size 4096 --email postmaster@$domain $cli_domain_arg --webroot-path /usr/local/ispconfig/interface/acme"; $success = $app->system->_exec($letsencrypt_cmd); } } else { diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index cbf9f209683980fe2a04682e6222abf91a368883..bb4d7fdd75de03cfc3ac6f52271ce0f6d748e399 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1221,8 +1221,8 @@ class apache2_plugin { /* Update the DB of the (local) Server */ $app->db->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']); /* Update also the master-DB of the Server-Farm */ - $app->dbmaster->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']); - } + $app->dbmaster->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ? AND `server_id` = ?", $data['new']['ssl'], 'n', $data['new']['domain'], $conf['server_id']); + } } if(@is_file($bundle_file)) $vhost_data['has_bundle_cert'] = 1; @@ -1458,7 +1458,11 @@ class apache2_plugin { //exec('chown -R '.$data['new']['system_user'].':'.$data['new']['system_group'].' '.escapeshellcmd($fastcgi_starter_path)); $app->system->chown($fastcgi_starter_path, $data['new']['system_user']); $app->system->chgrp($fastcgi_starter_path, $data['new']['system_group']); - $app->system->chmod($fastcgi_starter_path, 0550); + if($web_config['security_level'] == 10) { + $app->system->chmod($fastcgi_starter_path, 0755); + } else { + $app->system->chmod($fastcgi_starter_path, 0550); + } $fcgi_tpl = new tpl(); $fcgi_tpl->newTemplate('php-fcgi-starter.master'); @@ -1502,7 +1506,11 @@ class apache2_plugin { $app->log('Creating fastcgi starter script: '.$fcgi_starter_script, LOGLEVEL_DEBUG); - $app->system->chmod($fcgi_starter_script, 0550); + if($web_config['security_level'] == 10) { + $app->system->chmod($fcgi_starter_script, 0755); + } else { + $app->system->chmod($fcgi_starter_script, 0550); + } $app->system->chown($fcgi_starter_script, $data['new']['system_user']); $app->system->chgrp($fcgi_starter_script, $data['new']['system_group']); @@ -1595,7 +1603,11 @@ class apache2_plugin { $app->system->mkdirpath($cgi_starter_path); $app->system->chown($cgi_starter_path, $data['new']['system_user']); $app->system->chgrp($cgi_starter_path, $data['new']['system_group']); - $app->system->chmod($cgi_starter_path, 0550); + if($web_config['security_level'] == 10) { + $app->system->chmod($cgi_starter_path, 0755); + } else { + $app->system->chmod($cgi_starter_path, 0550); + } $app->log('Creating cgi starter script directory: '.$cgi_starter_path, LOGLEVEL_DEBUG); } @@ -1629,7 +1641,11 @@ class apache2_plugin { $app->log('Creating cgi starter script: '.$cgi_starter_script, LOGLEVEL_DEBUG); - $app->system->chmod($cgi_starter_script, 0550); + if($web_config['security_level'] == 10) { + $app->system->chmod($cgi_starter_script, 0755); + } else { + $app->system->chmod($cgi_starter_script, 0550); + } $app->system->chown($cgi_starter_script, $data['new']['system_user']); $app->system->chgrp($cgi_starter_script, $data['new']['system_group']); diff --git a/server/plugins-available/apps_vhost_plugin.inc.php b/server/plugins-available/apps_vhost_plugin.inc.php index 88b5aa290cabb3c953b5a2e5ea10ceda14ecdcdc..b843e3c8a4e45f86adedf8106207d79e1c4b586f 100644 --- a/server/plugins-available/apps_vhost_plugin.inc.php +++ b/server/plugins-available/apps_vhost_plugin.inc.php @@ -183,6 +183,11 @@ class apps_vhost_plugin { } $content = str_replace('{use_tcp}', $use_tcp, $content); $content = str_replace('{use_socket}', $use_socket, $content); + + // Fix socket path on PHP 7 systems + if(file_exists('/var/run/php/php7.0-fpm.sock')) $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.0-fpm.sock', $content); + if(file_exists('/var/run/php/php7.1-fpm.sock')) $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.1-fpm.sock', $content); + if(file_exists('/var/run/php/php7.2-fpm.sock')) $content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.2-fpm.sock', $content); // PHP-FPM // Dont just copy over the php-fpm pool template but add some custom settings diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index aad984aac0d058eef67d88b8a7e8321a05cb76d3..c1c71ac61583fc25a457e8637274317dcb9efd35 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -1307,7 +1307,7 @@ class nginx_plugin { $data['new']['ssl_letsencrypt'] = 'n'; if($data['old']['ssl'] == 'n') $data['new']['ssl'] = 'n'; /* Update the DB of the (local) Server */ - $app->db->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']); + $app->db->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ? AND `server_id` = ?", $data['new']['ssl'], 'n', $data['new']['domain'], $conf['server_id']); /* Update also the master-DB of the Server-Farm */ $app->dbmaster->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']); } diff --git a/server/scripts/vlogger b/server/scripts/vlogger index 8703df0d77a58f667574e8f7deb4ea1e6253f6ba..4e60254d0eea218602e2d8b80909137c0c957bdb 100755 --- a/server/scripts/vlogger +++ b/server/scripts/vlogger @@ -510,11 +510,9 @@ else { $log_line =~ s/^\S*\s+//o; } - if ($reqsize ne "-") { - if ( $reqsize =~ m/\d|/ && $reqsize > 0 ) { - $tracker{$vhost} += $reqsize; - } - } + if ( $reqsize =~ m/^\d+$/ && $reqsize > 0 ) { + $tracker{$vhost} += $reqsize; + } print $vhost $log_line;