@@ -96,7 +96,7 @@ function onShowEnd() {
9696
9797 if ($ available_dashlets_txt == '' ) $ available_dashlets_txt = '------ ' ;
9898 $ app ->tpl ->setVar ("available_dashlets_txt " , $ available_dashlets_txt );
99-
99+
100100 // Logo
101101 $ sys_ini = $ app ->db ->queryOneRecord ("SELECT * FROM sys_ini WHERE sysini_id = ? " , $ this ->id );
102102 if ($ sys_ini ['custom_logo ' ] != '' ){
@@ -156,6 +156,11 @@ function onUpdateSave($sql) {
156156 */
157157
158158 $ new_config = $ app ->tform ->encode ($ this ->dataRecord , $ section );
159+ if ($ section == 'sites ' && $ new_config ['client_protection ' ] != 'y ' && $ server_config_array ['sites ' ]['client_protection ' ] == 'y ' ) {
160+ $ app ->db ->query ("UPDATE web_domain sys_perm_group = 'riud' WHERE added_by = admin " );
161+ } elseif ($ section == 'sites ' && $ new_config ['client_protection ' ] != 'n ' && $ server_config_array ['sites ' ]['client_protection ' ] == 'n ' ) {
162+ $ app ->db ->query ("UPDATE web_domain sys_perm_group = 'ru' WHERE added_by = admin " );
163+ }
159164 if ($ section == 'sites ' && $ new_config ['vhost_subdomains ' ] != 'y ' && $ server_config_array ['sites ' ]['vhost_subdomains ' ] == 'y ' ) {
160165 // check for existing vhost subdomains, if found the mode cannot be disabled
161166 $ check = $ app ->db ->queryOneRecord ("SELECT COUNT(*) as `cnt` FROM `web_domain` WHERE `type` = 'vhostsubdomain' " );
@@ -198,13 +203,13 @@ function onUpdateSave($sql) {
198203 "FROM dns_soa " ;
199204 $ app ->db ->query ($ sql );
200205 }
201-
206+
202207 //die(print_r($_FILES));
203208 // Logo
204209 /*
205210 if(isset($_FILES['file']['name']) && is_uploaded_file($_FILES['file']['tmp_name'])){
206211 //print_r($_FILES);
207-
212+
208213 $path= $_FILES['file']['tmp_name'];
209214 $type = pathinfo($path, PATHINFO_EXTENSION);
210215 $data = file_get_contents($path);
0 commit comments