diff options
-rw-r--r-- | admin/access.php | 6 | ||||
-rwxr-xr-x | docs/CHANGELOG | 2 | ||||
-rw-r--r-- | lib/class/access.class.php | 4 | ||||
-rw-r--r-- | 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 @@ <?php /* - Copyright (c) 2004 Ampache.org + Copyright (c) 2001 - 2006 Ampache.org All rights reserved. This program is free software; you can redistribute it and/or @@ -22,44 +22,41 @@ /*! @header Add Access List Entry - A template file - */ - ?> - -<p style="font-size: 10pt; font-weight: bold;"><?php echo _("Add Access for a Host"); ?></p> -<p><?php echo _("Use the form below to add a host that you want to have access to your Ampache catalog."); ?></p> +<div class="text-box"> +<p style="font-size: 10pt; font-weight: bold;"><?php echo _('Add Access for a Host'); ?></p> +<p><?php echo _('Use the form below to add a host that you want to have access to your Ampache catalog.'); ?></p> <form name="update_catalog" method="post" enctype="multipart/form-data" action="<?php echo conf('web_path'); ?>/admin/access.php"> <table cellpadding="5" cellspacing="0" border="0"> <tr> - <td><?php echo _("Name"); ?>: </td> + <td><?php echo _('Name'); ?>: </td> <td> <input type="text" name="name" value="<?php echo $_REQUEST['name']; ?>" size="30" /> </td> </tr> <tr> - <td><?php echo _("Start IP Address"); ?>:</td> + <td><?php echo _('Start IP Address'); ?>:</td> <td> <input type="text" name="start" value="<?php echo $_REQUEST['start']; ?>" size="20" maxlength="15" /> </td> </tr> <tr> - <td><?php echo _("End IP Address"); ?>:</td> + <td><?php echo _('End IP Address'); ?>:</td> <td> <input type="text" name="end" value="<?php echo $_REQUEST['end']; ?>" size="20" maxlength="15" /> </td> </tr> <tr> - <td><?php echo _("Level"); ?>:</td> + <td><?php echo _('Level'); ?>:</td> <td> <select name="level"> - <option selected="selected" value="5" >Demo</option> - <option value="25">Stream</option> - <option value="50">Stream/Download</option> - <option value="75">XML-RPC</option> + <option selected="selected" value="5" ><?php echo _('Demo'); ?></option> + <option value="25"><?php echo _('Stream'); ?></option> + <option value="50"><?php echo _('Stream/Download'); ?></option> + <option value="75"><?php echo _('XML-RPC'); ?></option> </select> </td> </tr> @@ -67,8 +64,9 @@ <td> </td> <td> <input type="hidden" name="action" value="add_host" /> - <input type="submit" value="<?php echo _("Add Host"); ?>" /> + <input type="submit" value="<?php echo _('Add Host'); ?>" /> </td> </tr> </table> </form> +</div> |