📄 check_inc.asp
字号:
<%
function sqlchg(key)
dim bbsText,x
bbsText = Session("bbsText")
if bbsText <> "" then
bbsText = split(bbsText,",")
for x = 0 to ubound(bbsText)
if instr(key,bbsText(x)) then
response.Write("<script language='javascript'>alert('小心你说的话哦!');history.go(-1);</script>")
response.End()
end if
next
end if
if instr(key,"'") or instr(key,"script") or instr(key,"chr") or instr(key,";") or instr(key,"<") or instr(key,">") or instr(key,"#") or instr(key,"(") or instr(key,")") then
response.Write("<script language='javascript'>window.location.href='error.asp?errorMsg=请不要输入非法字符';</script>")
response.End()
end if
sqlchg=key
end function
function sqlcheck(key)
if not isnumeric(key) then
response.Write("<script language='javascript'>window.location.href='error.asp?errorMsg=传递非数字型参数出错';</script>")
response.End()
end if
sqlcheck=key
end function
function set0(key)
if key = "" then
key = 0
end if
set0=key
end function
function checked(key)
if key = 1 then
key = "checked"
end if
checked=key
end function
function NoneProductPic(key)
if instr(key,".") = false then
key = "images/emptybook.gif"
end if
NoneProductPic=key
end function
function OrderStage(key)
if key = 0 then
OrderStage = "等待服务商确认"
end if
if key = 1 then
OrderStage = "服务商已确认"
end if
if key = 2 then
OrderStage = "用户已付款"
end if
if key = 3 then
OrderStage = "服务商已发货"
end if
if key = 4 then
OrderStage = "用户已收到货"
end if
end function
function checkAdmin(Admin)
if Cint(Admin) = 1 then
checkAdmin = "超级管理员"
else
checkAdmin = "普通管理员"
end if
end function
function checkSearch(Search,Key)
if Search = "" then
checkSearch = ""
elseif Search = "Product" or Search = "Order" then
checkSearch = ""&Key&"="&Search&""
else
checkSearch = "&"&Key&"="&Search&""
end if
end function
function checkAds(Width,Width1)
if Width <> 0 then
checkAds = "width = '"&Width&"'"
end if
if Width1 <> 0 then
checkAds = checkAds&" Height = '"&Width1&"'"
end if
end function
function checkPic(pic,width,width1)
if right(pic,3) = "jpg" or right(pic,3) = "gif" then
checkPic ="<img src='"&pic&"' border='0' "&checkAds(width,width1)&">"
end if
if right(pic,3) = "swf" then
checkPic ="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' "&checkAds(width,width1)&"><param name='movie' value='"&pic&"'><param name='quality' value='high'><param name='wmode' value='transparent'><embed src='"&pic&"' width='"&width&"' height='"&width1&"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' wmode='transparent'></embed></object>"
end if
end function
function ChkBadWords(fString)
dim BadWords,bwords,z
bwords = split(BadWords, "|")
for z = 0 to ubound(bwords)
fString = Replace(fString, bwords(z), string(len(bwords(z)),"*"), 1,-1,1)
next
ChkBadWords = fString
end function
function HTMLEncode(fString)
fString = replace(fString, "&", "&")
fString = replace(fString, ">", ">")
fString = replace(fString, "<", "<")
fString = replace(fString, "@#$%3v42q", "'")
fString = Replace(fString, CHR(13), "")
fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
fString = Replace(fString, CHR(10), "<BR>")
HTMLEncode = fString
end function
function doCode(fString, fOTag, fCTag, fROTag, fRCTag)
dim fOTagPos,fCTagPos
fOTagPos = Instr(1, fString, fOTag, 1)
fCTagPos = Instr(1, fString, fCTag, 1)
while (fCTagPos > 0 and fOTagPos > 0)
fString = replace(fString, fOTag, fROTag, 1, 1, 1)
fString = replace(fString, fCTag, fRCTag, 1, 1, 1)
fOTagPos = Instr(1, fString, fOTag, 1)
fCTagPos = Instr(1, fString, fCTag, 1)
wend
doCode = fString
end function
function UBBCode(strContent)
dim strAllowHTML
if strAllowHTML <> 1 then
strContent = HTMLEncode(strContent)
end if
dim re
set re = New RegExp
re.Global = True
re.IgnoreCase = True
re.Pattern="(javascript)"
strContent=re.Replace(strContent,"javascript")
re.Pattern="(jscript:)"
strContent=re.Replace(strContent,"jscript:")
re.Pattern="(js:)"
strContent=re.Replace(strContent,"js:")
re.Pattern="(value)"
strContent=re.Replace(strContent,"value")
re.Pattern="(about:)"
strContent=re.Replace(strContent,"about:")
re.Pattern="(file:)"
strContent=re.Replace(strContent,"file:")
re.Pattern="(document.cookie)"
strContent=re.Replace(strContent,"documents.cookie")
re.Pattern="(vbscript:)"
strContent=re.Replace(strContent,"vbscript:")
re.Pattern="(vbs:)"
strContent=re.Replace(strContent,"vbs:")
re.Pattern="(on(mouse|exit|error|click|key))"
strContent=re.Replace(strContent,"on$2")
re.Pattern = "\[url](.[^\[]*)\[\/url]"
strContent = re.Replace(strContent,"<img src='images/url.gif' align='absmiddle'><a target=_blank href=$1>$1</a>")
re.Pattern = "\[mail](.[^\[]*)\[\/mail]"
strContent = re.Replace(strContent,"<img src='images/mail.gif' align='absmiddle'><a href=mailto:$1>$1</a>")
re.Pattern = "\[IMG](.[^\[]*)\[\/IMG]"
strContent = re.Replace(strContent,"<a href=""$1"" target=blank><IMG SRC=""$1"" border=0 onload=""javascript:if(this.width>750)this.width=750""></a>")
re.Pattern = "\[B](.[^\[]*)\[\/B]"
strContent = re.Replace(strContent,"<B>$1</B>")
re.Pattern = "\[I](.[^\[]*)\[\/I]"
strContent = re.Replace(strContent,"<B>$1</I>")
re.Pattern = "\[U](.[^\[]*)\[\/U]"
strContent = re.Replace(strContent,"<U>$1</U>")
re.Pattern = "\[center](.[^\[]*)\[\/center]"
strContent = re.Replace(strContent,"<div align=center>$1</div>")
re.Pattern = "\[right](.[^\[]*)\[\/right]"
strContent = re.Replace(strContent,"<div align=right>$1</div>")
re.Pattern = "\[QUOTE](.[^\[]*)\[\/QUOTE]"
strContent = re.Replace(strContent,"<div style='background-color:#F7F3FA;border:1px solid #CCCCCC;padding:20px;width:90%;margin:20px;'><strong>引用:</strong><br />$1</div>")
dim emNum
for emNum = 0 to 7
re.Pattern = "\[em0"&emNum&"]"
strContent = re.Replace(strContent,"<img src=images/em0"&emNum&".gif>")
next
strContent = doCode(strContent, "[list]", "[/list]", "<ul>", "</ul>")
strContent = doCode(strContent, "[list=1]", "[/list]", "<ol type=1>", "</ol id=1>")
strContent = doCode(strContent, "[list=a]", "[/list]", "<ol type=a>", "</ol id=a>")
strContent = doCode(strContent, "[*]", "[/*]", "<li>", "</li>")
strContent = ChkBadWords(strContent)
UBBCode = strContent
end function
function checkimg(max,lx)
if lx = 1 then
checkimg = "height = "&max&""
elseif lx = 0 then
checkimg = "width = "&max&""
end if
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -