求助,错误类型:Microsoft VBScript 编译器错误 (0x800A03F2) 缺少标识符
新弄了了网页,注册用户时出现如下错误:错误类型:
Microsoft VBScript 编译器错误 (0x800A03F2)
缺少标识符
/User_RegPost.asp, line 15, column 3
dim
--^
浏览器类型:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; TheWorld)
网页:
POST 202 ??? /User_RegPost.asp
POST Data:
UserName=&UserTrueName=&Password=&PwdConfirm=&Question=&Answer=&sex=1&Email=&birthyear=&birthmonth=&birthday=&address=&homepage=http%3A%2F%2F&QQ=&msn=&mobile=&Signature=&showre=1&Submit2=+%D7%A2+%B2%E . . .
时间:
2008年12月3日, 16:19:38
详细信息:
Microsoft 支持
user_regpost.asp中代码如下:、
<!--#include file="Inc/func_info.asp"-->
<!--#include file="Inc/md5.asp"-->
<%
if EnableUserReg<>"Yes" then
FoundErr=true
ErrMsg=ErrMsg & "<br><li>对不起,本站暂停新用户注册服务!</li>"
call WriteErrMsg()
response.end
end if
const ChannelID=2
Const ShowRunTime="Yes"
SkinID=0
dim
RUserName,UserTrueName,Password,PwdConfirm,Question,Answer,Sex,Email,Homepage,QQ,MSN,birthday,birthyear,birthmonth,address,signature,showre,mobile
RUserName=trim(request("UserName"))
UserTrueName=trim(request("usertruename"))
Password=trim(request("Password"))
PwdConfirm=trim(request("PwdConfirm"))
Question=trim(request("Question"))
Answer=trim(request("Answer"))
Sex=trim(Request("Sex"))
Email=trim(request("Email"))
Homepage=trim(request("Homepage"))
if Homepage="http://" or isnull(Homepage) then Homepage=""
QQ=trim(request("QQ"))
MSN=trim(request("MSN"))
birthyear=trim(request("birthyear"))
birthmonth=trim(request("birthmonth"))
birthday=trim(request("birthday"))
address=trim(request("address"))
signature=trim(request("signature"))
showre=trim(request("showre"))
mobile=trim(request("mobile"))
dim CheckNum,CheckUrl
randomize
CheckNum = int(7999*rnd+2000) '随机验证码
CheckUrl=Request.ServerVariables("HTTP_REFERER")
CheckUrl=left(CheckUrl,instrrev(CheckUrl,"/")) & "User_RegCheck.asp?Action=Check&UserName=" & RUserName & "&Password=" & Password & "&CheckNum=" & CheckNum
if RUserName="" or strLength(RUserName)>14 or strLength(RUserName)<4 then
founderr=true
errmsg=errmsg & "<br><li>请输入用户名(不能大于14小于4)</li>"
else
if Instr(RUserName,"=")>0 or Instr(RUserName,"%")>0 or Instr(RUserName,chr(32))>0 or Instr(RUserName,"?")>0 or Instr(RUserName,"&")>0 or Instr(RUserName,";")>0 or Instr(RUserName,",")>0 or Instr(RUserName,"'")>0 or Instr(RUserName,",")>0 or Instr(RUserName,chr(34))>0 or Instr(RUserName,chr(9))>0 or Instr(RUserName,"?")>0 or Instr(RUserName,"$")>0 then
errmsg=errmsg+"<br><li>用户名中含有非法字符</li>"
founderr=true
end if
end if
if Password="" or strLength(Password)>12 or strLength(Password)<6 then
founderr=true
errmsg=errmsg & "<br><li>请输入密码(不能大于12小于6)</li>"
else
if Instr(Password,"=")>0 or Instr(Password,"%")>0 or Instr(Password,chr(32))>0 or Instr(Password,"?")>0 or Instr(Password,"&")>0 or Instr(Password,";")>0 or Instr(Password,",")>0 or Instr(Password,"'")>0 or Instr(Password,",")>0 or Instr(Password,chr(34))>0 or Instr(Password,chr(9))>0 or Instr(Password,"?")>0 or Instr(Password,"$")>0 then
errmsg=errmsg+"<br><li>密码中含有非法字符</li>"
founderr=true
end if
end if
if PwdConfirm="" then
founderr=true
errmsg=errmsg & "<br><li>请输入确认密码(不能大于12小于6)</li>"
else
if Password<>PwdConfirm then
founderr=true
errmsg=errmsg & "<br><li>密码和确认密码不一致</li>"
end if
end if
if Question="" then
founderr=true
errmsg=errmsg & "<br><li>密码提示问题不能为空</li>"
end if
if Answer="" then
founderr=true
errmsg=errmsg & "<br><li>密码答案不能为空</li>"
end if
if Sex="" then
founderr=true
errmsg=errmsg & "<br><li>性别不能为空</li>"
else
sex=cint(sex)
if Sex<>0 and Sex<>1 then
Sex=1
end if
end if
if Email="" then
founderr=true
errmsg=errmsg & "<br><li>Email不能为空</li>"
else
if IsValidEmail(Email)=false then
errmsg=errmsg & "<br><li>您的Email有错误</li>"
founderr=true
end if
end if
if QQ<>"" then
if not isnumeric(QQ) or len(cstr(QQ))>20 then
errmsg=errmsg & "<br><li>QQ号码只能是4-20位数字,您可以选择不输入。</li>"
founderr=true
end if
end if
if mobile<>"" then
if not isnumeric(mobile) or len(cstr(mobile))>12 then
errmsg=errmsg & "<br><li>手机号必须是数字,不超过11位,您可以选择不输入。</li>"
founderr=true
end if
end if
if MSN<>"" then
if IsValidEmail(MSN)=false then
errmsg=errmsg & "<br><li>你的MSN有误。</li>"
founderr=true
end if
end if
if founderr=false then
dim sqlReg,rsReg
sqlReg="select * from " & db_User_Table & " where " & db_User_Name & "='" & RUserName & "'"
set rsReg=server.createobject("adodb.recordset")
rsReg.open sqlReg,Conn_User,1,3
if not(rsReg.bof and rsReg.eof) then
founderr=true
errmsg=errmsg & "<br><li>你注册的用户已经存在!请换一个用户名再试试!</li>"
else
rsReg.addnew
rsReg(db_User_Name)=RUserName
rsReg(db_User_Password)=md5(Password)
rsreg(db_user_truename)=usertruename
rsReg(db_User_Question)=Question
rsReg(db_User_Answer)=md5(Answer)
rsReg(db_User_Sex)=Sex
rsReg(db_User_Email)=Email
rsReg(db_User_Homepage)=Homepage
rsReg(db_User_QQ)=QQ
rsReg(db_User_Msn)=MSN
rsReg(db_User_RegDate)=Now()
rsReg(db_User_ArticleCount)=0
rsReg(db_User_ArticleChecked)=0
rsReg(db_User_LoginTimes)=1
rsReg(db_User_LastLoginTime)=NOW()
rsReg(db_User_ChargeType)=ChargeType_999
rsReg(db_User_UserPoint)=UserPoint_999
rsReg(db_User_BeginDate)=formatdatetime(now(),2)
rsReg(db_User_Valid_Num)=ValidDays_999
rsReg(db_User_Valid_Unit)=1
rsReg(db_User_address)=address
rsReg(db_User_sign)=signature
rsReg(db_User_showre)=showre
rsReg(db_User_mobile)=mobile
if len(birthyear&birthmonth&birthday)>1 then
rsReg(db_User_Birthday)=dateserial(cint(birthyear),cint(birthmonth),cint(birthday))
end if
if EmailCheckReg="Yes" then
rsReg(db_User_UserLevel)=3000
call SendRegEmail()
else
if AdminCheckReg="Yes" then
rsReg(db_User_UserLevel)=2000
else
rsReg(db_User_UserLevel)=999
Response.Cookies(CookiesName)("UserName")=RUserName
Response.Cookies(CookiesName)("Password") =md5(Password)
Response.Cookies(CookiesName)("UserLevel")=999
end if
end if
rsReg.update
end if
rsReg.close
set rsReg=nothing
end if
PageTitle="注册成功"
%>
<html>
<head>
<title><%=strPageTitle & " - " & PageTitle%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="inc/Skin_CSS.asp"-->
</head>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="Top.asp"-->
<table width="100%" height="300" border="0" align="center" cellpadding="0" cellspacing="0" class="border2">
<tr>
<td width="180" valign="top" class="tdbg_leftall"><TABLE cellSpacing=0 cellPadding=0 width="100%" border="0" style="word-break:break-all">
<TR class="title_left">
<TD align="center"><table width="180" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" class="title_maintxt">注册 <%=SiteName%></td>
</tr>
</table></TD>
</TR>
<TR>
<TD height="80" valign="top" class="tdbg_left"> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="5">
<tr>
<td valign="top"><br> <b> 注册步骤</b><br> 一、阅读并同意协议<font color="#FF0000">√</font><br>
二、填写注册资料<font color="#FF0000">√</font><br> 三、完成注册<font color="#FF0000">→</font></td>
</tr>
</table></TD>
</TR>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="tdbg_left"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="11" Class="title_left2"></td>
</tr>
</table></td>
</tr>
</table>
</td>
<td width=5></td>
<td width="575" align="center" valign=top><table width="100%" height="280" border="0" cellpadding="0" cellspacing="0">
<tr>
<td> <div align="center">
<%
if founderr=false then
call RegSuccess()
else
call WriteErrmsg()
end if
%>
<br>
<br>
</div></td>
</tr>
</table>
</td>
</tr>
</table>
<%
call Bottom()
%>
</body>
</html>
<%
call CloseConn
call CloseConn_User
sub WriteErrMsg()
response.write "<br><br><table align='center' width='300' border='0' cellpadding='2' cellspacing='0' class='border'>"
response.write "<tr class='title'><td align='center' height='22'>由于以下的原因不能注册用户!</td></tr>"
response.write "<tr class='tdbg'><td align='left' height='100'><br>" & errmsg & "<p align='center'>【<a href='javascript:onclick=history.go(-1)'>返 回</a>】<br></p></td></tr>"
response.write "</table>"
end sub
sub RegSuccess()
response.write "<br><br><table align='center' width='300' border='0' cellpadding='2' cellspacing='0' class='border'>"
response.write "<tr class='title'><td align='center' height='22'>成功注册用户!</td></tr>"
response.write "<tr class='tdbg'><td align='left' height='100'><br>你注册的用户名:" & RUserName & "<br>"
if EmailCheckReg="Yes" then
response.write "系统已经发送了一封确认信到你注册时填写的信箱中,你必须在收到确认信并通过确认信中链接进行确认后,你才能正式成为本站的注册用户。"
else
if AdminCheckReg="Yes" then
response.write "请等待管理通过你的注册申请后,你就可以正式成为本站的注册用户了。"
else
response.write "欢迎您的加入!!!"
end if
end if
response.write "<p align='center'>【<a href='javascript:onclick=window.close()'>关 闭</a>】<br></p></td></tr>"
response.write "</table>"
end sub
sub SendRegEmail()
dim MailtoAddress,MailtoName,Subject,MailBody,FromName,MailFrom,Priority
MailtoAddress=Email
MailtoName=RegUserName
Subject="注册确认信"
MailBody="这是一封注册确认信。你的验证码是:" & CheckNum & vbcrlf & "<br>请点此进行确认:<a href='" & CheckUrl & "'>" & CheckUrl & "</a>"
FromName=SiteName
MailFrom=WebmasterEmail
Priority=3
ErrMsg=SendMail(MailtoAddress,MailtoName,Subject,MailBody,FromName,MailFrom,Priority)
if ErrMsg<>"" then FoundErr=True
end sub
%>