七日杀电脑单机版:ASP代码?6

来源:百度文库 编辑:高校问答 时间:2024/04/30 00:00:27
(文件9)
const ImagePath="images/"
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="\[IMG\](http|https|ftp):\/\/(.[^\[]*)\[\/IMG\]"
strContent=re.Replace(strContent,"<a onfocus=this.blur() href=""$1://$2"" target=_blank><IMG SRC=""$1://$2"" border=0 alt=按此在新窗口浏览图片 onload=""javascript:if(this.width>screen.width-333)this.width=screen.width-333""></a>")
re.Pattern="\[UPLOAD=(gif|jpg|jpeg|bmp|png)\](.[^\[]*)(gif|jpg|jpeg|bmp|png)\[\/UPLOAD\]"
strContent= re.Replace(strContent,"<br><IMG SRC="""&ImagePath&"$1.gif"" border=0>此主题相关图片如下:<br><A HREF=""$2$1"" TARGET=_blank><IMG SRC=""$2$1"" border=0 alt=按此在新窗口浏览图片 onload=""javascript:if(this.width>screen.width-333)this.width=screen.width-333""></A>")

re.Pattern="\[UPLOAD=(.[^\[]*)\](.[^\[]*)\[\/UPLOAD\]"
strContent= re.Replace(strContent,"<br><IMG SRC="""&ImagePath&"$1.gif"" border=0> <a href=""$2"">点击浏览该文件</a>")
(这是原程序中的一部分,请问它有什么用啊,尽量具体点啊 !)