{-include:header.php-}
	<div id="main">
		<div id="stepList">
			<dl>
				<dt><strong>{-:@INSTALL_WIZARD-}</strong></dt>
				<dd>
					<ul>
						<li>{-:@INTRODUCE_SOFT-}</li>
						<li>{-:@SHOW_LICENSE-}</li>
						<li>{-:@CHECK_ENVIRONMENT-}</li>
						<li class="ongoing">{-:@SETUP_INSTALLATION-}</li>
						<li>{-:@WRITE_DATA-}</li>
						<li>{-:@LOCK-}</li>
					</ul>
				</dd>
			</dl>
		</div><!--id/stepList-->
		<div id="stepMain">
			<form action="" method="post" id="stepForm">
			<dl>
				<dt><strong id="stepTitle">{-:@SETUP_INSTALLATION-}</strong><span id="stepTip" class="stepTip">{-:@SETUP_INSTALLATION_TIP-}</span></dt>
				<dd id="stepContentBox">
					<div id="stepContent">
<script type="text/javascript">
String.prototype.trim = function()
{
	// delete space
	return this.replace(/(^\s*)|(\s*$)/g, "");
}
function input_check()
{
	var myform = $('stepForm');
	var ipt;
	var textboxs = new Array();
	var inputs = getElementsByClassName("required", myform);
	var result = true;

	for(var i = 0; i < inputs.length; i++)
	{
		ipt = inputs[i];
		if("text" == ipt.type)
		{
			textboxs[textboxs.length] = ipt;
		}
	}
	for(var i = 0; i < textboxs.length; i++)
	{
		var txt = textboxs[i];
		if(txt && txt.value == "")
		{
			txt.style.border = "1px solid #faac4f";
			result = false;
		}
		else
		{
			txt.style.border = "";
		}
	}
	return result;
}

function getElementsByClassName(className, parentElement){
	var children = (parentElement || document.body).getElementsByTagName('*');
	var elements = [], child;
	for(var i = 0; i < children.length; i++){
		var child = children[i];
		var classNames = child.className.split(' ');
		for(var j = 0; j < classNames.length; j++){
			if(classNames[j] == className){
				elements.push(child);
				break;
			}
		}
	}
	return elements;
};

function check_next_step()
{
	if(input_check())
	{
		$('stepNext').disabled = false;
		$('stepNext').value = "{-:@STEP_NEXT-}";
	}
	else
	{
		$('stepNext').disabled = true;
		$('stepNext').value = "{-:@STEP_NEED_FIXED-}";
	}
}
</script>
						<fieldset>
							<legend>{-:@DB_SETUP-}</legend>
							<p>
								<label for="db_host">{-:@DB_HOST-}</label>
								<input type="text" id="dbHost" class="required" name="dbHost" value="{-:$formV.dbHost-}" onkeyup="check_next_step()" />
								<span id="dbHostTip" class="inputTip">{-:@DB_HOST_TIP-}</span>
							</p>
							<p>
								<label for="db_port">{-:@DB_PORT-}</label>
								<input type="text" id="dbPort" class="required" name="dbPort" value="{-:$formV.dbPort-}" onkeyup="check_next_step()" />
								<span id="dbPortTip" class="inputTip">{-:@DB_PORT_TIP-}</span>
							</p>
							<p>
								<label for="dbUser">{-:@DB_USER-}</label>
								<input type="text" id="dbUser" class="required" name="dbUser" value="{-:$formV.dbUser-}" onkeyup="check_next_step()" />
								<span id="dbUserTip" class="inputTip">{-:@DB_USER_TIP-}</span>
							</p>
							<p>
								<label for="dbPassword">{-:@DB_PASSWORD-}</label>
								<input type="text" id="dbPassword" name="dbPassword" value="{-:$formV.dbPassword-}" onkeyup="check_next_step()" />
								<span id="dbPasswordTip" class="inputTip">{-:@DB_PASSWORD_TIP-}</span>
							</p>
							<p>
								<label for="dbDatabase">{-:@DB_DATABASE-}</label>
								<input type="text" id="dbDatabase" class="required" name="dbDatabase" value="{-:$formV.dbDatabase-}" onkeyup="check_next_step()" />
								<span id="dbDatabaseTip" class="inputTip">{-:@DB_DATABASE_TIP-}</span>
							</p>
							<p>
								<label for="dbPrefix">{-:@DB_PREFIX-}</label>
								<input type="text" id="dbPrefix" class="required" name="dbPrefix" value="{-:$formV.dbPrefix-}" onkeyup="check_next_step()" />
								<span id="dbPrefixTip" class="inputTip">{-:@DB_PREFIX_TIP-}</span>
							</p>
							<p>
								<label for="dbConnection">{-:@DB_CONNECTION-}</label>
								<select name="dbConnection">
									<option value="mysql" {-if: 'mysql'==$formV['dbConnection']-} selected{-:/if-}>MySQL</option>
									<option value="mysqli"{-if: 'mysqli'==$formV['dbConnection']-} selected{-:/if-}>MySQLi</option>
								</select>
								<span id="dbConnectionTip" class="inputTip">{-:@DB_CONNECTION_TIP-}</span>
							</p>
						</fieldset>
						<fieldset>
							<legend>{-:@FOUNDER_SETUP-}</legend>
							<p>
								<label for="founderName">{-:@FOUNDER_NAME-}</label>
								<input type="text" id="founderName" class="required" name="founderName" value="{-:$formV.founderName-}" onkeyup="check_next_step()" />
								<span id="founderNameTip" class="inputTip">{-:@FOUNDER_NAME_TIP-}</span>
							</p>
							<p>
								<label for="founderPassword">{-:@FOUNDER_PASSWORD-}</label>
								<input type="text" id="founderPassword" class="required" name="founderPassword" value="{-:$formV.founderPassword-}" onkeyup="check_next_step()" />
								<span id="founderPasswordTip" class="inputTip">{-:@FOUNDER_PASSWORD_TIP-}</span>
							</p>
							<p>
								<label for="founderEmail">{-:@FOUNDER_EMAIL-}</label>
								<input type="text" id="founderEmail" class="required" name="founderEmail" value="{-:$formV.founderEmail-}" onkeyup="check_next_step()" />
								<span id="founderEmailTip" class="inputTip">{-:@FOUNDER_EMAIL_TIP-}</span>
							</p>
						</fieldset>
						<fieldset>
							<legend>{-:@OTHER-}</legend>
							<p>
								<label for="cookieKey">{-:@COOKIE_KEY-}</label>
								<input type="text" id="cookieKey" class="required" name="cookieKey" value="{-:$formV.cookieKey-}" onkeyup="check_next_step()" />
								<span id="cookieKeyTip" class="inputTip">{-:@COOKIE_KEY_TIP-}</span>
							</p>
						</fieldset>
						{-if:''!=$errorMessage-}
						<div id="errorMessage">
							{-:$errorMessage-}
						</div>
						{-:/if-}
					</div><!--id/stepContent-->
				</dd><!--id/stepContentBox-->
				<dd id="operation">
					<input type="hidden" name="step" value="5">
					<input type="button" onclick="history.back()" value="{-:@STEP_BACK-}" />
					<input type="submit" disabled="disabled" id="stepNext" value="{-:@STEP_NEED_FIXED-}" />
					<script type="text/javascript">check_next_step();</script>
				</dd>
			</dl>
			</form>
		</div><!--id/stepMain-->
		<div class="c"></div>
	</div><!--id/main-->
{-include:footer.php-}