📄 dll.asp
字号:
response.write"<script>alert('"&sqlname&"不能为空!');history.go(-1);</script>"
Response.End
elseif num<>0 then
dim Bword(14)
Bword(0)="?"
Bword(1)=";"
Bword(2)=">"
Bword(3)="<"
Bword(4)="chr(32)"
Bword(5)="’"
Bword(6)="””"
Bword(7)="&"
Bword(8)="%"
Bword(9)="$"
Bword(10)="'"
Bword(11)="chr(34)"
Bword(12)="|"
Bword(13)="chr(9)"
Bword(14)="--"
for i= 0 to ubound(Bword)
if instr(str,Bword(i))<>0 then
response.write"<script>alert('"&sqlname&"中含有非法字符(各种符号)!');history.go(-1);</script>"
Response.End
end if
next
if len(str)>num then
response.write"<script>alert('"&sqlname&"不能超过"&num&"字符!');history.go(-1);</script>"
Response.End
end if
elseif instr(str,"'")<>0 then
response.write"<script>alert('"&sqlname&"中有非法字符!');history.go(-1);</script>"
Response.End
end if
elseif attrib=0 then
if str="" then
response.write"<script>alert('"&sqlname&"不能为空!');history.go(-1);</script>"
Response.End
elseif not isnumeric(str) then
response.write"<script>alert('"&sqlname&"不是数字型!');history.go(-1);</script>"
Response.End
elseif len(str)>num then
response.write"<script>alert('"&sqlname&"数字型参数位数不能超过"&num&"位!');history.go(-1);</script>"
Response.End
end if
else
response.write"<script>alert('过滤函数调用错误!');history.go(-1);</script>"
Response.End
end if
checksql=str
End Function
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◆函数名:IsObjInstalled ◇
'◇功 能:检查组件是否安装 ◆
'◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇
Function IsObjInstalled(strClassString)
'on error resume next
IsObjInstalled = False
Err = 0
Dim xTestObj
Set xTestObj = Server.CreateObject(strClassString)
If 0 = Err Then IsObjInstalled = True
Set xTestObj = Nothing
Err = 0
End Function
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◆函数名:JoinChar ◇
'◇功 能:检查字符长度 ◆
'◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇
function JoinChar(strUrl)
if strUrl="" then
JoinChar=""
exit function
end if
if InStr(strUrl,"?")<len(strUrl) then
if InStr(strUrl,"?")>1 then
if InStr(strUrl,"&")<len(strUrl) then
JoinChar=strUrl & "&"
else
JoinChar=strUrl
end if
else
JoinChar=strUrl & "?"
end if
else
JoinChar=strUrl
end if
end function
function strLength(str)
'on error resume next
dim WINNT_CHINESE
WINNT_CHINESE=(len("中国")=2)
if WINNT_CHINESE then
dim l,t,c
dim i
l=len(str)
t=l
for i=1 to l
c=asc(mid(str,i,1))
if c<0 then c=c+65536
if c>255 then
t=t+1
end if
next
strLength=t
else
strLength=len(str)
end if
if err.number<>0 then err.clear
end function
Rem 判断数字是否整形
function isInteger(para)
'on error resume next
dim str
dim l,i
if isNUll(para) then
isInteger=false
exit function
end if
str=cstr(para)
if trim(str)="" then
isInteger=false
exit function
end if
l=len(str)
for i=1 to l
if mid(str,i,1)>"9" or mid(str,i,1)<"0" then
isInteger=false
exit function
end if
next
isInteger=true
if err.number<>0 then err.clear
end function
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◆函数名:IsValidEmail ◇
'◇功 能:检查邮箱的格式是否正确 ◆
'◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇
function IsValidEmail(email)
dim names, name, i, c
IsValidEmail = true
names = Split(email, "@")
if UBound(names) <> 1 then
IsValidEmail = false
exit function
end if
for each name in names
if Len(name) <= 0 then
IsValidEmail = false
exit function
end if
for i = 1 to Len(name)
c = Lcase(Mid(name, i, 1))
if InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 and not IsNumeric(c) then
IsValidEmail = false
exit function
end if
next
if Left(name, 1) = "." or Right(name, 1) = "." then
IsValidEmail = false
exit function
end if
next
if InStr(names(1), ".") <= 0 then
IsValidEmail = false
exit function
end if
i = Len(names(1)) - InStrRev(names(1), ".")
if i <> 2 and i <> 3 then
IsValidEmail = false
exit function
end if
if InStr(email, "..") > 0 then
IsValidEmail = false
end if
end function
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◆函数名:replaceword ◇
'◇功 能:留言、评论过滤函数 ◆
'◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇
function key(str)
word=keys
reword=split(word,"|")
for i=0 to ubound(reword)
if i=0 then
restr=replace(str,reword(i),"<font color=red>***</font>")
else
restr=replace(re_1,reword(i),"<font color=red>***</font>")
end if
re_1=restr
next
key=restr
end function
'◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆
'◆过程名:autoshow ◇
'◇功 能:文章内容自动分页 ◆
'◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇
Const ShowContentByPage="Yes" '文章内容是否分页显示
Const MaxPerPage_Content=1000 '每页显示大约字符数
sub AutoShow()
dim ArticleID,strContent,CurrentPage
dim ContentLen,MaxPerPage,pages,i,lngBound
dim BeginPoint,EndPoint
ArticleID=rs("id")
strContent=rs("content")
ContentLen=len(strContent)
CurrentPage=trim(request("page"))
if ShowContentByPage="No" or ContentLen<=MaxPerPage_Content then
response.write strContent
if ShowContentByPage="Yes" then
response.write "</p><p align='center'><font color='red'><b>[1]</b></font></p>"
end if
else
if CurrentPage="" then
CurrentPage=1
else
CurrentPage=Cint(CurrentPage)
end if
pages=ContentLen\MaxPerPage_Content
if MaxPerPage_Content*pages<ContentLen then
pages=pages+1
end if
lngBound=MaxPerPage_Content '最大误差范围
if CurrentPage<1 then CurrentPage=1
if CurrentPage>pages then CurrentPage=pages
dim lngTemp
dim lngTemp1,lngTemp1_1,lngTemp1_2,lngTemp1_1_1,lngTemp1_1_2,lngTemp1_1_3,lngTemp1_2_1,lngTemp1_2_2,lngTemp1_2_3
dim lngTemp2,lngTemp2_1,lngTemp2_2,lngTemp2_1_1,lngTemp2_1_2,lngTemp2_2_1,lngTemp2_2_2
dim lngTemp3,lngTemp3_1,lngTemp3_2,lngTemp3_1_1,lngTemp3_1_2,lngTemp3_2_1,lngTemp3_2_2
dim lngTemp4,lngTemp4_1,lngTemp4_2,lngTemp4_1_1,lngTemp4_1_2,lngTemp4_2_1,lngTemp4_2_2
dim lngTemp5,lngTemp5_1,lngTemp5_2
dim lngTemp6,lngTemp6_1,lngTemp6_2
if CurrentPage=1 then
BeginPoint=1
else
BeginPoint=MaxPerPage_Content*(CurrentPage-1)+1
lngTemp1_1_1=instr(BeginPoint,strContent,"</table>",1)
lngTemp1_1_2=instr(BeginPoint,strContent,"</TABLE>",1)
lngTemp1_1_3=instr(BeginPoint,strContent,"</Table>",1)
if lngTemp1_1_1>0 then
lngTemp1_1=lngTemp1_1_1
elseif lngTemp1_1_2>0 then
lngTemp1_1=lngTemp1_1_2
elseif lngTemp1_1_3>0 then
lngTemp1_1=lngTemp1_1_3
else
lngTemp1_1=0
end if
lngTemp1_2_1=instr(BeginPoint,strContent,"<table",1)
lngTemp1_2_2=instr(BeginPoint,strContent,"<TABLE",1)
lngTemp1_2_3=instr(BeginPoint,strContent,"<Table",1)
if lngTemp1_2_1>0 then
lngTemp1_2=lngTemp1_2_1
elseif lngTemp1_2_2>0 then
lngTemp1_2=lngTemp1_2_2
elseif lngTemp1_2_3>0 then
lngTemp1_2=lngTemp1_2_3
else
lngTemp1_2=0
end if
if lngTemp1_1=0 and lngTemp1_2=0 then
lngTemp1=BeginPoint
else
if lngTemp1_1>lngTemp1_2 then
lngtemp1=lngTemp1_2
else
lngTemp1=lngTemp1_1+8
end if
end if
lngTemp2_1_1=instr(BeginPoint,strContent,"</p>",1)
lngTemp2_1_2=instr(BeginPoint,strContent,"</P>",1)
if lngTemp2_1_1>0 then
lngTemp2_1=lngTemp2_1_1
elseif lngTemp2_1_2>0 then
lngTemp2_1=lngTemp2_1_2
else
lngTemp2_1=0
end if
lngTemp2_2_1=instr(BeginPoint,strContent,"<p",1)
lngTemp2_2_2=instr(BeginPoint,strContent,"<P",1)
if lngTemp2_2_1>0 then
lngTemp2_2=lngTemp2_2_1
elseif lngTemp2_2_2>0 then
lngTemp2_2=lngTemp2_2_2
else
lngTemp2_2=0
end if
if lngTemp2_1=0 and lngTemp2_2=0 then
lngTemp2=BeginPoint
else
if lngTemp2_1>lngTemp2_2 then
lngtemp2=lngTemp2_2
else
lngTemp2=lngTemp2_1+4
end if
end if
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -