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

📄 dv_ubbcode.asp

📁 前台及后台用户名密码都是:gz35gz35.com
💻 ASP
📖 第 1 页 / 共 5 页
字号:
		re.Pattern="\[ALIGN=(center|left|right)\]"
		s=re.replace(s, chr(1) & "ALIGN=$1" & chr(2))
		re.Pattern="\[\/ALIGN\]"
		s=re.replace(s, chr(1) & "/ALIGN" & chr(2))
		re.Pattern="\x01ALIGN=(center|left|right)\x02\x01\/ALIGN\x02"
		s=re.Replace(s,"")
		re.Pattern="\x01ALIGN=(center|left|right)\x02(.[^\x01]*)\x01\/ALIGN\x02"
		s=re.Replace(s,"<div align=$1>$2</div>")
		re.Pattern="\x02"
		s=re.replace(s, "]")
		re.Pattern="\x01"
		s=re.replace(s, "[")
		Dv_UbbCode_Align=s
	End Function

	Private Function Dv_UbbCode_U(strText,PostUserGroup,Flag)	'(帖子内容,用户组,是否开放图片标签)
		Dim s
		If Dvbbs.Forum_Setting(76)="" Or Dvbbs.Forum_Setting(76)="0" Then Dvbbs.Forum_Setting(76)="UploadFile/"
		If right(Dvbbs.Forum_Setting(76),1)<>"/" Then Dvbbs.Forum_Setting(76)=Dvbbs.Forum_Setting(76)&"/"
		s=strText
		's=Dv_UbbCode_Exif(strText,PostUserGroup,Flag,MaxLoopCount,"skins/default/filetype/jpg.gif")
		re.Pattern="\[UPLOAD=(gif|jpg|jpeg|bmp|png|swf|swi)\]UploadFile/"
		s=re.replace(s, chr(1) & "UPLOAD=$1" & chr(2))
		re.Pattern="\[\/UPLOAD\]"
		s=re.replace(s, chr(1) & "/UPLOAD" & chr(2))
		re.Pattern="\x01UPLOAD=(gif|jpg|jpeg|bmp|png)\x02\x01\/UPLOAD\x02"
		s=re.Replace(s,"")
		re.Pattern="\x01UPLOAD=(gif|jpg|jpeg|bmp|png)\x02(.[^\x01]*)\x01\/UPLOAD\x02"
		If Dvbbs.Forum_Setting(75)="0" Then 
			If Flag = 1 or PostUserGroup<4 Then
				s= re.Replace(s,"<br><A HREF="""&Dvbbs.Forum_Setting(76)&"$2"" TARGET=_blank id=""ImgSpan""><IMG SRC="""&Dvbbs.Forum_Setting(76)&"$2"" border=0 alt=按此在新窗口浏览图片 ></A>")
			Else
				s= re.Replace(s,"<br><IMG SRC=""skins/default/filetype/$1.gif"" border=0><A HREF="""&Dvbbs.Forum_Setting(76)&"$2"" TARGET=_blank>"&Dvbbs.Forum_Setting(76)&"$2</A>")
			End If 
		Else
			If Flag = 1 or PostUserGroup<4 Then
				s= re.Replace(s,"<br><A HREF=""showimg.asp?BoardID="&Dvbbs.BoardID&"&filename=$2"" TARGET=_blank id=""ImgSpan"" ><IMG SRC=""showimg.asp?BoardID="&Dvbbs.BoardID&"&filename=$2"" border=0 alt=按此在新窗口浏览图片 ></A>")
			Else
				s= re.Replace(s,"<br><IMG SRC=""skins/default/filetype/$1.gif"" border=0><A HREF=""showimg.asp?BoardID="&Dvbbs.BoardID&"&filename=$2"" TARGET=_blank>showimg.asp?BoardID="&Dvbbs.BoardID&"&filename=$2</A>")
			End If
		End If
		re.Pattern="\x01UPLOAD=(swf|swi)\x02(.[^\x01]*)\x01\/UPLOAD\x02"
		If Dvbbs.Forum_Setting(75)="0" Then 
			If Dvbbs.Board_Setting(44) = 1 or PostUserGroup<4 Then
				s= re.Replace(s,"<br><A HREF="""&Dvbbs.Forum_Setting(76)&"$2"" TARGET=_blank>点击浏览该FLASH文件</A>")
			Else
				s= re.Replace(s,"<br><IMG SRC=""skins/default/filetype/$1.gif"" border=0><A HREF="""&Dvbbs.Forum_Setting(76)&"$2"" TARGET=_blank>$2</A>")
			End If 
		Else
			If Flag = 1 or PostUserGroup<4 Then
				s= re.Replace(s,"<br><A HREF="""&Dvbbs.Forum_Setting(76)&"$2"" TARGET=_blank>点击浏览该FLASH文件</A>")
			Else
				s= re.Replace(s,"<br><IMG SRC=""skins/default/filetype/$1.gif"" border=0><A HREF=""showimg.asp?BoardID="&Dvbbs.BoardID&"&filename=$2"" TARGET=_blank>showimg.asp?BoardID="&Dvbbs.BoardID&"&filename=$2</A>")
			End If
		End If
		re.Pattern="\x02"
		s=re.replace(s, "]")
		re.Pattern="\x01"
		s=re.replace(s, "[")
		
		re.Pattern="\[UPLOAD=(gif|jpg|jpeg|bmp|png|swf|swi)\]/WebDriver/BbsFiles/"
		s=re.replace(s, chr(1) & "UPLOAD=$1" & chr(2) &"/WebDriver/BbsFiles/")
		re.Pattern="\[\/UPLOAD\]"
		s=re.replace(s, chr(1) & "/UPLOAD" & chr(2))
		re.Pattern="\x01UPLOAD=(gif|jpg|jpeg|bmp|png)\x02\x01\/UPLOAD\x02"
		s=re.Replace(s,"")
		re.Pattern="\x01UPLOAD=(gif|jpg|jpeg|bmp|png)\x02(.[^\x01]*)\x01\/UPLOAD\x02"
		If Dvbbs.Forum_Setting(75)="0" Then 
			If Flag = 1 or PostUserGroup<4 Then
				s= re.Replace(s,"<br><A HREF=""$2"" TARGET=_blank id=""ImgSpan""><IMG SRC=""$2"" border=0 alt=按此在新窗口浏览图片 ></A>")
			Else
				s= re.Replace(s,"<br><IMG SRC=""skins/default/filetype/$1.gif"" border=0><A HREF=""$2"" TARGET=_blank>$2</A>")
			End If 
		Else
			If Flag = 1 or PostUserGroup<4 Then
				s= re.Replace(s,"<br><A HREF=""$2"" TARGET=_blank id=""ImgSpan"" ><IMG SRC=""$2"" border=0 alt=按此在新窗口浏览图片 ></A>")
			Else
				s= re.Replace(s,"<br><IMG SRC=""skins/default/filetype/$1.gif"" border=0><A HREF=""$2"" TARGET=_blank>$2</A>")
			End If
		End If
		re.Pattern="\x01UPLOAD=(swf|swi)\x02(.[^\x01]*)\x01\/UPLOAD\x02"
		If Dvbbs.Forum_Setting(75)="0" Then 
			If Dvbbs.Board_Setting(44) = 1 or PostUserGroup<4 Then
				s= re.Replace(s,"<br><IMG SRC=""skins/default/filetype/$1.gif"" border=0><A HREF=""$2"" TARGET=_blank>点击浏览该FLASH文件</A>")
			Else
				s= re.Replace(s,"<br><IMG SRC=""skins/default/filetype/$1.gif"" border=0><A HREF=""$2"" TARGET=_blank>点击浏览该FLASH文件</A>")
			End If 
		Else
			If Flag = 1 or PostUserGroup<4 Then
				s= re.Replace(s,"<br><IMG SRC=""skins/default/filetype/$1.gif"" border=0><A HREF=""$2"" TARGET=_blank>点击浏览该FLASH文件</A>")
			Else
				s= re.Replace(s,"<br><IMG SRC=""skins/default/filetype/$1.gif"" border=0><A HREF=""$2"" TARGET=_blank>点击浏览该FLASH文件</A>")
			End If
		End If
		re.Pattern="\x02"
		s=re.replace(s, "]")
		re.Pattern="\x01"
		s=re.replace(s, "[")
		re.Pattern="\[UPLOAD=(.[^\[]*)\]"
		s=re.replace(s, chr(1) & "UPLOAD=$1" & chr(2))
		re.Pattern="\[\/UPLOAD\]"
		s=re.replace(s, chr(1) & "/UPLOAD" & chr(2))
		re.Pattern="\x01UPLOAD=(.[^\x01]*)\x02\x01\/UPLOAD\x02"
		s=re.Replace(s,"")

		'处理附件的ubbcode
		Dim Test
  		Dim LoopCount
  		LoopCount=0
  		re.Pattern="(^.*)\x01UPLOAD=(.[^\x01]*)\x02viewFile\.asp\?id=*([0-9]*)\x01\/UPLOAD\x02(.*)"
  		Test=re.Test(s)
  		If Test then
   			dim upsql, uprs, uploadid, TrueFileName, TruePos, FileLen, iDownUser, SplitDownUser,iii
   			Do while Test
    				uploadid=re.Replace(s,"$3")
    				If IsNumeric(uploadid) then
     					upsql="select F_Filename,F_FileType,F_FileSize,F_DownNum,F_DownUser from DV_Upfile where F_ID="&trim(uploadid)
     					set uprs=conn.execute(upsql)
     					TruePos=instrrev(uprs("F_Filename"),"___")
     					If TruePos>0 then
      						TrueFileName=left(uprs("F_Filename"),TruePos-1)
     					Else
      						TrueFileName=uprs("F_Filename")
     					End if
     					TruePos=instrrev(TrueFileName,"/")
     					If TruePos>0 then
      						TrueFileName=right(TrueFileName,len(TrueFileName)-TruePos)
     					End if
     					FileLen=uprs("F_FileSize")
     					If FileLen>1024 then
      						FileLen=Round(FileLen / 1024,2)
      						If FileLen > 1024 then
       							FileLen=Round(FileLen / 1024,2)
       							FileLen="<B>" & FileLen & "</B> MByte"
      						Else
       							FileLen="<B>" & FileLen & "</b> KByte"
      						End if
     					Else
      						FileLen="<B>" & FileLen & "</B> Byte"
     					End if
     					If dvbbs.membername<>"" and (dvbbs.membername=username or dvbbs.master) then
						If (not isnull(uprs("F_DownUser"))) and uprs("F_DownUser")<>"" then
       							SplitDownUser=split(uprs("F_DownUser"),"|")
       							iDownUser="<select size=1><option value=0>以下用户</option>"
       							For iii=0 to ubound(SplitDownUser)
        								iDownUser=iDownUser & "<option value="&iii&">"&SplitDownUser(iii)&"</option>"
       							Next
       							iDownUser=iDownUser&"</select>"
      						Else
       							iDownUser=""
      						End if
      						s= re.Replace(s,"$1<BR><FIELDSET><LEGEND>本帖包含附件</LEGEND><TABLE cellSpacing=3 border=0 cellpadding=0><tr height=25 valign=middle><td><IMG src=""skins/default/filetype/"&uprs("F_FileType")&".gif"" border=0></td><TD><A href=""viewFile.asp?ID="&trim(uploadid)&""" target=_blank>"&TrueFileName&"</A>&nbsp; (&nbsp;"&FileLen&",已被"&iDownUser&"下载 <FONT color=red><b>"&uprs("F_DownNum")&"</b></FONT>&nbsp;次&nbsp;)</TD></TR></TABLE></FIELDSET><BR>$4")
     					Else
      						s= re.Replace(s,"$1<BR><FIELDSET><LEGEND>本帖包含附件</LEGEND><TABLE cellSpacing=3 border=0 cellpadding=0><tr height=25 valign=middle><td><IMG src=""skins/default/filetype/"&uprs("F_FileType")&".gif"" border=0></td><TD><A href=""viewFile.asp?ID="&trim(uploadid)&""" target=_blank>"&TrueFileName&"</A>&nbsp; (&nbsp;"&FileLen&",已被下载 <FONT color=red><b>"&uprs("F_DownNum")&"</b></FONT>&nbsp;次&nbsp;)</TD></TR></TABLE></FIELDSET><BR>$4")
     					End if
      					'[/COLOR]s= re.Replace(s,"$1<BR><FIELDSET><LEGEND>本帖包含附件</LEGEND><TABLE cellSpacing=3 border=0 cellpadding=0><tr height=25 valign=middle><td><IMG src=""skins/default/filetype/"&uprs("F_FileType")&".gif"" border=0></td><TD><A href=""viewFile.asp?ID="&trim(uploadid)&""" target=_blank>"&TrueFileName&"</A>&nbsp; (&nbsp;<b>"&round(uprs("F_FileSize")/1024,2)&"</b> KB,已被下载 <FONT color=red><b>"&uprs("F_DownNum")&"</b></FONT>&nbsp;次&nbsp;)</TD></TR></TABLE></FIELDSET><BR>$4")
				End if
    				re.Pattern="(^.*)\<\/FONT\>\&nbsp\;次\&nbsp\;\)\<\/TD\>\<\/TR\>\<\/TABLE\>\<\/FIELDSET\>(\<BR\>){0,}\<FIELDSET\>\<LEGEND\>本帖包含附件\<\/LEGEND\>\<TABLE cellSpacing=3 border=0 cellpadding=0\>(.*)"
    				s=re.Replace(s,"$1</FONT>&nbsp;次&nbsp;)</TD></TR>$3")
    				re.Pattern="(^.*)\x01UPLOAD=(.[^\x01]*)\x02viewFile\.asp\?id=*([0-9]*)\x01\/UPLOAD\x02(.*)"
    				Test=re.Test(s)
    				LoopCount=LoopCount+1
    				If LoopCount>MaxLoopCount Then Exit Do
   			Loop
  		End if
		're.Pattern="\x01UPLOAD=(.[^\x01]*)\x02(viewFile\.asp.[^\x01]*)\x01\/UPLOAD\x02"
		's= re.Replace(s,"<br><IMG SRC=""skins/default/filetype/$1.gif"" border=0> <a href=""$2"" target=_blank>点击浏览该文件</a>")
		re.Pattern="viewFile.asp\?"
		s= re.Replace(s,"viewFile.asp?Boardid="&Dvbbs.Boardid&"&")
		re.Pattern="\x01UPLOAD=(.[^\x01]*)\x02(.[^\x01]*)\x01\/UPLOAD\x02"
		s= re.Replace(s,"<br><IMG SRC=""skins/default/filetype/$1.gif"" border=0> <a href=""$2"" target=_blank>点击浏览该文件</a><br><IMG src=""$2"" border=0>")
		re.Pattern="\x02"
		s=re.replace(s, "]")
		re.Pattern="\x01"
		s=re.replace(s, "[")

		re.Pattern="\[UPLOAD=(.[^\[]*)\]"
		s=re.replace(s, chr(1) & "UPLOAD=$1" & chr(2))
		re.Pattern="\[\/UPLOAD\]"
		s=re.replace(s, chr(1) & "/UPLOAD" & chr(2))
		re.Pattern="\x01UPLOAD=(.[^\x01]*)\x02\x01\/UPLOAD\x02"
		s=re.Replace(s,"")
		Dv_UbbCode_U=s
	End Function
	'巧嘴娃
	Private Function Dv_UbbCode_Abl(strText)
		If Instr(Lcase(strText),"[dx_au")=0 Then Dv_UbbCode_Abl=strText:Exit Function
		Dim LoopCount,Test,Audibles_List,Audibles_ID,IsAudibles,Audibles_Text,Audibles_Url,s
		s=strText
		Audibles_List = "|||就这事啊!地球人都知道|||嘿嘿!逗你玩!|||年轻人,做人要厚道!|||这干嘛?这不是那我打岔吗?|||一定要幸福喔!|||你好可爱耶!|||加油喔!|||我好想你喔 ~|||你不要这样嘛|||真的好感激你啊|||你简直太让我感动了!|||过来..近点...再近点...Kiss!|||强!实在是强!|||真真的么?我要晕了!|||最近真的好想你哦!|||啊你是中邪喔..|||你好讨厌喔~|||抽根菸吧!|||不干不干就是不干!|||饿不饿我请你吃饭|||听见了吗那是我肚子在叫|||哼!小样!我看你还真是找扁!|||坦白从宽,你就交代了吧!|||哼!你这骗子|||我就是喜欢你动作非常慢的时候...|||Hi!是你吧,我知道你在,我可看见你了!|||哎~~看来你真的很寂寞!|||年轻人虚心点没错|||这么说你还不明白,你猪头啊!|||掰掰啰!|||拜拜了您那|||哎呦!老板来了,我先走了啊!|||不行不行!我得上厕所...得上厕所!|||晚安做个好梦!|||我困得不行了得先走一步了|||有人在家吗?|||开会啰!|||早安!|||还在加班?真忙假忙啊?|||你可算来了,我等你很久了!|||来啦小妞|||早上好,您来啦!|||你要死啦~到现在才出现,到哪里潜水去啦...|||喂..我老板来了,先闪一下喽~下次再聊..|||啊~~~这是一定要的啦!|||嗯哼~人家.. 去撇个尿啰..嗯哼~|||嗯哼~来,亲一个~|||起来动一动吧,follow me! one more, two more…|||祝你生日快乐~祝你生日快乐..喔喔!祝你生日快乐喽|||不知道该说什么 ..|||好想睡喔...zzz|||让我想一想~~"
		Audibles_List = Split(Audibles_List,"|||")
		LoopCount = 0
		Do While True
			Re.Pattern="\[Dx_au(.[^\[]*)\]"
			Test = Re.Test(s)
			IF Test Then
				Re.Pattern  = "\[Dx_Au(.[^\[]*)\]"
				S = Re.replace(s, chr(1) & "Dx_Au$1" & chr(2))
				Re.Pattern  = "(^.*)(\x01Dx_Au(.[^\[]*)\x02)(.*)"
				Audibles_ID = Re.replace(s, "$3")
				IsAudibles  = False
				'如果是数字处理
				IF IsNumeric(Audibles_ID) Then
					IF Cint(Audibles_ID) > 0 And Cint(Audibles_ID) <= UBound(Audibles_List) Then 
						Audibles_Text = Audibles_List(Int(Audibles_ID))
						IsAudibles    = True
					End IF
				End IF
				IF IsAudibles Then
					Audibles_Url = "Inc/Audibles/theswf/" & Audibles_ID & ".swf"
					Audibles_ID  = Dvbbs.CreatePass()
					S = Re.replace(s,"$1<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" & Audibles_ID & """><PARAM NAME=movie VALUE=""" & Audibles_Url &"""><param name=menu value=false><PARAM NAME=quality VALUE=high><PARAM NAME=play VALUE=false><param name=""wmode"" value=""transparent""><embed src=""" & Audibles_Url &""" 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 onclick=""document.Audible" & Audibles_ID & ".Play()"" style=""cursor:hand;"" title=""点击播放"" nowrap> "&Audibles_Text&"</td></tr></table>$4")
				Else
					S = Re.replace(s,"$1$4")
				End IF
				Re.Pattern = "\x02"
				S = Re.replace(S, "]")
				Re.Pattern = "\x01"
				S = re.replace(S, "[")

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -