From a3a07028fb45e9ebc0c741853f3e2b838f03bd12 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Fri, 8 Sep 2006 05:31:48 +0000 Subject: cleaned up access control interface a bit --- admin/access.php | 6 ++++-- docs/CHANGELOG | 2 ++ lib/class/access.class.php | 4 ++++ templates/show_add_access.inc | 30 ++++++++++++++---------------- 4 files changed, 24 insertions(+), 18 deletions(-) diff --git a/admin/access.php b/admin/access.php index f9e3d2be..d7bc11c8 100644 --- a/admin/access.php +++ b/admin/access.php @@ -43,11 +43,13 @@ switch ($action ) { break; case 'delete_host': $access->delete($_REQUEST['access_id']); - show_confirmation(_('Entry Deleted'),_('Your Access List Entry has been removed'),'admin/access.php'); + $url = conf('web_path') . '/admin/access.php'; + 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']); - show_confirmation(_('Entry Added'),_('Your new Access List Entry has been created'),'admin/access.php'); + $url = conf('web_path') . '/admin/access.php'; + show_confirmation(_('Entry Added'),_('Your new Access List Entry has been created'),$url); break; case 'update_host': $access->update($_REQUEST); diff --git a/docs/CHANGELOG b/docs/CHANGELOG index 496fd1ec..b84ae7b3 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,8 @@ -------------------------------------------------------------------------- v.3.3.2 + - Cleaned up some Formating issues with the Access control + interface - Fixed an issue with the MPD Controller not passing the password to the MPD class causing flames to shoot out if your MPD had a password set diff --git a/lib/class/access.class.php b/lib/class/access.class.php index 04d3a500..04456610 100644 --- a/lib/class/access.class.php +++ b/lib/class/access.class.php @@ -97,6 +97,10 @@ class Access { */ function create($name,$start,$end,$level) { + /* We need to verify the incomming data a littlebit */ + $start = intval($start); + $end = intval($end); + $start = ip2int($start); $end = ip2int($end); $name = sql_escape($name); diff --git a/templates/show_add_access.inc b/templates/show_add_access.inc index d1bbcdc2..06827c9b 100644 --- a/templates/show_add_access.inc +++ b/templates/show_add_access.inc @@ -1,7 +1,7 @@ - -

-

+
+

+

- + - + - + - + @@ -67,8 +64,9 @@
: :
::
::
::
  - " /> +
+
-- cgit