-
+ 2C6E967D649632785FDC8D561823816B2E7973FB4D72AFC5D40F01C5F9892BBEFB0DC56583BFA9F51E63EC5B7E04CE660784A79979EBD50D00C56D65F275705Amp-wp/wp-admin/install.php(0 . 0)(1 . 133)
48250 <?php
48251 /**
48252 * WordPress Installer
48253 *
48254 * @package WordPress
48255 * @subpackage Administration
48256 */
48257
48258 /**
48259 * We are installing WordPress.
48260 *
48261 * @since unknown
48262 * @var bool
48263 */
48264 define('WP_INSTALLING', true);
48265
48266 /** Load WordPress Bootstrap */
48267 require_once('../wp-load.php');
48268
48269 /** Load WordPress Administration Upgrade API */
48270 require_once('./includes/upgrade.php');
48271
48272 if (isset($_GET['step']))
48273 $step = $_GET['step'];
48274 else
48275 $step = 0;
48276
48277 /**
48278 * Display install header.
48279 *
48280 * @since unknown
48281 * @package WordPress
48282 * @subpackage Installer
48283 */
48284 function display_header() {
48285 header( 'Content-Type: text/html; charset=utf-8' );
48286 ?>
48287 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
48288 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
48289 <head>
48290 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
48291 <title><?php _e('WordPress › Installation'); ?></title>
48292 <?php wp_admin_css( 'install', true ); ?>
48293 </head>
48294 <body>
48295 <h1 id="logo"><img alt="WordPress" src="images/wordpress-logo.png" /></h1>
48296
48297 <?php
48298 }//end function display_header();
48299
48300 // Let's check to make sure WP isn't already installed.
48301 if ( is_blog_installed() ) {display_header(); die('<h1>'.__('Already Installed').'</h1><p>'.__('You appear to have already installed WordPress. To reinstall please clear your old database tables first.').'</p></body></html>');}
48302
48303 switch($step) {
48304 case 0:
48305 case 1: // in case people are directly linking to this
48306 display_header();
48307 ?>
48308 <h1><?php _e('Welcome'); ?></h1>
48309 <p><?php printf(__('Welcome to the famous five minute WordPress installation process! You may want to browse the <a href="%s">ReadMe documentation</a> at your leisure. Otherwise, just fill in the information below and you\'ll be on your way to using the most extendable and powerful personal publishing platform in the world.'), '../readme.html'); ?></p>
48310 <!--<h2 class="step"><a href="install.php?step=1"><?php _e('First Step'); ?></a></h2>-->
48311
48312 <h1><?php _e('Information needed'); ?></h1>
48313 <p><?php _e("Please provide the following information. Don't worry, you can always change these settings later."); ?></p>
48314
48315 <form id="setup" method="post" action="install.php?step=2">
48316 <table class="form-table">
48317 <tr>
48318 <th scope="row"><label for="weblog_title"><?php _e('Blog Title'); ?></label></th>
48319 <td><input name="weblog_title" type="text" id="weblog_title" size="25" /></td>
48320 </tr>
48321 <tr>
48322 <th scope="row"><label for="admin_email"><?php _e('Your E-mail'); ?></label></th>
48323 <td><input name="admin_email" type="text" id="admin_email" size="25" /><br />
48324 <?php _e('Double-check your email address before continuing.'); ?>
48325 </tr>
48326 <tr>
48327 <td colspan="2"><label><input type="checkbox" name="blog_public" value="1" checked="checked" /> <?php _e('Allow my blog to appear in search engines like Google and Technorati.'); ?></label></td>
48328 </tr>
48329 </table>
48330 <p class="step"><input type="submit" name="Submit" value="<?php _e('Install WordPress'); ?>" class="button" /></p>
48331 </form>
48332
48333 <?php
48334 break;
48335 case 2:
48336 if ( !empty($wpdb->error) )
48337 wp_die($wpdb->error->get_error_message());
48338
48339 display_header();
48340 // Fill in the data we gathered
48341 $weblog_title = isset($_POST['weblog_title']) ? stripslashes($_POST['weblog_title']) : '';
48342 $admin_email = isset($_POST['admin_email']) ? stripslashes($_POST['admin_email']) : '';
48343 $public = isset($_POST['blog_public']) ? (int) $_POST['blog_public'] : 0;
48344 // check e-mail address
48345 if (empty($admin_email)) {
48346 // TODO: poka-yoke
48347 die('<p>'.__("<strong>ERROR</strong>: you must provide an e-mail address.").'</p>');
48348 } else if (!is_email($admin_email)) {
48349 // TODO: poka-yoke
48350 die('<p>'.__('<strong>ERROR</strong>: that isn’t a valid e-mail address. E-mail addresses look like: <code>username@example.com</code>').'</p>');
48351 }
48352
48353 $wpdb->show_errors();
48354 $result = wp_install($weblog_title, 'admin', $admin_email, $public);
48355 extract($result, EXTR_SKIP);
48356 ?>
48357
48358 <h1><?php _e('Success!'); ?></h1>
48359
48360 <p><?php printf(__('WordPress has been installed. Were you expecting more steps? Sorry to disappoint.'), ''); ?></p>
48361
48362 <table class="form-table">
48363 <tr>
48364 <th><?php _e('Username'); ?></th>
48365 <td><code>admin</code></td>
48366 </tr>
48367 <tr>
48368 <th><?php _e('Password'); ?></th>
48369 <td><code><?php echo $password; ?></code><br />
48370 <?php echo '<p>'.__('<strong><em>Note that password</em></strong> carefully! It is a <em>random</em> password that was generated just for you.').'</p>'; ?></td>
48371 </tr>
48372 </table>
48373
48374 <p class="step"><a href="../wp-login.php" class="button"><?php _e('Log In'); ?></a></p>
48375
48376 <?php
48377 break;
48378 }
48379 ?>
48380 <script type="text/javascript">var t = document.getElementById('weblog_title'); if (t){ t.focus(); }</script>
48381 </body>
48382 </html>