File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -158,11 +158,31 @@ function top_panel($user, $TAB) {
158158 $ panel = json_decode (implode ('' , $ output ), true );
159159 unset($ output );
160160
161+ // Set home location URLs
162+ if (($ _SESSION ['userContext ' ] === 'admin ' ) && (!isset ($ _SESSION ['look ' ]))) {
163+ $ home_url = "/list/user/ " ;
164+ } else {
165+ if ($ panel [$ user ]['WEB_DOMAINS ' ] != "0 " ) {
166+ $ home_url = "/list/web/ " ;
167+ } else if ($ panel [$ user ]['DNS_DOMAINS ' ] != "0 " ) {
168+ $ home_url = "/list/dns/ " ;
169+ } else if ($ panel [$ user ]['MAIL_DOMAINS ' ] != "0 " ) {
170+ $ home_url = "/list/mail/ " ;
171+ } else if ($ panel [$ user ]['DATABASES ' ] != "0 " ) {
172+ $ home_url = "/list/db/ " ;
173+ } else if ($ panel [$ user ]['CRON_JOBS ' ] != "0 " ) {
174+ $ home_url = "/list/cron/ " ;
175+ } else if ($ panel [$ user ]['BACKUPS ' ] != "0 " ) {
176+ $ home_url = "/list/backups/ " ;
177+ }
178+ }
179+
161180 if (($ _SESSION ['userContext ' ] === 'admin ' )) {
162181 include (dirname (__FILE__ ).'/../templates/admin/panel.html ' );
163182 } else {
164183 include (dirname (__FILE__ ).'/../templates/user/panel.html ' );
165184 }
185+
166186}
167187
168188function translate_date ($ date ){
You can’t perform that action at this time.
0 commit comments