时间:2021-05-18
<%
FunctionHTMLEncode(ByValstrValue)
'忽略错误
OnErrorResumeNext
'定义变量
DimstrNewValue
IfstrValue<>""Then
strNewValue=Replace(strValue,"<","<")
strNewValue=Replace(strNewValue,">",">")
strNewValue=Replace(strNewValue,"'","'")
strNewValue=Replace(strNewValue,"""",""")
strNewValue=Replace(strNewValue,vbCrLf,"<br>")
strNewValue=Replace(strNewValue,""," ")
EndIf
HTMLEncode=strNewValue
'输出错误
IfErr.Number>0Then
Response.WriteErr.Description
Response.End
EndIf
EndFunction
FunctionUBBCode(strValue)
DimRegExp
'strValue=HTMLEncode(strValue)
SetRegExp=NewRegExp
RegExp.IgnoreCase=True
RegExp.Global=True
IfstrValue<>""Then
RegExp.Pattern="(\[IMG\])(.[^\[]*)(\[\/IMG\])"
strValue=RegExp.Replace(strValue,"<ahref=""$2""target=_blank><IMGSRC=""$2""border=0alt=按此在新窗口浏览图片onload=""javascript:if(this.width>screen.width-333)this.width=screen.width-333""></a>")
RegExp.Pattern="(\[FLASH\])(.[^\[]*)(\[\/FLASH\])"
strValue=RegExp.Replace(strValue,"<OBJECTcodebase=""http://download.macromedia.com/pub/sho ... h/swflash.cab#version=4,0,2,0""classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000width=500height=400id=ShockwaveFlash1><PARAMNAME=movieVALUE=""$2""><PARAMNAME=qualityVALUE=high><embedsrc=""$2""quality=highpluginspage=""")' target=_blank rel=nofollow>http:///shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash""type=""appl ... 00height=400></embed></OBJECT>")
RegExp.Pattern="(\[ZIP\])(.[^\[]*)(\[\/ZIP\])"
strValue=RegExp.Replace(strValue,"<br><ahref=""$2"">点击下载该文件</a>")
RegExp.Pattern="(\[RAR\])(.[^\[]*)(\[\/RAR\])"
strValue=RegExp.Replace(strValue,"<br><ahref=""$2"">点击下载该文件</a>")
'RegExp.Pattern="(\[UPLOAD=(.[^\[]*)\])(.[^\[]*)(\[\/UPLOAD\])"
'strValue=RegExp.Replace(strValue,"<br><IMGSRC=""$2.gif""border=0><AHREF=""$3""TARGET=_blank>点击查看或下载该文件</A>")
'strValue=RegExp.Replace(strValue,"<br><IMGSRC=""$2.gif""border=0>此主题相关图片如下:<br><AHREF=""$3""TARGET=_blank><IMGSRC=""$3""border=0alt=按此在新窗口浏览图片onload=""javascript:if(this.width>screen.width-333)this.width=screen.width-333""></A>")
RegExp.Pattern="(\[URL\])(http:\/\/.[^\[]*)(\[\/URL\])"
strValue=RegExp.Replace(strValue,"<AHREF=""$2""TARGET=_blank>$2</A>")
RegExp.Pattern="(\[URL\])(.[^\[]*)(\[\/URL\])"
strValue=RegExp.Replace(strValue,"<AHREF=""$2")' target=_blank rel=nofollow>http://$2""TARGET= ... t;/A>")
RegExp.Pattern="(\*)\])(.[^\[]*)(\[\/URL\])"
strValue=RegExp.Replace(strValue,"<AHREF=""$2""TARGET=_blank>$3</A>")
RegExp.Pattern="(\[URL=(.[^\[]*)\])(.[^\[]*)(\[\/URL\])"
strValue=RegExp.Replace(strValue,"<AHREF=""[url]http://$2""TARGET=_blank>$3</A>")
RegExp.Pattern="(\[EMAIL\])(\S+\@.[^\[]*)(\[\/EMAIL\])"
strValue=RegExp.Replace(strValue,"<AHREF=""mailto:$2"">$2</A>")
RegExp.Pattern="(\[EMAIL=(\S+\@.[^\[]*)\])(.[^\[]*)(\[\/EMAIL\])"
strValue=RegExp.Replace(strValue,"<AHREF=""mailto:$2""TARGET=_blank>$3</A>")
RegExp.Pattern="^(http://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)"
strValue=RegExp.Replace(strValue,"<atarget=_blankhref=$1>$1</a>")
RegExp.Pattern="(http://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)$"
strValue=RegExp.Replace(strValue,"<atarget=_blankhref=$1>$1</a>")
RegExp.Pattern="[^>=""](http://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)"
strValue=RegExp.Replace(strValue,"<atarget=_blankhref=$1>$1</a>")
RegExp.Pattern="^(ftp://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)"
strValue=RegExp.Replace(strValue,"<atarget=_blankhref=$1>$1</a>")
RegExp.Pattern="(ftp://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)$"
strValue=RegExp.Replace(strValue,"<atarget=_blankhref=$1>$1</a>")
RegExp.Pattern="[^>=""](ftp://[A-Za-z0-9\.\/=\?%\-&_~`@':+!]+)"
strValue=RegExp.Replace(strValue,"<atarget=_blankhref=$1>$1</a>")
RegExp.Pattern="^(rtsp://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)"
strValue=RegExp.Replace(strValue,"<atarget=_blankhref=$1>$1</a>")
RegExp.Pattern="(rtsp://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)$"
strValue=RegExp.Replace(strValue,"<atarget=_blankhref=$1>$1</a>")
RegExp.Pattern="[^>=""](rtsp://[A-Za-z0-9\.\/=\?%\-&_~`@':+!]+)"
strValue=RegExp.Replace(strValue,"<atarget=_blankhref=$1>$1</a>")
RegExp.Pattern="^(mms://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)"
strValue=RegExp.Replace(strValue,"<atarget=_blankhref=$1>$1</a>")
RegExp.Pattern="(mms://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)$"
strValue=RegExp.Replace(strValue,"<atarget=_blankhref=$1>$1</a>")
RegExp.Pattern="[^>=""](mms://[A-Za-z0-9\.\/=\?%\-&_~`@':+!]+)"
strValue=RegExp.Replace(strValue,"<atarget=_blankhref=$1>$1</a>")
RegExp.Pattern="(\[HTML\])(.[^\[]*)(\[\/HTML\])"
strValue=RegExp.Replace(strValue,"<tablewidth='100%'border='0'cellspacing='0'cellpadding='6'bgcolor='#FFFFFF'><td><b>以下内容为程序代码:</b><br>$2</td></table>")
RegExp.Pattern="(\[code\])(.[^\[]*)(\[\/code\])"
strValue=RegExp.Replace(strValue,"<tablewidth='100%'border='0'cellspacing='0'cellpadding='6'bgcolor='#FFFFFF'><td><b>以下内容为程序代码:</b><br>$2</td></table>")
RegExp.Pattern="(\[color=(.[^\[]*)\])(.[^\[]*)(\[\/color\])"
strValue=RegExp.Replace(strValue,"<fontcolor=$2>$3</font>")
RegExp.Pattern="(\[face=(.[^\[]*)\])(.[^\[]*)(\[\/face\])"
strValue=RegExp.Replace(strValue,"<fontface=$2>$3</font>")
RegExp.Pattern="(\[align=(.[^\[]*)\])(.*)(\[\/align\])"
strValue=RegExp.Replace(strValue,"<divalign=$2>$3</div>")
RegExp.Pattern="(\[QUOTE\])(.*)(\[\/QUOTE\])"
strValue=RegExp.Replace(strValue,"<tablecellpadding=0cellspacing=0border=0WIDTH=94%bgcolor=#000000align=center><tr><td><tablewidth=100%cellpadding=5cellspacing=1border=0><TR><TDBGCOLOR='#FFFFFF'>$2</table></table><br>")
RegExp.Pattern="(\[fly\])(.*)(\[\/fly\])"
strValue=RegExp.Replace(strValue,"<marqueewidth=90%behavior=alternatescrollamount=3>$2</marquee>")
RegExp.Pattern="(\[move\])(.*)(\[\/move\])"
strValue=RegExp.Replace(strValue,"<MARQUEEscrollamount=3>$2</marquee>")
RegExp.Pattern="\[GLOW=*([0-9]*),*(#*[a-z0-9]*),*([0-9]*)\](.[^\[]*)\[\/GLOW]"
strValue=RegExp.Replace(strValue,"<tablewidth=$1style=""filter:glow(color=$2,strength=$3)"">$4</table>")
RegExp.Pattern="\[SHADOW=*([0-9]*),*(#*[a-z0-9]*),*([0-9]*)\](.[^\[]*)\[\/SHADOW]"
strValue=RegExp.Replace(strValue,"<tablewidth=$1style=""filter:shadow(color=$2,strength=$3)"">$4</table>")
RegExp.Pattern="(\[i\])(.[^\[]*)(\[\/i\])"
strValue=RegExp.Replace(strValue,"<i>$2</i>")
RegExp.Pattern="(\[u\])(.[^\[]*)(\[\/u\])"
strValue=RegExp.Replace(strValue,"<u>$2</u>")
RegExp.Pattern="(\[b\])(.[^\[]*)(\[\/b\])"
strValue=RegExp.Replace(strValue,"<b>$2</b>")
RegExp.Pattern="(\[fly\])(.[^\[]*)(\[\/fly\])"
strValue=RegExp.Replace(strValue,"<marquee>$2</marquee>")
RegExp.Pattern="(\[size=1\])(.[^\[]*)(\[\/size\])"
strValue=RegExp.Replace(strValue,"<fontsize=1>$2</font>")
RegExp.Pattern="(\[size=2\])(.[^\[]*)(\[\/size\])"
strValue=RegExp.Replace(strValue,"<fontsize=2>$2</font>")
RegExp.Pattern="(\[size=3\])(.[^\[]*)(\[\/size\])"
strValue=RegExp.Replace(strValue,"<fontsize=3>$2</font>")
RegExp.Pattern="(\[size=4\])(.[^\[]*)(\[\/size\])"
strValue=RegExp.Replace(strValue,"<fontsize=4>$2</font>")
RegExp.Pattern="(\[center\])(.[^\[]*)(\[\/center\])"
strValue=RegExp.Replace(strValue,"<center>$2</center>")
EndIf
SetRegExp=Nothing
UBBCode=strValue
'输出错误
IfErr.Number>0Then
Response.WriteErr.Description
Response.End
EndIf
EndFunction
%>
调用:<%=UBBCode(Content)%>
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
分享一例php分页函数代码,用此函数实现分页代码很不错。代码,php分页函数。复制代码代码如下:
--------------------------------------很不错哦。
提起京东这个平台都不会陌生,它是很不错的一个购物网站。目前对于京东这个平台来说,必购码是很不错的一种福利,如果想要购买这款物品,同时还有提供必购码,只需要去申请
在网上搜资料找到一个大神写的shell修复bash漏洞脚本,觉得很不错,拖到我blog里来共享给大家.脚本内容:复制代码代码如下:#/bin/bash#Auth
这个插件支持多个文件选取功能,很不错,而且代码简单复制代码代码如下:$("#fileUpload").fileUpload({'uploader':'style