diff --git a/interface/web/dns/dns_soa_edit.php b/interface/web/dns/dns_soa_edit.php
index 877bf98ae8bbdde312e744a214b1af18c9a92d0d..defdb9747ea39f6d889e512243b9cf971a21c20e 100644
--- a/interface/web/dns/dns_soa_edit.php
+++ b/interface/web/dns/dns_soa_edit.php
@@ -72,7 +72,7 @@ class page_action extends tform_actions {
// If user is admin, we will allow him to select to whom this record belongs
if($_SESSION["s"]["user"]["typ"] == 'admin') {
// Getting Domains of the user
- $sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0";
+ $sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0 ORDER by name";
$clients = $app->db->queryAllRecords($sql);
$client_select = '';
if($_SESSION["s"]["user"]["typ"] == 'admin') $client_select .= "";
@@ -90,7 +90,7 @@ class page_action extends tform_actions {
$client = $app->db->queryOneRecord("SELECT client.client_id, client.contact_name FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
// Fill the client select field
- $sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id'];
+ $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 = '';
if(is_array($clients)) {
diff --git a/interface/web/dns/dns_wizard.php b/interface/web/dns/dns_wizard.php
index 61d6bb6eee93724dfeca1bedbcecc12ccf03a8e3..794065c28baaa9c81b3d5b12c46832c6182307a6 100644
--- a/interface/web/dns/dns_wizard.php
+++ b/interface/web/dns/dns_wizard.php
@@ -81,7 +81,7 @@ if($_SESSION['s']['user']['typ'] == 'admin') {
$app->tpl->setVar("server_id",$server_id_option);
// load the list of clients
- $sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0";
+ $sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0 ORDER BY name";
$clients = $app->db->queryAllRecords($sql);
$client_select = '';
if($_SESSION["s"]["user"]["typ"] == 'admin') $client_select .= "";
diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php
index fe49dc8fe44567c225d1b47f3917b137bf1cba1d..0106ebc0af7c76fd5b76b73e36d52566047c35dc 100644
--- a/interface/web/mail/mail_domain_edit.php
+++ b/interface/web/mail/mail_domain_edit.php
@@ -72,7 +72,7 @@ class page_action extends tform_actions {
if($_SESSION["s"]["user"]["typ"] == 'admin') {
// Getting Clients of the user
if($_SESSION["s"]["user"]["typ"] == 'admin') {
- $sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0";
+ $sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0 ORDER BY name";
} else {
$client_group_id = $_SESSION["s"]["user"]["default_group"];
$sql = "SELECT client.client_id, limit_web_domain, default_webserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id";
@@ -92,7 +92,7 @@ class page_action extends tform_actions {
// Get the limits of the client
$client_group_id = $_SESSION["s"]["user"]["default_group"];
- $client = $app->db->queryOneRecord("SELECT client.client_id, contact_name FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
+ $client = $app->db->queryOneRecord("SELECT client.client_id, contact_name FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id order by contact_name");
// Set the webserver to the default server of the client
$tmp = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = $client[default_webserver]");
diff --git a/interface/web/sites/database_edit.php b/interface/web/sites/database_edit.php
index 17252df44221eace5ec72f1bdd4161120435b044..9ffc42bf9d5b0586da51195b9d38d70cf0790131 100644
--- a/interface/web/sites/database_edit.php
+++ b/interface/web/sites/database_edit.php
@@ -93,7 +93,7 @@ class page_action extends tform_actions {
unset($tmp);
// Fill the client select field
- $sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id'];
+ $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 = '';
if(is_array($clients)) {
@@ -130,7 +130,7 @@ class page_action extends tform_actions {
unset($ips);
// Fill the client select field
- $sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0";
+ $sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0 ORDER BY name";
$clients = $app->db->queryAllRecords($sql);
$client_select = "";
if(is_array($clients)) {
diff --git a/interface/web/sites/web_domain_edit.php b/interface/web/sites/web_domain_edit.php
index 93911c8de484e0bab36e18dfe6619de512899a7e..a3b36115c42fba9934bde0e91db76bc101055447 100644
--- a/interface/web/sites/web_domain_edit.php
+++ b/interface/web/sites/web_domain_edit.php
@@ -111,7 +111,7 @@ class page_action extends tform_actions {
unset($tmp);
// Fill the client select field
- $sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id'];
+ $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 = '';
if(is_array($clients)) {
@@ -166,7 +166,7 @@ class page_action extends tform_actions {
unset($ips);
// Fill the client select field
- $sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0";
+ $sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0 ORDER BY name";
$clients = $app->db->queryAllRecords($sql);
$client_select = "";
if(is_array($clients)) {