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

📄 ubb.asp

📁 安全性好,适用于展示和进行资源下载的个人和大型网站使用!
💻 ASP
字号:
<%
Function YCMS_UBB(ABC)
If isEmpty(ABC) Or isNull(ABC) Then
Exit Function
Else
ABC=replace(ABC,"<","&lt;")
ABC=replace(ABC,">","&gt;")
ABC=replace(ABC," ","&nbsp")		'空格
ABC=replace(ABC,CHR(9),"&nbsp")		'table
ABC=replace(ABC,"'","&#39;")		'单引号
ABC=replace(ABC,"""","&quot;")	
ABC=Replace(ABC,vbnewline,"<br />")
Dim re,strMatchs,strMatch,rndID,tmpStr1,tmpStr2,tmpStr3,tmpStr4
Set re=new RegExp
re.IgnoreCase =True
re.Global=True
re.Pattern="([^=\]][\s]*?|^)(http|https|rstp|ftp|mms|ed2k)://([A-Za-z0-9\.\/=\?%\-_~`@':+!]*)"
Set strMatchs=re.Execute(ABC)
For Each strMatch in strMatchs
tmpStr1=strMatch.SubMatches(0)
tmpStr2=strMatch.SubMatches(1)
tmpStr3=strMatch.SubMatches(2)
ABC=replace(ABC,strMatch.Value,tmpStr1&"<a href="""&tmpStr2&"://"&tmpStr3&""" target=""_blank"">"&tmpStr2&"://"&tmpStr3&"</a>",1,-1,0)
Next
For i=0 To 30 
ABC=Replace(ABC,"[QQ="&i&"]","<img src='img/emot/"&i&".gif' alt='' />")
Next
'过滤危险脚本
re.Pattern="(script)"
ABC=re.Replace(ABC, "&#115;cript")
re.Pattern="(js:)"
ABC=re.Replace(ABC, "&#106;s&#58")
re.Pattern="(vbs:)"
ABC=re.Replace(ABC, "&#118;bs&#58")


re.Pattern="(\[img\])(.[^\]]*)\[\/img\]"
Set strMatchs=re.Execute(ABC)
For Each strMatch in strMatchs
	tmpStr1=strMatch.SubMatches(1)
	ABC=replace(ABC,strMatch.Value,"<img src="""&tmpStr1&""" border=""0"" onclick='window.open(this.src);' onload='resizepic(this)' onmousewheel='return bbimg(this)' alt='点击在新窗口中打开图片' class='img' />",1,-1,0)
Next
re.Pattern="\[img=(left|right|center|absmiddle|)\](.[^\]]*)(\[\/img\])"
Set strMatchs=re.Execute(ABC)
For Each strMatch in strMatchs
	tmpStr1=strMatch.SubMatches(0)
	tmpStr2=strMatch.SubMatches(1)
	ABC=replace(ABC,strMatch.Value,"<img align="""&tmpStr1&""" src="""&tmpStr2&""" border=""0"" onclick='window.open(this.src);' onload='resizepic(this)' onmousewheel='return bbimg(this)' alt='点击在新窗口中打开图片' class='img' />",1,-1,0)
Next
re.Pattern="\[img=(\d*|),(\d*|)\](.[^\]]*)\[\/img\]"
Set strMatchs=re.Execute(ABC)
For Each strMatch in strMatchs
	tmpStr1=strMatch.SubMatches(0)
	tmpStr2=strMatch.SubMatches(1)
	tmpStr3=strMatch.SubMatches(2)
	ABC=replace(ABC,strMatch.Value,"<img width="""&tmpStr1&""" height="""&tmpStr2&""" src="""&tmpStr3&""" border=""0"" onclick='window.open(this.src);' onload='resizepic(this)' onmousewheel='return bbimg(this)' alt='点击在新窗口中打开图片' class='img' />",1,-1,0)
Next				
'识别常规标签
re.Pattern="\[url=(.[^\]]*)\](.[^\[]*)\[\/url]" 
Set strMatchs=re.Execute(ABC)
For Each strMatch in strMatchs
tmpStr1=strMatch.SubMatches(0)
tmpStr2=strMatch.SubMatches(1)
ABC=replace(ABC,strMatch.Value,"<a target=""_blank"" href="""&tmpStr1&""">"&tmpStr2&"</a>",1,-1,0)
Next
re.Pattern="\[url](.[^\[]*)\[\/url]"
Set strMatchs=re.Execute(ABC)
For Each strMatch in strMatchs
tmpStr1=strMatch.SubMatches(0)
ABC=replace(ABC,strMatch.Value,"<a target=""_blank"" href="""&tmpStr1&""">"&tmpStr1&"</a>",1,-1,0)
Next
re.Pattern="\[email=(.[^\]]*)\](.[^\[]*)\[\/email]"
Set strMatchs=re.Execute(ABC)
For Each strMatch in strMatchs
tmpStr1=strMatch.SubMatches(0)
tmpStr2=strMatch.SubMatches(1)
ABC=replace(ABC,strMatch.Value,"<a href=""mailto:"&tmpStr1&""">"&tmpStr2&"</a>",1,-1,0)
Next
re.Pattern="\[email](.[^\[]*)\[\/email]"
Set strMatchs=re.Execute(ABC)
For Each strMatch in strMatchs
tmpStr1=strMatch.SubMatches(0)
ABC=replace(ABC,strMatch.Value,"<a href=""mailto:"&tmpStr1&""">"&tmpStr1&"</a>",1,-1,0)
Next
re.Pattern="\[align=(\w{4,6})\]([^\r]*?)\[\/align\]"
ABC=re.Replace(ABC,"<div align=""$1"">$2</div>")
re.Pattern="\[color=(#\w{3,10}|\w{3,10})\]([^\r]*?)\[\/color\]"
ABC=re.Replace(ABC,"<span style=""color:$1"">$2</span>")
re.Pattern="\[size=(\d{1,2})\]([^\r]*?)\[\/size\]"
ABC=re.Replace(ABC,"<span style=""font-size:$1pt"">$2</span>")
re.Pattern="\[font=([^\r]*?)\]([^\r]*?)\[\/font\]"
ABC=re.Replace(ABC,"<span style=""font-family:$1"">$2</span>")
re.Pattern="\[b\]([^\r]*?)\[\/b\]"
ABC=re.Replace(ABC,"<strong>$1</strong>")
re.Pattern="\[i\]([^\r]*?)\[\/i\]"
ABC=re.Replace(ABC,"<i>$1</i>")
re.Pattern="\[u\]([^\r]*?)\[\/u\]"
ABC=re.Replace(ABC,"<u>$1</u>")
re.Pattern="\[s\]([^\r]*?)\[\/s\]"
ABC=re.Replace(ABC,"<s>$1</s>")
re.Pattern="\[sup\]([^\r]*?)\[\/sup\]"
ABC=re.Replace(ABC,"<sup>$1</sup>")
re.Pattern="\[sub\]([^\r]*?)\[\/sub\]"
ABC=re.Replace(ABC,"<sub>$1</sub>")
re.Pattern="\[fly\]([^\r]*?)\[\/fly\]"
ABC=re.Replace(ABC,"<marquee width=""90%"" behavior=""alternate"" scrollamount=""3"">$1</marquee>")
re.Pattern="\[code\](.*?)\[\/code\]"
ABC= re.Replace(ABC,"<div class='ubb_code'>$1</div>")
ABC=Replace(ABC,"[list]","<ul>")
re.Pattern="\[list=(.[^\]]*)\]"
ABC=re.Replace(ABC,"<ul style=""list-style-type:$1"">")
re.Pattern="\[\*\](.[^\[]*)(\n|)"
ABC=re.Replace(ABC,"<li>$1</li>")
ABC=Replace(ABC,"[/list]","</ul>")	
re.Pattern="\[html\](.*?)\[\/html\]"
Set strMatchs=re.Execute(ABC)
For Each strMatch in strMatchs
Randomize
RndID="temp"&Int(100000 * Rnd)
ABC=Replace(ABC,strMatch.Value,"<div class='ubb_runcode'><textarea rows='8' id='"&rndID&"'>"&Replace(strMatch.SubMatches(0),"<br />",vbnewline)& "</textarea><br/><input onclick=""runcode('"&rndID&"')""  type=""button"" value=""运行此代码"" class='button'/> <input class='button' onclick=""copycode('"&rndID&"')""  type=""button"" value=""复制此代码""/> <input class='button' onclick=""savecode('"&rndID&"')""  type=""button"" value=""保存此代码""/>  [Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]<iframe srv='*' style='display:none' name='"&rndID&"'></iframe></div>",1,-1,0)
Next
Set strMatchs=Nothing

re.Pattern="\[(swf|wma|wmv|rm|ra|qt)(=\d*?|)(,\d*?|)\]([^<>]*?)\[\/(swf|wma|wmv|rm|ra|qt)\]"
Set strMatchs=re.Execute(ABC)
dim strType,strWidth,strHeight,strSRC
For Each strMatch in strMatchs
RAndomize
strType=strMatch.SubMatches(0)
strWidth=strMatch.SubMatches(1)
strHeight=strMatch.SubMatches(2)
if (len(strWidth)=0) then 
strWidth="400"
else
strWidth=right(strWidth,(len(strWidth)-1))
end if
if (len(strHeight)=0) then
strHeight="300"
else
strHeight=right(strHeight,(len(strHeight)-1))
end if
strSRC=strMatch.SubMatches(3)
rndID="temp"&Int(100000 * Rnd)
ABC=Replace(ABC,strMatch.Value,"<div class='ubb_dj'><a id="""+rndID+"_href"" href=""javascript:YCMS_DjShow('"+strType+"','"+rndID+"','"+strSRC+"','"+strWidth+"','"+strHeight+"')""><span id="""+rndID+"_text"">在线播放</span></a><div id="""+rndID+"""></div></div>")
Next
Set strMatchs=Nothing
Set re=Nothing
YCMS_UBB=ABC
End IF
End Function
%>

⌨️ 快捷键说明

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