⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 d_ubb.asp

📁 是个论坛,使用过还可以.
💻 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 HTMLEncode(fString)
    fString = replace(fString, "&", "&#38;")
    fString = replace(fString, ">", "&gt;")
    fString = replace(fString, "<", "&lt;")
	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)
    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)
    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,"&#106avascript")
re.Pattern="(jscript:)"
strContent=re.Replace(strContent,"&#106script:")
re.Pattern="(js:)"
strContent=re.Replace(strContent,"&#106s:")
re.Pattern="(value)"
strContent=re.Replace(strContent,"&#118alue")
re.Pattern="(about:)"
strContent=re.Replace(strContent,"about&#58")
re.Pattern="(file:)"
strContent=re.Replace(strContent,"file&#58")
re.Pattern="(document.cookie)"
strContent=re.Replace(strContent,"documents&#46cookie")
re.Pattern="(vbscript:)"
strContent=re.Replace(strContent,"&#118bscript:")
re.Pattern="(vbs:)"
strContent=re.Replace(strContent,"&#118bs:")
re.Pattern="(on(mouse|exit|error|click|key))"
strContent=re.Replace(strContent,"&#111n$2")

	re.Pattern = "\[url](.[^\[]*)\[\/url]"
	strContent = re.Replace(strContent,"<a target=_blank href=$1>$1</a>")
	
	re.Pattern = "\[mail](.[^\[]*)\[\/mail]"
	strContent = re.Replace(strContent,"<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 = "\[FLY](.[^\[]*)\[\/FLY]"
   	strContent = re.Replace(strContent,"<marquee width=90% behavior=alternate scrollamount=3>$1</marquee>")
	
    	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
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -