📄 dv_ubbcode.asp
字号:
Loop
Dv_UbbCode_Get=s
End Function
Private Function UBB_REPLYVIEW(strText,PostUserGroup,PostType)
Dim s
Dim Test
Dim vrs
s=strText
re.Pattern="\[REPLYVIEW\]"
s=re.replace(s, chr(1) & "REPLYVIEW" & chr(2))
re.Pattern="\[\/REPLYVIEW\]"
s=re.replace(s, chr(1) & "/REPLYVIEW" & chr(2))
re.Pattern="(\x01REPLYVIEW\x02)(\x01\/REPLYVIEW\x02)"
s=re.Replace(s,"")
re.Pattern="(\x01REPLYVIEW\x02)(.[^\x01]*)(\x01\/REPLYVIEW\x02)"
If (Dvbbs.Board_Setting(15)="1" or PostUserGroup<4) and PostType=1 Then
If isgetreed<>1 Then
Set vrs=dvbbs.execute("select AnnounceID from "&TotalUseTable&" where rootid="&Announceid&" and PostUserID="&Dvbbs.UserID)
isgetreed=1
If Not vRs.eof Then
reed=1
Else
reed=0
End If
Set vrs=Nothing
End If
If Dvbbs.Membername<>"" and (reed=1 or Dvbbs.master) Then
s=re.Replace(s,"<hr noshade size=1><font color=gray>以下内容只有<B>回复</B>后才可以浏览</font><BR>$2<hr noshade size=1>")
Else
s=re.Replace(s,"<hr noshade size=1><font color="&Dvbbs.Mainsetting(1)&">以下内容只有<B>回复</B>后才可以浏览</font><hr noshade size=1>")
End If
Else
s=re.Replace(s,"$2")
End If
re.Pattern="\x02"
s=re.replace(s, "]")
re.Pattern="\x01"
s=re.replace(s, "[")
UBB_REPLYVIEW=s
End Function
Private Function UBB_USEMONEY(strText,PostUserGroup,PostType)
Dim s
Dim Test
Dim po,ii,iii
Dim SplitBuyUser,iPostBuyUser
Dim LoopCount
LoopCount=0
s=strText
Do While True
re.Pattern="\[USEMONEY=*([0-9]*)\]"
Test=re.Test(s)
If Test Then
re.Pattern="\[\/USEMONEY\]"
Test=re.Test(s)
If Test Then
re.Pattern="\[USEMONEY=*([0-9]*)\]"
s=re.replace(s, chr(1) & "USEMONEY=$1" & chr(2))
re.Pattern="\[\/USEMONEY\]"
s=re.replace(s, chr(1) & "/USEMONEY" & chr(2))
re.Pattern="(\x01USEMONEY=*([0-9]*)\x02)(\x01\/USEMONEY\x02)"
s=re.Replace(s,"")
If (Cint(Dvbbs.Board_Setting(23))=1 or PostUserGroup<4) and PostType=1 Then
re.Pattern="(^.*)(\x01USEMONEY=*([0-9]*)\x02)(.[^\x01]*)(\x01\/USEMONEY\x02)(.*)"
po=re.Replace(s,"$3")
If IsNumeric(po) Then
ii=int(po)
Else
ii=0
End If
If Dvbbs.Membername<>"" and (Dvbbs.Membername=UserName or Dvbbs.master) Then
If (Not IsNull(PostBuyUser)) And PostBuyUser<>"" Then
SplitBuyUser=split(PostBuyUser,"|")
iPostBuyUser="<option value=0>已购买用户</option>"
for iii=0 to ubound(SplitBuyUser)
iPostBuyUser=iPostBuyUser & "<option value="&iii&">"&SplitBuyUser(iii)&"</option>"
next
Else
iPostBuyUser="<option value=0>还没有用户购买</option>"
End If
s=re.Replace(s,"$1<hr noshade size=1><font color=gray>以下内容需要花费现金<B>$3</B>才可以浏览</font> <select size=1 name=buyuser>"&iPostBuyUser&"</select><BR>$4<hr noshade size=1>$6")
Else
If (Not IsNull(PostBuyUser)) and PostBuyUser<>"" Then
If Instr("|"&PostBuyUser&"|","|"&Dvbbs.Membername&"|")>0 Then
s=re.Replace(s,"$1<hr noshade size=1><font color=gray>以下内容需要花费现金<B>$3</B>才可以浏览,您已经购买本帖</font><BR>$4<hr noshade size=1>$6")
Else
If UserPointInfo(0)>=ii Then
s=re.Replace(s,"$1<Form action=""BuyPost.asp"" mothod=post><font color="&Dvbbs.Mainsetting(1)&">以下内容需要花费现金<B>$3</B>才可以浏览 <input type=hidden name=boardid value="&Dvbbs.boardid&"><input type=hidden value="&replyid&" name=replyid><input type=hidden value="&AnnounceID&" name=id><input type=hidden value="&totalusetable&" name=posttable><input type=submit name=submit value=好黑啊…我…我买了!> </font></form>$6")
Else
s=re.Replace(s,"$1<hr noshade size=1><font color="&Dvbbs.Mainsetting(1)&">以下内容需要花费现金<B>$3</B>才可以浏览,您没有这么多现金</font><hr noshade size=1>$6")
End If
End If
Else
If UserPointInfo(0)>=ii Then
s=re.Replace(s,"$1<Form action=""BuyPost.asp"" mothod=post><font color="&Dvbbs.Mainsetting(1)&">以下内容需要花费现金<B>$3</B>才可以浏览 <input type=hidden name=boardid value="&Dvbbs.boardid&"><input type=hidden value="&replyid&" name=replyid><input type=hidden value="&AnnounceID&" name=id><input type=hidden value="&totalusetable&" name=posttable><input type=submit name=submit value=好黑啊…我…我买了!> </font></form>$6")
Else
s=re.Replace(s,"$1<hr noshade size=1><font color="&Dvbbs.Mainsetting(1)&">以下内容需要花费现金<B>$3</B>才可以浏览,您没有这么多现金</font><hr noshade size=1>$6")
End If
End If
End If
re.Pattern="([^>=""])(\x01USEMONEY=*([0-9]*)\x02)(.[^\x01]*)(\x01\/USEMONEY\x02)(.*)"
po=re.Replace(s,"$3")
If IsNumeric(po) Then
ii=int(po)
Else
ii=0
End If
If Dvbbs.Membername<>"" and (Dvbbs.Membername=UserName or Dvbbs.master) Then
If (Not IsNull(PostBuyUser)) And PostBuyUser<>"" Then
SplitBuyUser=split(PostBuyUser,"|")
iPostBuyUser="<option value=0>已购买用户</option>"
for iii=0 to ubound(SplitBuyUser)
iPostBuyUser=iPostBuyUser & "<option value="&iii&">"&SplitBuyUser(iii)&"</option>"
next
Else
iPostBuyUser="<option value=0>还没有用户购买</option>"
End If
s=re.Replace(s,"$1<hr noshade size=1><font color=gray>以下内容需要花费现金<B>$3</B>才可以浏览</font> <select size=1 name=buyuser>"&iPostBuyUser&"</select><BR>$4<hr noshade size=1>$6")
Else
If (Not IsNull(PostBuyUser)) and PostBuyUser<>"" Then
If Instr("|"&PostBuyUser&"|","|"&Dvbbs.Membername&"|")>0 Then
s=re.Replace(s,"$1<hr noshade size=1><font color=gray>以下内容需要花费现金<B>$3</B>才可以浏览,您已经购买本帖</font><BR>$4<hr noshade size=1>$6")
Else
If UserPointInfo(0)>=ii Then
s=re.Replace(s,"$1<Form action=""BuyPost.asp"" mothod=post><font color="&Dvbbs.Mainsetting(1)&">以下内容需要花费现金<B>$3</B>才可以浏览 <input type=hidden name=boardid value="&Dvbbs.boardid&"><input type=hidden value="&replyid&" name=replyid><input type=hidden value="&AnnounceID&" name=id><input type=hidden value="&totalusetable&" name=posttable><input type=submit name=submit value=好黑啊…我…我买了!> </font></form>$6")
Else
s=re.Replace(s,"$1<hr noshade size=1><font color="&Dvbbs.Mainsetting(1)&">以下内容需要花费现金<B>$3</B>才可以浏览,您没有这么多现金</font><hr noshade size=1>$6")
End If
End If
Else
If UserPointInfo(0)>=ii Then
s=re.Replace(s,"$1<Form action=""BuyPost.asp"" mothod=post><font color="&Dvbbs.Mainsetting(1)&">以下内容需要花费现金<B>$3</B>才可以浏览 <input type=hidden name=boardid value="&Dvbbs.boardid&"><input type=hidden value="&replyid&" name=replyid><input type=hidden value="&AnnounceID&" name=id><input type=hidden value="&totalusetable&" name=posttable><input type=submit name=submit value=好黑啊…我…我买了!> </font></form>$6")
Else
s=re.Replace(s,"$1<hr noshade size=1><font color="&Dvbbs.Mainsetting(1)&">以下内容需要花费现金<B>$3</B>才可以浏览,您没有这么多现金</font><hr noshade size=1>$6")
End If
End If
End If
Else
re.Pattern="(\x01USEMONEY=*([0-9]*)\x02)(.[^\x01]*)(\x01\/USEMONEY\x02)"
s=re.Replace(s,"$3")
End If
re.Pattern="\x02"
s=re.replace(s, "]")
re.Pattern="\x01"
s=re.replace(s, "[")
Else
Exit Do
End If
Else
Exit Do
End If
LoopCount=LoopCount+1
If LoopCount>MaxLoopCount Then Exit Do
Loop
UBB_USEMONEY=s
End Function
Private Function dv_fixHTML(strText)
Dim s
s=strText
If InStr(Ubblists,",39,")>0 And (InStr(Ubblists,",table,")>0 Or InStr(Ubblists,",td,")>0 Or InStr(Ubblists,",th,")>0 Or InStr(Ubblists,",tr,")>0 ) Then
s = server.htmlencode(s)
s="<form name=""scode"&replyid&""" method=""post"" action=""""><TABLE class=tableborder2 cellSpacing=1 cellPadding=3 width=""100%"" align=center border=0><TR><TH height=22>以下内容含错误标记</TH></TR><TR><TD class=tablebody1 align=middle width=""98%""><TEXTAREA id=CodeText style=""BORDER-RIGHT: 1px dotted; BORDER-TOP: 1px dotted; OVERFLOW-Y: visible; OVERFLOW: visible; BORDER-LEFT: 1px dotted; WIDTH: 98%; COLOR: #000000; BORDER-BOTTOM: 1px dotted"" rows=20 cols=120>"&s&"</TEXTAREA></TD></TR><TR><TD class=tablebody2 align=middle width=""98%""><input type=""button"" name=""run"" value=""在新窗口中查看"" onclick=""Dvbbs_ViewCode("&replyid&");""></TD></TR></TABLE></form>"
End If
dv_fixHTML=s
End Function
Public Function Dv_FilterJS(v)
If Not Isnull(V) Then
Dim t,test,Replacelist,t1
t=v
t1=v
re.Pattern="$"
t1=re.Replace(t1,"$")
re.Pattern="$"
t1=re.Replace(t1,"$")
re.Pattern="'"
t1=re.Replace(t1,"'")
re.Pattern="'"
t1=re.Replace(t1,"'")
If InStr(Dvbbs.forum_setting(77),"|")=0 Then
Replacelist="(&#([0-9][0-9]*)|function|meta|window\.|script|js:|about:|file:|Document\.|vbs:|frame|cookie|on(finish|mouse|Exit=|error|click|key|load|focus|Blur))"
Else
Replacelist="("&Dvbbs.forum_setting(77)&"&#([0-9][0-9]*)|function|meta|window\.|script|js:|about:|file:|Document\.|vbs:|frame|cookie|on(finish|mouse|Exit|error|click|key|load|focus|Blur))"
End If
re.Pattern="<((.[^>]*"&Replacelist&"[^>]*)|"&Replacelist&")>"
Test=re.Test(t1)
If Test=false Then
re.Pattern="(\[(.[^\]]*)\])((.[^\]]*"&Replacelist&"[^\]]*)|"&Replacelist&")(\[\/(.[^\]]*)\])"
Test=re.Test(t1)
End If
Dv_FilterJS=test
End If
End Function
Public Function Dv_FilterJS2(v)
If Not Isnull(V) Then
Dim t,test,Replacelist,t1
t=v
t1=v
re.Pattern="$"
t1=re.Replace(t1,"$")
re.Pattern="$"
t1=re.Replace(t1,"$")
re.Pattern="'"
t1=re.Replace(t1,"'")
re.Pattern="'"
t1=re.Replace(t1,"'")
If InStr(Dvbbs.forum_setting(77),"|")=0 Then
Replacelist="(&#([0-9][0-9]*)|function|meta|window\.|script|js:|about:|file:|Document\.|vbs:|frame|cookie|on(finish|mouse|Exit=|error|click|key|load|focus|Blur))"
Else
Replacelist="("&Dvbbs.forum_setting(77)&"&#([0-9][0-9]*)|function|meta|window\.|script|js:|about:|file:|Document\.|vbs:|frame|cookie|on(finish|mouse|Exit|error|click|key|load|focus|Blur))"
End If
re.Pattern="(\[(.[^\]]*)\])((.[^\]]*"&Replacelist&"[^\]]*)|"&Replacelist&")(\[\/(.[^\]]*)\])"
Test=re.Test(t1)
Dv_FilterJS2=test
End If
End Function
End Class
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -