Update of /cvsroot/webnotes/webnotes In directory usw-pr-cvs1:/tmp/cvs-serv9087 Modified Files: admin_manage_users.php Added Files: admin_manage_users_delete.php admin_manage_users_delete_page.php admin_manage_users_edit.php admin_manage_users_update.php Log Message: initial checkin of user management code. not functional. --- NEW FILE: admin_manage_users_delete.php --- <?php # phpWebNotes - a php based note addition system # Copyright (C) 2000-2002 Webnotes Team - web...@so... # This program is distributed under the terms and conditions of the GPL # See the files README and LICENSE for details # -------------------------------------------------------- # $Id: admin_manage_users_delete.php,v 1.1 2002/09/30 02:38:12 prescience Exp $ # -------------------------------------------------------- require_once( 'core' . DIRECTORY_SEPARATOR . 'api.php' ); login_cookie_check(); access_ensure_check_action( ACTION_USERS_DELETE ); util_header_redirect( $g_admin_manage_users ); ?> --- NEW FILE: admin_manage_users_delete_page.php --- <?php # phpWebNotes - a php based note addition system # Copyright (C) 2000-2002 Webnotes Team - web...@so... # This program is distributed under the terms and conditions of the GPL # See the files README and LICENSE for details # -------------------------------------------------------- # $Id: admin_manage_users_delete_page.php,v 1.1 2002/09/30 02:38:12 prescience Exp $ # -------------------------------------------------------- require_once( 'core' . DIRECTORY_SEPARATOR . 'api.php' ); login_cookie_check(); access_ensure_check_action( ACTION_USERS_DELETE ); print_html_top(); print_head_top(); print_title( $g_window_title ); print_css( $g_css_inc_file ); print_head_bottom(); print_body_top(); print_header( $g_page_title ); print_top_page( $g_top_page_inc ); print_admin_menu(); print_footer( __FILE__ ); print_bottom_page( $g_bottom_page_inc ); print_body_bottom(); print_html_bottom(); ?> --- NEW FILE: admin_manage_users_edit.php --- <?php # phpWebNotes - a php based note addition system # Copyright (C) 2000-2002 Webnotes Team - web...@so... # This program is distributed under the terms and conditions of the GPL # See the files README and LICENSE for details # -------------------------------------------------------- # $Id: admin_manage_users_edit.php,v 1.1 2002/09/30 02:38:12 prescience Exp $ # -------------------------------------------------------- require_once( 'core' . DIRECTORY_SEPARATOR . 'api.php' ); login_cookie_check(); access_ensure_check_action( ACTION_USERS_EDIT ); print_html_top(); print_head_top(); print_title( $g_window_title ); print_css( $g_css_inc_file ); print_head_bottom(); print_body_top(); print_header( $g_page_title ); print_top_page( $g_top_page_inc ); print_admin_menu(); $f_id = gpc_get( 'f_id' ); $t_user_array = user_get_row( $f_id ); extract( $t_user_array, EXTR_PREFIX_ALL, 'v' ); ?> <div algin="center"> <form method="post" action="<?php echo $g_admin_manage_users_update ?>"> <input type="hidden" name="f_id" value="?php echo $v_id ?>" /> <table> <tr> <th colspan="2"> Update User </th> </tr> <tr> <td> Username </td> <td> <?php echo $v_username ?> </td> </tr> <tr> <td> Email </td> <td> <input type="text" name="f_email" value="<?php echo $v_email ?>" /> </td> </tr> <tr> <td> Password </td> <td> <input type="password" name="f_password" value="" /> </td> </tr> <tr> <td> Password Confirm </td> <td> <input type="password" name="f_password_confirm" value="" /> </td> </tr> <tr> <td> Access Level </td> <td> <input type="text" name="f_access_level" value="<?php echo $v_access_level ?>" /> </td> </tr> <tr> <td> Enabled </td> <td> <input type="checkbox" name="f_enabled" <?php if ( 1 == $v_enabled ) echo 'checked="checked"' ?> /> </td> </tr> <tr> <td> </td> <td> <input type="submit" value="Update User" /> <?php # @@@ LOCALIZE ?> </td> </tr> </table> </form> </div> <?php print_footer( __FILE__ ); print_bottom_page( $g_bottom_page_inc ); print_body_bottom(); print_html_bottom(); ?> --- NEW FILE: admin_manage_users_update.php --- <?php # phpWebNotes - a php based note addition system # Copyright (C) 2000-2002 Webnotes Team - web...@so... # This program is distributed under the terms and conditions of the GPL # See the files README and LICENSE for details # -------------------------------------------------------- # $Id: admin_manage_users_update.php,v 1.1 2002/09/30 02:38:12 prescience Exp $ # -------------------------------------------------------- require_once( 'core' . DIRECTORY_SEPARATOR . 'api.php' ); login_cookie_check(); access_ensure_check_action( ACTION_USERS_EDIT ); util_header_redirect( $g_admin_manage_users ); ?> Index: admin_manage_users.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin_manage_users.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- admin_manage_users.php 21 Sep 2002 02:44:32 -0000 1.4 +++ admin_manage_users.php 30 Sep 2002 02:38:12 -0000 1.5 @@ -30,14 +30,14 @@ #echo '<div class="pwn-box" align="center">'; echo '<table class="pwn-width100" border="0" width="95%" cellspacing="0">'; - echo "<thead><tr class=\"pwn-category\"><td>User Name</td><td>Email</td><td>Access Level</td><td>Enabled</td></tr></thead><tbody>"; + echo '<thead><tr class="pwn-category"><td></td><td>Email</td><td>Access Level</td><td>Enabled</td></tr></thead><tbody>'; $i = 0; foreach ( $t_users_array as $user ) { extract( $user, EXTR_PREFIX_ALL, 'v' ); $v_enabled = $v_enabled ? 'x' : ' '; $t_color = util_alternate_colors( $i++ ); $t_access_level = enum_get_element( 'access_levels', $v_access_level ); - echo "<tr bgcolor=\"$t_color\"><td>$v_username</td><td>$v_email</td><td>$t_access_level</td><td>$v_enabled</td></tr>"; + echo "<tr bgcolor=\"$t_color\"><td><a href=\"$g_admin_manage_users_edit?f_id=$v_id\">$v_username</a></td><td>$v_email</td><td>$t_access_level</td><td>$v_enabled</td></tr>"; } echo '</tbody></table>'; #echo '</div>'; |