日期:2014-05-16  浏览次数:20936 次

UBB代码,怎么实现可以播放MP4文件呢? 请指教,谢谢!
UBB.asp代码如下:


<%
Const MaxLoopcount=50
function ubb(bod)  'h=2为转换帖,h=1为转换签名
Set re=new RegExp  '声明正则表达式对象
re.IgnoreCase =true   '设置是否区分字符大小写
re.Global=True   '设置全区可用性
're.pattern 设置模式
bod = dvHTMLEncode(bod)
re.Pattern="(javascript)"
bod=re.Replace(bod,"<I>&#106avascript</I>")
re.Pattern="(jscript:)"
bod=re.Replace(bod,"<I>&#106script:</I>")
re.Pattern="(js:)"
bod=re.Replace(bod,"<I>&#106s:</I>")
re.Pattern="(value)"
bod=re.Replace(bod,"<I>&#118alue</I>")
re.Pattern="(about:)"
bod=re.Replace(bod,"<I>about&#58</I>")
re.Pattern="(file:)"
bod=re.Replace(bod,"<I>file&#58</I>")
re.Pattern="(document.cookie)"
bod=re.Replace(bod,"<I>documents&#46cookie</I>")
re.Pattern="(vbscript:)"
bod=re.Replace(bod,"<I>&#118bscript:</I>")
re.Pattern="(vbs:)"
bod=re.Replace(bod,"<I>&#118bs:</I>")
re.Pattern="(on(mouse|exit|error|click|key))"
bod=re.Replace(bod,"<I>&#111n$2</I>")
'常用标签
re.Pattern="(\[humor)([\d]+)(\])"
bod=re.replace(bod,"<img src=""images/humor/$2.gif"" border=""0"">")
're.Pattern="\[QUOTE\](.*)\[\/QUOTE\]"
re.pattern="\[QUOTE\]([\s\S]*?)\[\/QUOTE\]"

bod=re.Replace(bod,"<table style=""border-collapse:collapse;width:100%"" bordercolor=""#6595D6"" cellpadding=5 cellspacing=0 border=1><tr><td bgcolor=""#E4E8EF"" width=""100%"">$1</td></tr></table>")

re.Pattern = "(\[SIZE=([0-9]*)\])(.[^\[]*)(\[\/SIZE\])"
bod=re.Replace(bod,"<FONT SIZE='$2'>$3</FONT>")

re.Pattern = "(\[B\])(.[^\[]*)(\[\/B\])"
bod=re.Replace(bod,"<B>$2</B>")

re.Pattern = "(\[COLOR=(.[^\[]*)\])(.[^\[]*)(\[\/RED\])"
bod=re.Replace(bod,"<FONT COLOR='$2'>$3</FONT>")

re.Pattern = "(\[RED\])(.[^\[]*)(\[\/RED\])"
bod = re.Replace(bod,"<FONT COLOR='#FF0000'>$2</FONT>")

re.Pattern = "(\[GREEN\])(.[^\[]*)(\[\/GREEN\])"
bod = re.Replace(bod,"<FONT COLOR='#009900'>$2</FONT>")

re.Pattern = "(\[BLUE\])(.[^\[]*)(\[\/BLUE\])"
bod = re.Replace(bod,"<FONT COLOR='#000099'>$2</FONT>")

re.Pattern = "(\[GRAY\])(.[^\[]*)(\[\/GRAY\])"
bod = re.Replace(bod,"<FONT COLOR='#999999'>$2</FONT>")

re.Pattern = "(\[S\])(.[^\[]*)(\[\/S\])"
bod= re.Replace(bod,"<FONT STYLE='TEXT-DECORATION:LINE-THROUGH'>$2</FONT>")

re.Pattern = "(\[I\])(.[^\[]*)(\[\/I\])"
bod = re.Replace(bod,"<I>$2</I>")

re.Pattern = "(\[U\])(.[^\[]*)(\[\/U\])"
bod = re.Replace(bod,"<U>$2</U>")

re.Pattern = "(\[ALIGN=(.[^\[]*)\])(.[^\[]*)(\[\/ALIGN\])"
bod = re.Replace(bod,"<DIV ALIGN='$2'>$3</DIV>")
re.Pattern = "(\[CENTER\])(.[^\[]*)(\[\/CENTER\])"
bod= re.Replace(bod,"<CENTER>$2</CENTER>")

re.Pattern="\[anchor=([^\]]+)\]"     '--锚点链接
bod=re.Replace(bod,"<a name='$1'></a>")

re.Pattern = "\[url=#(.[^\]]*)\](.[^\[]*)\[\/url]"
bod = re.Replace(bod,"<img align=absmiddle src=images/url2.gif border=0><a style=