Disable WebUI header menu WEB, DNS, MAIL, DB, CRON, BACKUP if they are set "0" in the package.

This commit is contained in:
JA 2016-11-26 02:42:33 +09:00
commit cc15e4adad
2 changed files with 63 additions and 2 deletions

View file

@ -15,6 +15,54 @@
});
</script>
<?php if($panel[$user]['WEB_DOMAINS'] == "0") { ?>
<script>
$('a[href^="/list/web"]').addClass('disabled').click(function() {
return false;
});
</script>
<?php } ?>
<?php if($panel[$user]['DNS_DOMAINS'] == "0") { ?>
<script>
$('a[href^="/list/dns"]').addClass('disabled').click(function() {
return false;
});
</script>
<?php } ?>
<?php if($panel[$user]['MAIL_DOMAINS'] == "0") { ?>
<script>
$('a[href^="/list/mail"]').addClass('disabled').click(function() {
return false;
});
</script>
<?php } ?>
<?php if($panel[$user]['DATABASES'] == "0") { ?>
<script>
$('a[href^="/list/db"]').addClass('disabled').click(function() {
return false;
});
</script>
<?php } ?>
<?php if($panel[$user]['CRON_JOBS'] == "0") { ?>
<script>
$('a[href^="/list/cron"]').addClass('disabled').click(function() {
return false;
});
</script>
<?php } ?>
<?php if($panel[$user]['BACKUPS'] == "0") { ?>
<script>
$('a[href^="/list/backup"]').addClass('disabled').click(function() {
return false;
});
</script>
<?php } ?>
<?php
// Dialogs
// todo: display all the dialogs?
@ -68,4 +116,4 @@ elseif (!empty($_SESSION['error_msg'])):
<?php
unset($_SESSION['error_msg']);
endif;
?>
?>