<!--#include file="conn.asp"--><%seo_title="Register-"&sitename%>
<!--#include file="IncAsp/WrzcNethtml_top.asp"-->
<!--#include file="IncAsp/WrzcNethtml_email.asp"-->
<!-- #include file="IncAsp/WrzcNethtml_md5.asp" -->
<div align="center">
<table cellpadding="0" cellspacing="0" class="all_t1">
<tr><td class="all_l_td" valign="top">
<!--#include file="IncAsp/WrzcNethtml_log.asp"--><div class="d5"></div>
</td>
<td valign="top" class="all_c_td">
<%
if trim(request("user_name"))="" then
    errmsg=errmsg+"<br>"+"<li>Please Enter UserName"
    founderr=true
else
    user_name=DelStr(request("user_name"))
end if
if trim(request("user_pass"))="" or trim(request("user_pass2"))="" then
    errmsg=errmsg+"<br>"+"<li>Please Enter password"
    founderr=true
else
    user_pass=md5(DelStr(request("user_pass")))
    user_pass2=md5(DelStr(request("user_pass2")))
end if
if user_pass <> user_pass2 then
    errmsg=errmsg+"<br>"+"<li>Please Enter correct Password"
    founder=true
end if
if isvalidemail(trim(request("user_mail")))=false then
    errmsg=errmsg+"<br>"+"<li>Please Enter correct Email"
    founderr=true
else
    user_mail=DelStr(request("user_mail"))
end if
question=DelStr(request("question"))
answer=DelStr(request("answer"))
set rs=server.createobject("adodb.recordset")
sql="select username from WrzcNethtml_user where username='"&user_name&"'"
rs.open sql,conn,1,1
if not rs.eof then
    errmsg=errmsg+"<br>"+"<li>UserName existed"
    founderr=true
end if
rs.close
set rs=nothing
errmes="Hello,"
%>
<table border="0" width="99%" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
<%
if founderr=false then
set rs=server.createobject("adodb.recordset")
sql="select * from WrzcNethtml_user where username='"&user_name&"'"
rs.open sql,conn,1,3
rs.addnew
rs("username")=user_name
rs("userpass")=user_pass
rs("usermail")=user_mail
rs("question")=question
rs("answer")=answer
rs("savemoney")=0
rs("savemoneyz")=0
rs("degree")=1
rs("regtime")=now()
rs("landtime")=now()
rs("user_type")=1
rs("user_lastip")=request.servervariables("remote_addr")
rs("user_regip")=request.servervariables("remote_addr")
rs("user_fav")=""
rs.update
rs.close
set rs=nothing

if Request.Cookies("WrzcNethtml")("guest")<>"" then
guest=Request.Cookies("WrzcNethtml")("guest")
set rs=server.createobject("adodb.recordset")
rs.open "select user_name from WrzcNethtml_basket where user_name='"&guest&"' and basket_check=0",conn,1,3
do while not rs.eof
rs("user_name")=request("user_name")
rs.update
rs.movenext
loop
rs.close
set rs=nothing
Response.Cookies("WrzcNethtml")("guest")=""
end if
Response.Cookies("WrzcNethtml")("user_name")=user_name
Response.Cookies("WrzcNethtml")("user_pass")=user_pass
Response.Cookies("WrzcNethtml")("user_type")=1

if mail_regs<>"" and mail_regc<>"" then
	mail_regs=replace(replace(replace(replace(mail_regs,"#U",user_name),"#M",user_mail),"#Q",question),"#A",answer)
	mail_regc=replace(replace(replace(replace(mail_regc,"#U",user_name),"#M",user_mail),"#Q",question),"#A",answer)
	if E_SendManType=1 then
	SendEmail ""&user_mail&"",""&mail_regs&"",""&mail_regc&"","Jmail"
	elseif E_SendManType=2 then
	SendEmail ""&user_mail&"",""&mail_regs&"",""&mail_regc&"","ObjCDOMail"
	elseif E_SendManType=3 then
	SendEmail ""&user_mail&"",""&mail_regs&"",""&mail_regc&"","Aspemail"
	elseif E_SendManType=4 then
	SendEmail ""&user_mail&"",""&mail_regs&"",""&mail_regc&"","Cdom"
	end if
end if
%>
<tr><td class="sort">&nbsp;<IMG src="Skin/<%=WrzcNethtml_skin%>/home.gif" border=0 align="absmiddle">
	  
	<a class="ser" href="index.html">Home</a> &gt;&gt;&nbsp;Congratulations!</td></tr>
<tr><td>
<table width="100%" border="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
<tr><td width="33%" height="30" align="right">UserName:</td><td width="67%" height="30"><%=user_name%></td></tr>
<tr><td width="33%" height="30" align="right">Email:</td><td width="67%" height="30"><%=user_mail%></td></tr>
<tr><td width="33%" height="30" align="right">Question of passwprd:</td><td width="67%" height="30"><%if question="" then%><%else%><%=question%><%end if%></td></tr>
<tr><td width="33%" height="30" align="right">Answer of passwprd:</td><td width="67%" height="30"><%if answer="" then%><%else%><%=answer%><%end if%></td></tr>
<tr><td height="100" colspan="2"> <p style="line-height: 150%">
<a href="modify.asp"><font color="#FF0000">Please fill in your contact infomation.</font></a><br>
<a href="index.html">Back to home</a></td></tr></table></td></tr>
<%else%>
<tr><td class="sort">&nbsp;<IMG src="Skin/<%=WrzcNethtml_skin%>/home.gif" border=0 align="absmiddle">
	  
	<a class="ser" href="index.html">home</a> &gt;&gt;&nbsp;Error!</td></tr>
<tr><td><table border="0" width="100%" cellspacing="1"><tr><td height="200"><p style="line-height: 150%"><%=errmsg%></td></tr></table></td></tr>
<%end if%></table>

</td></tr></table></div><!--#include file="IncAsp/WrzcNethtml_copy.asp"-->