<!--#include file="inc/conn.asp"-->
<!--#include file="inc/jle_sub.asp"-->
<!--#include file="inc/jle_fuction.asp"-->
<!--#include file="inc/md5.asp"-->
<!--#include file="inc/function.asp"-->
<!--#include file="inc/Checkyuckj.asp"-->
<!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-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=title%>-会员注册成功</title>
<link rel="icon" href="<%=web%>/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="<%=web%>/favicon.ico" type="image/x-icon" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<%
If Request.Form("yuckjAnswer")="" Then
response.write "<script language=JavaScript>" & chr(13) & "alert('请填写防恶意注册问题答案!');" & "history.back()" & "</script>"
End If
If Not Checkyuckj(Request.Form("yuckjAnswer")) Then
response.write "<script language=JavaScript>" & chr(13) & "alert('防恶意注册问题回答错误，请返回重试。');" & "history.back()" & "</script>"
End If

jle_checkcode=CStr(session("GetCode"))
session("GetCode")=""
if jle_checkcode<>CStr(request("jle_checkcode"))  then
Response.write"<script>alert(""验证码不正确，请点击刷新验证后重写！  "");history.back();</script>"
Response.end
end if

dim password1,namecn,tu1
tu1=trim(request("tu"))
if request("per")="jle" then
username=HtmlEncode(trim(request("username")))
password=request("password")
email=HtmlEncode(trim(request("email")))
set rs=server.createobject("adodb.recordset")
sql="select * from [user] where username='"&username&"'or email='"&email&"'"
rs.open sql,conn,1,3
if not rs.eof or not rs.bof then
 if trim(rs("username"))=username then
 response.write "<script language=JavaScript>" & chr(13) & "alert('您输入的用户名已经注册过,请重新注册个人用户');" & "history.back()" & "</script>"
 response.end
 end if
 if trim(rs("email"))=email then
 response.write "<script language=JavaScript>" & chr(13) & "alert('您输入的E-mail已经注册过,请重新注册个人用户');" & "history.back()" & "</script>"
 response.end
 end if

end if
if rs.eof or rs.bof then
rs.addnew
rs("username")=username
rs("password")=md5(password)
rs("name")=HtmlEncode(trim(request("name")))
rs("email")=email
rs("dianhua")=HtmlEncode(trim(request("dianhua")))
rs("qq")=HtmlEncode(trim(request("qq1")))
rs("dizhi")=HtmlEncode(trim(request("dizhi")))
rs("zcdata")=now()
rs("jf")=jf
rs("hb")=hb
rs.update
end if
else


dim comabout,fax
username=HtmlEncode(trim(request("comusername")))
password=request("compassword")
password=Request.form("compassword")
password1=Request.form("compassword1")
'com=Request.form("com")
email=HtmlEncode(trim(request.form("comemail")))
set rs1=server.createobject("adodb.recordset")
sql1="select * from [jle_shop] where username='"&username&"'or email='"&email&"'"
rs1.open sql1,conn,1,3
if not rs1.eof or not rs1.bof then
 if trim(rs1("username"))=username then
 response.write "<script language=JavaScript>" & chr(13) & "alert('您输入的用户名已经注册过,请重新注册商家用户');" & "history.back()" & "</script>"
 response.end
 end if
 
 if trim(rs1("email"))=email then
 response.write "<script language=JavaScript>" & chr(13) & "alert('您输入的E-mail已经注册过,请重新注册商家用户');" & "history.back()" & "</script>"
 response.end
 end if
 end if

if rs1.eof or rs1.bof then
rs1.addnew
rs1("username")=username
rs1("password")=md5(password)
rs1("sjcla1")=request("sjcla1")
rs1("sjcla2")=request("sjcla2")
rs1("diqu")=HtmlEncode(request("diqu"))
rs1("city_one")=HtmlEncode(request.form("city_one"))
rs1("city_two")=HtmlEncode(request.form("city_two"))
rs1("city_three")=HtmlEncode(request.form("city_three"))
rs1("city")=HtmlEncode(request("city"))
rs1("com")=HtmlEncode(request("com"))
rs1("comabout")=HtmlEncodes(trim(request("comabout")))
rs1("name")=HtmlEncode(trim(request("comname")))
rs1("qq")=HtmlEncode(trim(request("qq")))
rs1("email")=email
rs1("url")=HtmlEncode(trim(request("url")))
rs1("dianhua")=HtmlEncode(trim(request("comdianhua")))
rs1("fax")=HtmlEncode(trim(request("comfax")))
rs1("che")=HtmlEncode(request("che"))
rs1("dizhi")=HtmlEncode(trim(request("comdizhi")))
rs1("logo")=HtmlEncode(trim(request("tupian")))
rs1("zcdata")=now()
rs1("jf")=jf
rs1("hb")=hb
rs1("mapx")=HtmlEncode(trim(request("mapx")))
rs1("mapy")=HtmlEncode(trim(request("mapy")))
rs1("mapz")=HtmlEncode(trim(request("mapz")))
rs1("mb")=trim(request.form("mb"))
rs1.update
end if
end if

%>
<body>
<%call top()%><div id="Fmain">


<div id=FFTit class=F12bold>注册会员成功</div><div id=FFContent><div Class='FFdiv'>
<table width="100%" border="0" bordercolor="#FFFFFF" cellpadding="0" style="border-collapse: collapse">
<form method="POST" name="thisForm" action="login.asp">
<tr> 
<td class=userbg align="center" width="50%">注册会员成功</td>
</tr><tr> 
<td height="111">
<p align="center" style="line-height: 200%; margin-top: 0; margin-bottom: 0">
<font size="3">恭喜您,<b><%=username%></b>(<%if request("per")="jle" then response.write "个人会员"  else response.write "商家会员"%>)！<b><font color="#FF0000">注册成功了！</font></b></font><p align="center" style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font size="2">同时将密码发送到您的邮箱<b><font color=""#ff0000""><%=email%></font></b>，请保管好您的密码</font><br>
<hr size="0" style="border: 1px dotted #cad9ea">
</td>
</tr>
<tr> 
<td height="32">
<p align="center">用户名称：<input type="text" maxlength="12" name="username" size="20" value="<%=username%>"><font color="#FF0000"> *</font></td>
</tr>
<tr> 
<td height="45">
<p align="center">用户密码：<input type="password" maxlength="40" name="password" size="20" value="<%=password%>" >
<font color="#FF0000">*</font></td>
</tr>
<tr> 
<td>
<p align="center"><input type="hidden" name="login" value="jle"><%if request("per")="jle" then %><input type="submit" value="个人登录" name="per"><%else%><input type="submit" value="商家登陆" name="com"><br>您的帐号需要我们在24小时内审核通过！<br>
<%end if%></td>
</tr>
</form>
</table>
</div></div>
 <br style="clear:both;" />

</div>


<%
call mail()
rs.close
set rs=nothing
rs1.close
set rs1=nothing

call bottom()
%>


<%
sub mail()
dim mailbody,Jmail
mailbody="欢迎您,"&username&"!<br>恭喜您成为<a target=_blank href="&web&">"&title&"</a>的尊敬会员！<br>您的登陆帐号："&username&"<br>您的登陆密码："&password&"<br><br>登陆地址为：<a target=_blank href="&web&">"&web&"</a><br>["&title&"]打造吉林最专业的分类资讯平台<br>"
Set Jmail=server.createobject("Jmail.Message")
Jmail.Charset ="gb2312"
Jmail.Silent =true
JMail.ContentType = "text/html"
Jmail.Priority = 3
Jmail.MailServerUserName = mailname
Jmail.MailServerPassword = mailpass
Jmail.From = mailform
Jmail.FromName =""&title&""
Jmail.Subject ="恭喜你注册成功，请查收登陆帐号！"
Jmail.AddRecipient ""&email&""
Jmail.Body = mailbody
Jmail.Send(mailsmtp)
Set Jmail=nothing
end sub
%>
</body>
</html>
