| 1 |
<?php bb_get_header(); ?> |
|---|
| 2 |
|
|---|
| 3 |
<h3 class="bbcrumb"><a href="<?php bb_uri(); ?>"><?php bb_option('name'); ?></a> » <?php _e('Register'); ?></h3> |
|---|
| 4 |
|
|---|
| 5 |
<h2 id="register"><?php _e('Registration'); ?></h2> |
|---|
| 6 |
|
|---|
| 7 |
<?php if ( !bb_is_user_logged_in() ) : ?> |
|---|
| 8 |
|
|---|
| 9 |
<form method="post" action="<?php bb_uri('register.php', null, BB_URI_CONTEXT_FORM_ACTION + BB_URI_CONTEXT_BB_USER_FORMS); ?>"> |
|---|
| 10 |
|
|---|
| 11 |
<fieldset> |
|---|
| 12 |
<legend><?php _e('Profile Information'); ?></legend> |
|---|
| 13 |
|
|---|
| 14 |
<p><?php _e("Your password will be emailed to the address you provide."); ?></p> |
|---|
| 15 |
|
|---|
| 16 |
<?php |
|---|
| 17 |
|
|---|
| 18 |
$user_login_error = $bb_register_error->get_error_message( 'user_login' ); |
|---|
| 19 |
|
|---|
| 20 |
?> |
|---|
| 21 |
|
|---|
| 22 |
<table width="100%"> |
|---|
| 23 |
<tr class="required<?php if ( $user_login_error ) echo ' error'; ?>"> |
|---|
| 24 |
<th scope="row"><label for="user_login"><sup class="required">*</sup> <?php _e('Username:'); ?></label></th> |
|---|
| 25 |
<td><input name="user_login" type="text" id="user_login" size="30" maxlength="30" value="<?php echo $user_login; ?>" /><?php |
|---|
| 26 |
if ( $user_login_error ) |
|---|
| 27 |
echo "<br />$user_login_error"; |
|---|
| 28 |
?></td> |
|---|
| 29 |
</tr> |
|---|
| 30 |
|
|---|
| 31 |
<?php |
|---|
| 32 |
|
|---|
| 33 |
if ( is_array($profile_info_keys) ) : |
|---|
| 34 |
foreach ( $profile_info_keys as $key => $label ) : |
|---|
| 35 |
$class = ''; |
|---|
| 36 |
if ( $label[0] ) { |
|---|
| 37 |
$class .= 'required'; |
|---|
| 38 |
$label[1] = '<sup class="required">*</sup> ' . $label[1]; |
|---|
| 39 |
} |
|---|
| 40 |
if ( $profile_info_key_error = $bb_register_error->get_error_message( $key ) ) |
|---|
| 41 |
$class .= ' error'; |
|---|
| 42 |
|
|---|
| 43 |
?> |
|---|
| 44 |
|
|---|
| 45 |
<tr class="<?php echo $class; ?>"> |
|---|
| 46 |
<th scope="row"><label for="<?php echo $key; ?>"><?php echo $label[1]; ?>:</label></th> |
|---|
| 47 |
<td><input name="<?php echo $key; ?>" type="text" id="<?php echo $key; ?>" size="30" maxlength="140" value="<?php echo $$key; ?>" /><?php |
|---|
| 48 |
if ( $profile_info_key_error ) |
|---|
| 49 |
echo "<br />$profile_info_key_error"; |
|---|
| 50 |
?></td> |
|---|
| 51 |
</tr> |
|---|
| 52 |
|
|---|
| 53 |
<?php |
|---|
| 54 |
|
|---|
| 55 |
endforeach; |
|---|
| 56 |
endif; |
|---|
| 57 |
|
|---|
| 58 |
?> |
|---|
| 59 |
|
|---|
| 60 |
</table> |
|---|
| 61 |
|
|---|
| 62 |
<p><sup class="required">*</sup> <?php _e('These items are <span class="required">required</span>.') ?></p> |
|---|
| 63 |
|
|---|
| 64 |
</fieldset> |
|---|
| 65 |
|
|---|
| 66 |
<?php do_action('extra_profile_info', $user); ?> |
|---|
| 67 |
|
|---|
| 68 |
<p class="submit"> |
|---|
| 69 |
<input type="submit" name="Submit" value="<?php echo attribute_escape( __('Register »') ); ?>" /> |
|---|
| 70 |
</p> |
|---|
| 71 |
|
|---|
| 72 |
</form> |
|---|
| 73 |
|
|---|
| 74 |
<?php else : ?> |
|---|
| 75 |
|
|---|
| 76 |
<p><?php _e('You’re already logged in, why do you need to register?'); ?></p> |
|---|
| 77 |
|
|---|
| 78 |
<?php endif; ?> |
|---|
| 79 |
|
|---|
| 80 |
<?php bb_get_footer(); ?> |
|---|
| 81 |
|
|---|