<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>《HuCart开源企业外网信息系统》许可协议</title>
<link rel="stylesheet" type="text/css" href="./install.css" />
<script language="javascript">
function submitFun()
{
		var idmysql_hostname 	= document.getElementById('mysql_hostname');
		var idmysql_database 	= document.getElementById('mysql_database');
		var idmysql_username 	= document.getElementById('mysql_username');
		var idmysql_password 	= document.getElementById('mysql_password');
		var idmysql_prefix 		= document.getElementById('mysql_prefix');
		var iduser_name 		= document.getElementById('user_name');
		var idadmin_email 		= document.getElementById('user_email');
		var iduser_pwd 			= document.getElementById('user_pwd');
		var idreuser_pwd 		= document.getElementById('reuser_pwd');

		if(idmysql_hostname.value=='')
		{
			alert(' 提 示：数据库地址不能为空！请输入！');
			idmysql_hostname.focus();
			return false;
		}
		
		if(idmysql_database.value=='')
		{
			alert(' 提 示：数据库名不能为空！请输入！');
			idmysql_database.focus();
			return false;
		}

		if(idmysql_username.value=='')
		{
			alert(' 提 示：数据库用户名不能为空！请输入！');
			idmysql_username.focus();
			return false;
		}

		if(idmysql_password.value=='')
		{
			alert(' 提 示：数据库密码不能为空！请输入！');
			idmysql_password.focus();
			return false;
		}	

		if(idmysql_prefix.value=='')
		{
			alert(' 提 示：数据库表前缀不能为空！请输入！');
			idmysql_prefix.focus();
			return false;
		}

		if(iduser_name.value=='')
		{
			alert(' 提 示：管理员帐号不能为空！请输入！');
			iduser_name.focus();
			return false;
		}
		patn = /^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/;
		if(idadmin_email.value=='')
		{
			alert(' 提 示：管理员邮箱不能为空！请输入！');
			idadmin_email.focus();
			return false;
		}else if(!patn.test(idadmin_email.value))
		{
			alert ("提示：\n\n电子邮件格式不正确，请输入正确的电子邮件地址！！");
			idadmin_email.focus (); 
			return false; 
		}
		
		if(iduser_pwd.value=='')
		{
			alert(' 提 示：管理员密码不能为空！请输入！');
			iduser_pwd.focus();
			return false;
		}
		if(idreuser_pwd.value=='')
		{
			alert(' 提 示：管理员确认密码不能为空！请输入！');
			idreuser_pwd.focus();
			return false;
		}
		
		if(idreuser_pwd.value!=iduser_pwd.value)
		{
			alert(' 提 示：管理员确认密码与密码不一致！请输入一致密码！');
			idreuser_pwd.focus();
			return false;
		}
		
		if(!confirm('提 示：请记住您的网站超级管理员\n\n帐号'+iduser_name.value+'\n\n密码'+iduser_pwd.value))
		{
			return  false; 
		}
		
}

</script>
</head>

<body>
<div style="height:30px;"></div>
<div class="setuplogo"><img src="./setuplogo2.png" width="465" height="62"  ></div>
<div class="setuptable">
<form action="./index.php?act=step5" method="post" onsubmit="return submitFun(this)"  name="formSub">
<table cellpadding="0" cellspacing="1" border="0" style="width:100%" class="tableborder">

<tr>
<th colspan="2" align="center"><strong>填写数据库连接信息</strong></th>
</tr>
<tr>

<td width="40%" class="tdd"></td>
<td width="60%" class="tdd"></td>
</tr>
<tr>
<td class="tdright">数据库地址：</td>
<td><input type="text" name="mysql_hostname" id="mysql_hostname" value="localhost" /></td>
</tr>
<tr>
<td class="tdright">数据库名：</td>
<td><input type="text" name="mysql_database" id="mysql_database"  value="" /></td>
</tr>
<tr>
<td class="tdright">数据库用户名：</td>
<td><input type="text" name="mysql_username" id="mysql_username" value="" /></td>
</tr>
<tr>
<td class="tdright">密码：</td>
<td><input type="password" name="mysql_password" id="mysql_password" value="" /></td>
</tr>
<td class="tdright">表前缀：</td>
<td><input type="text" name="mysql_prefix" id="mysql_prefix" value="hc_" /></td>
</tr>

<tr>
<th colspan="2" align="center"><strong>填写管理员信息</strong></th>
</tr>

<tr>
<td class="tdd"></td><td class="tdd"></td>
</tr>

<tr>
<td class="tdright">管理员帐号：</td>
<td><input type="text" name="user_name" id="user_name" value="admin" />
<span style="color:#FF0000">务必记得</span></td>
</tr>

<tr>
<td class="tdright">管理员密码：</td>
<td><input type="password" name="user_pwd" id="user_pwd" value="" />
 <span style="color:#FF0000">务必记得</span></td>
</tr>
<tr>
<td class="tdright">确认密码：</td>
<td><input type="password" name="reuser_pwd" id="reuser_pwd" value="" /></td>
</tr>

<tr>
<td class="tdright">管理员邮箱：</td>
<td><input type="text" name="user_email" id="user_email" value="" /></td>
</tr>


<tr>
<th colspan="2" align="center"><strong>其他项</strong></th>
</tr>
<tr>
<td class="tdright">开启60万数量级缓存功能：</td>
<td><input type="checkbox" name="iswebtmp" id="iswebtmp" value="1"  /></td>
</tr>
<tr>
<td class="tdright">安装测试数据：</td>
<td><input type="checkbox" name="test_data" id="test_data" value="1" checked="checked"   /></td>
</tr>

<tr>
<td class="tdd"></td><td class="tdd"></td>
</tr>

<tr>
<td  colspan="2" class="tdcenter"> <input name="submit" id="submit" type="submit" value="下一步安装" ></td>
</tr>
</table>
</form>
</div>
</body>
</html>
