-
functionhtmlencode (byvalstrvalue)
'忽略错误
onerrorresumenext
'定义变量
dimstrnewvalue
ifstrvalue <> "" แล้ว
strNewValue = แทนที่ (strvalue, "<", "<")
strNewValue = แทนที่ (strNewValue, ">", ">")
strNewValue = แทนที่ (strNewValue, "'", "' ')
strNewValue = แทนที่ (strNewValue, "" "", "")
strNewValue = แทนที่ (strNewValue, vbcrlf, "<br>")
strNewValue = แทนที่ (strNewValue, "", "")
endif
htmlencode = strNewValue
'输出错误
iferr.number> 0 แล้ว
Response.writeerr.description
Response.end
endif
endfunction
functionubbcode (strvalue)
dimregexp
'strvalue = htmlencode (strvalue)
setregexp = newregexp
regexp.ignorecase = true
regexp.global = true
ifstrvalue <> "" แล้ว
regexp.pattern = "(/[img/like;
strvalue = regexp.replace (strvalue, "<ahref =" "$ 2" "target = _blank> <imgsrc =" "" $ 2 "" ชายแดน = 0Alt = 按此在新窗口浏览图片 onload = "" JavaScript: ถ้า (this.width> screen.width-333)
regexp.pattern = "(/[แฟลช/เหมือนกัน;
strvalue = regexp.replace (strvalue, "<objectCodeBase =" "http://download.macromedia.com/pub/sho ... h/swflash.cab#เวอร์ชัน = 4,0,2,0 "" classid = clsid: d27cdb6e-ae6d-11cf-96b8-444553540000width = 500Height = 400id = shockw aveflash1> <paramname = movieveAlue = "" $ 2 ""> <paramname = qualityValue = สูง> <EmbedSrc = "" $ 2 "" คุณภาพ = highPluginsPage = "" ") 'target = _blank rel = nofollow> http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash" "type =" "appl ...
regexp.pattern = "(/[zip/like;
strvalue = regexp.replace (strvalue, "<br> <ahref =" "$ 2" "> 点击下载该文件 </a>")
regexp.pattern = "(/[rar/like;
strvalue = regexp.replace (strvalue, "<br> <ahref =" "$ 2" "> 点击下载该文件 </a>")
'regexp.pattern = "(/[upload = (. [^/[]*)/]) (. [^/[]*) (/[// อัปโหลด/])"
'strvalue = regexp.replace (strvalue, "<br> <imgsrc =" "$ 2.gif" "Border = 0> <ahref =" "$ 3" "เป้าหมาย = _blank> 点击查看或下载该文件 </a>")
'strvalue = regexp.replace (strvalue, "<br> <imgsrc =" "$ 2.gif" "ชายแดน = 0> 此主题相关图片如下: <br> <ahref =" "$ 3" "เป้าหมาย = _blank> <imgsrc = "" $ 3 "" Border = 0Alt = 按此在新窗口浏览图片 onload = "" JavaScript: if (this.width> screen.width-333) this.width = screen.width-333 ""> </a> ")