diff --git a/src/includes/functionality.php b/src/includes/functionality.php index 48c1279..999fc9b 100644 --- a/src/includes/functionality.php +++ b/src/includes/functionality.php @@ -114,11 +114,7 @@ function getCountApprovals() function requireAdmin() { if (!isAdmin()) { - echo '
'; - echo '

Permission denied

'; - echo '

You are no admin that I know of. Go away.

'; - echo '
'; - include_once 'includes/widgets/footer.php'; + simpleFatalError('You are not an admin.'); exit; } @@ -126,8 +122,10 @@ function requireAdmin() function simpleFatalError($message) { + require_once 'includes/widgets/header.php'; + echo '
'; - echo '

Permission Denied

'; + echo '

Error

'; echo '

' . $message . '

'; echo '
'; diff --git a/src/user-edit.php b/src/user-edit.php index 633eeec..7c1551e 100644 --- a/src/user-edit.php +++ b/src/user-edit.php @@ -1,6 +1,6 @@ displayForm($f); diff --git a/src/usergroup-create.php b/src/usergroup-create.php index 37944e6..4bc007c 100644 --- a/src/usergroup-create.php +++ b/src/usergroup-create.php @@ -1,6 +1,6 @@ displayForm($f); diff --git a/src/usergroup-grant.php b/src/usergroup-grant.php index 03f0d2e..9437eb8 100644 --- a/src/usergroup-grant.php +++ b/src/usergroup-grant.php @@ -1,6 +1,6 @@ displayForm($f);