diff options
Diffstat (limited to 'templates/show_edit_user.inc.php')
-rw-r--r-- | templates/show_edit_user.inc.php | 66 |
1 files changed, 26 insertions, 40 deletions
diff --git a/templates/show_edit_user.inc.php b/templates/show_edit_user.inc.php index 675c6224..fc6dd546 100644 --- a/templates/show_edit_user.inc.php +++ b/templates/show_edit_user.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 @@ -19,60 +19,49 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -if ($type === 'new_user') { - $userfield = "<input type=\"text\" name=\"new_username\" size=\"30\" value=\"" . scrub_out($username) . "\" />"; - $title = _('Adding a New User'); -} -else { - $userfield = scrub_out($username); - $title = _('Editing existing User'); -} ?> - -<br /> -<?php show_box_top($title); ?> +<?php show_box_top(_('Editing existing User')); ?> <?php $GLOBALS['error']->print_error('general'); ?> -<form name="update_user" method="post" action="<?php echo conf('web_path') . "/admin/users.php"; ?>"> -<table cellspacing="0" cellpadding="0" border="0"> +<form name="update_user" enctype="multipart/form-data" method="post" action="<?php echo conf('web_path') . "/admin/users.php"; ?>"> +<table class="tabledata" cellspacing="0" cellpadding="0" border="0"> <tr> <td> - <?php echo _('Username'); ?>: + <?php echo _('Username'); ?>: </td> <td> - <?php echo $userfield; ?> + <input type="text" name="username" size="30" maxlength="128" value="<?php echo scrub_out($working_user->username); ?>" /> <?php $GLOBALS['error']->print_error('username'); ?> </td> </tr> <tr> - <td><?php echo _('Full Name'); ?>:</td> + <td><?php echo _('Full Name'); ?>:</td> <td> - <input type="text" name="new_fullname" size="30" value="<?php echo scrub_out($fullname); ?>" /> + <input type="text" name="fullname" size="30" value="<?php echo scrub_out($working_user->fullname); ?>" /> </td> </tr> <tr> <td> - <?php echo _('E-mail'); ?>: + <?php echo _('E-mail'); ?>: </td> <td> - <input type="text" name="new_email" size="30" value="<?php echo scrub_out($email); ?>" /> + <input type="text" name="email" size="30" value="<?php echo scrub_out($working_user->email); ?>" /> </td> </tr> <tr> <td> - <?php echo _('Password'); ?> : + <?php echo _('Password'); ?> : </td> <td> - <input type="password" name="new_password_1" size="30" value="" /> + <input type="password" name="password_1" size="30" value="" /> <?php $GLOBALS['error']->print_error('password'); ?> </td> </tr> <tr> <td> - <?php echo _('Confirm Password'); ?>: + <?php echo _('Confirm Password'); ?>: </td> <td> - <input type="password" name="new_password_2" size="30" value="" /> + <input type="password" name="password_2" size="30" value="" /> </td> </tr> <tr> @@ -80,24 +69,21 @@ else { <?php echo _('User Access Level'); ?>: </td> <td> - <select name="user_access"> - <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> + <?php $var_name = "on_" . $working_user->access; ${$var_name} = 'selected="selected"'; ?> + <select name="access"> + <option value="1" <?php echo $on_1; ?>><?php echo _('Guest'); ?></option> + <option value="25" <?php echo $on_25; ?>><?php echo _('User'); ?></option> + <option value="100" <?php echo $on_100; ?>><?php echo _('Admin'); ?></option> </select> </td> </tr> +<tr> + <td colspan="2"> + <input type="hidden" name="action" value="update_user" /> + <input type="submit" value="<?php echo _('Update User'); ?>" /> + <input type="hidden" name="user_id" value="<?php echo $working_user->id; ?>" /> + </td> +</tr> </table> -<?php -if ($type == 'new_user') { - echo "<input type=\"hidden\" name=\"action\" value=\"add_user\" />"; - echo "<input type=\"submit\" value=\"" . _('Add User') . "\" />"; -} -else { - echo "<input type=\"hidden\" name=\"action\" value=\"update_user\" />\n"; - echo "<input type=\"submit\" value=\"" . _('Update User') . "\" />\n"; - echo "<input type=\"hidden\" name=\"new_username\" value=\"$id\" />"; -} -?> </form> <?php show_box_bottom(); ?> |