| [ Index ] |
WordPress Source Cross Reference |
[Summary view] [Print] [Text view]
1 <?php 2 define('WP_INSTALLING', true); 3 if (!file_exists('../wp-config.php')) 4 die("There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started. Need more help? <a href='http://wordpress.org/docs/faq/#wp-config'>We got it</a>. You can <a href='setup-config.php'>create a <code>wp-config.php</code> file through a web interface</a>, but this doesn't work for all server setups. The safest way is to manually create the file."); 5 6 require_once('../wp-config.php'); 7 require_once ('./upgrade-functions.php'); 8 9 if (isset($_GET['step'])) 10 $step = $_GET['step']; 11 else 12 $step = 0; 13 header( 'Content-Type: text/html; charset=utf-8' ); 14 ?> 15 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 16 <html xmlns="http://www.w3.org/1999/xhtml"> 17 <head> 18 <title><?php _e('WordPress › Installation'); ?></title> 19 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 20 <style media="screen" type="text/css"> 21 <!-- 22 html { 23 background: #eee; 24 } 25 body { 26 background: #fff; 27 color: #000; 28 font-family: Georgia, "Times New Roman", Times, serif; 29 margin-left: 20%; 30 margin-right: 20%; 31 padding: .2em 2em; 32 } 33 34 h1 { 35 color: #006; 36 font-size: 18px; 37 font-weight: lighter; 38 } 39 40 h2 { 41 font-size: 16px; 42 } 43 44 p, li, dt { 45 line-height: 140%; 46 padding-bottom: 2px; 47 } 48 49 ul, ol { 50 padding: 5px 5px 5px 20px; 51 } 52 #logo { 53 margin-bottom: 2em; 54 } 55 .step a, .step input { 56 font-size: 2em; 57 } 58 td input { 59 font-size: 1.5em; 60 } 61 .step, th { 62 text-align: right; 63 } 64 #footer { 65 text-align: center; 66 border-top: 1px solid #ccc; 67 padding-top: 1em; 68 font-style: italic; 69 } 70 --> 71 </style> 72 </head> 73 <body> 74 <h1 id="logo"><img alt="WordPress" src="images/wordpress-logo.png" /></h1> 75 <?php 76 // Let's check to make sure WP isn't already installed. 77 if ( is_blog_installed() ) 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>'); 78 79 switch($step) { 80 81 case 0: 82 ?> 83 <p><?php printf(__('Welcome to WordPress installation. We’re now going to go through a few steps to get you up and running with the latest in personal publishing platforms. You may want to peruse the <a href="%s">ReadMe documentation</a> at your leisure.'), '../readme.html'); ?></p> 84 <h2 class="step"><a href="install.php?step=1"><?php _e('First Step »'); ?></a></h2> 85 <?php 86 break; 87 88 case 1: 89 90 ?> 91 <h1><?php _e('First Step'); ?></h1> 92 <p><?php _e("Before we begin we need a little bit of information. Don't worry, you can always change these later."); ?></p> 93 94 <form id="setup" method="post" action="install.php?step=2"> 95 <table width="100%"> 96 <tr> 97 <th width="33%"><?php _e('Weblog title:'); ?></th> 98 <td><input name="weblog_title" type="text" id="weblog_title" size="25" /></td> 99 </tr> 100 <tr> 101 <th><?php _e('Your e-mail:'); ?></th> 102 <td><input name="admin_email" type="text" id="admin_email" size="25" /></td> 103 </tr> 104 <tr> 105 <th scope="row" valign="top"> <?php __('Privacy:'); ?></th> 106 <td><label><input type="checkbox" name="blog_public" value="1" checked="checked" /> <?php _e('I would like my blog to appear in search engines like Google and Technorati.'); ?></label></td> 107 </tr> 108 </table> 109 <p><em><?php _e('Double-check that email address before continuing.'); ?></em></p> 110 <h2 class="step"> 111 <input type="submit" name="Submit" value="<?php _e('Continue to Second Step »'); ?>" /> 112 </h2> 113 </form> 114 115 <?php 116 break; 117 case 2: 118 119 // Fill in the data we gathered 120 $weblog_title = stripslashes($_POST['weblog_title']); 121 $admin_email = stripslashes($_POST['admin_email']); 122 $public = (int) $_POST['blog_public']; 123 // check e-mail address 124 if (empty($admin_email)) { 125 die (__("<strong>ERROR</strong>: please type your e-mail address")); 126 } else if (!is_email($admin_email)) { 127 die (__("<strong>ERROR</strong>: the e-mail address isn't correct")); 128 } 129 130 ?> 131 <h1><?php _e('Second Step'); ?></h1> 132 <p><?php _e('Now we’re going to create the database tables and fill them with some default data.'); ?></p> 133 134 135 <?php 136 137 $result = wp_install($weblog_title, __('admin'), $admin_email, $public); 138 extract($result); 139 ?> 140 141 <p><em><?php _e('Finished!'); ?></em></p> 142 143 <p><?php printf(__('Now you can <a href="%1$s">log in</a> with the <strong>username</strong> "<code>admin</code>" and <strong>password</strong> "<code>%2$s</code>".'), '../wp-login.php', $password); ?></p> 144 <p><?php _e('<strong><em>Note that password</em></strong> carefully! It is a <em>random</em> password that was generated just for you. If you lose it, you will have to delete the tables from the database yourself, and re-install WordPress. So to review:'); ?> 145 </p> 146 <dl> 147 <dt><?php _e('Username'); ?></dt> 148 <dd><code><?php _e('admin') ?></code></dd> 149 <dt><?php _e('Password'); ?></dt> 150 <dd><code><?php echo $password; ?></code></dd> 151 <dt><?php _e('Login address'); ?></dt> 152 <dd><a href="../wp-login.php">wp-login.php</a></dd> 153 </dl> 154 <p><?php _e('Were you expecting more steps? Sorry to disappoint. All done! :)'); ?></p> 155 <?php 156 break; 157 } 158 ?> 159 <p id="footer"><?php _e('<a href="http://wordpress.org/">WordPress</a>, personal publishing platform.'); ?></p> 160 </body> 161 </html>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Sat Jul 15 11:57:04 2006 | Courtesy of Taragana |