summaryrefslogtreecommitdiffstats
path: root/admin/access.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/access.php')
-rw-r--r--admin/access.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/admin/access.php b/admin/access.php
index d7bc11c8..74f13d6b 100644
--- a/admin/access.php
+++ b/admin/access.php
@@ -28,7 +28,7 @@ $action = scrub_in($_REQUEST['action']);
$access_id = scrub_in($_REQUEST['access_id']);
$access = new Access($access_id);
-if (!$GLOBALS['user']->has_access(100)) {
+if (!$GLOBALS['user']->has_access(100) || conf('demo_mode')) {
access_denied();
exit();
}
@@ -39,7 +39,9 @@ show_template('header');
switch ($action ) {
case 'show_confirm_delete':
- show_confirmation(_('Confirm Delete'),_('Do you really want to delete this Access Record?'),'admin/access.php?access_id=' . scrub_out($_REQUEST['access_id']) . '&action=delete_host','1');
+ $title = _('Confirm Delete');
+ $body = _('Do you really want to delete this Access Record?');
+ show_confirmation($title,$body,'admin/access.php?access_id=' . scrub_out($_REQUEST['access_id']) . '&action=delete_host','1');
break;
case 'delete_host':
$access->delete($_REQUEST['access_id']);
@@ -47,7 +49,7 @@ switch ($action ) {
show_confirmation(_('Entry Deleted'),_('Your Access List Entry has been removed'),$url);
break;
case 'add_host':
- $access->create($_REQUEST['name'],$_REQUEST['start'],$_REQUEST['end'],$_REQUEST['level']);
+ $access->create($_REQUEST['name'],$_REQUEST['start'],$_REQUEST['end'],$_REQUEST['level'],$_REQUEST['user'],$_REQUEST['key'],$_REQUEST['type']);
$url = conf('web_path') . '/admin/access.php';
show_confirmation(_('Entry Added'),_('Your new Access List Entry has been created'),$url);
break;