<script language="javascript">
function checksub(){
	var dbname = document.getElementById("dbname").value;
	var dbuser = document.getElementById("dbuser").value;
	var pwd = document.getElementById("pwd").value;
	if(pwd.length > 20){
		alert("管理员密码最长20个字符！");
		return false;
	}
	if(dbname=='' || dbuser=='' || pwd==''){
		alert("请确认所有选项都已填写！");
		return false;
	}
	var re=/^[0-9]+$/;
	var r = re.exec(dbname);
	if (r != null){
		alert("数据库名不能为纯数字！");
		return false;
	}
	var re=/^\w+$/;
	var r = re.exec(dbname);
	if (r == null){
		alert("数据库名不能包含特殊字符！");
		return false;
	}
	return true;
}
</script>
<form action="index.php?step=4" method="post" onsubmit="return checksub();">
<div id="contain">
 <div id="left">
   <div class="title">安装步骤</div>
   <ul class="step">
     <li class="succed">许可协议</li>
     <li class="succed">环境检测</li>
     <li class="select">参数配置</li>
     <li>正在安装</li>
     <li>安装完成</li>
   </ul>
 </div>
 <div id="right">
   <div class="r_title">数据库设定</div>
   <table width="726" border="0" align="center" cellpadding="0" cellspacing="0" class="twbox">
			<tr>
				<td class="onetd"><strong>数据库主机：</strong></td>
				<td><input type="text" value="localhost" name="dbhost" value="localhost" class="input-txt">
				<small>一般是 localhost</small></td>
			</tr>
			<tr>
				<td class="onetd"><strong>数据库名：</strong></td>
				<td>
					<input name="dbname" type="text" class="input-txt" id="dbname"/>
				<small>填写您要存放的数据库名称</small></td>
			</tr>
			<tr>
				<td class="onetd"><strong>数据库表前缀：</strong>
				</td>
				<td>
					<input name="dbprefix" type="text" value="5w_" class="input-txt" />
				<small>该项允许为空</small></td>
			</tr>
			<tr>
				<td class="onetd"><strong>数据库用户名：</strong>
				</td>
				<td>
					<input name="dbuser" type="text" class="input-txt" id="dbuser"/>
				<small>您的数据库用户名，不要全数字</small></td>
			</tr>
			<tr>
				<td class="onetd"><strong>数据库用户密码：</strong>
				</td>
				<td>
					<input name="dbpw" type="password" class="input-txt" />
				<small>您的数据库登陆密码</small></td>
			</tr>
		</table>
<iframe name="downloadframe" id="downloadframe" style="display:none"></iframe>
         <div class="r_title">管理员初始密码</div>
<div style="padding:2px 8px 0px; line-height:33px; height:23px; overflow:hidden; color:#666;">
			请设定管理员初始密码。
	</div>
		<table width="726" border="0" align="center" cellpadding="0" cellspacing="0" class="twbox">
			<tr>
				<td class="onetd"><strong>管理员账号：</strong></td>
				<td>
					<input name="admin_name" type="text" value="admin" class="input-txt" />
					<p><small>只能用'0-9'、'a-z'、'A-Z'、'.'、'@'、'_'、'-'、'!'以内范围的字符</small></p>
				</td>
			</tr>
			<tr>
				<td class="onetd"><strong>密　码：</strong></td>
				<td><input name="admin_password" type="password" value="" class="input-txt" id="pwd"/></td>
			</tr>
			<input type="hidden" value="导航网大全" name="sitename" class="formfield" style="width:150px">
		</table>



        <div class="btn-box">
			<input type="submit" class="btn-next" value="继续" />
		</div>


 </div>
</div>
</form>