⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dv_ubbcode.asp

📁 现在好了
💻 ASP
📖 第 1 页 / 共 4 页
字号:
						If  IsNumeric(po) Then
							ii=int(po) 
						Else
							ii=0
						End If 
						If  Dvbbs.Membername<>"" and (Dvbbs.Membername=UserName or UsePoint>=ii or Dvbbs.master) Then
							s=re.Replace(s,tCode1)
						Else
							s=re.Replace(s,tCode2)
						End If
					Else
						re.Pattern="(\x01"&uCodeC&"=*([0-9]*)\x02)(.[^\x01]*)(\x01\/"&uCodeC&"\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
		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 (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(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 T_GetMoneyType >0 Then
							s=re.Replace(s,"$1<hr noshade size=1><font color=gray>由于使用了金币帖子设置,因此不能使用出售帖UBB模式</font>&nbsp;&nbsp;<BR><hr noshade size=1>")
						Else
							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>&nbsp;&nbsp;<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>才可以浏览&nbsp;&nbsp;<input type=hidden name=boardid value="&Dvbbs.boardid&"><input type=hidden value="&replyid_a&" name=replyid><input type=hidden value="&AnnounceID_a&" name=id><input type=hidden value="&RootID_a&" name=rootid><input type=hidden value="&totalusetable&" name=posttable><input type=submit name=submit value=好黑啊…我…我买了!>&nbsp;&nbsp;</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>才可以浏览&nbsp;&nbsp;<input type=hidden name=boardid value="&Dvbbs.boardid&"><input type=hidden value="&replyid_a&" name=replyid><input type=hidden value="&AnnounceID_a&" name=id><input type=hidden value="&RootID_a&" name=rootid><input type=hidden value="&totalusetable&" name=posttable><input type=submit name=submit value=好黑啊…我…我买了!>&nbsp;&nbsp;</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
						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>&nbsp;&nbsp;<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>才可以浏览&nbsp;&nbsp;<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=好黑啊…我…我买了!>&nbsp;&nbsp;</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>才可以浏览&nbsp;&nbsp;<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=好黑啊…我…我买了!>&nbsp;&nbsp;</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
	
	Public Function Dv_FilterJS(v)
		If Not Isnull(V) Then
			Dim t,test,Replacelist,t1
			t=v
			t1=v
			re.Pattern="&#36;"
			t1=re.Replace(t1,"$")
			re.Pattern="&#36"
			t1=re.Replace(t1,"$")
			re.Pattern="&#39;"
			t1=re.Replace(t1,"'")
			re.Pattern="&#39"
			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
				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)|\[|\])"
					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)
			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="&#36;"
			t1=re.Replace(t1,"$")
			re.Pattern="&#36"
			t1=re.Replace(t1,"$")
			re.Pattern="&#39;"
			t1=re.Replace(t1,"'")
			re.Pattern="&#39"
			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 + -