Changeset 1434
- Timestamp:
- 08/25/08 11:15:05 (3 months ago)
- Files:
-
- branches/2.6/wp-activate.php (modified) (1 diff)
- trunk/wp-activate.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/2.6/wp-activate.php
r1328 r1434 8 8 require_once( ABSPATH . WPINC . '/registration.php'); 9 9 10 if( is_object( $wp_object_cache ) ) $wp_object_cache->cache_enabled = false; 10 if( is_object( $wp_object_cache ) ) 11 $wp_object_cache->cache_enabled = false; 11 12 12 13 do_action("activate_header"); 13 14 15 function wpmu_activate_stylesheet() { 16 ?> 17 <style type="text/css"> 18 form { margin-top: 2em; } 19 #submit, #key { width: 90%; font-size: 24px; } 20 #language { margin-top: .5em; } 21 .error { background: #f66; } 22 span.h3 { padding:0 8px; font-size:1.3em; font-family:'Trebuchet MS','Lucida Grande',Verdana,Arial,Sans-Serif; font-weight:700; color:#333333; } 23 </style> 24 <?php 25 } 26 add_action( 'wp_head', 'wpmu_activate_stylesheet' ); 27 14 28 get_header(); 15 29 ?> 30 16 31 <div id="content" class="widecolumn"> 17 <style type="text/css"> 18 form { margin-top: 2em; } 19 #submit, #key { 20 width: 90%; 21 font-size: 24px; 22 } 23 #language { 24 margin-top: .5em; 25 } 26 .error { 27 background-color: #f66; 28 } 29 </style> 30 <?php 31 if ( empty($_GET['key']) && empty($_POST['key']) ) { 32 ?> 33 <h2><?php _e('Activation Key Required') ?></h2> 34 <form name="activateform" id="activateform" method="post" action="<?php echo 'http://' . $current_site->domain . $current_site->path ?>wp-activate.php"> 35 <table border="0" width="100%" cellpadding="9"> 36 <tr> 37 <th valign="top"><?php _e('Activation Key:') ?></th> 38 <td><input name="key" type="text" id="key" value="" /></td> 39 </tr> 40 <tr> 41 <th scope="row" valign="top"> </th> 42 <td><input id="submit" type="submit" name="Submit" class="submit" value="<?php _e('Activate »') ?>" /></td> 43 </tr> 44 </table> 45 </form> 46 <?php 47 } else { 48 if ( ! empty($_GET['key']) ) 49 $key = $_GET['key']; 50 else 51 $key = $_POST['key']; 32 <?php if ( empty($_GET['key']) && empty($_POST['key']) ) { ?> 33 34 <h2><?php _e('Activation Key Required') ?></h2> 35 <form name="activateform" id="activateform" method="post" action="<?php echo 'http://' . $current_site->domain . $current_site->path ?>wp-activate.php"> 36 <p> 37 <label for="key"><?php _e('Activation Key:') ?></label> 38 <br /><input type="text" name="key" id="key" value="" size="50" /> 39 </p> 40 <p class="submit"> 41 <input id="submit" type="submit" name="Submit" class="submit" value="<?php _e('Activate »') ?>" /> 42 </p> 43 </form> 44 45 <?php } else { 52 46 53 $result = wpmu_activate_signup($key); 54 if ( is_wp_error($result) ) { 55 if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) { 56 $signup = $result->get_error_data(); 57 _e( '<h2>Your account is now active!</h2>' ); 58 if( $signup->domain . $signup->path == '' ) { 59 printf(__('<p class="lead-in">Your account has been activated. You may now <a href="%1$s">login</a> to the site using your chosen username of "%2$s". Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.</p>'), 'http://' . $current_site->domain . $current_site->path . 'wp-login.php', $signup->user_login, $signup->user_email, 'http://' . $current_site->domain . $current_site->path . 'wp-login.php?action=lostpassword'); 47 $key = !empty($_GET['key']) ? $_GET['key'] : $_POST['key']; 48 $result = wpmu_activate_signup($key); 49 if ( is_wp_error($result) ) { 50 if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) { 51 $signup = $result->get_error_data(); 52 ?> 53 <h2><?php _e('Your account is now active!'); ?></h2> 54 <?php 55 if( $signup->domain . $signup->path == '' ) { 56 printf(__('<p class="lead-in">Your account has been activated. You may now <a href="%1$s">login</a> to the site using your chosen username of "%2$s". Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.</p>'), 'http://' . $current_site->domain . $current_site->path . 'wp-login.php', $signup->user_login, $signup->user_email, 'http://' . $current_site->domain . $current_site->path . 'wp-login.php?action=lostpassword'); 57 } else { 58 printf(__('<p class="lead-in">Your blog at <a href="%1$s">%2$s</a> is active. You may now login to your blog using your chosen username of "%3$s". Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%5$s">reset your password</a>.</p>'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, 'http://' . $current_site->domain . $current_site->path . 'wp-login.php?action=lostpassword'); 59 } 60 60 } else { 61 printf(__('<p class="lead-in">Your blog at <a href="%1$s">%2$s</a> is active. You may now login to your blog using your chosen username of "%3$s". Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%5$s">reset your password</a>.</p>'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, 'http://' . $current_site->domain . $current_site->path . 'wp-login.php?action=lostpassword'); 61 ?> 62 <h2><?php _e('An error occurred during the activation'); ?></h2> 63 <?php 64 echo '<p>'.$result->get_error_message().'</p>'; 62 65 } 63 66 } else { 64 echo $result->get_error_message(); 65 } 66 } else { 67 extract($result); 68 $url = get_blogaddress_by_id($blog_id); 69 $user = new WP_User($user_id); 70 ?> 71 <h2><?php _e('Your account is now active!'); ?></h2> 72 <table border="0" id="signup-welcome"> 73 <tr> 74 <td width="50%" align="center"> 75 <h3><?php _e('Username'); ?>:</h3> 76 <p><?php echo $user->user_login ?></p></td> 77 <td width="50%" align="center"> 78 <h3><?php _e('Password'); ?>:</h3> 79 <p><?php echo $password; ?></p> 80 </td> 81 </tr> 82 </table> 83 <?php if( $url != 'http://' . $current_site->domain . $current_site->path ) { ?> 84 <p class="view"><?php printf(__('Your account is now activate. <a href="%1$s">View your site</a> or <a href="%2$s">Login</a>'), $url, $url . 'wp-login.php' ); ?></p> <?php 85 } else { 86 ?> <p class="view"><?php printf( __( 'Your account is now activate. <a href="%1$s">Login</a> or go back to the <a href="%2$s">homepage</a>.' ), 'http://' . $current_site->domain . $current_site->path . 'wp-login.php', 'http://' . $current_site->domain . $current_site->path ); ?></p> <?php 87 } 67 extract($result); 68 $url = get_blogaddress_by_id( (int) $blog_id); 69 $user = new WP_User( (int) $user_id); 70 ?> 71 <h2><?php _e('Your account is now active!'); ?></h2> 72 73 <div id="signup-welcome"> 74 <p><span class="h3"><?php _e('Username:'); ?></span> <?php echo $user->user_login ?></p> 75 <p><span class="h3"><?php _e('Password:'); ?></span> <?php echo $password; ?></p> 76 </div> 77 78 <?php if( $url != 'http://' . $current_site->domain . $current_site->path ) : ?> 79 <p class="view"><?php printf(__('Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Login</a>'), $url, $url . 'wp-login.php' ); ?></p> 80 <?php else: ?> 81 <p class="view"><?php printf( __( 'Your account is now activated. <a href="%1$s">Login</a> or go back to the <a href="%2$s">homepage</a>.' ), 'http://' . $current_site->domain . $current_site->path . 'wp-login.php', 'http://' . $current_site->domain . $current_site->path ); ?></p> 82 <?php endif; 83 } 88 84 } 89 } 90 ?> 85 ?> 91 86 </div> 87 92 88 <?php get_footer(); ?> trunk/wp-activate.php
r1328 r1434 8 8 require_once( ABSPATH . WPINC . '/registration.php'); 9 9 10 if( is_object( $wp_object_cache ) ) $wp_object_cache->cache_enabled = false; 10 if( is_object( $wp_object_cache ) ) 11 $wp_object_cache->cache_enabled = false; 11 12 12 13 do_action("activate_header"); 13 14 15 function wpmu_activate_stylesheet() { 16 ?> 17 <style type="text/css"> 18 form { margin-top: 2em; } 19 #submit, #key { width: 90%; font-size: 24px; } 20 #language { margin-top: .5em; } 21 .error { background: #f66; } 22 span.h3 { padding:0 8px; font-size:1.3em; font-family:'Trebuchet MS','Lucida Grande',Verdana,Arial,Sans-Serif; font-weight:700; color:#333333; } 23 </style> 24 <?php 25 } 26 add_action( 'wp_head', 'wpmu_activate_stylesheet' ); 27 14 28 get_header(); 15 29 ?> 30 16 31 <div id="content" class="widecolumn"> 17 <style type="text/css"> 18 form { margin-top: 2em; } 19 #submit, #key { 20 width: 90%; 21 font-size: 24px; 22 } 23 #language { 24 margin-top: .5em; 25 } 26 .error { 27 background-color: #f66; 28 } 29 </style> 30 <?php 31 if ( empty($_GET['key']) && empty($_POST['key']) ) { 32 ?> 33 <h2><?php _e('Activation Key Required') ?></h2> 34 <form name="activateform" id="activateform" method="post" action="<?php echo 'http://' . $current_site->domain . $current_site->path ?>wp-activate.php"> 35 <table border="0" width="100%" cellpadding="9"> 36 <tr> 37 <th valign="top"><?php _e('Activation Key:') ?></th> 38 <td><input name="key" type="text" id="key" value="" /></td> 39 </tr> 40 <tr> 41 <th scope="row" valign="top"> </th> 42 <td><input id="submit" type="submit" name="Submit" class="submit" value="<?php _e('Activate »') ?>" /></td> 43 </tr> 44 </table> 45 </form> 46 <?php 47 } else { 48 if ( ! empty($_GET['key']) ) 49 $key = $_GET['key']; 50 else 51 $key = $_POST['key']; 32 <?php if ( empty($_GET['key']) && empty($_POST['key']) ) { ?> 33 34 <h2><?php _e('Activation Key Required') ?></h2> 35 <form name="activateform" id="activateform" method="post" action="<?php echo 'http://' . $current_site->domain . $current_site->path ?>wp-activate.php"> 36 <p> 37 <label for="key"><?php _e('Activation Key:') ?></label> 38 <br /><input type="text" name="key" id="key" value="" size="50" /> 39 </p> 40 <p class="submit"> 41 <input id="submit" type="submit" name="Submit" class="submit" value="<?php _e('Activate »') ?>" /> 42 </p> 43 </form> 44 45 <?php } else { 52 46 53 $result = wpmu_activate_signup($key); 54 if ( is_wp_error($result) ) { 55 if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) { 56 $signup = $result->get_error_data(); 57 _e( '<h2>Your account is now active!</h2>' ); 58 if( $signup->domain . $signup->path == '' ) { 59 printf(__('<p class="lead-in">Your account has been activated. You may now <a href="%1$s">login</a> to the site using your chosen username of "%2$s". Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.</p>'), 'http://' . $current_site->domain . $current_site->path . 'wp-login.php', $signup->user_login, $signup->user_email, 'http://' . $current_site->domain . $current_site->path . 'wp-login.php?action=lostpassword'); 47 $key = !empty($_GET['key']) ? $_GET['key'] : $_POST['key']; 48 $result = wpmu_activate_signup($key); 49 if ( is_wp_error($result) ) { 50 if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) { 51 $signup = $result->get_error_data(); 52 ?> 53 <h2><?php _e('Your account is now active!'); ?></h2> 54 <?php 55 if( $signup->domain . $signup->path == '' ) { 56 printf(__('<p class="lead-in">Your account has been activated. You may now <a href="%1$s">login</a> to the site using your chosen username of "%2$s". Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.</p>'), 'http://' . $current_site->domain . $current_site->path . 'wp-login.php', $signup->user_login, $signup->user_email, 'http://' . $current_site->domain . $current_site->path . 'wp-login.php?action=lostpassword'); 57 } else { 58 printf(__('<p class="lead-in">Your blog at <a href="%1$s">%2$s</a> is active. You may now login to your blog using your chosen username of "%3$s". Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%5$s">reset your password</a>.</p>'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, 'http://' . $current_site->domain . $current_site->path . 'wp-login.php?action=lostpassword'); 59 } 60 60 } else { 61 printf(__('<p class="lead-in">Your blog at <a href="%1$s">%2$s</a> is active. You may now login to your blog using your chosen username of "%3$s". Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%5$s">reset your password</a>.</p>'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, 'http://' . $current_site->domain . $current_site->path . 'wp-login.php?action=lostpassword'); 61 ?> 62 <h2><?php _e('An error occurred during the activation'); ?></h2> 63 <?php 64 echo '<p>'.$result->get_error_message().'</p>'; 62 65 } 63 66 } else { 64 echo $result->get_error_message(); 65 } 66 } else { 67 extract($result); 68 $url = get_blogaddress_by_id($blog_id); 69 $user = new WP_User($user_id); 70 ?> 71 <h2><?php _e('Your account is now active!'); ?></h2> 72 <table border="0" id="signup-welcome"> 73 <tr> 74 <td width="50%" align="center"> 75 <h3><?php _e('Username'); ?>:</h3> 76 <p><?php echo $user->user_login ?></p></td> 77 <td width="50%" align="center"> 78 <h3><?php _e('Password'); ?>:</h3> 79 <p><?php echo $password; ?></p> 80 </td> 81 </tr> 82 </table> 83 <?php if( $url != 'http://' . $current_site->domain . $current_site->path ) { ?> 84 <p class="view"><?php printf(__('Your account is now activate. <a href="%1$s">View your site</a> or <a href="%2$s">Login</a>'), $url, $url . 'wp-login.php' ); ?></p> <?php 85 } else { 86 ?> <p class="view"><?php printf( __( 'Your account is now activate. <a href="%1$s">Login</a> or go back to the <a href="%2$s">homepage</a>.' ), 'http://' . $current_site->domain . $current_site->path . 'wp-login.php', 'http://' . $current_site->domain . $current_site->path ); ?></p> <?php 87 } 67 extract($result); 68 $url = get_blogaddress_by_id( (int) $blog_id); 69 $user = new WP_User( (int) $user_id); 70 ?> 71 <h2><?php _e('Your account is now active!'); ?></h2> 72 73 <div id="signup-welcome"> 74 <p><span class="h3"><?php _e('Username:'); ?></span> <?php echo $user->user_login ?></p> 75 <p><span class="h3"><?php _e('Password:'); ?></span> <?php echo $password; ?></p> 76 </div> 77 78 <?php if( $url != 'http://' . $current_site->domain . $current_site->path ) : ?> 79 <p class="view"><?php printf(__('Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Login</a>'), $url, $url . 'wp-login.php' ); ?></p> 80 <?php else: ?> 81 <p class="view"><?php printf( __( 'Your account is now activated. <a href="%1$s">Login</a> or go back to the <a href="%2$s">homepage</a>.' ), 'http://' . $current_site->domain . $current_site->path . 'wp-login.php', 'http://' . $current_site->domain . $current_site->path ); ?></p> 82 <?php endif; 83 } 88 84 } 89 } 90 ?> 85 ?> 91 86 </div> 87 92 88 <?php get_footer(); ?>
