| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 335 人关注过本帖
标题:有没有朋友愿意帮我看看这段代码问题在哪
只看楼主 加入收藏
nkmessi
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2010-6-12
结帖率:100%
收藏
 问题点数:0 回复次数:0 
有没有朋友愿意帮我看看这段代码问题在哪
<!--#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
%>
搜索更多相关主题的帖子: content 会员注册 email 朋友 meta 
2011-02-01 13:28
快速回复:有没有朋友愿意帮我看看这段代码问题在哪
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.024571 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved