- Timestamp:
- Feb 13, 2005, 8:53:07 PM (19 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/profile.php
r709 r741 209 209 } 210 210 } 211 else if (defined('IN_ADMIN') and IN_ADMIN and isset($_POST['submit_add'])) 212 { 213 $errors = register_user($_POST['login'], $_POST['password'], 214 $_POST['password'], ''); 215 } 211 216 // +-----------------------------------------------------------------------+ 212 217 // | page header and options | … … 228 233 if (defined('IN_ADMIN') and IN_ADMIN and empty($userdata)) 229 234 { 235 $admin_profile = add_session_id(PHPWG_ROOT_PATH.'admin.php?page=profile'); 236 237 $template->assign_block_vars('add_user', array('F_ACTION'=>$admin_profile)); 230 238 $template->assign_block_vars('select_user',array()); 231 232 $admin_profile = add_session_id(PHPWG_ROOT_PATH.'admin.php?page=profile');233 239 234 240 $conf['users_page'] = 20; … … 254 260 'L_FIND_USERNAME'=>$lang['Find_username'], 255 261 'L_AUTH_USER'=>$lang['permuser_only_private'], 262 'L_GROUP_ADD_USER' => $lang['group_add_user'], 256 263 'L_SUBMIT'=>$lang['submit'], 257 264 'L_STATUS'=>$lang['user_status'], 258 265 'L_USERNAME' => $lang['login'], 266 'L_PASSWORD' => $lang['password'], 259 267 'L_EMAIL' => $lang['mail_address'], 260 268 'L_ORDER_BY' => $lang['order_by'], … … 427 435 $template->assign_vars(array('U_RETURN' => add_session_id($url_return))); 428 436 } 429 //-------------------------------------------------------------- errors display430 if (count($errors) != 0)431 {432 $template->assign_block_vars('modify.errors',array());433 foreach ($errors as $error)434 {435 $template->assign_block_vars('modify.errors.error',436 array('ERROR'=>$error));437 }438 }439 437 //------------------------------------------------------------- user management 440 438 if (defined('IN_ADMIN') and IN_ADMIN) … … 466 464 } 467 465 // +-----------------------------------------------------------------------+ 466 // | errors display | 467 // +-----------------------------------------------------------------------+ 468 if (count($errors) != 0) 469 { 470 $template->assign_block_vars('errors',array()); 471 foreach ($errors as $error) 472 { 473 $template->assign_block_vars('errors.error', array('ERROR'=>$error)); 474 } 475 } 476 // +-----------------------------------------------------------------------+ 468 477 // | html code display | 469 478 // +-----------------------------------------------------------------------+ -
trunk/template/default/profile.tpl
r709 r741 1 <!-- BEGIN errors --> 2 <div class="errors"> 3 <ul> 4 <!-- BEGIN error --> 5 <li>{errors.error.ERROR}</li> 6 <!-- END error --> 7 </ul> 8 </div> 9 <!-- END errors --> 10 11 <!-- BEGIN add_user --> 12 <div class="admin">{L_GROUP_ADD_USER}</div> 13 <form method="post" name="post" action="{add_user.F_ACTION}"> 14 {L_USERNAME} <input type="text" name="login" maxlength="50" size="20" /> 15 {L_PASSWORD} <input type="text" name="password" /> 16 <input type="submit" name="submit_add" value="add" class="bouton" /> 17 </form> 18 <!-- END add_user --> 19 1 20 <!-- BEGIN select_user --> 2 21 <div class="admin">{L_SELECT_USERNAME}</div> … … 51 70 <div class="titrePage">{L_TITLE}</div> 52 71 <!-- END profile --> 53 <!-- BEGIN errors -->54 <div class="errors">55 <ul>56 <!-- BEGIN error -->57 <li>{modify.errors.error.ERROR}</li>58 <!-- END error -->59 </ul>60 </div>61 <!-- END errors -->62 72 <form method="post" action="{F_ACTION}"> 63 73 <table width="70%" align="center">
Note: See TracChangeset
for help on using the changeset viewer.