1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-03 09:49:30 +02:00

add new ACL creation forms, none of them work yet, remove wrong icon... add correct icon

This commit is contained in:
Karl 'vollmerk' Vollmer 2009-01-31 22:49:29 +00:00
parent c0916ab7e9
commit babecb6cd0
9 changed files with 270 additions and 34 deletions

View file

@ -45,12 +45,13 @@ switch ($_REQUEST['action']) {
show_confirmation(_('Updated'),_('Access List Entry updated'),'admin/access.php'); show_confirmation(_('Updated'),_('Access List Entry updated'),'admin/access.php');
break; break;
case 'show_add_current': case 'show_add_current':
require_once Config::get('prefix') . '/templates/show_add_access_current.inc.php';
break; break;
case 'show_add_rpc': case 'show_add_rpc':
require_once Config::get('prefix') . '/templates/show_add_access_rpc.inc.php';
break; break;
case 'show_add_local': case 'show_add_local':
require_once Config::get('prefix') . '/templates/show_add_access_local.inc.php';
break; break;
case 'show_add_advanced': case 'show_add_advanced':
require_once Config::get('prefix') . '/templates/show_add_access.inc.php'; require_once Config::get('prefix') . '/templates/show_add_access.inc.php';

BIN
images/icon_add_key.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 703 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 612 B

View file

@ -23,7 +23,7 @@
***/ ***/
// SVN Fluf // SVN Fluf
$svn_version = trim('$Rev$','$'); $svn_version = 'Subversion ' . trim('$Rev$','$ ');
// Use output buffering, this gains us a few things and // Use output buffering, this gains us a few things and
// fixes some CSS issues // fixes some CSS issues
@ -88,7 +88,7 @@ if (!count($results)) {
} }
/** This is the version.... fluf nothing more... **/ /** 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['int_config_version'] = '9';
$results['raw_web_path'] = $results['web_path']; $results['raw_web_path'] = $results['web_path'];

View file

@ -1,7 +1,7 @@
<?php <?php
/* /*
Copyright (c) 2001 - 2007 Ampache.org Copyright (c) Ampache.org
All rights reserved. All rights reserved.
This program is free software; you can redistribute it and/or 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"> <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"> <table class="tabledata" cellpadding="5" cellspacing="0">
<tr> <tr>
<td><?php echo _('Name'); ?>:</td> <td><?php echo _('Name'); ?>:</td>
<td> <td colspan="3">
<input type="text" name="name" value="<?php echo scrub_out($_REQUEST['name']); ?>" size="20" /> <input type="text" name="name" value="<?php echo scrub_out($_REQUEST['name']); ?>" size="20" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td><?php echo _('Start IP Address'); ?>:</td> <td><?php echo _('Level'); ?>:</td>
<td> <td colspan="3">
<input type="text" name="start" value="<?php echo scrub_out($_REQUEST['start']); ?>" size="20" maxlength="15" /> <input name="level" type="radio" checked="checked" value="5" /> <?php echo _('View'); ?>
<span class="information">(255.255.255.255)</span> <input name="level" type="radio" value="25" /> <?php echo _('Read'); ?>
</td> <input name="level" type="radio" value="50" /> <?php echo _('Read/Write'); ?>
</tr> <input name="level" type="radio" value="75" /> <?php echo _('All'); ?>
<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> </td>
</tr> </tr>
<tr> <tr>
<td><?php echo _('User'); ?>:</td> <td><?php echo _('User'); ?>:</td>
<td> <td colspan="3">
<?php show_user_select('user'); ?> <?php show_user_select('user'); ?>
</td> </td>
</tr> </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> <tr>
<td><?php echo _('ACL Type'); ?>:</td> <td><?php echo _('ACL Type'); ?>:</td>
<td> <td colspan="3">
<select name="type"> <select name="type">
<option selected="selected" value="stream"><?php echo _('Stream Access'); ?></option> <option selected="selected" value="stream"><?php echo _('Stream Access'); ?></option>
<option value="interface"><?php echo _('Web Interface'); ?></option> <option value="interface"><?php echo _('Web Interface'); ?></option>
@ -71,16 +56,33 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2"><h4><?php echo _('RPC Options'); ?></h4></td> <td colspan="4"><h4><?php echo _('RPC Options'); ?></h4></td>
</tr> </tr>
<tr> <tr>
<td><?php echo _('Remote Key'); ?>:</td> <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> <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> </td>
</tr> </tr>
</table> </table>
<div class="formValidation"> <div class="formValidation">
<?php Core::form_register('add_acl'); ?>
<input class="button" type="submit" value="<?php echo _('Create ACL'); ?>" /> <input class="button" type="submit" value="<?php echo _('Create ACL'); ?>" />
</div> </div>
</form> </form>

View file

@ -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(); ?>

View file

@ -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(); ?>

View file

@ -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(); ?>

View file

@ -36,7 +36,7 @@
</li> </li>
<li><h4><?php echo _('Access Control'); ?></h4> <li><h4><?php echo _('Access Control'); ?></h4>
<ul class="sb3" id="sb_admin_acl"> <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> <li id="sb_admin_acl_ShowAccess"><a href="<?php echo $web_path; ?>/admin/access.php"><?php echo _('Show ACL(s)'); ?></a></li>
</ul> </ul>
</li> </li>