<%
'**************************************************
'函数名:Restr
'作 用:过滤非法的SQL字符
'参 数:strChar-----要过滤的字符
'返回值:过滤后的字符
'**************************************************
Function Restr(strChar)
If strChar = "" Or IsNull(strChar) Then
Restr = ""
Exit Function
End If
Dim strBadChar, arrBadChar, tempChar, i
strBadChar = "+,',%,^,&,?,(,),<,>,[,],{,},/,\,;,:," & Chr(34) & "," & Chr(0) & ",--,and,exec,insert,select,delete,update,count,*,%,chr,mid,master,truncate,char,declare"
arrBadChar = Split(strBadChar, ",")
tempChar = strChar
For i = 0 To UBound(arrBadChar)
tempChar = Replace(tempChar, arrBadChar(i), "")
Next
tempChar = Replace(tempChar, "@@", "@")
Restr = trim(tempChar)
End Function
Set rs = Server.CreateObject("ADODB.Recordset")
Set conn=Server.CreateObject("ADODB.Connection")
conn.Open Application("FreeHostDBlink")
xunweb.xunwebPages stype,typeid,conn,rs,skey
if not rs.eof then
dim typenames
dim pageid,maxperpage,mpage,totalput,wn
if trim(request("pageid"))<>"" then pageid = cint(request("pageid")) else pageid = 1
if pageid = "" or pageid =< 1 then pageid = 1
maxperpage = 20 '每页显示资源数目
rs.pagesize = maxperpage
mpage = rs.pagecount '得到总页数
totalput = rs.recordcount '得到总记录数
rs.move(pageid-1)*maxperpage
if not rs.eof then
if stype = "1" then
typenames = "按照行业分类 > <a href=""?stype=1&typeid="& typeid &""">" & rs("webTname") & "</a>"
elseif stype = "2" then
typenames = "按照应用分类 > <a href=""?stype=2&typeid="& typeid &""">" & rs("proTname") & "</a>"
end if
if skey <> "" then
typenames = typenames & " <font color=red>搜索关键词(" & skey &")</font>"
end if
end if
if stype = "" then stype = "0"
if typeid = "" then typeid = "0"
%>
报错字段 红色标记
错误代码
Microsoft VBScript 运行时错误 错误 '800a01a8'
缺少对象: ''
/website.asp,行 141 |