Skip to content

Commit 6c3992b

Browse files
author
Kristan Kenney
committed
Set home location URLs based on package features
1 parent 61aafd8 commit 6c3992b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

web/inc/main.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff 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

168188
function translate_date($date){

0 commit comments

Comments
 (0)