ubb.asp 文件
<%
function ChkBadWords(fString)
bwords = split(BadWords, "|")
for i = 0 to ubound(bwords)
fString = Replace(fString, bwords(i), string(len(bwords(i)),"*"), 1,-1,1)
next
ChkBadWords = fString
end function
function doCode(fString, fOTag, fCTag, fROTag, fRCTag)
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 HTMLEncode(fString)
fString = replace(fString, ">", ">")
fString = replace(fString, "<", "<")
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 HTMLDecode(fString)
fString = replace(fString, ">", ">")
fString = replace(fString, "<", "<")
fString = Replace(fString, "", CHR(13))
fString = Replace(fString, "</P><P>", CHR(10) & CHR(10))
fString = Replace(fString, "<BR>", CHR(10))
HTMLDecode = fString
end function
function HTMLDecode1(fString)
fString = replace(fString, ">", ">")
fString = replace(fString, "<", "<")
fString = Replace(fString, "", CHR(13))
fString = Replace(fString, "</P><P>", CHR(10) & CHR(10))
fString = Replace(fString, "<BR>", CHR(10))
HTMLDecode1 = fString
end function
function UBBCode(strContent)
if strAllowHTML <> 1 then
strContent = HTMLEncode(strContent)
end if
dim re
set re = New RegExp
re.Global = True
re.IgnoreCase = True
re.Pattern="(\[URL\])(http:\/\/\S+?)(\[\/URL\])"
strContent= re.Replace(strContent,"<img src=img/url_1.gif border=0><A HREF=""$2"" TARGET=_blank>$2</A>")
re.Pattern="(\[URL\])(\S+?)(\[\/URL\])"
strContent= re.Replace(strContent,"<img src=img/url_1.gif border=0><A HREF=""http://$2"" TARGET=_blank>$2</A>")
re.Pattern="(\[URL=(http:\/\/\S+?)\])(.+?)(\[\/URL\])"
strContent= re.Replace(strContent,"<img src=img/url_1.gif border=0><A HREF=""$2"" TARGET=_blank>$3</A>")
re.Pattern="(\[URL=(\S+?)\])(.+?)(\[\/URL\])"
strContent= re.Replace(strContent,"<img src=img/url_1.gif border=0><A HREF=""http://$2"" TARGET=_blank>$3</A>")
re.Pattern="(\[EMAIL\])(\S+\@\S+?)(\[\/EMAIL\])"
strContent= re.Replace(strContent,"<img src=img/email_1.gif border=0><A HREF=""mailto:$2"">$2</A>")
re.Pattern="(\[EMAIL=(\S+\@\S+?)\])(.+?)(\[\/EMAIL\])"
strContent= re.Replace(strContent,"<img src=img/email_1.gif border=0><A HREF=""mailto:$2"" TARGET=_blank>$3</A>")
rem *******href ubb********
re.Pattern = "\[FLASH](.[^\[]*)\[\/FLASH]"
strContent = re.Replace(strContent,"<OBJECT codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=400 height=300><PARAM NAME=movie VALUE=""$1""><PARAM NAME=quality VALUE=high><embed src=""$1"" quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width=400 height=300>$1</embed></OBJECT>")
rem *******flash ubb********
re.Pattern="\[IMG](.[^\[]*)\[\/IMG]"
strContent=re.Replace(strContent,"<a href=""$1"" target=_blank><IMG SRC=""$1"" border=0 onload='javascript:if(this.width>560) this.width=560'></a>")
rem *******img ubb********
strContent = doCode(strContent, "
", "[/list]", "<ul>", "</ul>")
strContent = doCode(strContent, "", " ", "<ol type=1>", "</ol id=1>")
strContent = doCode(strContent, "[list=a]", " ", "<ol type=a>", "</ol id=a>")
strContent = doCode(strContent, "
", " [/*]", "<li>", "</li>")
strContent = doCode(strContent, "", "
", "<hr width=70% size=1 color=#808000 align=left>代码:<pre id=code style=""margin-left:30""><font face=""Verdana, Arial"" color=#808080 id=code style=font-size:8pt>", "</font id=code></pre id=code><hr width=70% size=1 color=#808000 align=left>")
strContent = doCode(strContent, "引用 ", " ","<hr width=70% size=1 color=#808000 align=left>引用:<p style=""margin-left:30"" id=quote><font face=""Verdana, Arial"" color=#808080 id=code style=font-size:8pt>", "</font id=code></p id=quote><hr width=70% size=1 color=#808000 align=left>")
strContent=ChkBadWords(strContent)
UBBCode = strContent
end function
%>
Microsoft VBScript 运行时错误 错误 '800a139a'
错误的数量词
/allrun/jiujiusibbs/inc/ubb.asp,行67