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

📄 wapls_ubb.asp

📁 蓝色WAP建站系统,WAP源码,更多请登陆http://xywap.cn
💻 ASP
字号:
<%
'==================================
'=文 件 名:wapls_ubb.asp
'=适用版本:蓝色世纪WAP网站管理系统(CMS)V1.1
'=官方版权:http://www.wapls.com
'=文件功能:网站UBB转换
'=文件作者:蓝色阳光
'=发行时间:2007-02-01
'==================================
function utf8(str)
if str="" or isnull(str) then
	tohtm=str
	exit function
end if
utf8 = replace(str,"&","&amp;")
utf8 = replace(utf8,"","&quot;")
utf8 = replace(utf8,"<","&lt;")
utf8 = replace(utf8,">","&gt;")
utf8 = replace(utf8," ","&nbsp;")
utf8 = replace(utf8,"$","$$")
utf8 = replace(utf8,"&#39;","'")
utf8 = replace(utf8,vbnewline,"<br/>")
end function

function outHTM(str)
if str="" or isnull(str) then
	tohtm=str
exit function
end if
outHTM = replace(str,"&","&amp;")
outHTM = replace(outHTM,"","&quot;")
outHTM = replace(outHTM,"<","&lt;")
outHTM = replace(outHTM,">","&gt;")
outHTM = replace(outHTM," ","&nbsp;")
outHTM = replace(outHTM,"$","$$")
outHTM = replace(outHTM,"&#39;","'")
outHTM = replace(outHTM,vbnewline,"<br/>")
outHTM = ubbcode(outHTM)
end function
function UBBCode(strContent)
	dim re,i
	UbbCode=strContent
	if (instr(strContent,"(")=0 or instr(strContent,")")=0) and instr(strContent,"http://")=0 then
		exit function
	end if
	
	Set re=new RegExp
	re.IgnoreCase =true
	re.Global=True
	
	'过滤script事件
	if instr(1,strContent,"on",1)>0 then
		re.Pattern="on(\w+)="
		strContent=re.Replace(strContent,"on_$1=")
	end if
	strContent=Replace(strContent,"file:","file :")
	strContent=Replace(strContent,"files:","files :")
	strContent=Replace(strContent,"script:","script :")
	strContent=Replace(strContent,"js:","js :")

	if instr(1,strContent,"(img)",1)>0 then
		re.Pattern="(\(img\))(.[^\[]*)(\(\/img\))"
		strContent=re.Replace(strContent,"<img src=""$2"" alt=""LOGO...""/>")
	end if
	if instr(1,strContent,"(/url)",1)>0 then
		re.Pattern="(\(url\))(.[^\[]*)(\(\/url\))"
		strContent= re.Replace(strContent,"<a href=""$2"">$2</a>")
		re.Pattern="(\(url=(.[^\[]*)\))(.[^\[]*)(\(\/url\))"
		strContent= re.Replace(strContent,"<a href=""$2"">$3</a>")
	end if
'	if instr(1,strContent,"http://",1)>0 then
'		re.Pattern = "^(http://(A-Za-z0-9\./=\?%\-&_~`@':+!)+)"
'		strContent = re.Replace(strContent,"<a href=$1>$1</a>")
'		re.Pattern = "(http://(A-Za-z0-9\./=\?%\-&_~`@':+!)+)$"
'		strContent = re.Replace(strContent,"<a href=$1>$1</a>")
'		
'		re.Pattern = "((^>=""))(http://(A-Za-z0-9\./=\?%\-&_~`@':+!)+)"
'		strContent = re.Replace(strContent,"$1<a href=$2>$2</a>")
'	end if
	if instr(1,strContent,"(/i)",1)>0 then
		re.Pattern="(\(i\))(.[^\[]*)(\(\/i\))"
		strContent=re.Replace(strContent,"<i>$2</i>")
	end if
	if instr(1,strContent,"(/u)",1)>0 then
		re.Pattern="(\(u\))(.[^\[]*)(\(\/u\))"
		strContent=re.Replace(strContent,"<u>$2</u>")
	end if
	if instr(1,strContent,"(/b)",1)>0 then
		re.Pattern="(\(b\))(.[^\[]*)(\(\/b\))"
		strContent=re.Replace(strContent,"<b>$2</b>")
	end if
	if instr(1,strContent,"(/em)",1)>0 then
		re.Pattern="(\(em\))(.[^\[]*)(\(\/em\))"
		strContent=re.Replace(strContent,"<em>$2</em>")
	end if
	strContent=Replace(strContent,"(br)","<br/>")
	strContent=Replace(strContent,"<br/>(center)","</p><p align=""center"">")
	strContent=Replace(strContent,"(center)","</p><p align=""center"">")
	strContent=Replace(strContent,"<br/>(left)","</p><p align=""left"">")
	strContent=Replace(strContent,"(left)","</p><p align=""left"">")
	strContent=Replace(strContent,"<br/>(right)","</p><p align=""right"">")			
	strContent=Replace(strContent,"(right)","</p><p align=""right"">")
	strContent=Replace(strContent,"(n)",""& Year(date()) &"")
	strContent=Replace(strContent,"(y)",""& Month(date()) &"")
	strContent=Replace(strContent,"(r)",""& Day(date()) &"")
	strContent=Replace(strContent,"(s)",""& Hour(time()) &"")
	strContent=Replace(strContent,"(f)",""& Minute(time()) &"")
	strContent=Replace(strContent,"(m)",""& Second(time()) &"")
	strContent=Replace(strContent,"(xq)",""& WeekDayName(DatePart("w",Now)) &"")
	strContent=Replace(strContent,"(userip)",""& userip &"")
	strContent=Replace(strContent,"(wapbeian)",""&wapbeian&"")
	strContent=Replace(strContent,"(wapname)",""&wapname&"")
	strContent=Replace(strContent,"(wapurl)",""&wapurl&"")
	strContent=Replace(strContent,"(waplogo)",""&waplogo&"")
	strContent=Replace(strContent,"(wapboss)",""&wapboss&"")
	strContent=Replace(strContent,"(wapday)",""&wapday&"")
	strContent=Replace(strContent,"(wapemail)",""&wapemail&"")
	strContent=Replace(strContent,"(logo)",""&mb_logo&"/")
	strContent=Replace(strContent,"(zx)",""&total&"")

'=================================================================================================================
	if instr(1,strContent,"[img]",1)>0 then
		re.Pattern="(\[img\])(.[^\[]*)(\[\/img\])"
		strContent=re.Replace(strContent,"<img src=""$2"" alt=""LOGO...""/>")
	end if
	
	if instr(1,strContent,"[/url]",1)>0 then
		re.Pattern="(\[url\])(.[^\[]*)(\[\/url\])"
		strContent= re.Replace(strContent,"<a href=""$2"">$2</a>")
		re.Pattern="(\[url=(.[^\]]*)\])(.[^\[]*)(\[\/url\])"
		strContent= re.Replace(strContent,"<a href=""$2"">$3</a>")
	end if
	
'	if instr(1,strContent,"http://",1)>0 then
'		re.Pattern = "^(http://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)"
'		strContent = re.Replace(strContent,"<a href=$1>$1</a>")
'		re.Pattern = "(http://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)$"
'		strContent = re.Replace(strContent,"<a href=$1>$1</a>")
'		
'		re.Pattern = "([^>=""])(http://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)"
'		strContent = re.Replace(strContent,"$1<a href=$2>$2</a>")
'	end if
	
	if instr(1,strContent,"[/i]",1)>0 then
		re.Pattern="(\[i\])(.[^\[]*)(\[\/i\])"
		strContent=re.Replace(strContent,"<i>$2</i>")
	end if
	if instr(1,strContent,"[/u]",1)>0 then
		re.Pattern="(\[u\])(.[^\[]*)(\[\/u\])"
		strContent=re.Replace(strContent,"<u>$2</u>")
	end if
	if instr(1,strContent,"[/b]",1)>0 then
		re.Pattern="(\[b\])(.[^\[]*)(\[\/b\])"
		strContent=re.Replace(strContent,"<b>$2</b>")
	end if
	if instr(1,strContent,"[/em]",1)>0 then
		re.Pattern="(\[em\])(.[^\[]*)(\[\/em\])"
		strContent=re.Replace(strContent,"<em>$2</em>")
	end if
	strContent=Replace(strContent,"[br]","<br/>")
	strContent=Replace(strContent,"<br/>[center]","</p><p align=""center"">")
	strContent=Replace(strContent,"[center]","</p><p align=""center"">")
	strContent=Replace(strContent,"<br/>[left]","</p><p align=""left"">")
	strContent=Replace(strContent,"[left]","</p><p align=""left"">")
	strContent=Replace(strContent,"<br/>[right]","</p><p align=""right"">")			
	strContent=Replace(strContent,"[right]","</p><p align=""right"">")
	strContent=Replace(strContent,"[n]",""& Year(date()) &"")
	strContent=Replace(strContent,"[y]",""& Month(date()) &"")
	strContent=Replace(strContent,"[r]",""& Day(date()) &"")
	strContent=Replace(strContent,"[s]",""& Hour(time()) &"")
	strContent=Replace(strContent,"[f]",""& Minute(time()) &"")
	strContent=Replace(strContent,"[m]",""& Second(time()) &"")
	strContent=Replace(strContent,"[xq]",""& WeekDayName(DatePart("w",Now)) &"")
	strContent=Replace(strContent,"[userip]",""& userip &"")
	strContent=Replace(strContent,"[wapbeian]",""&wapbeian&"")
	strContent=Replace(strContent,"[wapname]",""&wapname&"")
	strContent=Replace(strContent,"[wapurl]",""&wapurl&"")
	strContent=Replace(strContent,"[waplogo]",""&waplogo&"")
	strContent=Replace(strContent,"[wapboss]",""&wapboss&"")
	strContent=Replace(strContent,"[wapday]",""&wapday&"")
	strContent=Replace(strContent,"[wapemail]",""&wapemail&"")
	strContent=Replace(strContent,"[logo]",""&mb_logo&"/")
	strContent=Replace(strContent,"[zx]",""&total&"")
	set re=Nothing
	UBBCode=strContent
end function
%>

⌨️ 快捷键说明

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