Changeset 98
- Timestamp:
- Sep 14, 2003, 5:02:52 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/user_list.php
r57 r98 24 24 'listuser_delete_hint','listuser_delete','yes','no', 25 25 'listuser_button_all','listuser_button_invert', 26 'listuser_button_create_address' ); 26 'listuser_button_create_address','title_add','login','password', 27 'add','errors_title' ); 27 28 templatize_array( $tpl, 'lang', $sub ); 28 29 $vtp->setGlobalVar( $sub, 'user_template', $user['template'] ); 30 //------------------------------------------------------------------ add a user 31 $errors = array(); 32 if ( isset( $_POST['submit'] ) ) 33 { 34 $errors = register_user( 35 $_POST['username'], $_POST['password'], $_POST['password'], '', 'guest' ); 36 } 37 //-------------------------------------------------------------- errors display 38 if ( sizeof( $errors ) != 0 ) 39 { 40 $vtp->addSession( $sub, 'errors' ); 41 foreach ( $errors as $error ) { 42 $vtp->addSession( $sub, 'li' ); 43 $vtp->setVar( $sub, 'li.li', $error ); 44 $vtp->closeSession( $sub, 'li' ); 45 } 46 $vtp->closeSession( $sub, 'errors' ); 47 } 48 else 49 { 50 $_POST = array(); 51 } 29 52 //--------------------------------------------------------------- delete a user 30 53 if ( isset ( $_GET['delete'] ) and is_numeric( $_GET['delete'] ) ) … … 83 106 else 84 107 { 108 // add a user 109 $vtp->addSession( $sub, 'add_user' ); 110 $action = './admin.php?'.$_SERVER['QUERY_STRING']; 111 $vtp->setVar( $sub, 'add_user.form_action', $action ); 112 $vtp->setVar( $sub, 'add_user.f_username', $_POST['username'] ); 113 $vtp->closeSession( $sub, 'add_user' ); 114 85 115 $vtp->addSession( $sub, 'users' ); 86 116
Note: See TracChangeset
for help on using the changeset viewer.