diff --git a/interface/web/dns/dns_soa_edit.php b/interface/web/dns/dns_soa_edit.php index d2eb158541b126c63c2742e0ed32d6a689d6e896..a94cf013077907f0252bf8a9dfaed11a7506ff1c 100644 --- a/interface/web/dns/dns_soa_edit.php +++ b/interface/web/dns/dns_soa_edit.php @@ -76,9 +76,10 @@ class page_action extends tform_actions { $clients = $app->db->queryAllRecords($sql); $client_select = ''; if($_SESSION["s"]["user"]["typ"] == 'admin') $client_select .= "<option value='0'></option>"; + $tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($clients)) { foreach( $clients as $client) { - $selected = ($client["groupid"] == @$this->dataRecord["sys_groupid"])?'SELECTED':''; + $selected = ($client["groupid"] == @$tmp_data_record["sys_groupid"])?'SELECTED':''; $client_select .= "<option value='$client[groupid]' $selected>$client[name]</option>\r\n"; } } @@ -93,9 +94,10 @@ class page_action extends tform_actions { $sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY name"; $clients = $app->db->queryAllRecords($sql); $client_select = '<option value="'.$client['client_id'].'">'.$client['contact_name'].'</option>'; + $tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($clients)) { foreach( $clients as $client) { - $selected = @($client["groupid"] == $this->dataRecord["sys_groupid"])?'SELECTED':''; + $selected = @($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':''; $client_select .= "<option value='$client[groupid]' $selected>$client[name]</option>\r\n"; } } diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php index 0106ebc0af7c76fd5b76b73e36d52566047c35dc..ed8420d11195c66b95a119c71fda537b77a3a338 100644 --- a/interface/web/mail/mail_domain_edit.php +++ b/interface/web/mail/mail_domain_edit.php @@ -80,9 +80,10 @@ class page_action extends tform_actions { $clients = $app->db->queryAllRecords($sql); $client_select = ''; if($_SESSION["s"]["user"]["typ"] == 'admin') $client_select .= "<option value='0'></option>"; + $tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($clients)) { foreach( $clients as $client) { - $selected = ($client["groupid"] == $this->dataRecord["sys_groupid"])?'SELECTED':''; + $selected = ($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':''; $client_select .= "<option value='$client[groupid]' $selected>$client[name]</option>\r\n"; } } @@ -103,9 +104,10 @@ class page_action extends tform_actions { $sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']; $clients = $app->db->queryAllRecords($sql); $client_select = '<option value="'.$client['client_id'].'">'.$client['contact_name'].'</option>'; + $tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($clients)) { foreach( $clients as $client) { - $selected = @($client["groupid"] == $this->dataRecord["sys_groupid"])?'SELECTED':''; + $selected = @($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':''; $client_select .= "<option value='$client[groupid]' $selected>$client[name]</option>\r\n"; } } diff --git a/interface/web/sites/database_edit.php b/interface/web/sites/database_edit.php index 9ffc42bf9d5b0586da51195b9d38d70cf0790131..8dba245c718dcb37fdebc78ef59c73e317d6e84e 100644 --- a/interface/web/sites/database_edit.php +++ b/interface/web/sites/database_edit.php @@ -96,9 +96,10 @@ class page_action extends tform_actions { $sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY name"; $clients = $app->db->queryAllRecords($sql); $client_select = '<option value="'.$client['client_id'].'">'.$client['contact_name'].'</option>'; + $tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($clients)) { foreach( $clients as $client) { - $selected = @($client["groupid"] == $this->dataRecord["sys_groupid"])?'SELECTED':''; + $selected = @($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':''; $client_select .= "<option value='$client[groupid]' $selected>$client[name]</option>\r\n"; } } @@ -133,9 +134,10 @@ class page_action extends tform_actions { $sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0 ORDER BY name"; $clients = $app->db->queryAllRecords($sql); $client_select = "<option value='0'></option>"; + $tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($clients)) { foreach( $clients as $client) { - $selected = @($client["groupid"] == $this->dataRecord["sys_groupid"])?'SELECTED':''; + $selected = @($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':''; $client_select .= "<option value='$client[groupid]' $selected>$client[name]</option>\r\n"; } } diff --git a/interface/web/sites/web_domain_edit.php b/interface/web/sites/web_domain_edit.php index e874387145c150204c3bb16959008b1eb4b7f09f..557bcdb93e5cd707142148a402ff7dcd11d3e464 100644 --- a/interface/web/sites/web_domain_edit.php +++ b/interface/web/sites/web_domain_edit.php @@ -114,9 +114,10 @@ class page_action extends tform_actions { $sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY name"; $records = $app->db->queryAllRecords($sql); $client_select = '<option value="'.$client['client_id'].'">'.$client['contact_name'].'</option>'; + $tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($records)) { foreach( $records as $rec) { - $selected = @($rec["groupid"] == $this->dataRecord["sys_groupid"])?'SELECTED':''; + $selected = @($rec["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':''; $client_select .= "<option value='$rec[groupid]' $selected>$rec[name]</option>\r\n"; } } @@ -169,9 +170,10 @@ class page_action extends tform_actions { $sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0 ORDER BY name"; $clients = $app->db->queryAllRecords($sql); $client_select = "<option value='0'></option>"; + $tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($clients)) { foreach( $clients as $client) { - $selected = @($client["groupid"] == $this->dataRecord["sys_groupid"])?'SELECTED':''; + $selected = @($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':''; $client_select .= "<option value='$client[groupid]' $selected>$client[name]</option>\r\n"; } }