今天装了一个友情链接系统,使用时总是出现如下出错信息:
Microsoft VBScript 运行时错误
错误 '800a0009'
下标越界: '[number: 2]'
/link1/linkforward.asp,行 28
弄了半天也没有弄出结果来。。现将linkforward.asp 文件原码帖于后,希望哪位高手能帮一下哦。。多谢了!!!
<!--#include file="conn.asp"-->
<!--#include file="common.asp"-->
<%
if request("forward")<>"" and request("ID")<>"" then
sql="select goout,gooutToday,outToday from link where ID="&request("ID")
rs.open sql,conn,1,3
if not rs.eof then
if DateDiff("d",rs("outToday"),now)=0 then
rs("goout")=rs("goout")+1
rs("gooutToday")=rs("gooutToday")+1
else
rs("goout")=rs("goout")+1
rs("gooutToday")=1
rs("outToday")=now
end if
rs.update
rs.close
end if
end if
if request("friendid")<>"" then
dim alternation
dim CookiesDoMain
dim CurrentDoMain
ComeFrom=request.ServerVariables("HTTP_REFERER")
ArrComeFrom=Split(ComeFrom,"/")
CurrentDoMain=ArrComeFrom(2)
if CurrentDoMain<>"" then
sql="select * from link where username='"&decryptstr(request("friendid"))&"'"
rs.open sql,conn,1,3
if not rs.eof then
arr2=Split(rs("Y_MyLink"),"/")
if CurrentDoMain=arr2(2) then
CookiesDoMain=request.Cookies("visit")(CurrentDoMain)
if CookiesDoMain="" then
if DateDiff("d",rs("inToday"),now)=0 then
rs("goin")=rs("goin")+1
rs("goinToday")=rs("goinToday")+1
else
rs("goin")=rs("goin")+1
rs("goinToday")=1
rs("inToday")=now
end if
rs.update
rs.close
sql="select alternation from setting"
set rs=conn.execute (sql)
if not rs.eof then
alternation=rs("alternation")
rs.close
end if
response.cookies("visit")(CurrentDoMain)="71C570102EE77010556F615C1FC82B7F"
Response.Cookies("visit").Expires= DateAdd("n",alternation,now())
end if
end if
end if
end if
dim L_SiteURL
sql="select L_SiteURL from setting"
set rs=conn.execute (sql)
if not rs.eof then
L_SiteURL=rs("L_SiteURL")
rs.close
end if
'response.Redirect(L_SiteURL)
response.write "<script>document.URL="""&L_SiteURL&""";</script>"
end if
%>
<form name="linkforward" id="linkforward" action="" method="post" target="_self">
<input name="forward" type="hidden">
<input name="ID" type="hidden">
</form>