summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-06-21 14:48:21 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-06-21 14:48:21 +0000
commita7e50222a51424ac0f101c7abe9f19b1f763b975 (patch)
treeb8b957c7240240912d0beeb6aeae2866f86d38d0 /templates
parent2ea7061ed6d4eb2c45f173f5168956b23b5295ca (diff)
downloadampache-a7e50222a51424ac0f101c7abe9f19b1f763b975.tar.gz
ampache-a7e50222a51424ac0f101c7abe9f19b1f763b975.tar.bz2
ampache-a7e50222a51424ac0f101c7abe9f19b1f763b975.zip
new disabled support
Diffstat (limited to 'templates')
-rw-r--r--templates/show_users.inc58
-rw-r--r--templates/userform.inc1
2 files changed, 24 insertions, 35 deletions
diff --git a/templates/show_users.inc b/templates/show_users.inc
index 3108b079..8ef7048a 100644
--- a/templates/show_users.inc
+++ b/templates/show_users.inc
@@ -55,13 +55,10 @@ $admin_menu = "admin/";
<b><?php echo _("Prefs"); ?></b>
</td>
<td align="center">
- <b><?php echo _("Delete"); ?></b>
- </td>
- <td align="center">
- <b><?php echo _("Set Access"); ?></b>
+ <b><?php echo _("Access"); ?></b>
</td>
- <td align="center">
- <b><?php echo _("Disable"); ?></b>
+ <td align="center">
+ <b><?php echo _("Delete"); ?></b>
</td>
<td align="center">
<b><?php echo _("On-line"); ?></b>
@@ -86,44 +83,37 @@ while ( $results = mysql_fetch_object($db_result) ) {
</td>
<td>
<a href="<?php echo conf('web_path'); ?>/admin/users.php?action=edit&amp;user=<?php echo $user->username; ?>">
- <?php echo _("edit"); ?>
+ <?php echo _("Edit"); ?>
</a>
</td>
<td>
<a href="<?php echo conf('web_path'); ?>/admin/preferences.php?action=user&amp;user_id=<?php echo $user->id; ?>">
- <?php echo _("prefs"); ?>
+ <?php echo _("Prefs"); ?>
</a>
</td>
- <td>
- <a href="<?php echo conf('web_path'); ?>/admin/users.php?action=delete&amp;user=<?php echo $user->username; ?>">
- <?php echo _("delete"); ?>
- </a>
- </td>
- <?php
+ <?php
//FIXME: Fix this for the extra permission levels
- if ($user->access == 'admin') {
- echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&amp;user=$user->username&amp;level=user\">" . _("set to user") . "</a></td>";
- echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&amp;user=$user->username&amp;level=disabled\">" . _("disable") . "</a></td>";
+ if ($user->disabled == '1') {
+ echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&amp;user=$user->username&amp;level=enabled\">" . _("Enable") . "</a></td>";
}
- elseif ($user->access == 'user') {
- echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&amp;user=$user->username&amp;level=admin\">" . _("set to admin") . "</a></td>";
- echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&amp;user=$user->username&amp;level=disabled\">" . _("disable") . "</a></td>";
- }
- elseif ($user->access == 'disabled') {
- echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&user=$user->username&amp;level=admin\">" . _("set to admin") . "</a></td>";
- echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&amp;user=$user->username&amp;level=user\">" . _("set to user") . "</a></td>";
- }
- elseif ($user->access == '1') {
- echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&user=$user->username&amp;level=user\">" . _("set to user") . "</a></td>";
- echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&amp;user=$user->username&amp;level=disabled\">" . _("disable") ."</a></td>";
+ else {
+ echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&amp;user=$user->username&amp;level=disabled\">" . _("Disable") ."</a></td>";
}
- if ( $user->is_logged_in() and $user->is_online() ) {
- echo "<td bgcolor=\"green\"> &nbsp; </td>";
- }
- else {
- echo "<td bgcolor=\"red\"> &nbsp; </td>";
- }
?>
+<td>
+ <a href="<?php echo conf('web_path'); ?>/admin/users.php?action=delete&amp;user=<?php echo $user->username; ?>">
+ <?php echo _("delete"); ?>
+ </a>
+</td>
+ <?php
+ if ( $user->is_logged_in() and $user->is_online() ) {
+ echo "<td bgcolor=\"green\"> &nbsp; </td>";
+ } elseif ( $user->disabled == 1) {
+ echo "<td bgcolor=\"gray\"> &nbsp; </td>";
+ } else {
+ echo "<td bgcolor=\"darkred\"> &nbsp; </td>";
+ }
+?>
</tr>
<?php } ?>
</table>
diff --git a/templates/userform.inc b/templates/userform.inc
index 3e487355..6ff5bfc9 100644
--- a/templates/userform.inc
+++ b/templates/userform.inc
@@ -85,7 +85,6 @@ else {
<option value="1" <?php if($access==='1') echo "selected=\"selected\""; ?>>Guest</option>
<option value="user" <?php if($access==='user') echo "selected=\"selected\""; ?>>User</option>
<option value="admin" <?php if($access==='admin') echo "selected=\"selected\""; ?>>Admin</option>
- <option value="disabled" <?php if($access==='diabled') echo "selected=\"selected\""; ?>>Disabled</option>
</select>
</td>
</tr>