?? inc_ubb.asp
字號:
<%
Dim GBL_strUbbFont,GBL_strUbbSize,GBL_strUbbColor,GBL_strUbbFont2,GBL_strUbbCenter,GBL_strUbbUrl,GBL_strUbbEmail,GBL_strUbbImg,GBL_strUbbFlash,GBL_strUbbQuote,GBL_strUbbFly,GBL_strUbbMove,strUbbGlow,GBL_strUbbShadown,h_html
'取得變量
h_html=0'rsconn1("h_html")'顯示html
'過慮詞語
function ChkBadWords(fString)
fString=replace(fString,"'","''")
bwords = split(BadWords, "|")
for i = 0 to ubound(bwords)
fString = Replace(fString, bwords(i), string(len(bwords(i)),"*"))
next
ChkBadWords = fString
end function
'---------------- 過濾表單字符--------------------
function cpbhtmlencode(fString)
fString = replace(fString, ">", ">")
fString = replace(fString, "<", "<")
fString = Replace(fString, CHR(32) & CHR(32), " ")
fString = Replace(fString, CHR(9), " ")
fString = Replace(fString, CHR(34), """)
fString = Replace(fString, CHR(39), "'")
fString = Replace(fString, CHR(13), " ")
fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
fString = Replace(fString, CHR(10), "<BR>")
'fString = Replace(fString, CHR(10), "<br>")
'fString=ChkBadWords(fString)
cpbhtmlencode = fString
end function
function UBBCode(strContent)
'strContent = cpbhtmlencode(strContent)
dim re
Set re=new RegExp' 建立正則表達式
re.IgnoreCase =true'忽略大小寫
re.Global=True' 設置全局可用
re.Pattern="(javascript)"
strContent=re.Replace(strContent,"javascript")
re.Pattern="(jscript:)"
strContent=re.Replace(strContent,"jscript:")
re.Pattern="(js:)"
strContent=re.Replace(strContent,"js:")
re.Pattern="(value)"
strContent=re.Replace(strContent,"value")
re.Pattern="(about:)"
strContent=re.Replace(strContent,"about:")
re.Pattern="(file:)"
strContent=re.Replace(strContent,"file:")
re.Pattern="(document.cookie)"
strContent=re.Replace(strContent,"documents.cookie")
re.Pattern="(vbscript:)"
strContent=re.Replace(strContent,"vbscript:")
re.Pattern="(vbs:)"
strContent=re.Replace(strContent,"vbs:")
re.Pattern="(on(mouse|exit|error|click|key))"
strContent=re.Replace(strContent,"on$2")
'加入巧嘴娃娃 04/07/31
dim audibles_list,myrnd
Dim LoopN
Audibles_List = "|||就這事??!地球人都知道|||嘿嘿!逗你玩!|||年輕人,做人要厚道!|||這干嘛?這不是那我打岔嗎?|||一定要幸福喔!|||你好可愛耶!|||加油喔!|||我好想你喔 ~|||你不要這樣嘛|||真的好感激你啊|||你簡直太讓我感動了!|||過來..近點...再近點...Kiss!|||強!實在是強!|||真真的么?我要暈了!|||最近真的好想你哦!|||啊你是中邪喔..|||你好討厭喔~|||抽根煙吧!|||不干不干就是不干!|||餓不餓我請你吃飯|||聽見了嗎那是我肚子在叫|||哼!小樣!我看你還真是找扁!|||坦白從寬,你就交代了吧!|||哼!你這騙子|||我就是喜歡你動作非常慢的時候...|||Hi!是你吧,我知道你在,我可看見你了!|||哎~~看來你真的很寂寞!|||年輕人虛心點沒錯|||這么說你還不明白,你豬頭啊!|||掰掰啰!|||拜拜了您那|||哎呦!老板來了,我先走了??!|||不行不行!我得上廁所...得上廁所!|||晚安做個好夢!|||我困得不行了得先走一步了|||有人在家嗎?|||開會啰!|||早安!|||還在加班?真忙假忙???|||你可算來了,我等你很久了!|||來啦小妞|||早上好,您來啦!|||你要死啦~到現在才出現,到哪里潛水去啦...|||喂..我老板來了,先閃一下嘍~下次再聊..|||啊~~~這是一定要的啦!|||嗯哼~人家.. 去撇個尿啰..嗯哼~|||嗯哼~來,親一個~|||起來動一動吧,follow me! one more, two more…|||祝你生日快樂~祝你生日快樂..喔喔!祝你生日快樂嘍|||不知道該說什么 ..|||好想睡喔...zzz|||讓我想一想~~"
Audibles_List=split(Audibles_List,"|||")
For LoopN = 1 to 52
Randomize Timer
MyRnd = Int(Rnd * 999999)&int(timer)
strContent=replace(strContent,"[AUDIO" & Right(("0" & LoopN),2) & "]","<P><table border=0 cellspacing=0 cellpadding=0><tr><td><OBJECT codeBase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='48' height='48' Id='Audible"&myrnd&"'><PARAM NAME=movie VALUE='../plug-ins/audio/swf/"&Right("0" & LoopN,2)&".swf'><param name=menu value=false><PARAM NAME=quality VALUE=high><PARAM NAME=play VALUE=false><param name='wmode' value='transparent'><embed src='../plug-ins/audio/swf/"&Right("0" & LoopN,2)&".swf' quality='high' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='48' height='48'></embed></OBJECT></td><td align='left' style='cursor:hand;' onMouseOver='this.parentElement.children[0].children[0].Play()'>"&Audibles_List(loopN)&"</td></tr></table></p>",1,52,0)
strContent=replace(strContent,"[audio" & Right(("0" & LoopN),2) & "]","<P><table border=0 cellspacing=0 cellpadding=0><tr><td><OBJECT codeBase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='48' height='48' Id='Audible"&myrnd&"'><PARAM NAME=movie VALUE='../plug-ins/audio/swf/"&Right("0" & LoopN,2)&".swf'><param name=menu value=false><PARAM NAME=quality VALUE=high><PARAM NAME=play VALUE=false><param name='wmode' value='transparent'><embed src='../plug-ins/audio/swf/"&Right("0" & LoopN,2)&".swf' quality='high' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='48' height='48'></embed></OBJECT></td><td align='left' style='cursor:hand;' onMouseOver='this.parentElement.children[0].children[0].Play()'>"&Audibles_List(loopN)&"</td></tr></table></p>",1,52,0)
Next
'加入巧嘴娃娃結束
dim checklockubbreply,checklockubb
if checklockubbreply=0 or checklockubb=0 then
'== for board smileface
re.Pattern="(\[BI\])(.[^\[]*)(\[\/BI\])"
strContent = re.Replace(strContent,"<IMG SRC=""" & GBL_strHomeURL & GBL_strBoardFace & "$2" & ".gif" & """ border=0 align=middle> ")
'== for smileface by cc
re.Pattern="\[em(.[^\[]*)\]"
strContent = re.Replace(strContent,"<img src=" & GBL_strHomeURL & "images/smile/$1.gif border=0 align=middle>")
re.Pattern="(\[IMG\])(http|https|ftp):\/\/(.[^\[]*)(\[\/IMG\])"
strContent=re.Replace(strContent,"<a onfocus=this.blur() href=""$2://$3"" target=_blank><IMG SRC=""$2://$3"" border=0 alt=按此在新窗口瀏覽圖片 onLoad=""javascript:DrawImage2(this," & GBL_intImgWidth2 & ");""></a><br>")
re.Pattern="(\[uploadIMG\])(.[^\[]*)(\[\/uploadIMG\])"
strContent=re.Replace(strContent,"<br><b>上傳圖片</b>:<br><a href=""upload/$2"" target=_blank><IMG SRC=""upload/$2"" border=0 alt=按此在新窗口瀏覽圖片 onload=""javascript:if(this.width>screen.width-300)this.width=screen.width-300""><a>")
re.Pattern="(\[uploadfile\])(.[^\[]*)(\[\/uploadfile\])"
strContent=re.Replace(strContent,"<br><b>上傳文件</b>:<br><a href=""upload/$2"" target=_blank title=按此瀏覽上傳文件>按此瀏覽<a><br>")
re.Pattern="(\[sound\])(.[^\[]*)(\[\/sound\])"
strContent=re.Replace(strContent,"<br><b>加有背景音樂:</b><br><a href=""$2"" target=_blank title=按此收聽>按此收聽<a><br><bgsound src=""$2"">")
re.Pattern="(\[download\])(.[^\[]*)(\[\/download\])"
strContent=re.Replace(strContent,"<IMG src=images/download.gif border=0><a href=""$2"" target=_blank title=點擊下載><b>CPB--點擊下載</b></a><BR>")
re.Pattern="(\[frame\])(.[^\[]*)(\[\/frame\])"
strContent=re.Replace(strContent,"<br><table align=center border=0 width=90% cellspacing=1 cellpadding=0 class=tdc><tr><td><iframe marginwidth=0 framespacing=0 marginheight=0 frameborder=2 width=100% height=200 src=""$2""></iframe></td></tr><tr><td><a href=""$2"" target=_blank>點這里訪問</a></td></tr></table>")
re.Pattern="\[DIR=*([0-9]*),*([0-9]*)\](http|https|ftp|mms):\/\/(.[^\[]*)\[\/DIR]"
strContent=re.Replace(strContent,"<BR><b>影視文件:</b><a href=$3://$4>$3://$4</a><BR><object classid=clsid:166B1BCA-3F9C-11CF-8075-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=7,0,2,0 width=$1 height=$2><param name=src value=$3://$4><embed src=""$3://$4"" pluginspage=http://www.macromedia.com/shockwave/download/ width=$1 height=$2></embed></object><BR>")
re.Pattern="(\[cc])(.[^\[]*)(\[\/cc])"
strContent=re.Replace(strContent,"<object classid=""clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"" codebase=""http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"" width=""438"" height=""387""><param name=""movie"" value=""http://union.bokecc.com/$2""><param name=""allowFullScreen"" value=""true"" /> <param name=""quality"" value=""high""><embed src=""http://union.bokecc.com/$2"" quality=""high"" pluginspage=""http://www.macromedia.com/go/getflashplayer"" type=""application/x-shockwave-flash"" width=""438"" height=""387"" allowFullscreen=""true"" ></embed></object>")
re.Pattern="\[QT=*([0-9]*),*([0-9]*)\](http|https|rtsp|ftp|mms):\/\/(.[^\[]*)\[\/QT]"
strContent=re.Replace(strContent,"<BR><b>影視文件:</b><a href=$3://$4>$3://$4</a><BR><embed src=$3://$4 width=$1 height=$2 autoplay=false loop=false controller=true playeveryframe=false cache=false scale=TOFIT bgcolor=#000000 kioskmode=false targetcache=false pluginspage=http://www.apple.com/quicktime/><BR>")
re.Pattern="\[MP=*([0-9]*),*([0-9]*)\](http|rtsp|https|ftp|mms):\/\/(.[^\[]*)\[\/MP]"
strContent=re.Replace(strContent,"<BR><b>影視文件:</b><a href=$3://$4>$3://$4</a><BR><object align=middle classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 class=OBJECT id=MediaPlayer width=$1 height=$2 ><param name=ShowStatusBar value=-1><param name=Filename value=$3://$4><embed type=application/x-oleobject codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701 flename=mp src=$3://$4 width=$1 height=$2></embed></object><BR>")
re.Pattern="\[RM=*([0-9]*),*([0-9]*)\](http|https|rtsp|ftp|mms):\/\/(.[^\[]*)\[\/RM]"
strContent=re.Replace(strContent,"<BR><b>影視文件:</b><a href=$3://$4>$3://$4</a><BR><OBJECT classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA class=OBJECT id=RAOCX width=$1 height=$2><PARAM NAME=SRC VALUE=$3://$4><PARAM NAME=CONSOLE VALUE=Clip1><PARAM NAME=CONTROLS VALUE=imagewindow><PARAM NAME=AUTOSTART VALUE=false></OBJECT><br><OBJECT classid=CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA height=32 id=video2 width=$1><PARAM NAME=SRC VALUE=$3://$4><PARAM NAME=AUTOSTART VALUE=0><PARAM NAME=CONTROLS VALUE=controlpanel><PARAM NAME=CONSOLE VALUE=Clip1></OBJECT><BR>")
'flash轉換
re.Pattern="\[flash=*([0-9]*),*([0-9]*)\](http|https|ftp):\/\/(.[^\[]*)\[\/flash\]"
strContent= re.Replace(strContent,"<BR><OBJECT codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=$1 height=$2><PARAM NAME=movie VALUE=""$3://$4""><PARAM NAME=quality VALUE=high><embed src=""$3://$4"" quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width=$1 height=$2>$3://$4</embed></OBJECT><BR>")
'url與email 轉換
re.Pattern="(\[URL\])(.[^\[]*)(\[\/URL\])"
strContent= re.Replace(strContent,"<A HREF=""$2"" TARGET=_blank>$2</A>")
re.Pattern="(\[URL=(.[^\[]*)\])(.[^\[]*)(\[\/URL\])"
strContent= re.Replace(strContent,"<A HREF=""$2"" TARGET=_blank>$3</A>")
re.Pattern="(\[\/LIGHT\])"
strContent=re.Replace(strContent,"[/LIGHT]" & VbCrLf)
re.Pattern="\[LIGHT\](.*)\[\/LIGHT]"
strContent=re.Replace(strContent,"<span style=""behavior:url(" & GBL_strHomeURL & "inc/font.htc)"">$1</span>")
strContent = Replace(strContent,VbCrLf,"")
re.Pattern="(\[EMAIL\])((\w)+[@]{1}(\w)+[.]{1,3}(\w)+)(\[\/EMAIL\])"
strContent= re.Replace(strContent,"<img align=absmiddle src=" & GBL_strHomeURL & "images/ubb/email.gif><A HREF=""mailto:$2"">$2</A>")
re.Pattern="(\[EMAIL=((\w)+[@]{1}(\w)+[.]{1,3}(\w)+)\])(.[^\[]*)(\[\/EMAIL\])"
strContent= re.Replace(strContent,"<img align=absmiddle src=images/email.gif><A HREF=""mailto:$2"" TARGET=_blank>$3</A>")
'自動尋找
'if checkurl="1" or checkurlreply="1" then
'自動識別網址
re.Pattern = "([^>=""])((http|https|ftp|rtsp|mms):(\/\/|\\\\)[A-Za-z0-9\./=\?%\-&_~`@':+!]+)"
strContent = re.Replace(strContent,"$1<img align=absmiddle src=" & GBL_strHomeURL & "images/ubb/url.gif border=0><a target=_blank href=$2>$2</a>")
'自動識別www開頭的網址
re.Pattern = "([^(http://|http:\\)])((www|cn)[.](\w)+[.]{1,}(net|com|cn|org|cc)(((\/[\~]*|\\[\~]*)(\w)+)|[.](\w)+)*(((([?](\w)+){1}[=]*))*((\w)+){1}([\&](\w)+[\=](\w)+)*)*)$"
strContent = re.Replace(strContent,"<img align=absmiddle src=images/url.gif border=0><a target=_blank href=""$2"">$2</a>")
'自動識別Email地址
're.Pattern ="([^(=)])((\w)+[@]{1}((\w)+[.]){1,3}(\w)+)"
'strContent = re.Replace(strContent,"<img align=absmiddle src=images/email.gif border=0><a target=_blank href=""mailto:$2"">$2</a>")
'end if
'代碼轉換
re.Pattern="\[code\](.[^\[]*)\[\/code\]"
dim bgcolor,bgcolor1,rcount,Matches,Match
strContent=re.Replace(strContent,"<table width='100%' border='0' cellspacing='0' cellpadding='6' bgcolor='"&bgcolor1&"' class=tdc><td><b>以下為程序代碼:</b><br>$1</td></table>")
'代碼轉換
re.Pattern="\[html\](.[^\[]*)\[\/html\]"
strContent=re.Replace(strContent,"<br><b>以下為html代碼:<textarea id=fy"&rcount&" style=width:95% rows=10 class=bdtj3>$1</textarea><br><script src=open.js></script><INPUT onclick=runEx() type=button value=運行此段代碼 name=Button1 class=bdtj3> <INPUT onclick=JM_cc('fy"&rcount&"') type=button value=復制到我的剪貼板 name=Button2 class=bdtj3></B><Br>如果看不到效果或效果有問題,請將代碼保存為html文件查看.<br>")
'引用
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -