@@ -109,7 +109,7 @@ function onShowEnd() {
109109
110110 // Get the limits of the client
111111 $ client_group_id = $ _SESSION ["s " ]["user " ]["default_group " ];
112- $ client = $ app ->db ->queryOneRecord ("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 " );
112+ $ client = $ app ->db ->queryOneRecord ("SELECT client.client_id, limit_web_domain, default_webserver, client.contact_name FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $ client_group_id " );
113113
114114 // Set the webserver to the default server of the client
115115 $ tmp = $ app ->db ->queryOneRecord ("SELECT server_name FROM server WHERE server_id = $ client [default_webserver]" );
@@ -119,7 +119,7 @@ function onShowEnd() {
119119 // Fill the client select field
120120 $ sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = " .$ client ['client_id ' ];
121121 $ clients = $ app ->db ->queryAllRecords ($ sql );
122- $ client_select = '' ;
122+ $ client_select = '<option value=" ' . $ client [ ' client_id ' ]. ' "> ' . $ client [ ' contact_name ' ]. ' </option> ' ;
123123 if (is_array ($ clients )) {
124124 foreach ( $ clients as $ client ) {
125125 $ selected = @($ client ["groupid " ] == $ this ->dataRecord ["sys_groupid " ])?'SELECTED ' :'' ;
@@ -207,7 +207,7 @@ function onSubmit() {
207207 if ($ _SESSION ["s " ]["user " ]["typ " ] != 'admin ' ) {
208208 // Get the limits of the client
209209 $ client_group_id = $ _SESSION ["s " ]["user " ]["default_group " ];
210- $ client = $ app ->db ->queryOneRecord ("SELECT limit_web_domain, default_webserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $ client_group_id " );
210+ $ client = $ app ->db ->queryOneRecord ("SELECT limit_web_domain, default_webserver, parent_client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $ client_group_id " );
211211
212212 // When the record is updated
213213 if ($ this ->id > 0 ) {
0 commit comments