<%
'商易仿淘宝4.0(多用户)
'ACCESS版演示网站：http://www.ftaobao.com(商易仿淘宝商城)
'SQL版演示网站：http://sql.ftaobao.com
'电话：0571-56907100
'QQ：1147100
%>
<!-- #include file="include/conn.asp" -->
<!-- #include file="include/md5.asp" -->
<!-- #include file="FFunction.asp" -->
<%
url=md5(SERVER_url)
if request("menu")="ok" then
    pin=md5(shopnet("pin"))
    set rs=server.createobject("adodb.recordset")
    sql="select * from admin where pin='"&pin&"'"
    rs.open sql,conn,1,1
if not(rs.bof and rs.eof) then
  Connbbs.execute("update [BBSXP_SiteSettings] set Adminpassword='"&MD5(shopnet("Adminpass"))&"'")
   Conn.execute("update system set systemname='"&shopnet("sitename")&"',url='"&SERVER_url&"'")
   Connbbs.execute("insert into [BBSXP_Users](membercode,UserName,UserPass,usermail,UserInfo,UserIM)values(5,'"&shopnet("adminname")&"','"&MD5(shopnet("adminpass"))&"','"&shopnet("email")&"','"&HTMLEncode(shopnet("realname"))&"\"&HTMLEncode(shopnet("country"))&"\"&HTMLEncode(shopnet("province"))&"\"&HTMLEncode(shopnet("city"))&"\"&HTMLEncode(shopnet("Postcode"))&"\"&HTMLEncode(shopnet("blood"))&"\"&HTMLEncode(shopnet("belief"))&"\"&HTMLEncode(shopnet("occupation"))&"\"&HTMLEncode(shopnet("marital"))&"\"&HTMLEncode(shopnet("education"))&"\"&HTMLEncode(shopnet("college"))&"\"&HTMLEncode(shopnet("address"))&"\"&HTMLEncode(shopnet("tel"))&"\"&HTMLEncode(shopnet("character"))&"\"&HTMLEncode(shopnet("personal"))&"','"&shopnet("oicq")&"\"&shopnet("icp")&"\"&shopnet("uc")&"\"&shopnet("aim")&"\"&shopnet("msn")&"\"&shopnet("yahoo")&"')")
   Conn.execute("insert into huiyuan(huiyuan,oicq,[password],zt,tel,mail)values('"&shopnet("adminname")&"','"&shopnet("oicq")&"','"&MD5(shopnet("adminpass"))&"',1,'"&shopnet("tel")&"','"&shopnet("email")&"')")
   Conn.execute("update admin set adminname='"&shopnet("adminname")&"',adminpass='"&md5(shopnet("adminpass"))&"',administrator='"&shopnet("sitename")&"',qx=6")
   response.Write("<Script>alert('商易商城安装设置成功，点击确定转到商城首页登陆');window.location='manage/adminlogin.asp';</script>")
else
response.Write("<Script>alert('验证码不正确！');window.location='../';</script>")  
end if 
end if
%>
<title>商易商城4.0-设置安装程序</title>
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.STYLE2 {
	color: #FF0000;
	font-weight: bold;
}
-->
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td bgcolor="#000000">&nbsp;</td>
    <td width="800"><img src="image/setup.gif" /></td>
    <td bgcolor="#000000">&nbsp;</td>
  </tr>
  <tr>
    <td height="48" bgcolor="#FFFFFF">&nbsp;</td>
    <td background="image/setup1.gif">&nbsp;</td>
    <td bgcolor="#FFFFFF">&nbsp;</td>
  </tr>
</table>
<%set rssystem = conn.execute("select * from admin")%>
<hr />
<br>
<form action="?menu=ok" method=POST name=myform id=myform>
<script language="javascript">
<!--//
function setup1(){
		if ( document.myform.Adminname.value == '' ) {
			window.alert('请输入后台管理用户名!!');
			document.myform.Adminname.focus();
			return false;
		}
		if ( document.myform.Adminpass.value == '' ) {
			window.alert('请输入后台管理用户名密码!!');
			document.myform.Adminpass.focus();
			return false;
		}
					if ( document.myform.regname.value == '' ) {
			window.alert('请输入商城用户注册名!!');
			document.myform.regname.focus();
			return false;
		}
					if ( document.myform.regpass.value == '' ) {
			window.alert('请输入商城用户注册名密码!!');
			document.myform.regpass.focus();
			return false;
		}
		if ( document.myform.email.value == '' ) {
			window.alert('请输入一个邮箱!!');
			document.myform.email.focus();
			return false;
		}
				if ( document.myform.tel.value == '' ) {
			window.alert('请输入联系电话!!');
			document.myform.tel.focus();
			return false;
		}
					if ( document.myform.url.value == '' ) {
			window.alert('请输入商城的网址!!');
			document.myform.url.focus();
			return false;
		}
					if ( document.myform.sitename.value == '' ) {
			window.alert('请输入商城名称!!');
			document.myform.sitename.focus();
			return false;
		}
					if ( document.myform.pin.value == '' ) {
			window.alert('请输入商易网络提供的验证码!!');
			document.myform.pin.focus();
			return false;
		}
               if ( document.myform.adminpass.value.length<6) {
			window.alert('为保证账号安全，密码不能低于6位!!');
			document.myform.adminpass.focus();
			return false;
		}
return true;
}
//-->
</script>
  <table width="648" border="0" align="center" cellpadding="5" cellspacing="0">
  
  <tr>
    <td width="138">用户名</td>
    <td width="498" height="22"><input name="Adminname" type="text" id="Adminname" size="30" />
      *商城后台用户名以及论坛后台用户名</td>
  </tr>
  <tr>
    <td>用户密码</td>
    <td height="22"><input name="Adminpass" type="password" id="Adminpass" size="30" />
      *商城后台密码以及论坛后台密码</td>
  </tr>
  <tr>
    <td>邮箱</td>
    <td height="22"><input name="email" type="text" id="email" size="30" />
      *</td>
  </tr>
  <tr>
    <td>联系电话</td>
    <td height="22"><input name="tel" type="text" id="tel" size="30" /> 
    * </td>
  </tr>
  <tr>
    <td>OICQ</td>
    <td height="22"><input name="oicq" type="text" id="oicq" size="30" /></td>
  </tr>
  <tr>
    <td>网站域名</td>
    <td height="22">
	<%=SERVER_url%>
	</td>
  </tr>
  <tr>
    <td>系统(商城)名称</td>
    <td height="22"><input name="sitename" type="text" id="sitename" size="30" />
      *即商城用户注册名</td>
  </tr>
    <tr>
    <td>程序验证码</td>
    <td height="22"><input name="pin" type="text" id="pin" size="30" />
      <a href="http://bbs.rikee.com" target="_blank">*验证码请点击这里到瑞克技术论坛查看</a></td>
  </tr>
  <tr>
    <td height="50" colspan="2"><div align="center">
     <input type="submit" name="Submit" value=" 安 装 "ONCLICK="javascript:return setup1()">
      <br />
      <br />
    </div></td>
    </tr>
</table>
  <div align="center"><br />
    <a href="http://www.rikee.com">瑞克网络
  </a></div>
</FORM>

