summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-09-25 01:05:23 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-09-25 01:05:23 +0000
commite32557bf900153c5cfb0d2f28640aa9091ef7488 (patch)
tree56e2d9b722c582d536a6b3e8065914851894db72 /templates
parent3ad79fc4c9a6718a336fd929e33b6a0ac9bbf173 (diff)
downloadampache-e32557bf900153c5cfb0d2f28640aa9091ef7488.tar.gz
ampache-e32557bf900153c5cfb0d2f28640aa9091ef7488.tar.bz2
ampache-e32557bf900153c5cfb0d2f28640aa9091ef7488.zip
finished up ACL work
Diffstat (limited to 'templates')
-rw-r--r--templates/default.css1
-rw-r--r--templates/show_access_list.inc5
-rw-r--r--templates/show_add_access.inc50
-rw-r--r--templates/show_edit_access.inc34
4 files changed, 65 insertions, 25 deletions
diff --git a/templates/default.css b/templates/default.css
index 5939425a..d6bd5b98 100644
--- a/templates/default.css
+++ b/templates/default.css
@@ -506,6 +506,7 @@ li.current-rating{
}
.box-title {
border-bottom: solid 1px; #000000;
+ font-size: 1.05em;
font-weight: bold;
}
.box-left-top {
diff --git a/templates/show_access_list.inc b/templates/show_access_list.inc
index 13a24fbd..20dddab0 100644
--- a/templates/show_access_list.inc
+++ b/templates/show_access_list.inc
@@ -44,7 +44,7 @@ stream from this server.</p>
<a href="<?php echo $web_path; ?>/admin/access.php?action=show_add_host"><?php echo _('Add Entry'); ?></a>
</span>
</p>
-
+<?php if (count($list)) { ?>
<table cellspacing="1" cellpadding="3" class="border">
<tr class="table-header" align="center">
<td><?php echo _('Name'); ?></td>
@@ -57,7 +57,6 @@ stream from this server.</p>
<td><?php echo _('Action'); ?></td>
</tr>
<?php
-if (count($list)) {
/* Start foreach List Item */
foreach ($list as $access) {
?>
@@ -77,7 +76,7 @@ if (count($list)) {
</tr>
<?php $row_classes = array_reverse($row_classes); ?>
<?php } // end foreach ?>
-<?php } // end if count ?>
</table>
+<?php } // end if count ?>
<?php show_box_bottom(); ?>
diff --git a/templates/show_add_access.inc b/templates/show_add_access.inc
index 9c878365..237f0c6f 100644
--- a/templates/show_add_access.inc
+++ b/templates/show_add_access.inc
@@ -19,10 +19,6 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-
-/*!
- @header Add Access List Entry
-*/
?>
<?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>
@@ -31,39 +27,65 @@
<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" />
+ <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 $_REQUEST['start']; ?>" size="20" maxlength="15" />
+ <input type="text" name="start" value="<?php echo scrub_out($_REQUEST['start']); ?>" size="20" maxlength="15" />
</td>
</tr>
<tr>
<td><?php echo _('End IP Address'); ?>:</td>
<td>
- <input type="text" name="end" value="<?php echo $_REQUEST['end']; ?>" size="20" maxlength="15" />
+ <input type="text" name="end" value="<?php echo scrub_out($_REQUEST['end']); ?>" size="20" maxlength="15" />
+ </td>
+</tr>
+<tr>
+ <td><?php echo _('User'); ?>:</td>
+ <td>
+ <?php show_user_select('user'); ?>
</td>
</tr>
<tr>
<td><?php echo _('Level'); ?>:</td>
<td>
<select name="level">
- <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>
+ <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>
+ <select name="type">
+ <option selected="selected" value="stream"><?php echo _('Stream Access'); ?></option>
+ <option value="interface"><?php echo _('Web Interface'); ?></option>
+ <option value="network"><?php echo _('Local Network Definition'); ?></option>
+ <option vlaue="xml-rpc"><?php echo _('XML-RPC'); ?></option>
</select>
</td>
</tr>
<tr>
- <td>&nbsp;</td>
+ <td colspan="2"><br /><?php echo _('XML-RPC Options'); ?>:</td>
+</tr>
+<tr>
+ <td><?php echo _('Remote Key'); ?>:</td>
<td>
+ <input type="text" name="key" value="<?php echo scrub_out($_REQUEST['end']); ?>" size="32" maxlength="32" />
+ </td>
+</tr>
+<tr>
+ <td colspan="2">
+ <br />
<input type="hidden" name="action" value="add_host" />
- <input type="submit" value="<?php echo _('Add Host'); ?>" />
+ <input type="submit" value="<?php echo _('Create ACL'); ?>" />
</td>
</tr>
</table>
diff --git a/templates/show_edit_access.inc b/templates/show_edit_access.inc
index 95adad9e..21794aaf 100644
--- a/templates/show_edit_access.inc
+++ b/templates/show_edit_access.inc
@@ -20,16 +20,18 @@
*/
?>
-
-<p class="header1"><?php echo _('Edit Access List'); ?></p>
-
+<?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 class="text-box">
+<table>
<tr>
<td><?php echo _('Name'); ?>: </td>
<td><?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>
+</tr>
+<tr>
<td><?php echo _('Start IP Address'); ?>:</td>
<td>
<input type="text" name="start" value="<?php echo int2ip($access->start); ?>" size="20" maxlength="15" />
@@ -42,14 +44,29 @@
</td>
</tr>
<tr>
+ <td><?php echo _('User'); ?>:</td>
+ <td>
+ <?php show_user_select('user',$access->user); ?>
+ </td>
+</tr>
+<?php if ($access->type == 'xml-rpc') { ?>
+<tr>
+ <td><?php echo _('Remote Key'); ?></td>
+ <td>
+ <input type="text" name="key" value="<?php echo scrub_out($access->key); ?>" size="32" maxlength="32" />
+ </td>
+</tr>
+<?php } ?>
+</tr>
+<tr>
<td><?php echo _('Level'); ?>:</td>
<td>
<select name="level">
<?php $name = 'level_' . $access->level; ${$name} = 'selected="selected"'; ?>
- <option value="5" <?php echo $level_5; ?>><?php echo _('Demo'); ?></option>
- <option value="25" <?php echo $level_25; ?>><?php echo _('Stream'); ?></option>
- <option value="50" <?php echo $level_50; ?>><?php echo _('Stream/Download'); ?></option>
- <option value="75" <?php echo $level_75; ?>><?php echo _('XML-RPC'); ?></option>
+ <option value="5" <?php echo $level_5; ?>><?php echo _('View'); ?></option>
+ <option value="25" <?php echo $level_25; ?>><?php echo _('Read'); ?></option>
+ <option value="50" <?php echo $level_50; ?>><?php echo _('Read/Write'); ?></option>
+ <option value="75" <?php echo $level_75; ?>><?php echo _('All'); ?></option>
</select>
</td>
</tr>
@@ -63,3 +80,4 @@
</tr>
</table>
</form>
+<?php show_box_bottom(); ?>