summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-10-10 07:30:15 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-10-10 07:30:15 +0000
commitff58181d5b4ddd10b34062a0ad2204435e698cae (patch)
tree60b4654309d0826c81411790efe8448675a038bb /templates
parent32349846fbd66e4ebc44e63d37fbcd8cff5a8a73 (diff)
downloadampache-ff58181d5b4ddd10b34062a0ad2204435e698cae.tar.gz
ampache-ff58181d5b4ddd10b34062a0ad2204435e698cae.tar.bz2
ampache-ff58181d5b4ddd10b34062a0ad2204435e698cae.zip
fixed acls, fixed transcoding issues
Diffstat (limited to 'templates')
-rw-r--r--templates/show_access_list.inc.php54
-rw-r--r--templates/show_add_access.inc.php13
-rw-r--r--templates/show_confirmation.inc.php6
-rw-r--r--templates/show_edit_access.inc.php (renamed from templates/show_edit_access.inc)33
4 files changed, 50 insertions, 56 deletions
diff --git a/templates/show_access_list.inc.php b/templates/show_access_list.inc.php
index 15fb3417..1374b81a 100644
--- a/templates/show_access_list.inc.php
+++ b/templates/show_access_list.inc.php
@@ -26,7 +26,7 @@
*/
$web_path = Config::get('web_path');
?>
-<?php show_box_top(_('Host Access to Your Catalog')); ?>
+<?php show_box_top(_('Ampache Access Control')); ?>
<p>Since your catalog can be accessed remotely you may want to limit the access from
remote sources so you are not in violation of copyright laws. By default your
server will allow anyone with an account to stream music. It will not allow any
@@ -35,40 +35,38 @@ to add any server's IP address that you want to access your Ampache catalog or b
stream from this server.</p>
<p>
-<span class="text-action">
-<a href="<?php echo $web_path; ?>/admin/access.php?action=show_add_host"><?php echo _('Add Entry'); ?></a>
-</span>
+<a class="smallbutton" href="<?php echo $web_path; ?>/admin/access.php?action=show_add_host"><?php echo _('Add Entry'); ?></a>
</p>
<?php if (count($list)) { ?>
<table cellspacing="1" cellpadding="3" class="tabledata">
-<tr class="table-header" align="center">
- <td><?php echo _('Name'); ?></td>
- <td><?php echo _('Start Address'); ?></td>
- <td><?php echo _('End Address'); ?></td>
- <td><?php echo _('Level'); ?></td>
- <td><?php echo _('User'); ?></td>
- <td><?php echo _('Key'); ?></td>
- <td><?php echo _('Type'); ?></td>
- <td><?php echo _('Action'); ?></td>
+<tr class="table-data">
+ <th><?php echo _('Name'); ?></th>
+ <th><?php echo _('Start Address'); ?></th>
+ <th><?php echo _('End Address'); ?></th>
+ <th><?php echo _('Level'); ?></th>
+ <th><?php echo _('User'); ?></th>
+ <th><?php echo _('Key'); ?></th>
+ <th><?php echo _('Type'); ?></th>
+ <th><?php echo _('Action'); ?></th>
</tr>
<?php
/* Start foreach List Item */
- foreach ($list as $access) {
+ foreach ($list as $access_id) {
+ $access = new Access($access_id);
?>
- <tr class="<?php echo flip_class(); ?>">
- <td><?php echo scrub_out($access->name); ?></td>
- <td><?php echo int2ip($access->start); ?></td>
- <td><?php echo int2ip($access->end); ?></td>
- <td><?php echo $access->get_level_name(); ?></td>
- <td><?php echo $access->get_user_name(); ?></td>
- <td><?php echo $access->key; ?></td>
- <td><?php echo $access->get_type_name(); ?></td>
- <td>
- <a href="<?php echo $web_path; ?>/admin/access.php?action=show_edit_host&amp;access_id=<?php echo scrub_out($access->id); ?>"><?php echo _('Edit'); ?></a>
- |
- <a href="<?php echo $web_path; ?>/admin/access.php?action=show_confirm_delete&amp;access_id=<?php echo scrub_out($access->id); ?>"><?php print _("Revoke"); ?></a>
- </td>
- </tr>
+<tr class="<?php echo flip_class(); ?>">
+ <td><?php echo scrub_out($access->name); ?></td>
+ <td><?php echo int2ip($access->start); ?></td>
+ <td><?php echo int2ip($access->end); ?></td>
+ <td><?php echo $access->get_level_name(); ?></td>
+ <td><?php echo $access->get_user_name(); ?></td>
+ <td><?php echo $access->key; ?></td>
+ <td><?php echo $access->get_type_name(); ?></td>
+ <td>
+ <a href="<?php echo $web_path; ?>/admin/access.php?action=show_edit_record&amp;access_id=<?php echo scrub_out($access->id); ?>"><?php echo get_user_icon('edit'); ?></a>
+ <a href="<?php echo $web_path; ?>/admin/access.php?action=delete_record&amp;access_id=<?php echo scrub_out($access->id); ?>"><?php echo get_user_icon('delete'); ?></a>
+ </td>
+</tr>
<?php } // end foreach ?>
</table>
<?php } // end if count ?>
diff --git a/templates/show_add_access.inc.php b/templates/show_add_access.inc.php
index 81f6ccc1..506f9cda 100644
--- a/templates/show_add_access.inc.php
+++ b/templates/show_add_access.inc.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2006 Ampache.org
+ Copyright (c) 2001 - 2007 Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
@@ -20,10 +20,7 @@
*/
?>
<?php show_box_top(_('Add Access for a Host')); ?>
-<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 Config::get('web_path'); ?>/admin/access.php">
+<form name="update_catalog" method="post" enctype="multipart/form-data" action="<?php echo Config::get('web_path'); ?>/admin/access.php?action=add_host">
<table cellpadding="5" cellspacing="0">
<tr>
<td><?php echo _('Name'); ?>:</td>
@@ -45,8 +42,8 @@
</tr>
<tr>
<td><?php echo _('User'); ?>:</td>
- <!-- Stuff Goes Here -->
<td>
+ <?php show_user_select('user'); ?>
</td>
</tr>
<tr>
@@ -72,7 +69,7 @@
</td>
</tr>
<tr>
- <td colspan="2"><br /><?php echo _('XML-RPC Options'); ?>:</td>
+ <td colspan="2"><h4><?php echo _('XML-RPC Options'); ?></h4></td>
</tr>
<tr>
<td><?php echo _('Remote Key'); ?>:</td>
@@ -82,8 +79,6 @@
</tr>
<tr>
<td colspan="2">
- <br />
- <input type="hidden" name="action" value="add_host" />
<input class="button" type="submit" value="<?php echo _('Create ACL'); ?>" />
</td>
</tr>
diff --git a/templates/show_confirmation.inc.php b/templates/show_confirmation.inc.php
index 84a885d9..21b20ca3 100644
--- a/templates/show_confirmation.inc.php
+++ b/templates/show_confirmation.inc.php
@@ -22,10 +22,8 @@
<?php show_box_top(scrub_out($title)); ?>
<?php echo $text; ?>
<br />
-<div class="text-action">
- <a href="<?php echo $path; ?>"><?php echo _('Continue'); ?></a>
+ <a class="smallbutton" href="<?php echo $path; ?>"><?php echo _('Continue'); ?></a>
<?php if ($cancel) { ?>
- <a href="<?php echo Config::get('web_path') . "/" . return_referer(); ?>"><?php echo _('Cancel'); ?></a>
+ <a class="smallbutton" href="<?php echo Config::get('web_path') . "/" . return_referer(); ?>"><?php echo _('Cancel'); ?></a>
<?php } ?>
-</div>
<?php show_box_bottom(); ?>
diff --git a/templates/show_edit_access.inc b/templates/show_edit_access.inc.php
index 21794aaf..06a0feb8 100644
--- a/templates/show_edit_access.inc
+++ b/templates/show_edit_access.inc.php
@@ -1,13 +1,12 @@
<?php
/*
- Copyright (c) 2001 - 2006 Ampache.org
+ Copyright (c) 2001 - 2007 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
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
+ 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
@@ -20,16 +19,25 @@
*/
?>
-<?php show_box_top(_('Edit Access List')); ?>
-<form name="edit_access" method="post" enctype="multipart/form-data" action="<?php echo conf('web_path'); ?>/admin/access.php">
-<table>
+<?php show_box_top(_('Edit ACL')); ?>
+<form name="edit_access" method="post" enctype="multipart/form-data" action="<?php echo Config::get('web_path'); ?>/admin/access.php?action=update_record&amp;access_id=<?php echo intval($access->id); ?>">
+<table class="table-data">
<tr>
<td><?php echo _('Name'); ?>: </td>
- <td><?php echo scrub_out($access->name); ?></td>
+ <td><input type="textbox" name="name" value="<?php echo scrub_out($access->name); ?>" /></td>
</tr>
<tr>
<td><?php echo _('ACL Type'); ?>: </td>
- <td><?php echo scrub_out($access->get_type_name()); ?></td>
+ <td>
+ <select name="type">
+ <?php $name = 'sl_' . $access->type; ${$name} = ' selected="selected"'; ?>
+ <option value="stream"<?php echo $sl_stream; ?>><?php echo _('Stream Access'); ?></option>
+ <option value="interface"<?php echo $sl_interface; ?>><?php echo _('Web Interface'); ?></option>
+ <option value="network"<?php echo $sl_network; ?>><?php echo _('Local Network Definition'); ?></option>
+ <option value="xml-rpc"<?php echo $sl_xml-rpc; ?>><?php echo _('XML-RPC'); ?></option>
+ </select>
+ </td>
+
</tr>
<tr>
<td><?php echo _('Start IP Address'); ?>:</td>
@@ -71,12 +79,7 @@
</td>
</tr>
<tr>
- <td>&nbsp;</td>
- <td>
- <input type="hidden" name="access_id" value="<?php echo scrub_out($access->id); ?>" />
- <input type="hidden" name="action" value="update_host" />
- <input type="submit" value="<?php echo _('Update'); ?>" />
- </td>
+ <td colspan="2"><input type="submit" value="<?php echo _('Update'); ?>" /></td>
</tr>
</table>
</form>