diff --git a/customer_domains.php b/customer_domains.php index f7dc28e2..a135b0d6 100644 --- a/customer_domains.php +++ b/customer_domains.php @@ -20,6 +20,12 @@ define('AREA', 'customer'); require './lib/init.php'; +// redirect if this customer page is hidden via settings +if (Settings::IsInList('panel.customer_hide_options','domains')) { + redirectTo('customer_index.php'); + exit; +} + if (isset($_POST['id'])) { $id = intval($_POST['id']); } elseif (isset($_GET['id'])) { diff --git a/customer_email.php b/customer_email.php index 2ace4ad5..6d6c7c96 100644 --- a/customer_email.php +++ b/customer_email.php @@ -20,6 +20,12 @@ define('AREA', 'customer'); require './lib/init.php'; +// redirect if this customer page is hidden via settings +if (Settings::IsInList('panel.customer_hide_options','email')) { + redirectTo('customer_index.php'); + exit; +} + if (isset($_POST['id'])) { $id = intval($_POST['id']); } elseif (isset($_GET['id'])) { diff --git a/customer_extras.php b/customer_extras.php index 9294863c..3477e512 100644 --- a/customer_extras.php +++ b/customer_extras.php @@ -19,6 +19,12 @@ define('AREA', 'customer'); require './lib/init.php'; +// redirect if this customer page is hidden via settings +if (Settings::IsInList('panel.customer_hide_options','extras')) { + redirectTo('customer_index.php'); + exit; +} + if (isset($_POST['id'])) { $id = intval($_POST['id']); } elseif (isset($_GET['id'])) { @@ -29,6 +35,13 @@ if ($page == 'overview') { $log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras"); eval("echo \"" . getTemplate("extras/extras") . "\";"); } elseif ($page == 'htpasswds') { + + // redirect if this customer sub-page is hidden via settings + if (Settings::IsInList('panel.customer_hide_options','extras.directoryprotection')) { + redirectTo('customer_index.php'); + exit; + } + if ($action == '') { $log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras::htpasswds"); $fields = array( @@ -262,6 +275,13 @@ if ($page == 'overview') { } } } elseif ($page == 'htaccess') { + + // redirect if this customer sub-page is hidden via settings + if (Settings::IsInList('panel.customer_hide_options','extras.pathoptions')) { + redirectTo('customer_index.php'); + exit; + } + if ($action == '') { $log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_extras::htaccess"); $fields = array( @@ -520,6 +540,12 @@ if ($page == 'overview') { } } elseif ($page == 'backup') { + // redirect if this customer sub-page is hidden via settings + if (Settings::IsInList('panel.customer_hide_options','extras.backup')) { + redirectTo('customer_index.php'); + exit; + } + if (Settings::Get('system.backupenabled') == 1) { if ($action == 'abort' && isset($_POST['send']) && $_POST['send'] == 'send') { diff --git a/customer_ftp.php b/customer_ftp.php index c46ef9ce..642bcb7c 100644 --- a/customer_ftp.php +++ b/customer_ftp.php @@ -20,6 +20,12 @@ define('AREA', 'customer'); require './lib/init.php'; +// redirect if this customer page is hidden via settings +if (Settings::IsInList('panel.customer_hide_options','ftp')) { + redirectTo('customer_index.php'); + exit; +} + $id = 0; if (isset($_POST['id'])) { $id = intval($_POST['id']); diff --git a/customer_logger.php b/customer_logger.php index ba8debe7..f5c0461d 100644 --- a/customer_logger.php +++ b/customer_logger.php @@ -20,6 +20,12 @@ define('AREA', 'customer'); require './lib/init.php'; +// redirect if this customer page is hidden via settings +if (Settings::IsInList('panel.customer_hide_options','extras.logger')) { + redirectTo('customer_index.php'); + exit; +} + if ($page == 'log' ) { if ($action == '') { diff --git a/customer_mysql.php b/customer_mysql.php index 39c642da..e901e38e 100644 --- a/customer_mysql.php +++ b/customer_mysql.php @@ -20,6 +20,12 @@ define('AREA', 'customer'); require './lib/init.php'; +// redirect if this customer page is hidden via settings +if (Settings::IsInList('panel.customer_hide_options','mysql')) { + redirectTo('customer_index.php'); + exit; +} + // get sql-root access data Database::needRoot(true); Database::needSqlData(); diff --git a/customer_tickets.php b/customer_tickets.php index a2840ece..37b8e513 100644 --- a/customer_tickets.php +++ b/customer_tickets.php @@ -20,6 +20,12 @@ define('AREA', 'customer'); require './lib/init.php'; +// redirect if this customer page is hidden via settings +if (Settings::IsInList('panel.customer_hide_options','domains')) { + redirectTo('customer_index.php'); + exit; +} + if (isset($_POST['id'])) { $id = intval($_POST['id']); diff --git a/customer_traffic.php b/customer_traffic.php index bbf42281..e4a9a025 100644 --- a/customer_traffic.php +++ b/customer_traffic.php @@ -20,6 +20,13 @@ define('AREA', 'customer'); $intrafficpage = 1; require './lib/init.php'; + +// redirect if this customer page is hidden via settings +if (Settings::IsInList('panel.customer_hide_options','traffic')) { + redirectTo('customer_index.php'); + exit; +} + $traffic = ''; $month = null; $year = null;