谁能帮我测试一下这个注册用户的文件

biancheng258 2009-10-16 04:30:40
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<%dim action,username
action=request.QueryString("action")%>
<title><%=webname%>--新用户注册</title>

<%
select case action
case ""%>
<TABLE WIDTH="760" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="0" bgcolor="#FFFFFF">
<TBODY>
<TR>
<td colspan=2 width="100%" height="25" align="center">
<strong><%=webname%>注册条约</strong></TD>
</TR>

<TR> <TD align=left valign="top">
<P ALIGN="CENTER"></P><P ALIGN="CENTER"><FONT COLOR="#009900"><B>作为章丘优惠信息网的用户,您有责任:</B></FONT></P>
<P><FONT COLOR="#000000">◆在注册时,提供真实的、准确的、最新的和完整的个人资料,并保持并及时更新上述资料,以保证其真实性、准确性、最新性和完整性。章丘优惠信息网不能也不会对因您丢失了密码而引起的任何损失或损害承担责任。</P>

<P><FONT COLOR="#000000">◆对于您通过章丘优惠信息网张贴、发送或以其他任何形式传输的任何内容,章丘优惠信息网不负担负责。章丘优惠信息网并不控制通过本服务而张贴的内容,因此,并不保证此等内容的准确性、完整性和质量。无论任何情况下,章丘优惠信息网都不对任何内容以任何形式负责,包括但不限于,任何内容中的错误或疏忽,或任何由于使用所张贴、发送、或其他通过本服务的传输的内容而引起的损失或损害。</FONT></P>

<P><FONT COLOR="#000000">◆不得张贴、用电子邮件或其他方法传送违法、有害、威胁的、辱骂性的、骚扰性的、侵权性的侮辱性的、粗俗的、淫秽的、诽谤性的、侵犯他人隐私的、仇恨的、或在种族、民族上或其他方面不能接受的,以及其他您无权传送的内容。
不得张贴、发送或以其他形式传输任何未经请求或授权的广告、推广材料,“垃圾邮件”、或任何其他形式的此类推销。 </FONT></P><P>
<FONT COLOR="#000000">◆不得针对本服务、与本服务连接的服务器或网络制造干扰、混乱,或违反连接本服务的网络的任何要求、程序、政策或规则。并遵守适用的中国的法律法规。您对本服务的使用的风险将由您独自承担。本服务按照“现状”和“现有”的基础而提供。章丘优惠信息网明示不提供任何明示或默示的担保,包括但不限于,商业适用性的默示担保、特定目的之适用性及未侵害他人权利。
</FONT></P> </TD></TR>
<TR>
<FORM NAME="form1" METHOD="post" ACTION="reg.asp?action=yes"> <TD ALIGN="center">
<INPUT TYPE="submit" NAME="Submit4"STYLE="height:20; font:9pt; BORDER-BOTTOM: #cccccc 1px groove; BORDER-RIGHT: #cccccc 1px groove; BACKGROUND-COLOR: #eeeeee" VALUE="我 同 意">
   <INPUT TYPE="button" NAME="Submit22" VALUE="我 不 同 意" STYLE="height:20; font:9pt; BORDER-BOTTOM: #cccccc 1px groove; BORDER-RIGHT: #cccccc 1px groove; BACKGROUND-COLOR: #eeeeee"ONCLICK="location.href='../'">
</TD></FORM>
</TR>
</TBODY>
</TABLE>

<%case "yes"%>
<TABLE WIDTH="760" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="0" bgcolor="#ffffff">
<tr>
<TD colspan="2" ALIGN="center"><FONT COLOR="#cb6f00">请填写用户信息</FONT></TD>
</tr>
<form align="center" method="post" name="FrmAddLink" LANGUAGE="javascript" onsubmit="return FrmAddLink_onsubmit()" action=reg.asp?action=save>
<TABLE WIDTH="760" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="0" bgcolor="#ffffff">
<tr>
<TD colspan="2">  </TD>
</tr>
<tr>
<TD colspan="2" ALIGN="center"><FONT COLOR="#0000ff" size=3>请填写用户信息</FONT>(请详细填写每一项资料)</TD>
</tr>
<tr>
<TD colspan="2">  </TD>
</tr>
<TR>
<TD align="right"><FONT COLOR="#cb6f00">用 户 名:</FONT></TD>
<TD width="550"><INPUT NAME="username" TYPE="text" ID="username" >
用户名长度不能小于4</TD>
</TR>
<TR>
<TD><div align="right"><FONT COLOR="#cb6f00">密  码:</FONT></div></TD>
<TD> <INPUT NAME="Passwd" type="Password" ID="Passwd">
长度必须大于6个字符</TD>
</TR>
<TR>
<TD><div align="right"><FONT COLOR="#cb6f00">确认密码:</FONT> </div></TD>
<TD> <INPUT NAME="Passwd2" type="Password" ID="Passwd2"> </TD>
</TR>

<TR>
<TD><div align="right"><FONT COLOR="#cb6f00">真实姓名: </FONT></div></TD>
<TD> <INPUT NAME="fullname" TYPE="text" ID="fullname">
  </TD>
</TR>
<tr>
<td><div align="right"><FONT COLOR="#cb6f00">性  别: </FONT></div></TD></td>
<td width="264" height="20"> <select size="1" name="sex" style="font-family: 宋体; font-size: 9pt" title="请在这里填写您的性别。">
<option selected value="">请选择性别</option>
<option value="0">先生</option>
<option value="1">女士</option>
<option value="2">保密</option>
</td>
</tr>
<TR>
<TD><div align="right"><FONT COLOR="#cb6f00">电话号码: </FONT></div></TD>
<TD> <INPUT NAME="tel" TYPE="text" ID="tel">
请填写正确的号码,以便有急事联系</TD>
</TR>
<TR>
<TD><div align="right"><FONT COLOR="#cb6f00">电子信箱:</FONT> </div></TD>
<TD> <INPUT NAME="email" TYPE="text" ID="useremail2">
请您务必填写正确的E-mail地址,便于我们与您联系</TD>
</TR>
<TR>
<TD><div align="right"><FONT COLOR="#cb6f00"> 腾讯 Q Q:</FONT> </div></TD>
<TD> <INPUT NAME="qq" TYPE="text" ID="qq" >
网上联系</TD>
</TR>
<TR>
<TD><div align="right"><FONT COLOR=#cb6f00>密码提示问题: </FONT></div></TD>
<TD> <INPUT NAME="Question" TYPE="text" ID="Question"> </TD>
</TR>
<TR>
<TD><div align="right"><FONT COLOR=#cb6f00>密码答案: </FONT></div></TD>
<TD> <INPUT NAME="Answer" TYPE="text" ID="Answer"> </TD>
</TR>
</table>
<div align="center">
<br>
<input type="submit" value=" 确 定 " name="cmdOk" class="buttonface" style="font-family: 宋体; font-size: 9pt;">
 
<input type="reset" value=" 重 填 " name="cmdReset" class="buttonface" style="font-family: 宋体; font-size: 9pt;" >
</div>

</form>
</TABLE>

<%case "save"%>
<!--#include file="func.asp"-->
<%call saveuser()
end select%>

<%sub tiaoyue()
set rs=server.CreateObject("adodb.recordset")
rs.Open "select [rule] from config",conn,1,1
response.Write trim(rs("rule"))
rs.Close
set rs=nothing
end sub

sub saveuser()
dim rsrec,strgift,stradd,strresult,id
if session("regtimes")=1 then
response.Write "<div align=center><br><br>对不起,您刚注册过用户。<br>请稍后再进行注册!</font></div><br>"
response.End
end if

set rs=server.CreateObject("adodb.recordset")
rs.open "select username,useremail from [admin] where username='"&trim(request.form("username"))&"' or useremail='"&trim(request.form("useremail"))&"'",conn,1,1
if rs.recordcount>0 then
call usererr()
rs.close
set rs = nothing
else
rs.close

rs.open "select webimg13 from [config]",conn,1,1
strgift=Clng(rs("webimg13"))
rs.close


set rs=server.CreateObject("adodb.recordset")

rs.open "select * from [admin]",conn,1,3
rs.addnew
rs("admin")=username

rs("UserPassword")=passwd
rs("rank")=3
rs("UserQuestion")=question
rs("UserAnswer")=answer
rs("realname")=fullname
rs("UserEmail")=email

rs("UserSex")=sex
rs("Userqq")=qq
rs("UserMobile")=tel


rs("UserLastIP")=ip
rs("UserLogins")=1
rs("LastLogin")=now()


rs("adddate")=now()
rs.update
id=rs("Id")

rs.close
set rs=nothing



%>
<table width=760 border=0 align=center cellpadding=0 cellspacing=1 bgcolor=<% = bgclr1 %>>
<tr><td height=100 bgcolor=<% = bgclr4 %>>
<table width=700 border=0 align=center cellpadding=0 cellspacing=0>
<tr><td height=80 bgcolor=<% = bgclr4 %>><font color=#FF0000>用户注册成功<br></font>
恭喜<% = request.Cookies("timesshop")("username") %>,您已注册成为[<% = webname %>]正式用户,请进行下一步操作:<br><br>
·<% = strresult %><br><br>
·
·<a href=index.asp>返回首页</a></td></tr></table>
</td></tr></table>
<%
end if
end sub

sub usererr()
response.write "<table width=760 align=center border=0 cellspacing=0 cellpadding=0 class=table-zuoyou bordercolor=#CCCCCC><tr><td bordercolor=#FFFFFF bgcolor=#FFFFFF align=center>"
response.write "<table width=450 border=0 align=center cellpadding=2 cellspacing=0><tr><td height=260>"
response.write "<p>· <font color=red>用户注册失败!</font></p><p>· 您输入的用户名或e-mail地址已存在,请返回重新输入!</p><p>· <a href=javascript:history.go(-1)>返回上一页</a></p> </td></tr></table></td></tr></table>"
end sub
%>
<SCRIPT LANGUAGE="JavaScript">
<!--
function check()
{
if(checkspace(document.userinfo.username.value)) {
document.userinfo.username.focus();
alert("用户名不能为空,请重新输入!");
return false;
}
if(checkspace(document.userinfo.username.value) || document.userinfo.username.value.length < 2) {
document.userinfo.username.focus();
alert("用户名长度不能小于2,请重新输入!");
return false;
}
if(checkspace(document.userinfo.identify.value) || document.userinfo.identify.value.length < 15) {
document.userinfo.identify.focus();
alert("身份证号码长度不能小于15位,请重新输入!");
return false;
}
if(checkspace(document.userinfo.identify.value) || document.userinfo.identify.value.length > 18) {
document.userinfo.identify.focus();
alert("身份证号码长度不能大于18位,请重新输入!");
return false;
}
if(checkspace(document.userinfo.UserPassword.value) || document.userinfo.UserPassword.value.length < 6) {
document.userinfo.UserPassword.focus();
alert("密码长度不能小于6,请重新输入!");
return false;
}
if(document.userinfo.UserPassword.value != document.userinfo.UserPassword1.value) {
document.userinfo.UserPassword.focus();
document.userinfo.UserPassword.value = '';
document.userinfo.UserPassword1.value = '';
alert("两次输入的密码不同,请重新输入!");
return false;
}

if(document.userinfo.useremail.value.length!=0)
{
if (document.userinfo.useremail.value.charAt(0)=="." ||
document.userinfo.useremail.value.charAt(0)=="@"||
document.userinfo.useremail.value.indexOf('@', 0) == -1 ||
document.userinfo.useremail.value.indexOf('.', 0) == -1 ||
document.userinfo.useremail.value.lastIndexOf("@")==document.userinfo.useremail.value.length-1 ||
document.userinfo.useremail.value.lastIndexOf(".")==document.userinfo.useremail.value.length-1)
{
alert("Email地址格式不正确!");
document.userinfo.useremail.focus();
return false;
}
}
else
{
alert("Email不能为空!");
document.userinfo.useremail.focus();
return false;
}

}

function regInput(obj, reg, inputStr)
{
var docSel = document.selection.createRange()
if (docSel.parentElement().tagName != "INPUT") return false
oSel = docSel.duplicate()
oSel.text = ""
var srcRange = obj.createTextRange()
oSel.setEndPoint("StartToStart", srcRange)
var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
return reg.test(str)
}


function checkspace(checkstr) {
var str = '';
for(i = 0; i < checkstr.length; i++) {
str = str + ' ';
}
return (str == checkstr);
}
//-->
</script>
...全文
46 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
biancheng258 2009-10-16
  • 打赏
  • 举报
回复
错误类型:
Microsoft JET Database Engine (0x80040E10)
至少一个参数没有被指定值。
/reg.asp, 第 160 行
biancheng258 2009-10-16
  • 打赏
  • 举报
回复
怎么老是出错

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧