| 1 |
<?php |
|---|
| 2 |
define( "WP_INSTALLING", true ); |
|---|
| 3 |
require ('wp-config.php'); |
|---|
| 4 |
require_once( ABSPATH . WPINC . '/registration.php'); |
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
do_action("activate_header"); |
|---|
| 8 |
|
|---|
| 9 |
get_header(); |
|---|
| 10 |
?> |
|---|
| 11 |
<div id="content" class="widecolumn"> |
|---|
| 12 |
<style type="text/css"> |
|---|
| 13 |
form { margin-top: 2em; } |
|---|
| 14 |
#submit, #key { |
|---|
| 15 |
width: 90%; |
|---|
| 16 |
font-size: 24px; |
|---|
| 17 |
} |
|---|
| 18 |
#language { |
|---|
| 19 |
margin-top: .5em; |
|---|
| 20 |
} |
|---|
| 21 |
.error { |
|---|
| 22 |
background-color: #f66; |
|---|
| 23 |
} |
|---|
| 24 |
</style> |
|---|
| 25 |
<?php |
|---|
| 26 |
if ( empty($_GET['key']) && empty($_POST['key']) ) { |
|---|
| 27 |
?> |
|---|
| 28 |
<h2><?php _e('Activation Key Required') ?></h2> |
|---|
| 29 |
<form name="activateform" id="activateform" method="post" action="/wp-activate.php"> |
|---|
| 30 |
<table border="0" width="100%" cellpadding="9"> |
|---|
| 31 |
<tr> |
|---|
| 32 |
<th valign="top"><?php _e('Activation Key:') ?></th> |
|---|
| 33 |
<td><input name="key" type="text" id="key" value="" /></td> |
|---|
| 34 |
</tr> |
|---|
| 35 |
<tr> |
|---|
| 36 |
<th scope="row" valign="top"> </th> |
|---|
| 37 |
<td><input id="submit" type="submit" name="Submit" class="submit" value="<?php _e('Activate »') ?>" /></td> |
|---|
| 38 |
</tr> |
|---|
| 39 |
</table> |
|---|
| 40 |
</form> |
|---|
| 41 |
<?php |
|---|
| 42 |
} else { |
|---|
| 43 |
if ( ! empty($_GET['key']) ) |
|---|
| 44 |
$key = $_GET['key']; |
|---|
| 45 |
else |
|---|
| 46 |
$key = $_POST['key']; |
|---|
| 47 |
|
|---|
| 48 |
$result = wpmu_activate_signup($key); |
|---|
| 49 |
if ( is_wp_error($result) ) { |
|---|
| 50 |
if ( 'already_active' == $result->get_error_code() ) |
|---|
| 51 |
echo __('The blog is already active. Please check your email inbox for your username, password, and login instructions.'); |
|---|
| 52 |
else |
|---|
| 53 |
echo $result->get_error_message(); |
|---|
| 54 |
} else { |
|---|
| 55 |
extract($result); |
|---|
| 56 |
$url = get_blogaddress_by_id($blog_id); |
|---|
| 57 |
$user = new WP_User($user_id); |
|---|
| 58 |
?> |
|---|
| 59 |
<h2><?php _e('All set!'); ?></h2> |
|---|
| 60 |
<table border="0" id="signup-welcome"> |
|---|
| 61 |
<tr> |
|---|
| 62 |
<td width="50%" align="center"> |
|---|
| 63 |
<h3><?php _e('Username'); ?>:</h3> |
|---|
| 64 |
<p><?php echo $user->user_login ?></p></td> |
|---|
| 65 |
<td width="50%" align="center"> |
|---|
| 66 |
<h3><?php _e('Password'); ?>:</h3> |
|---|
| 67 |
<p><?php echo $password; ?></p> |
|---|
| 68 |
</td> |
|---|
| 69 |
</tr> |
|---|
| 70 |
</table> |
|---|
| 71 |
<h3 class="view"><?php printf(__('<a href="%1$s">View your site</a> or <a href="%2$s">Login</a>'), $url, $url . 'wp-login.php' ); ?></h3> |
|---|
| 72 |
<?php |
|---|
| 73 |
} |
|---|
| 74 |
} |
|---|
| 75 |
?> |
|---|
| 76 |
</div> |
|---|
| 77 |
<?php get_footer(); ?> |
|---|
| 78 |
|
|---|