国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

很不錯的一個UBB代碼

2024-05-04 10:59:11
字體:
來源:轉載
供稿:網友
<%
Function HTMLEncode(ByVal strValue)
 '忽略錯誤
 On Error Resume Next
 '定義變量
 Dim strNewValue
 If strValue <> "" Then
  strNewValue = Replace(strValue,"<","<")
  strNewValue = Replace(strNewValue,">",">")
  strNewValue = Replace(strNewValue,"'","'")
  strNewValue = Replace(strNewValue,"""",""")
  strNewValue = Replace(strNewValue,vbCrLf,"<br>")
  strNewValue = Replace(strNewValue," "," ")
 End If
 HTMLEncode = strNewValue
 '輸出錯誤
 If Err.Number>0 Then
  Response.Write Err.Description
  Response.End
 End If
End Function

Function UBBCode(strValue) 
Dim RegExp 
'strValue=HTMLEncode(strValue)
Set RegExp=New RegExp 
RegExp.IgnoreCase =True 
RegExp.Global=True 

If strValue <> "" Then
RegExp.Pattern="(/[IMG/])(.[^/[]*)(/[//IMG/])" 
strValue=RegExp.Replace(strValue,"<a href=""$2"" target=_blank><IMG SRC=""$2"" border=0 alt=按此在新窗口瀏覽圖片 onload=""javascript:if(this.width>screen.width-333)this.width=screen.width-333""></a>") 

RegExp.Pattern="(/[FLASH/])(.[^/[]*)(/[//FLASH/])" 
strValue=RegExp.Replace(strValue,"<OBJECT codebase=""http://download.macromedia.com/pub/sho ... h/swflash.cab#version=4,0,2,0"" classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=500 height=400 id=ShockwaveFlash1><PARAM NAME=movie VALUE=""$2""><PARAM NAME=quality VALUE=high><embed src=""$2"" quality=high pluginspage=""") ' target=_blank rel=nofollow>http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"" type=""appl ... 00 height=400></embed></OBJECT>") 

RegExp.Pattern="(/[ZIP/])(.[^/[]*)(/[//ZIP/])" 
strValue=RegExp.Replace(strValue,"<br><a href=""$2"">點擊下載該文件</a>") 

RegExp.Pattern="(/[RAR/])(.[^/[]*)(/[//RAR/])" 
strValue=RegExp.Replace(strValue,"<br><a href=""$2"">點擊下載該文件</a>") 

'RegExp.Pattern="(/[UPLOAD=(.[^/[]*)/])(.[^/[]*)(/[//UPLOAD/])" 
'strValue=RegExp.Replace(strValue,"<br><IMG SRC=""$2.gif"" border=0> <A HREF=""$3"" TARGET=_blank>點擊查看或下載該文件</A>") 
'strValue=RegExp.Replace(strValue,"<br><IMG SRC=""$2.gif"" border=0>此主題相關圖片如下:<br><A HREF=""$3"" TARGET=_blank><IMG SRC=""$3"" border=0 alt=按此在新窗口瀏覽圖片 onload=""javascript:if(this.width>screen.width-333)this.width=screen.width-333""></A>") 
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 乐安县| 灵宝市| 阜阳市| 沐川县| 特克斯县| 翁源县| 马山县| 平定县| 施甸县| 侯马市| 石城县| 湘潭县| 鸡泽县| 迁安市| 郧西县| 洪湖市| 平湖市| 文安县| 高邑县| 新河县| 唐山市| 罗山县| 乌审旗| 义乌市| 蒙自县| 白山市| 上林县| 剑河县| 浮山县| 南投市| 乐亭县| 安仁县| 醴陵市| 周宁县| 安平县| 瑞金市| 荣成市| 华宁县| 越西县| 正定县| 吴忠市|