有没有朋友愿意帮我看看这段代码问题在哪
<!--#include file="inc/conn.asp"--><!--#include file="config.asp"-->
<!--#include file="inc/ipt.asp"-->
<!--#include file="inc/err.asp"-->
<!--#include file="mail.asp"-->
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>会员注册成功-<%=title%></title>
</head>
<%
dim username,password,password1,namecn,idcard,dianhua,qq,dizhi,email,tu
tu=trim(request("tu"))
if request("per")="cnmai" then
dim rs,sql
username=trim(request("username"))
password=request("password")
email=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('您输入的用户名已经注册过,请重新注册1');" & "history.back()" & "</script>"
response.end
end if
if trim(rs("email"))=email then
response.write "<script language=JavaScript>" & chr(13) & "alert('您输入的E-mail已经注册过,请重新注册1');" & "history.back()" & "</script>"
response.end
end if
end if
if rs.eof or rs.bof then
rs.addnew
rs("username")=username
rs("password")=password
rs("name")=trim(request("name"))
rs("email")=email
rs("idcard")=trim(request("idcard"))
rs("dianhua")=trim(request("dianhua"))
rs("qq")=trim(request("qq"))
rs("dizhi")=trim(request("dizhi"))
rs("zcdata")=now()
rs("a")=z_a
rs("b")=z_b
rs("c")=z_c
rs("d")=z_d
rs("jf")=jf_1
rs("hb")=z_hb
rs.update
end if
else
dim com,comabout,fax,rs1,sql1,class2,name
username=trim(request("comusername"))
password=request("compassword")
password=Request.form("compassword")
password1=Request.form("compassword1")
com=trim(request("com"))
email=trim(request("comemail"))
set rs1=server.createobject("adodb.recordset")
sql1="select * from [com] 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('您输入的用户名已经注册过,请重新注册2');" & "history.back()" & "</script>"
response.end
end if
if trim(rs1("email"))=email then
response.write "<script language=JavaScript>" & chr(13) & "alert('您输入的E-mail已经注册过,请重新注册2');" & "history.back()" & "</script>"
response.end
end if
end if
if rs1.eof or rs1.bof then
rs1.addnew
rs1("username")=username
rs1("password")=password
rs1("class1")=request("class1")
rs1("com")=com
rs1("comabout")=trim(request("comabout"))
rs1("name")=trim(request("comname"))
rs1("qq")=trim(request("qq"))
rs1("email")=email
rs1("idcard")=trim(request("comidcard"))
rs1("dianhua")=trim(request("comdianhua"))
rs1("fax")=trim(request("comfax"))
rs1("dizhi")=trim(request("comdizhi"))
rs1("logo")=trim(request("tupian"))
rs1("zcdata")=now()
rs1("a")=z_a
rs1("b")=z_b
rs1("c")=z_c
rs1("d")=z_d
rs1("jf")=jf_1
rs1("hb")=z_hb
rs1.update
end if
end if
call mail()
%>
<body>
<!--#include file="topcnmai.asp"-->
<div align="center">
<table width="760" id="table1" bgcolor="#FFFFFF" style="border-left:1px solid #CCCCCC; border-right:1px solid #CCCCCC; padding:1px; " cellspacing="0" cellpadding="0">
<tr>
<td height="30">
</td>
</tr>
<tr>
<td valign="top">
<div align="center">
<table width="510" border="0" bordercolor="#FFFFFF" cellpadding="0" style="border-collapse: collapse">
<form method="POST" name="thisForm" action="login.asp">
<tr>
<td class=td2_muen height="26" align="center"><font color=white>注册会员成功</font></td>
</tr>
<tr>
<td>
<IMG src="image/a_1.gif" width="515" height="10"></td>
</tr>
<tr>
<td bgcolor="#FFECD9" background="image/b_1.gif">
<p align="center" style="line-height: 200%; margin-top: 0; margin-bottom: 0">
<font size="2">恭喜您,<b><%=username%></b>(<%if request("per")="cnmai" 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="red"><%=email%></font></b>信箱,请注意查收保管!</font><br>
<hr size="0" style="border: 1px dotted #CCCCCC"></td>
</tr>
<tr>
<td height="28" background="image/b_1.gif">
<p align="center">用户名称:<input type="text" maxlength="12" name="username" size="20" value="<%=username%>"><font color="#FF0000"> *</font></td>
</tr>
<tr>
<td height="25" background="image/b_1.gif">
<p align="center">用户密码:<input type="password" maxlength="40" name="password" size="20" value="<%=password%>" >
<font color="#FF0000">*</font></td>
</tr>
<tr>
<td height="31" background="image/b_1.gif">
<p align="center"><input type="hidden" name="login" value="cnmai"><%if request("per")="cnmai" then %><input type="submit" value="个人登陆" name="per"><%else%><input type="submit" value="商家登陆" name="com"><%end if%></td>
</tr>
<tr>
<td>
<IMG src="image/c_1.gif" width="515" height="9"></td>
</tr>
</form>
</table>
</div>
</td>
</tr>
</table>
</div>
<!--#include file="endcnmai.asp"-->
</body>
</html>
<%
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&">晋城二手网</a><br>["&title&"]打造最专业供求信息平台。<br>服务热线:13753625312 QQ:63993389"
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
set rs=nothing
set rs1=nothing
%>