<%
FunctionhtmLencode (byValStrValue)
'忽略错误
Onerrorresumenext
'定义变量
Dimstrnewvalue
IfstrValue <> "" alors
strNewValue = remplacer (strvalue, "<", "<")
strNewValue = remplacer (strNewValue, ">", ">")
strNewValue = remplacer (strNewValue, "'", "'")
strNewValue = remplacer (strNewValue, "" "", "")
strNewValue = remplacer (strNewValue, vbcrlf, "<br>")
strNewValue = remplacer (strNewValue, "", "")
Endire
Htmlencode = strNewValue
'输出错误
IFERR.NUMBER> 0THEN
Response.writeerr.Description
Réponse.
Endire
Finition de fin
Functionubbcode (strvalue)
Dimregexp
'strvalue = htmlencode (strvalue)
SetRegexp = newRegexp
Regexp.ignorecase = true
Regexp.global = true
IfstrValue <> "" alors
Regexp.pattern = "(/ [img / diplomo) (.^^ / fichier dos*)(/orthy// img /])"
strvalue = regexp.replace (strvalue, "<ahref =" "$ 2" "cible = _blank> <imgsrc =" "$ 2" "border = 0alt = 按此在新窗口浏览图片 onload =" "javascript: if (this.width> screp
Regexp.pattern = "(/ [flash / diplomot)(._^/*.
strValue = regexp.replace (strvalue, "<objectCodeBase =" "http://download.macromedia.com/pub/sho ... h / swflash.cab # version = 4,0,2,0 "" Classid = ClSid: D27CDB6E-AE6D-11CF-96B8-44455354000000Width = 500Height = 400ID = Shockww aveflash1> <paramname = filmvalue = "" $ 2 ""> <paramname = QualityValue = high> <embedsrc = "" 2 "" Quality = HighpluginsPage = "" ") 'cible = _blank rel = nofollow> http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash" "type =" "Appl ... 00Height = 400> </embed> </ objet>")
Regexp.pattern = "(/ [zip / diplomo) (.^^ / fichier dos*)(/[// zip /])"
strvalue = regexp.replace (strvalue, "<br> <ahref =" "2 $" "> 点击下载该文件 </a>")
Regexp.pattern = "(/ [rar / diplomate) (.^^ / fichier dos*)(/orthy// rar /])"
strvalue = regexp.replace (strvalue, "<br> <ahref =" "2 $" "> 点击下载该文件 </a>")
'Regexp.pattern = "(/ [upload = (. [^ / [] *) /]) (. [^ / [] *) (/ [// upload /])"
'strvalue = regexp.replace (strvalue, "<br> <imgsrc =" "2,gif" "border = 0> <ahref =" "3" "cible = _blank> 点击查看或下载该文件 </a>")
'strvalue = regexp.replace (strValue, "<br> <imgsrc =" "2 $ 2" border = 0> 此主题相关图片如下 : <br> <ahref = "" $ 3 "" cible = _blank> <imgsrc = "" 3 $ "" border = 0alt = 按此在新窗口浏览图片 onload = "" JavaScript: if (this.width> screen.width-333) this.width = screen.width-333 ""> </a> ")