这个错误原因是什么?

bineon 2003-08-22 02:20:47
Microsoft VBScript 运行时错误 (0x800A000D)
类型不匹配: '[object]'
/bbs/login.asp, 第 591 行
...全文
37 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
bineon 2003-08-22
  • 打赏
  • 举报
回复
太长了,我还是贴我修改了的吧:
Response.Cookies(Dvbbs.Forum_sn)("username") = regname
Response.Cookies(Dvbbs.Forum_sn)("userid") = dvbbs.UserID
Response.Cookies(Dvbbs.Forum_sn)("password") = PassWord
Response.Cookies(Dvbbs.Forum_sn)("userclass") = userclass
Response.Cookies(Dvbbs.Forum_sn)("userhidden") = userhidden

'#######添加文章管理信息¥¥¥¥¥这里是我添加的
dim wzrs
dim wenji,wzshu,wzjifen,wzdengji
set wzrs=Server.CreateObject("adodb.recordset")
wzrs.open "select wenji,shu,wzjifen,wzdengji from [user] where username='"& regname &"'" , conn,1,1
wenji=wzrs("wenji")
response.Cookies(Dvbbs.Forum_sn)("wenji")=wzrs("wenji")
response.Cookies(Dvbbs.Forum_sn)("wzshu")=wzrs("wzshu")
response.Cookies(Dvbbs.Forum_sn)("wzjifen")=wzrs("wzjifen")
response.Cookies(Dvbbs.Forum_sn)("wzdengji")=wzrs("wzdengji")
wzrs.close
set wzrs=nothing
'#######技术文章信息

bineon 2003-08-22
  • 打赏
  • 举报
回复
Session("re_challenge_reg_temp")=checkreal(remobile) & "|||" & checkreal(reuserpassword) & "|||" & checkreal(resex) & "|||" & checkreal(reqq) & "|||" & checkreal(reemail) & "|||" & checkreal(reusername)

select case ErrorCode
case 100
challengeWord_key=session("challengeWord_key")
If challengeWord_key=retokerWord Then
set rs=conn.execute("select UserMobile,IsChallenge,userid,userclass,username from [user] where UserMobile='"&remobile&"' and IsChallenge=1")
If rs.eof and rs.bof Then
'不是本论坛高级用户,引导其注册
call redir_reg_1()
Exit Function
Else
conn.execute("update [user] set UserPassword='"&md5(reuserpassword,16)&"' where UserMobile='"&remobile&"' and IsChallenge=1")
dvbbs.userid=rs(2)
userclass=rs(3)
reusername=rs(4)
End If
Else
Dvbbs.AddErrmsg "非法的提交过程1。"
'challengeWord_key & "," & retokerWord & "," & md5(Session("challengeWord") & ":" & "raynetwork",32) & "<br>原始随机数:"&Session("challengeWord")&",返回随机数:"&rechallengeWord&""
Exit Function
End If
case 101
Dvbbs.AddErrmsg "您在论坛超级联盟登录失败。"
Exit Function
case Else
Dvbbs.AddErrmsg "非法的提交过程2。"
Exit Function
end select

Response.Write "<script>dvbbs_login_suc_re('"&reuserpassword&"')</script>"

Response.Cookies(Dvbbs.Forum_sn)("usercookies") = "0"
Response.Cookies(Dvbbs.Forum_sn)("username") = reusername
Response.Cookies(Dvbbs.Forum_sn)("userid") = dvbbs.UserID
Response.Cookies(Dvbbs.Forum_sn)("password") = md5(reuserpassword,16)
Response.Cookies(Dvbbs.Forum_sn)("userclass") = userclass
Response.Cookies(Dvbbs.Forum_sn)("userhidden") = 2
rem 清除图片上传数的限制
response.cookies("upNum")=0
Response.Cookies(Dvbbs.Forum_sn).path=dvbbs.cookiepath

End Function

sub redir_reg_1()

If Session("re_challenge_reg_temp")="" Then
Dvbbs.AddErrmsg "非法的提交过程。"
exit sub
End If

Dim re_challenge_reg_temp
re_challenge_reg_temp=split(Session("re_challenge_reg_temp"),"|||")

Response.Write "<script>dvbbs_login_reg('"&re_challenge_reg_temp(5)&"')</script>"

end sub

sub save_redir_reg()
If Session("re_challenge_reg_temp")="" Then
Dvbbs.AddErrmsg "非法的提交过程。"
exit sub
End If

Dim username,sex,pass1,pass2,password
Dim useremail,face,width,height
Dim oicq,sign,showRe,birthday
Dim mailbody,sendmsg,rndnum,num1
Dim quesion,answer,topic
Dim userinfo,usersetting
Dim userclass
Dim re_challenge_reg_temp
Dim rs,sql,i
re_challenge_reg_temp=split(Session("re_challenge_reg_temp"),"|||")


If dvbbs.chkpost=false Then
Dvbbs.AddErrmsg "您提交的数据不合法,请不要从外部提交发言。"
End If

If request("name")="" or strLength(request("name"))>Cint(Dvbbs.Forum_setting(41)) or strLength(request("name"))<Cint(Dvbbs.Forum_setting(40)) Then
Dvbbs.AddErrmsg "请输入您的用户名(长度不能大于"&Dvbbs.Forum_setting(41)&"小于"&Dvbbs.Forum_setting(40)&")。"
Else
username=trim(request("name"))
End If

If Instr(request("name"),"=")>0 or Instr(request("name"),"%")>0 or Instr(request("name"),chr(32))>0 or Instr(request("name"),"?")>0 or Instr(request("name"),"&")>0 or Instr(request("name"),";")>0 or Instr(request("name"),",")>0 or Instr(request("name"),"'")>0 or Instr(request("name"),",")>0 or Instr(request("name"),chr(34))>0 or Instr(request("name"),chr(9))>0 or Instr(request("name"),"")>0 or Instr(request("name"),"$")>0 Then
Dvbbs.AddErrmsg "用户名中含有非法字符。"
Else
username=trim(request("name"))
End If

dvbbs.splitwords=split(dvbbs.splitwords,",")
for i = 0 to ubound(dvbbs.splitwords)
If instr(username,dvbbs.splitwords(i))>0 Then
Dvbbs.AddErrmsg "您输入的用户名包含系统禁止注册字符。"
exit for
End If
next

sex=re_challenge_reg_temp(2)
password=md5(re_challenge_reg_temp(1),16)
useremail=re_challenge_reg_temp(4)

showRe=1

face="userface/image1.gif"
width=request("width")
height=request("height")

If request.Form("birthyear")="" or request.form("birthmonth")="" or request.form("birthday")="" Then
birthday=""
Else
birthday=trim(Request.Form("birthyear"))&"-"&trim(Request.Form("birthmonth"))&"-"&trim(Request.Form("birthday"))
If not isdate(birthday) Then birthday=""
End If

userinfo=checkreal(request.Form("realname")) & "|||" & checkreal(request.Form("character")) & "|||" & checkreal(request.Form("personal")) & "|||" & checkreal(request.Form("country")) & "|||" & checkreal(request.Form("province")) & "|||" & checkreal(request.Form("city")) & "|||" & request.Form("shengxiao") & "|||" & request.Form("blood") & "|||" & request.Form("belief") & "|||" & request.Form("occupation") & "|||" & request.Form("marital") & "|||" & request.Form("education") & "|||" & checkreal(request.Form("college")) & "|||" & checkreal(request.Form("userphone")) & "|||" & checkreal(request.Form("address"))
usersetting=request.Form("setuserinfo") & "|||" & request.Form("setusertrue")

If Dvbbs.Founderr Then exit sub

Dim titlepic
set rs=conn.execute("select usertitle,titlepic from usertitle where not minarticle=-1 order by minarticle")
userclass=rs(0)
titlepic=rs(1)

set rs=server.createobject("adodb.recordset")
sql="select * from [user] where username='"&username&"' or usermobile='"&re_challenge_reg_temp(0)&"'"
rs.open sql,conn,1,3
If not rs.eof and not rs.bof Then
If cint(Dvbbs.Forum_Setting(24))=1 Then
Dvbbs.AddErrmsg "您输入的用户名已经被注册或者已经有用户使用了您填写的电子邮件地址。"
exit sub
Else
Dvbbs.AddErrmsg "您输入的用户名已经被注册。"
exit sub
End If
Else
rs.addnew
rs("usermobile")=re_challenge_reg_temp(0)
rs("IsChallenge")=1
rs("username")=username
rs("userpassword")=password
rs("useremail")=useremail
rs("userclass")=userclass
rs("titlepic")=titlepic
rs("UserMobile")=re_challenge_reg_temp(0)

If re_challenge_reg_temp(3)<>"" Then
rs("oicq")=re_challenge_reg_temp(3)
End If
Rs("article")=0
Rs("usergroupid")=4
rs("lockuser")=0
Rs("sex")=sex
Rs("showRe")=showRe
If birthday<>"" Then
rs("birthday")=birthday
End If
Rs("addDate")=NOW()
rs("face")=replace(face,"'","")
Rs("width")=width
Rs("height")=height
rs("logins")=1
Rs("lastlogin")=NOW()
rs("userWealth")=Dvbbs.Forum_user(0)
rs("userEP")=Dvbbs.Forum_user(5)
rs("usercP")=Dvbbs.Forum_user(10)
rs("userinfo")=userinfo
rs("usersetting")=usersetting
rs("bbstype")=1
rs.update
conn.execute("update dvbbs_info set usernum=usernum+1,lastuser='"&username&"'")
End If
rs.close
set rs=nothing

set rs=conn.execute("select top 1 userid,face from [user] order by userid desc")
dvbbs.userid=rs(0)

rs.close
set rs=nothing


If Dvbbs.Forum_Setting(47)=1 Then
on error resume next
'发送注册邮件
Dim getpass
topic="您在" & Dvbbs.Forum_info(0) & "的注册资料"
%>
<!--#include file="inc/email_txt.asp"-->
<%
select case Cint(Dvbbs.Forum_Setting(2))
case 0
sendmsg="<li>系统未开启邮件功能,请记住您的注册信息。</li>"
case 1
call jmail(useremail,topic,mailbody)
case 2
call Cdonts(useremail,topic,mailbody)
case 3
call aspemail(useremail,topic,mailbody)
case Else
sendmsg="<li>系统未开启邮件功能,请记住您的注册信息。</li>"
end select
If SendMail="OK" Then
sendmsg="<li>您的注册信息已经发往您的邮箱,请注意查收。</li>"
Else
sendmsg="<li>由于系统错误,给您发送的注册资料未成功。</li>"
End If
End If

If Dvbbs.Forum_Setting(46)=1 Then
'发送注册短信
Dim sender,title,body
sender=Dvbbs.Forum_info(0)
title=Dvbbs.Forum_info(0)&"欢迎您的到来"
%>
<!--#include file="inc/sms_txt.asp"-->
<%
'response.write body
sql="insert into message(incept,sender,title,content,sendtime,flag,issend) values('"&username&"','"&sender&"','"&title&"','"&body&"',"&SqlNowString&",0,1)"
conn.Execute(sql)
End If
bineon 2003-08-22
  • 打赏
  • 举报
回复
<!--#include file="Conn.asp"-->
<!--#include file="inc/const.asp"-->
<!--#include file="inc/chan_const.asp"-->
<!--#include file="inc/chkinput.asp"-->
<!--#include file="inc/email.asp"-->
<!--#include file="inc/md5.asp"-->
<%
response.buffer=True
NavCode=1
Dim comeurl
Dim Sendmail
dvbbs.stats="填写登录信息"
Dvbbs.Myaction=Dvbbs.Stats
Dvbbs.Nav()
Dvbbs.Head_var dvbbs.stats,"<a href=login.asp>论坛登录</a>",NavCode
Dvbbs.ScriptSrc(Dvbbs.Templateurl&"js/Dvlogin.js")
Dvbbs.ActiveOnline
Select Case request("action")
Case "chk"
Dvbbs_ChkLogin
ChkAllErr()
Case "redir"
redir
ChkAllErr()
Case "save_redir_reg"
call save_redir_reg()
ChkAllErr()
Case Else
Response.Write "<script>dvbbs_login_main("""&Request.ServerVariables("HTTP_REFERER")&""")</script>"
End Select

Dvbbs.Footer()

Function Dvbbs_ChkLogin

Dim UserIP
Dim username
Dim userclass
Dim password
Dim article
Dim cookies_path_s,cookies_path_d,cookies_path,usercookies
Dim mobile
Dim chrs,i

UserIP=replace(Request.ServerVariables("REMOTE_ADDR"),"'","")
mobile=trim(Dvbbs.CheckStr(request("mobile")))
if mobile<>"" and request("username")="" then
if len(mobile)<>11 then
Dvbbs.AddErrmsg "手机号码长度必须为11位。"
end if
end if
if mobile<>"" then
if len(mobile)<>11 then mobile=""
end if
If request("username")="" Then
If request("mobile")="" Then
Dvbbs.AddErrmsg "用户名和手机号必须填写其一。"
End If
Else
username=trim(Dvbbs.CheckStr(request("username")))
End If
If request("password")="" and mobile="" Then
Dvbbs.AddErrmsg "请输入您的密码。"
Else
password=md5(trim(Dvbbs.CheckStr(request("password"))),16)
End If

'判断更新cookies目录
cookies_path_s=split(Request.ServerVariables("PATH_INFO"),"/")
cookies_path_d=ubound(cookies_path_s)
cookies_path="/"
For i=1 to cookies_path_d-1
If not (cookies_path_s(i)="upload" or cookies_path_s(i)="admin") Then cookies_path=cookies_path&cookies_path_s(i)&"/"
Next
If dvbbs.cookiepath<>cookies_path Then
dvbbs.cookiepath=replace(cookies_path,"'","")
conn.execute("update dvbbs_info set cookiepath='"&dvbbs.cookiepath&"'")
End If

If Dvbbs.Founderr Then Exit Function

usercookies=request("CookieDate")

If ChkUserLogin(username,password,mobile,usercookies,1)=false Then
'本地验证未通过,使用手机号登录的
If mobile<>"" Then
challenge_check mobile,password
Exit Function
'本地验证未通过,使用用户名登录的,并且是高级用户则继续主服务器验证流程
Else
set chrs=conn.execute("select UserMobile,IsChallenge from [user] where username='"&username&"' and IsChallenge=1")
If chrs.eof and chrs.bof Then
Dvbbs.AddErrmsg "您的用户名并不存在,或者您的论坛密码错误,或者您的帐号已被管理员锁定。"
Exit Function
Else
challenge_check chrs("UserMobile"),password
Exit Function
End If
set chrs=nothing
End If
End If

Dim comeurlname
If instr(lcase(request("comeurl")),"reg.asp")>0 or instr(lcase(request("comeurl")),"login.asp")>0 or trim(request("comeurl"))="" Then
comeurlname=""
comeurl="index.asp"
Else
comeurl=request("comeurl")
comeurlname="<li><a href="&request("comeurl")&">"&request("comeurl")&"</a></li>"
End If

Response.Write "<script>dvbbs_login_suc("""&comeurl&""","""&comeurlname&""");</script>"

End Function

'全网认证
Function challenge_check(mobile,password)

If Not(Dvbbs.Forum_ChanSetting(0)=1 And Dvbbs.Forum_ChanSetting(10)=1) Then
Dvbbs.AddErrmsg "本论坛没有开启论坛全网用户无边界登录功能。"
exit function
End If
Dim rs
Dim MyForumID
Dim PostChanWord
set rs=conn.execute("select top 1 * from Dv_ChallengeInfo")
MyForumID=rs("D_ForumID")
PostChanWord=Get_ChallengeWord

Response.Write "<script>dvbbs_login_together('"&mobile&"','"&left(mobile,3)&"xxx"&right(mobile,5)&"','"&password&"','"&MyForumID&"','http://"&request.servervariables("server_name")&replace(lcase(request.servervariables("script_name")),"login.asp","")&"','"&PostChanWord&"')</script>"
set rs=nothing

End Function

Function redir()

Dim ErrorCode,ErrorMsg
Dim remobile,rechallengeWord,retokerWord,reuserpassword
Dim resex,reqq,reemail,reusername
Dim challengeWord_key,rechallengeWord_key
Dim userclass
Dim rs

ErrorCode=trim(request("ErrorCode"))
ErrorMsg=trim(request("ErrorMsg"))
remobile=trim(Dvbbs.CheckStr(request("mobile")))
reuserpassword=trim(Dvbbs.CheckStr(request("forumPwd")))
rechallengeWord=trim(Dvbbs.CheckStr(request("challengeWord")))
retokerWord=trim(request("tokenWord"))
resex=trim(Dvbbs.CheckStr(request("sex")))
If resex="F" Then
resex=1
Else
resex=0
End If
reqq=trim(Dvbbs.CheckStr(request("qq")))
reemail=trim(Dvbbs.CheckStr(request("email")))
reusername=trim(Dvbbs.CheckStr(request("username")))
pp4u 2003-08-22
  • 打赏
  • 举报
回复
类型不正确
贴出代码。。。。
hfkj 2003-08-22
  • 打赏
  • 举报
回复
老兄
这个怎么看呀
你把错的代码贴上

28,390

社区成员

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

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