diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-06-21 14:48:21 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-06-21 14:48:21 +0000 |
commit | a7e50222a51424ac0f101c7abe9f19b1f763b975 (patch) | |
tree | b8b957c7240240912d0beeb6aeae2866f86d38d0 /templates/show_users.inc | |
parent | 2ea7061ed6d4eb2c45f173f5168956b23b5295ca (diff) | |
download | ampache-a7e50222a51424ac0f101c7abe9f19b1f763b975.tar.gz ampache-a7e50222a51424ac0f101c7abe9f19b1f763b975.tar.bz2 ampache-a7e50222a51424ac0f101c7abe9f19b1f763b975.zip |
new disabled support
Diffstat (limited to 'templates/show_users.inc')
-rw-r--r-- | templates/show_users.inc | 58 |
1 files changed, 24 insertions, 34 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&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&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&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&user=$user->username&level=user\">" . _("set to user") . "</a></td>"; - echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&user=$user->username&level=disabled\">" . _("disable") . "</a></td>"; + if ($user->disabled == '1') { + echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&user=$user->username&level=enabled\">" . _("Enable") . "</a></td>"; } - elseif ($user->access == 'user') { - echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&user=$user->username&level=admin\">" . _("set to admin") . "</a></td>"; - echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&user=$user->username&level=disabled\">" . _("disable") . "</a></td>"; - } - elseif ($user->access == 'disabled') { - echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&user=$user->username&level=admin\">" . _("set to admin") . "</a></td>"; - echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&user=$user->username&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&level=user\">" . _("set to user") . "</a></td>"; - echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&user=$user->username&level=disabled\">" . _("disable") ."</a></td>"; + else { + echo "<td><a href=\"".conf('web_path')."/admin/users.php?action=update&user=$user->username&level=disabled\">" . _("Disable") ."</a></td>"; } - if ( $user->is_logged_in() and $user->is_online() ) { - echo "<td bgcolor=\"green\"> </td>"; - } - else { - echo "<td bgcolor=\"red\"> </td>"; - } ?> +<td> + <a href="<?php echo conf('web_path'); ?>/admin/users.php?action=delete&user=<?php echo $user->username; ?>"> + <?php echo _("delete"); ?> + </a> +</td> + <?php + if ( $user->is_logged_in() and $user->is_online() ) { + echo "<td bgcolor=\"green\"> </td>"; + } elseif ( $user->disabled == 1) { + echo "<td bgcolor=\"gray\"> </td>"; + } else { + echo "<td bgcolor=\"darkred\"> </td>"; + } +?> </tr> <?php } ?> </table> |