summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/access.php5
-rw-r--r--images/icon_add_key.pngbin0 -> 703 bytes
-rw-r--r--images/icon_key.pngbin612 -> 0 bytes
-rw-r--r--lib/init.php4
-rw-r--r--templates/show_add_access.inc.php60
-rw-r--r--templates/show_add_access_current.inc.php61
-rw-r--r--templates/show_add_access_local.inc.php86
-rw-r--r--templates/show_add_access_rpc.inc.php86
-rw-r--r--templates/sidebar_admin.inc.php2
9 files changed, 270 insertions, 34 deletions
diff --git a/admin/access.php b/admin/access.php
index 02606c66..6ffaa167 100644
--- a/admin/access.php
+++ b/admin/access.php
@@ -45,12 +45,13 @@ switch ($_REQUEST['action']) {
show_confirmation(_('Updated'),_('Access List Entry updated'),'admin/access.php');
break;
case 'show_add_current':
-
+ require_once Config::get('prefix') . '/templates/show_add_access_current.inc.php';
break;
case 'show_add_rpc':
+ require_once Config::get('prefix') . '/templates/show_add_access_rpc.inc.php';
break;
case 'show_add_local':
-
+ require_once Config::get('prefix') . '/templates/show_add_access_local.inc.php';
break;
case 'show_add_advanced':
require_once Config::get('prefix') . '/templates/show_add_access.inc.php';
diff --git a/images/icon_add_key.png b/images/icon_add_key.png
new file mode 100644
index 00000000..d4074039
--- /dev/null
+++ b/images/icon_add_key.png
Binary files differ
diff --git a/images/icon_key.png b/images/icon_key.png
deleted file mode 100644
index 4ec1a928..00000000
--- a/images/icon_key.png
+++ /dev/null
Binary files differ
diff --git a/lib/init.php b/lib/init.php
index 979c90cb..c4e13b6d 100644
--- a/lib/init.php
+++ b/lib/init.php
@@ -23,7 +23,7 @@
***/
// SVN Fluf
-$svn_version = trim('$Rev$','$');
+$svn_version = 'Subversion ' . trim('$Rev$','$ ');
// Use output buffering, this gains us a few things and
// fixes some CSS issues
@@ -88,7 +88,7 @@ if (!count($results)) {
}
/** This is the version.... fluf nothing more... **/
-$results['version'] = '3.5-Alpha2 Build (' . $svn_version . ')';
+$results['version'] = '3.5-Alpha2 '. $svn_version;
$results['int_config_version'] = '9';
$results['raw_web_path'] = $results['web_path'];
diff --git a/templates/show_add_access.inc.php b/templates/show_add_access.inc.php
index bbe87995..79d3de38 100644
--- a/templates/show_add_access.inc.php
+++ b/templates/show_add_access.inc.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2007 Ampache.org
+ Copyright (c) Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
@@ -19,49 +19,34 @@
*/
?>
-<?php show_box_top(_('Add Access for a Host')); ?>
+<?php show_box_top(_('Advanced Add')); ?>
<form name="update_catalog" method="post" enctype="multipart/form-data" action="<?php echo Config::get('web_path'); ?>/admin/access.php?action=add_host">
<table class="tabledata" cellpadding="5" cellspacing="0">
<tr>
<td><?php echo _('Name'); ?>:</td>
- <td>
+ <td colspan="3">
<input type="text" name="name" value="<?php echo scrub_out($_REQUEST['name']); ?>" size="20" />
</td>
</tr>
<tr>
- <td><?php echo _('Start IP Address'); ?>:</td>
- <td>
- <input type="text" name="start" value="<?php echo scrub_out($_REQUEST['start']); ?>" size="20" maxlength="15" />
- <span class="information">(255.255.255.255)</span>
- </td>
-</tr>
-<tr>
- <td><?php echo _('End IP Address'); ?>:</td>
- <td>
- <input type="text" name="end" value="<?php echo scrub_out($_REQUEST['end']); ?>" size="20" maxlength="15" />
- <span class="information">(255.255.255.255)</span>
+ <td><?php echo _('Level'); ?>:</td>
+ <td colspan="3">
+ <input name="level" type="radio" checked="checked" value="5" /> <?php echo _('View'); ?>
+ <input name="level" type="radio" value="25" /> <?php echo _('Read'); ?>
+ <input name="level" type="radio" value="50" /> <?php echo _('Read/Write'); ?>
+ <input name="level" type="radio" value="75" /> <?php echo _('All'); ?>
</td>
</tr>
<tr>
<td><?php echo _('User'); ?>:</td>
- <td>
+ <td colspan="3">
<?php show_user_select('user'); ?>
</td>
</tr>
-<tr>
- <td><?php echo _('Level'); ?>:</td>
- <td>
- <select name="level">
- <option selected="selected" value="5" ><?php echo _('View'); ?></option>
- <option value="25"><?php echo _('Read'); ?></option>
- <option value="50"><?php echo _('Read/Write'); ?></option>
- <option value="75"><?php echo _('All'); ?></option>
- </select>
- </td>
-</tr>
+
<tr>
<td><?php echo _('ACL Type'); ?>:</td>
- <td>
+ <td colspan="3">
<select name="type">
<option selected="selected" value="stream"><?php echo _('Stream Access'); ?></option>
<option value="interface"><?php echo _('Web Interface'); ?></option>
@@ -71,16 +56,33 @@
</td>
</tr>
<tr>
- <td colspan="2"><h4><?php echo _('RPC Options'); ?></h4></td>
+ <td colspan="4"><h4><?php echo _('RPC Options'); ?></h4></td>
</tr>
<tr>
<td><?php echo _('Remote Key'); ?>:</td>
+ <td colspan="3">
+ <input type="text" name="key" value="<?php echo scrub_out($_REQUEST['key']); ?>" maxlength="32" />
+ </td>
+</tr>
+
+<tr>
+ <td colspan="4"><h3><?php echo _('IPv4 or IPv6 Addresses'); ?></h3>
+ <span class="information">(255.255.255.255) / (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff)</span>
+ </td>
+</tr>
+<tr>
+ <td><?php echo _('Start'); ?>:</td>
<td>
- <input type="text" name="key" value="<?php echo scrub_out($_REQUEST['end']); ?>" maxlength="32" />
+ <input type="text" name="start" value="<?php echo scrub_out($_REQUEST['start']); ?>" size="20" maxlength="15" />
+ </td>
+ <td><?php echo _('End'); ?>:</td>
+ <td>
+ <input type="text" name="end" value="<?php echo scrub_out($_REQUEST['end']); ?>" size="20" maxlength="15" />
</td>
</tr>
</table>
<div class="formValidation">
+ <?php Core::form_register('add_acl'); ?>
<input class="button" type="submit" value="<?php echo _('Create ACL'); ?>" />
</div>
</form>
diff --git a/templates/show_add_access_current.inc.php b/templates/show_add_access_current.inc.php
new file mode 100644
index 00000000..e999ad57
--- /dev/null
+++ b/templates/show_add_access_current.inc.php
@@ -0,0 +1,61 @@
+<?php
+/*
+
+ Copyright (c) Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License v2
+ as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+?>
+<?php show_box_top(_('Add Current Host')); ?>
+<form name="update_catalog" method="post" enctype="multipart/form-data" action="<?php echo Config::get('web_path'); ?>/admin/access.php?action=add_host">
+<table class="tabledata" cellpadding="5" cellspacing="0">
+<tr>
+ <td><?php echo _('Name'); ?>:</td>
+ <td colspan="3">
+ <input type="text" name="name" value="<?php echo scrub_out($_REQUEST['name']); ?>" size="20" />
+ </td>
+</tr>
+<tr>
+ <td><?php echo _('Level'); ?>:</td>
+ <td colspan="3">
+ <input name="level" type="radio" value="5" /> <?php echo _('View'); ?>
+ <input name="level" type="radio" value="25" /> <?php echo _('Read'); ?>
+ <input name="level" type="radio" checked="checked" value="50" /> <?php echo _('Read/Write'); ?>
+ <input name="level" type="radio" value="75" /> <?php echo _('All'); ?>
+ </td>
+</tr>
+<tr>
+ <td><?php echo _('User'); ?>:</td>
+ <td colspan="3">
+ <?php show_user_select('user'); ?>
+ </td>
+</tr>
+<tr>
+ <td colspan="4"><h4><?php echo _('RPC Options'); ?></h4></td>
+</tr>
+<tr>
+ <td><?php echo _('Remote Key'); ?>:</td>
+ <td colspan="3">
+ <input type="text" name="key" value="<?php echo scrub_out($_REQUEST['end']); ?>" maxlength="32" />
+ </td>
+</tr>
+</table>
+<div class="formValidation">
+ <?php Core::form_register('add_acl'); ?>
+ <input class="button" type="submit" value="<?php echo _('Create ACL'); ?>" />
+</div>
+</form>
+<?php show_box_bottom(); ?>
diff --git a/templates/show_add_access_local.inc.php b/templates/show_add_access_local.inc.php
new file mode 100644
index 00000000..f7332f9d
--- /dev/null
+++ b/templates/show_add_access_local.inc.php
@@ -0,0 +1,86 @@
+<?php
+/*
+
+ Copyright (c) Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License v2
+ as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+?>
+<?php show_box_top(_('Add Local Network Definition')); ?>
+<form name="update_catalog" method="post" enctype="multipart/form-data" action="<?php echo Config::get('web_path'); ?>/admin/access.php?action=add_host">
+<table class="tabledata" cellpadding="5" cellspacing="0">
+<tr>
+ <td><?php echo _('Name'); ?>:</td>
+ <td colspan="3">
+ <input type="text" name="name" value="<?php echo scrub_out($_REQUEST['name']); ?>" size="20" />
+ </td>
+</tr>
+<tr>
+ <td><?php echo _('Level'); ?>:</td>
+ <td colspan="3">
+ <input name="level" type="radio" value="5" /> <?php echo _('View'); ?>
+ <input name="level" type="radio" value="25" /> <?php echo _('Read'); ?>
+ <input name="level" type="radio" checked="checked" value="50" /> <?php echo _('Read/Write'); ?>
+ <input name="level" type="radio" value="75" /> <?php echo _('All'); ?>
+ </td>
+</tr>
+<tr>
+ <td><?php echo _('User'); ?>:</td>
+ <td colspan="3">
+ <?php show_user_select('user'); ?>
+ </td>
+</tr>
+
+<tr>
+ <td valign="top"><?php echo _('Type'); ?>:</td>
+ <td colspan="3">
+ <input type="radio" name="type" value="network" /><?php echo _('Local Network Definition'); ?><br />
+ <input type="radio" name="type" value="streamnetwork" /><?php echo _('Local Network Definition'); ?> + <?php echo _('Stream Access'); ?> + <?php echo _('Web Interface'); ?><br />
+ <input type="radio" name="type" value="allnetwork" checked="checked" /><?php echo _('Local Network Definition'); ?> + <?php echo _('All'); ?><br />
+ </td>
+</tr>
+<tr>
+ <td colspan="4"><h4><?php echo _('RPC Options'); ?></h4></td>
+</tr>
+<tr>
+ <td><?php echo _('Remote Key'); ?>:</td>
+ <td colspan="3">
+ <input type="text" name="key" value="<?php echo scrub_out($_REQUEST['end']); ?>" maxlength="32" />
+ </td>
+</tr>
+
+<tr>
+ <td colspan="4"><h3><?php echo _('IPv4 or IPv6 Addresses'); ?></h3>
+ <span class="information">(255.255.255.255) / (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff)</span>
+ </td>
+</tr>
+<tr>
+ <td><?php echo _('Start'); ?>:</td>
+ <td>
+ <input type="text" name="start" value="<?php echo scrub_out($_REQUEST['start']); ?>" size="20" maxlength="15" />
+ </td>
+ <td><?php echo _('End'); ?>:</td>
+ <td>
+ <input type="text" name="end" value="<?php echo scrub_out($_REQUEST['end']); ?>" size="20" maxlength="15" />
+ </td>
+</tr>
+</table>
+<div class="formValidation">
+ <?php Core::form_register('add_acl'); ?>
+ <input class="button" type="submit" value="<?php echo _('Create ACL'); ?>" />
+</div>
+</form>
+<?php show_box_bottom(); ?>
diff --git a/templates/show_add_access_rpc.inc.php b/templates/show_add_access_rpc.inc.php
new file mode 100644
index 00000000..c23bfb36
--- /dev/null
+++ b/templates/show_add_access_rpc.inc.php
@@ -0,0 +1,86 @@
+<?php
+/*
+
+ Copyright (c) Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License v2
+ as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+?>
+<?php show_box_top(_('Add API / RPC Host')); ?>
+<form name="update_catalog" method="post" enctype="multipart/form-data" action="<?php echo Config::get('web_path'); ?>/admin/access.php?action=add_host">
+<table class="tabledata" cellpadding="5" cellspacing="0">
+<tr>
+ <td><?php echo _('Name'); ?>:</td>
+ <td colspan="3">
+ <input type="text" name="name" value="<?php echo scrub_out($_REQUEST['name']); ?>" size="20" />
+ </td>
+</tr>
+<tr>
+ <td><?php echo _('Level'); ?>:</td>
+ <td colspan="3">
+ <input name="level" type="radio" value="5" /> <?php echo _('View'); ?>
+ <input name="level" type="radio" value="25" /> <?php echo _('Read'); ?>
+ <input name="level" type="radio" checked="checked" value="50" /> <?php echo _('Read/Write'); ?>
+ <input name="level" type="radio" value="75" /> <?php echo _('All'); ?>
+ </td>
+</tr>
+<tr>
+ <td><?php echo _('User'); ?>:</td>
+ <td colspan="3">
+ <?php show_user_select('user'); ?>
+ </td>
+</tr>
+
+<tr>
+ <td valign="top"><?php echo _('Type'); ?>:</td>
+ <td colspan="3">
+ <input type="radio" name="type" value="rpc" /><?php echo _('RPC'); ?><br />
+ <input type="radio" name="type" value="streamrpc" checked="checked" /><?php echo _('RPC'); ?> + <?php echo _('Stream Access'); ?><br />
+ <input type="radio" name="type" value="allrpc" /><?php echo _('RPC'); ?> + <?php echo _('All'); ?>
+ </td>
+</tr>
+<tr>
+ <td colspan="4"><h4><?php echo _('RPC Options'); ?></h4></td>
+</tr>
+<tr>
+ <td><?php echo _('Remote Key'); ?>:</td>
+ <td colspan="3">
+ <input type="text" name="key" value="<?php echo scrub_out($_REQUEST['key']); ?>" maxlength="32" />
+ </td>
+</tr>
+
+<tr>
+ <td colspan="4"><h3><?php echo _('IPv4 or IPv6 Addresses'); ?></h3>
+ <span class="information">(255.255.255.255) / (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff)</span>
+ </td>
+</tr>
+<tr>
+ <td><?php echo _('Start'); ?>:</td>
+ <td>
+ <input type="text" name="start" value="<?php echo scrub_out($_REQUEST['start']); ?>" size="20" maxlength="15" />
+ </td>
+ <td><?php echo _('End'); ?>:</td>
+ <td>
+ <input type="text" name="end" value="<?php echo scrub_out($_REQUEST['end']); ?>" size="20" maxlength="15" />
+ </td>
+</tr>
+</table>
+<div class="formValidation">
+ <?php Core::form_register('add_acl'); ?>
+ <input class="button" type="submit" value="<?php echo _('Create ACL'); ?>" />
+</div>
+</form>
+<?php show_box_bottom(); ?>
diff --git a/templates/sidebar_admin.inc.php b/templates/sidebar_admin.inc.php
index ae57583d..490d497a 100644
--- a/templates/sidebar_admin.inc.php
+++ b/templates/sidebar_admin.inc.php
@@ -36,7 +36,7 @@
</li>
<li><h4><?php echo _('Access Control'); ?></h4>
<ul class="sb3" id="sb_admin_acl">
- <li id="sb_admin_acl_AddAccess"><a href="<?php echo $web_path; ?>/admin/access.php?action=show_add_host"><?php echo _('Add ACL'); ?></a></li>
+ <li id="sb_admin_acl_AddAccess"><a href="<?php echo $web_path; ?>/admin/access.php?action=show_add_advanced"><?php echo _('Add ACL'); ?></a></li>
<li id="sb_admin_acl_ShowAccess"><a href="<?php echo $web_path; ?>/admin/access.php"><?php echo _('Show ACL(s)'); ?></a></li>
</ul>
</li>