diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php index d9ec9b8d03cdc5e82104fa3299437be7aa49c482..c076c356e311c99f6e63b44c8467dea4df288de8 100644 --- a/interface/lib/classes/db_mysql.inc.php +++ b/interface/lib/classes/db_mysql.inc.php @@ -252,7 +252,7 @@ class db extends mysqli $sQuery = call_user_func_array(array(&$this, '_build_query_string'), $aArgs); $this->securityScan($sQuery); - $this->_iQueryId = mysqli_query($this->_iConnId, $sQuery); + $this->_iQueryId = @mysqli_query($this->_iConnId, $sQuery); if (!$this->_iQueryId) { $this->_sqlerror('Falsche Anfrage / Wrong Query', false, 'SQL-Query = ' . $sQuery); return false; diff --git a/interface/web/sites/ajax_get_json.php b/interface/web/sites/ajax_get_json.php index fb2f1c093f7e7dbbbde054c28c6d2ba0ab7d1e14..243c158da66dd56e7d93263493880e9172b1c9e5 100644 --- a/interface/web/sites/ajax_get_json.php +++ b/interface/web/sites/ajax_get_json.php @@ -201,6 +201,44 @@ if ($type == 'getdirectivesnippet') { $json = json_encode($snippets); } +if($type == 'getclientssldata'){ + $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", intval($web_id)); + $sys_group = $app->db->queryOneRecord("SELECT * FROM sys_group WHERE groupid = ?", intval($web['sys_groupid'])); + $client = $app->db->queryOneRecord("SELECT * FROM client WHERE client_id = ?", intval($sys_group['client_id'])); + if(is_array($client) && !empty($client)){ + if($client['telephone'] == '' && $client['mobile'] != '') $client['telephone'] = $client['mobile']; + + $fname = ''; + $lname = ''; + $parts = preg_split("/\s+/", $client['contact_name']); + if(sizeof($parts) == 2){ + $fname = $parts[0]; + $lname = $parts[1]; + } + if(sizeof($parts) > 2){ + $fname = $parts[0].' '; + for($i=1;$ifunctions->json_encode($client); +} + //} header('Content-type: application/json'); diff --git a/interface/web/sites/lib/lang/de_web_vhost_domain.lng b/interface/web/sites/lib/lang/de_web_vhost_domain.lng index a6b866df38e5914453c60292a904200ea3ef5406..7917cae90d7eb7b8abe813beab2627fd11dd76c5 100644 --- a/interface/web/sites/lib/lang/de_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/de_web_vhost_domain.lng @@ -137,4 +137,7 @@ $wb['apache_directive_blocked_error'] = 'Die Apache Direktive wurde durch die Si $wb['btn_save_txt'] = 'Speichern'; $wb['btn_cancel_txt'] = 'Abbrechen'; $wb['enable_spdy_txt'] = 'Aktiviere SPDY'; +$wb['load_client_data_txt'] = 'Kundendaten übernehmen'; +$wb['load_my_data_txt'] = 'Meine Kontaktdaten laden'; +$wb['reset_client_data_txt'] = 'Daten verwerfen'; ?> diff --git a/interface/web/sites/lib/lang/en_web_vhost_domain.lng b/interface/web/sites/lib/lang/en_web_vhost_domain.lng index 3be30d054de71dda5737bb8b915919f3a7f3ffaa..8af57ff82771011cdc49ebe92c07ebabd0590a45 100644 --- a/interface/web/sites/lib/lang/en_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/en_web_vhost_domain.lng @@ -140,4 +140,7 @@ $wb['subdomain_error_empty'] = 'The subdommain field is empty or contains invali $wb['btn_save_txt'] = "Save"; $wb['btn_cancel_txt'] = "Cancel"; $wb['enable_spdy_txt'] = 'Enable SPDY'; +$wb['load_client_data_txt'] = 'Load client details'; +$wb['load_my_data_txt'] = 'Load my contact details'; +$wb['reset_client_data_txt'] = 'Reset data'; ?> diff --git a/interface/web/sites/templates/web_vhost_domain_ssl.htm b/interface/web/sites/templates/web_vhost_domain_ssl.htm index e910e22b1c714c75b0d6ff524d71c86be436cbf2..90467468d0181482b933c7a3d13f3444b91013f1 100644 --- a/interface/web/sites/templates/web_vhost_domain_ssl.htm +++ b/interface/web/sites/templates/web_vhost_domain_ssl.htm @@ -14,6 +14,12 @@
+ + +
@@ -37,7 +43,7 @@
- + @@ -83,3 +89,29 @@
+ \ No newline at end of file diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index 27ece43ef50cbafc508f430963cbca3bb733519c..6e7d4347ff8573249c12720b636ce6687281b8ae 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -142,6 +142,8 @@ class page_action extends tform_actions { $read_limits = array('limit_cgi', 'limit_ssi', 'limit_perl', 'limit_ruby', 'limit_python', 'force_suexec', 'limit_hterror', 'limit_wildcard', 'limit_ssl'); if($this->_vhostdomain_type != 'domain') $parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"])); + + $is_admin = false; //* Client: If the logged in user is not admin and has no sub clients (no reseller) if($_SESSION["s"]["user"]["typ"] != 'admin' && !$app->auth->has_clients($_SESSION['s']['user']['userid'])) { @@ -451,6 +453,8 @@ class page_action extends tform_actions { //* Admin: If the logged in user is admin } else { + + $is_admin = true; if($this->_vhostdomain_type == 'domain') { // The user is admin, so we fill in all IP addresses of the server @@ -700,6 +704,14 @@ class page_action extends tform_actions { $app->tpl->setVar('vhostdomain_type', $this->_vhostdomain_type); $app->tpl->setVar('is_spdy_enabled', ($web_config['enable_spdy'] === 'y')); + $app->tpl->setVar("is_admin", $is_admin); + + if($this->id > 0) { + $tmp_web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", intval($this->id)); + $tmp_sys_group = $app->db->queryOneRecord("SELECT * FROM sys_group WHERE groupid = ?", intval($tmp_web['sys_groupid'])); + if(intval($tmp_sys_group['client_id']) > 0) $tmp_client = $app->db->queryOneRecord("SELECT * FROM client WHERE client_id = ?", intval($tmp_sys_group['client_id'])); + if(is_array($tmp_client) && !empty($tmp_client) && trim($this->dataRecord['ssl_organisation']) == '' && trim($this->dataRecord['ssl_locality']) == '' && trim($this->dataRecord['ssl_state']) == '' && trim($this->dataRecord['ssl_organisation_unit']) == '') $app->tpl->setVar("show_helper_links", true); + } parent::onShowEnd(); }