麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 編程 > Regex > 正文

asp的ubb函數(shù)(推薦)

2020-03-16 21:24:02
字體:
供稿:網(wǎng)友
asp的ubb函數(shù)(推薦)

  1. function unHtml(content)  
  2. unHtml=content  
  3. if content <> "" then  
  4. unHtml=replace(unHtml,"&","&")  
  5. unHtml=replace(unHtml,"<","<")  
  6. unHtml=replace(unHtml,">",">")  
  7. unHtml=replace(unHtml,chr(34),""")  
  8. unHtml=replace(unHtml,chr(13),"<br>")  
  9. unHtml=replace(unHtml,chr(32)," ")  
  10. 'unHtml=ubb(unHtml)  
  11. end if  
  12. end function  
  13.  
  14. function ubb(content)  
  15. Dim nowtime,i  
  16. ubb=content  
  17. nowtime=now()  
  18. UBB=Convert(ubb,"code")  
  19. UBB=Convert(ubb,"html")  
  20. UBB=Convert(ubb,"url")  
  21. UBB=Convert(ubb,"color")  
  22. UBB=Convert(ubb,"font")  
  23. UBB=Convert(ubb,"size")  
  24. UBB=Convert(ubb,"quote")  
  25. UBB=Convert(ubb,"email")  
  26. UBB=Convert(ubb,"img")  
  27. UBB=Convert(ubb,"swf")  
  28.  
  29. UBB=AutoURL(ubb)  
  30. ubb=replace(ubb,"[b]","<b>",1,-1,1)  
  31. ubb=replace(ubb,"[/b]","</b>",1,-1,1)  
  32. ubb=replace(ubb,"[i]","<i>",1,-1,1)  
  33. ubb=replace(ubb,"[/i]","</i>",1,-1,1)  
  34. ubb=replace(ubb,"[u]","<u>",1,-1,1)  
  35. ubb=replace(ubb,"[/u]","</u>",1,-1,1)  
  36. ubb=replace(ubb,"[blue]","<font color='#000099'>",1,-1,1)  
  37. ubb=replace(ubb,"[/blue]","</font>",1,-1,1)  
  38. ubb=replace(ubb,"[red]","<font color='#990000'>",1,-1,1)  
  39. ubb=replace(ubb,"[/red]","</font>",1,-1,1)  
  40. for i=1 to 28  
  41. ubb=replace(ubb,"{:em"&i&"}","<IMG SRC=emot/emotface/em"&i&".gif></img>",1,6,1)  
  42. ubb=replace(ubb,"{:em"&i&"}","",1,-1,1)  
  43. next  
  44. ubb=replace(ubb,"["&chr(176),"[",1,-1,1)  
  45. ubb=replace(ubb,chr(176)&"]","]",1,-1,1)  
  46. ubb=replace(ubb,"/"&chr(176),"/",1,-1,1)  
  47. ' ubb=replace(ubb,"{;em","{:em",1,-1,1)  
  48. end function  
  49.  
  50.  
  51. function Convert(ubb,CovT)  
  52. Dim cText,startubb,endubb,Lcovt,text,codetext  
  53. cText=ubb  
  54. startubb=1  
  55. do while Covt="url" or Covt="color" or Covt="font" or Covt="size"  
  56. startubb=instr(startubb,cText,"["&CovT&"=",1)  
  57. if startubb=0 then exit do  
  58. endubb=instr(startubb,cText,"]",1)  
  59. if endubb=0 then exit do  
  60. Lcovt=Covt  
  61. startubb=startubb+len(lCovT)+2  
  62. text=mid(cText,startubb,endubb-startubb)  
  63. codetext=replace(text,"[","["&chr(176),1,-1,1)  
  64. codetext=replace(codetext,"]",chr(176)&"]",1,-1,1)  
  65. 'codetext=replace(codetext,"{:em","{;em",1,-1,1)  
  66. codetext=replace(codetext,"/","/"&chr(176),1,-1,1)  
  67. select case CovT  
  68. case "color"  
  69. cText=replace(cText,"[color="&text&"]","<font color='"&text&"'>",1,1,1)  
  70. cText=replace(cText,"[/color]","</font>",1,1,1)  
  71. case "font"  
  72. cText=replace(cText,"[font="&text&"]","<font face='"&text&"'>",1,1,1)  
  73. cText=replace(cText,"[/font]","</font>",1,1,1)  
  74. case "size"  
  75. if IsNumeric(text) then  
  76. if text>6 then text=6  
  77. if text<1 then text=1  
  78. cText=replace(cText,"[size="&text&"]","<font size='"&text&"'>",1,1,1)  
  79. cText=replace(cText,"[/size]","</font>",1,1,1)  
  80. end if  
  81. case "url"  
  82. cText=replace(cText,"[url="&text&"]","<a href='"&codetext&"' target=_blank>",1,1,1)  
  83. cText=replace(cText,"[/url]","</a>",1,1,1)  
  84. case "email"  
  85. cText=replace(cText,"["&CovT&"="&text&"]","<a href=mailto:"&text&">",1,1,1)  
  86. cText=replace(cText,"[/"&CovT&"]","</a>",1,1,1)  
  87. end select  
  88. loop  
  89.  
  90. startubb=1  
  91. do  
  92. startubb=instr(startubb,cText,"["&CovT&"]",1)  
  93. if startubb=0 then exit do  
  94. endubb=instr(startubb,cText,"[/"&CovT&"]",1)  
  95. if endubb=0 then exit do  
  96. Lcovt=Covt  
  97. startubb=startubb+len(lCovT)+2  
  98. text=mid(cText,startubb,endubb-startubb)  
  99. codetext=replace(text,"[","["&chr(176),1,-1,1)  
  100. codetext=replace(codetext,"]",chr(176)&"]",1,-1,1)  
  101. 'codetext=replace(codetext,"{:em","{;em",1,-1,1)  
  102. codetext=replace(codetext,"/","/"&chr(176),1,-1,1)  
  103. select case CovT  
  104. case "url"  
  105. cText=replace(cText,"["&CovT&"]"&text,"<a href='"&codetext&"' target=_blank>"&codetext,1,1,1)  
  106. cText=replace(cText,"<a href='"&codetext&"' target=_blank>"&codetext&"[/"&CovT&"]","<a href="&codetext&" target=_blank>"&codetext&"</a>",1,1,1)  
  107. case "email"  
  108. cText=replace(cText,"["&CovT&"]","<a href=mailto:"&text&">",1,1,1)  
  109. cText=replace(cText,"[/"&CovT&"]","</a>",1,1,1)  
  110. case "html"  
  111. codetext=replace(codetext,"<br>",chr(13),1,-1,1)  
  112. codetext=replace(codetext," ",chr(32),1,-1,1)  
  113. Randomize  
  114. rid="temp"&Int(100000 * Rnd)  
  115. cText=replace(cText,"{html}"&text,"代碼片斷如下:<TEXTAREA id="&rid&" rows=15 style='width:100%' class='bk'>"&codetext,1,1,1)  
  116. cText=replace(cText,"代碼片斷如下:<TEXTAREA id="&rid&" rows=15 style='width:100%' class='bk'>"&codetext&"{/html}","代碼片斷如下:<TEXTAREA id="&rid&" rows=15 style='width:100%' class='bk'>"&codetext&"</TEXTAREA><INPUT onclick=runEx('"&rid&"') type=button value=運(yùn)行此段代碼 name=Button1 class='Tips_bo'> <INPUT onclick=JM_cc('"&rid&"') type=button value=復(fù)制到我的剪貼板 name=Button2 class='Tips_bo'>",1,1,1)  
  117. case "img"  
  118. cText=replace(cText,"[img]"&text,"<a href="&chr(34)&"about:<img src="&codetext&" border=0>"&chr(34)&" target=_blank><img src="&codetext,1,1,1)  
  119. cText=replace(cText,"[/img]"," vspace=2 hspace=2 border=0 alt=::點(diǎn)擊圖片在新窗口中打開::></a>",1,1,1)  
  120. case "code"  
  121. cText=replace(cText,"[code]"&text,"以下內(nèi)容為程序代碼<hr noshade>"&codetext,1,1,1)  
  122. cText=replace(cText,"以下內(nèi)容為程序代碼<hr noshade>"&codetext&"[/code]","以下內(nèi)容為程序代碼<hr noshade>"&codetext&"<hr noshade>",1,1,1)  
  123. case "quote"  
  124. atext=replace(text,"[img]","",1,-1,1)  
  125. atext=replace(atext,"[/img]","",1,-1,1)  
  126. atext=replace(atext,"[swf]","",1,-1,1)  
  127. atext=replace(atext,"[/swf]","",1,-1,1)  
  128. atext=replace(atext,"{html}","",1,-1,1)  
  129. atext=replace(atext,"{/html}","",1,-1,1)  
  130. ' atext=replace(atext,"{:em","{;em",1,-1,1)  
  131. atext=SplitWords(atext,350)  
  132. atext=replace(atext,chr(32)," ",1,-1,1)  
  133. cText=replace(cText,"[quote]"&text,"<blockquote><hr noshade>"&atext,1,1,1)  
  134. cText=replace(cText,"<blockquote><hr noshade>"&atext&"[/quote]","<blockquote><hr noshade>"&atext&"<hr noshade></blockquote>",1,1,1)  
  135. case "swf"  
  136. cText=replace(cText,"[swf]"&text,"影片地址:<br>"&text&"<br><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='500' height='500'><param name=movie value='"&codetext&"'><param name=quality value=high><embed src='"&codetext&"' quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='500' height='500'>",1,1,1)  
  137. cText=replace(cText,"<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='500' height='500'><param name=movie value='"&codetext&"'><param name=quality value=high><embed src='"&codetext&"' quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='500' height='500'>"&"[/swf]","<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='500' height='500'><param name=movie value='"&codetext&"'><param name=quality value=high><embed src='"&codetext&"' quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='500' height='500'>"&"</embed></object>",1,1,1)  
  138. end select  
  139. loop  
  140. Convert=cText  
  141. end function  

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: jj视频在线播放 | 免费午夜视频在线观看 | 国产黄色免费网站 | 日本在线视频免费 | 久久伊人国产精品 | 曰韩黄色片 | 欧美日韩亚洲精品一区二区三区 | 成人做爽爽爽爽免费国产软件 | 天天草天天色 | a集毛片 | av在线免费观看国产 | 毛片网站视频 | 斗罗破苍穹在线观看免费完整观看 | 一级色毛片 | 日本在线观看一区二区 | 最新午夜综合福利视频 | 久久国产成人午夜av浪潮 | 国产精品久久久久久久久久久久久久久 | 久久96国产精品久久秘臀 | 日韩不卡一区二区 | 国产高清一区 | 色屁屁xxxxⅹ免费视频 | 黄色片免费看看 | 福利在线国产 | 国产免费高清在线 | h色视频在线观看 | mmmwww| 在线a亚洲视频播放在线观看 | 久久久久久久久久亚洲 | 毛片视频网站在线观看 | 国产一区二区欧美精品 | 国产精品视频中文字幕 | 成人毛片网站 | 中文字幕网在线 | 青青草免费观看完整版高清 | 精品国产一区二区三区久久久蜜月 | chengrenzaixian | 依人九九宗合九九九 | 欧美三级欧美成人高清www | 欧美一级理论 | 香蕉国产9 |