asp连接数据库代码实例(17)
发布时间:2021-06-06
发布时间:2021-06-06
asp 连接数据库代码实例
----------ubbcode.asp--------------
<%
const ImagePath="images/emot/"
function UBBCode(strContent)
strContent= FilterJS(strContent)
dim re
dim po,ii
dim reContent
Set re=new RegExp
re.IgnoreCase =true
re.Global=True
po=0
ii=0
re.Pattern="[UPLOAD=(gif|jpg|jpeg|bmp|png)](.[^[]*)(gif|jpg|jpeg|bmp)[/UPLOAD]"
strContent=re.replace(strContent,"<br><IMG SRC=""pic/$1.gif"" border=0> 此主题相关图片如下:<br><SPAN style='CURSOR: hand'><IMG SRC=""upload/$2$1"" border=0 alt=转动滚轮可缩放图片 按此在新窗口浏览图片 onload=""imgload(this)"" onclick=""window.open(this.src,null,'')"" onmousewheel=""return bbimg(this)""></span>")
re.Pattern="[IMG](http|https|ftp)://(.[^[]*)[/IMG]"
strContent=re.replace(strContent,"<img src=$1://$2 border=0 style='cursor:hand' alt=转动滚轮可缩放图片;按此在新窗口浏览图片 onload=""imgload(this)"" onclick=""window.open(this.src,null,'')"" onmousewheel=""return bbimg(this)"">")
re.Pattern="[DIR=*([0-9]*),*([0-9]*)](.[^[]*)[/DIR]"
strContent=re.Replace(strContent,"<object
classid=clsid:166B1BCA-3F9C-11CF-8075-444553540000
codebase=/pub/shockwave/cabs/director/sw.cab#version=7,0,2,0 width=$1 height=$2><param name=src value=$3><embed src=$3 pluginspage=/shockwave/download/ width=$1 height=$2></embed></object>")
re.Pattern="[QT=*([0-9]*),*([0-9]*)](.[^[]*)[/QT]"
strContent=re.Replace(strContent,"<embed src=$3 width=$1 height=$2 autoplay=true loop=false controller=true playeveryframe=false cache=false scale=TOFIT bgcolor=#000000 kioskmode=false targetcache=false pluginspage=/quicktime/>")
re.Pattern="[MP=*([0-9]*),*([0-9]*)](.[^[]*)[/MP]"
strContent=re.Replace(strContent,"<object align=middle classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 class=OBJECT id=MediaPlayer width=$1 height=$2 ><param name=ShowStatusBar value=-1><param name=Filename value=$3><embed type=application/x-oleobject codebase=/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701 flename=mp src=$3 width=$1 height=$2></embed></object>")