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

📄 inc_functions.asp

📁 此程序是一个个人主页创造程序,该程序无插件,无任何恶意程序.
💻 ASP
📖 第 1 页 / 共 5 页
字号:
		
		      fString = replace(fString, "<font color=red>", "[red]", 1, -1, 1)
		      fString = replace(fString, "</font id=red>", "[/red]", 1, -1, 1)
		      fString = replace(fString, "<font color=green>", "[green]", 1, -1, 1)
		      fString = replace(fString, "</font id=green>", "[/green]", 1, -1, 1)
		      fString = replace(fString, "<font color=blue>", "[blue]", 1, -1, 1)
		      fString = replace(fString, "</font id=blue>", "[/blue]", 1, -1, 1)
		      fString = replace(fString, "<font color=white>", "[white]", 1, -1, 1)
		      fString = replace(fString, "</font id=white>", "[/white]", 1, -1, 1)
		      fString = replace(fString, "<font color=purple>", "[purple]", 1, -1, 1)
		      fString = replace(fString, "</font id=purple>", "[/purple]", 1, -1, 1)
	  	      fString = replace(fString, "<font color=yellow>", "[yellow]", 1, -1, 1)
	  	      fString = replace(fString, "</font id=yellow>", "[/yellow]", 1, -1, 1)
		      fString = replace(fString, "<font color=violet>", "[violet]", 1, -1, 1)
		      fString = replace(fString, "</font id=violet>", "[/violet]", 1, -1, 1)
		      fString = replace(fString, "<font color=brown>", "[brown]", 1, -1, 1)
		      fString = replace(fString, "</font id=brown>", "[/brown]", 1, -1, 1)
		      fString = replace(fString, "<font color=black>", "[black]", 1, -1, 1)
		      fString = replace(fString, "</font id=black>", "[/black]", 1, -1, 1)
		      fString = replace(fString, "<font color=pink>", "[pink]", 1, -1, 1)
		      fString = replace(fString, "</font id=pink>", "[/pink]", 1, -1, 1)
		      fString = replace(fString, "<font color=orange>", "[orange]", 1, -1, 1)
		      fString = replace(fString, "</font id=orange>", "[/orange]", 1, -1, 1)
		      fString = replace(fString, "<font color=gold>", "[gold]", 1, -1, 1)
		      fString = replace(fString, "</font id=gold>", "[/gold]", 1, -1, 1)

		      fString = replace(fString, "<font color=beige>", "[beige]", 1, -1, 1)
		      fString = replace(fString, "</font id=beige>", "[/beige]", 1, -1, 1)
		      fString = replace(fString, "<font color=teal>", "[teal]", 1, -1, 1)
		      fString = replace(fString, "</font id=teal>", "[/teal]", 1, -1, 1)
		      fString = replace(fString, "<font color=navy>", "[navy]", 1, -1, 1)
		      fString = replace(fString, "</font id=navy>", "[/navy]", 1, -1, 1)
		      fString = replace(fString, "<font color=maroon>", "[maroon]", 1, -1, 1)
		      fString = replace(fString, "</font id=maroon>", "[/maroon]", 1, -1, 1)
		      fString = replace(fString, "<font color=limegreen>", "[limegreen]", 1, -1, 1)
		      fString = replace(fString, "</font id=limegreen>", "[/limegreen]", 1, -1, 1)

			fString = replace(fString, "<h1>", "[h1]", 1, -1, 1)
			fString = replace(fString, "</h1>", "[/h1]", 1, -1, 1)
			fString = replace(fString, "<h2>", "[h2]", 1, -1, 1)
			fString = replace(fString, "</h2>", "[/h2]", 1, -1, 1)
			fString = replace(fString, "<h3>", "[h3]", 1, -1, 1)
			fString = replace(fString, "</h3>", "[/h3]", 1, -1, 1)
			fString = replace(fString, "<h4>", "[h4]", 1, -1, 1)
			fString = replace(fString, "</h4>", "[/h4]", 1, -1, 1)
			fString = replace(fString, "<h5>", "[h5]", 1, -1, 1)
			fString = replace(fString, "</h5>", "[/h5]", 1, -1, 1)
			fString = replace(fString, "<h6>", "[h6]", 1, -1, 1)
			fString = replace(fString, "</h6>", "[/h6]", 1, -1, 1)
			fString = replace(fString, "<font size=""1"">", "[size=1]", 1, -1, 1)
			fString = replace(fString, "</font>", "[/size=1]", 1, -1, 1)
			fString = replace(fString, "<font size=""2"">", "[size=2]", 1, -1, 1)
			fString = replace(fString, "</font>", "[/size=2]", 1, -1, 1)
			fString = replace(fString, "<font size=""3"">", "[size=3]", 1, -1, 1)
			fString = replace(fString, "</font>", "[/size=3]", 1, -1, 1)
			fString = replace(fString, "<font size=""4"">", "[size=4]", 1, -1, 1)
			fString = replace(fString, "</font>", "[/size=4]", 1, -1, 1)
			fString = replace(fString, "<font size=""5"">", "[size=5]", 1, -1, 1)
			fString = replace(fString, "</font>", "[/size=5]", 1, -1, 1)
			fString = replace(fString, "<font size=""6"">", "[size=6]", 1, -1, 1)
			fString = replace(fString, "</font>", "[/size=6]", 1, -1, 1)
			fString = replace(fString, "<br>","[br]", 1, -1, 1)
			fString = replace(fString, "[/URL]", "[/url]", 1, -1, 1)
			fString = replace(fString, "[URL", "[url", 1, -1, 1)
			fString = replace(fString, "<div align=left>", "[left]", 1, -1, 1)
			fString = replace(fString, "</div id=left>", "[/left]", 1, -1, 1)
			fString = replace(fString, "<center>","[center]", 1, -1, 1)
			fString = replace(fString, "</center>","[/center]", 1, -1, 1)
			fString = replace(fString, "<div align=right>", "[right]", 1, -1, 1)
			fString = replace(fString, "</div id=right>", "[/right]", 1, -1, 1)
			fString = replace(fString, "<ul>","[list]", 1, -1, 1)
			fString = replace(fString, "</ul>","[/list]", 1, -1, 1)
			fString = replace(fString, "<ol type=1>","[list=1]", 1, -1, 1)
			fString = replace(fString, "</ol id=1>","[/list=1]", 1, -1, 1)
			fString = replace(fString, "<ol type=a>","[list=a]", 1, -1, 1)
			fString = replace(fString, "</ol id=a>","[/list=a]", 1, -1, 1)
			fString = replace(fString, "<li>","[*]", 1, -1, 1)
			fString = replace(fString, "</li>","[/*]", 1, -1, 1)

' ###			fString = replace(fString, "<table cellpadding=0 cellspacing=0 border=0 WIDTH=94% bgcolor=#000000 align=center><tr><td><table width=100% cellpadding=5 cellspacing=1 border=0><TR><TD BGCOLOR=#eeeeee><font size=" & strFooterFontSize & " face=""" & strDefaultFontFace & """ id=quote>","[quote]", 1, -1, 1)
' ###			fString = replace(fString, "</td></tr></table></td></tr></table>","[/quote]", 1, -1, 1)

			fString = replace(fString, "<BLOCKQUOTE id=quote><font size=" & strFooterFontSize & " face=""" & strDefaultFontFace & """ id=quote><hr height=1 noshade id=quote>","[quote]", 1, -1, 1)
			fString = replace(fString, "<hr height=1 noshade id=quote></font id=quote></BLOCKQUOTE id=quote>","[/quote]", 1, -1, 1)
		
			'############### Append By Guozi On 2001-09-28 13:28 #################
			fString = replace(fString, "<BR><table cellpadding=0 cellspacing=0 border=0 WIDTH=94% bgcolor=#000000 align=center><tr><td><table width=100% cellpadding=5 cellspacing=1 border=0><TR><TD BGCOLOR=#F8F8F8><font size=" & strFooterFontSize & " face=""" & strDefaultFontFace & """ id=quote>","[quote]", 1, -1, 1)
			fString = replace(fString, "</td></tr></table></td></tr></table>","[/quote]", 1, -1, 1)
			fString = replace(fString, "<table cellpadding=0 cellspacing=0 border=0 WIDTH=94% bgcolor=#000000 align=center><tr><td><table width=100% cellpadding=5 cellspacing=1 border=0><TR><TD BGCOLOR=#F8F8F8><font size=" & strFooterFontSize & " face=""" & strDefaultFontFace & """ id=quote>","[quote]", 1, -1, 1)
			'#####################################################################
			

' ### 			fString = replace(fString, "<pre id=code><font face=courier size=" & strDefaultFontSize & " id=code>","[code]", 1, -1, 1)
' ### 			fString = replace(fString, "</font id=code></pre id=code>","[/code]", 1, -1, 1)
' ### 			fString = replace(fString,"<a href='","[url=", 1, -1, 1)
' ### 			fString = replace(fString,"' target=_blank>", "]", 1, -1, 1)
' ### 			fString = replace(fString,"</a>","[/url]", 1, -1, 1)
' ### 表情图片处理 ###
		if stricons = "1" then
			'Smile Editing mod By Eric J starts here
			strsql = "Select smile_url, smile_code from forum_smiles"
			set drs = my_conn.execute(strsql)
			Do until drs.eof
				smile_url = drs("smile_url")
				smile_code = drs("smile_code")
				'fString= replace(fString, "<img src="""&smile_url&" border=0>", "["&smile_code&"]", 1, -1, 1)
				drs.movenext
			loop
			set drs=nothing
			'Ends
		end if
' ### 图片处理 ###
			if strIMGInPosts = "1" then
				' ### 防止JavaScript 炸弹
				if InStr(fString, "javascript:") = 0 or InStr(fString, "window.open") = 0 then
					fString = replace(fString, "<img src=""","[img]", 1, -1, 1)
					fString = replace(fString, "<img align=right src=""","[img=right]", 1, -1, 1)
					fString = replace(fString, "<img align=left src=""","[img=left]", 1, -1, 1)
					fString = replace(fString, """ border=0>","[/img]", 1, -1, 1)
					fString = replace(fString, """ id=right border=0>","[/img=right]", 1, -1, 1)
					fString = replace(fString, """ id=left border=0>","[/img=left]", 1, -1, 1)
				end if
			end if
'[code] 及 [/code] 处理
			if strAllowCODE = "1" then
				fString = Replace(fString, strTextAreaStart, "[code]",1,1,1)
				fString = Replace(fString, strTextAreaEnd, "[/code]",1,1,1)
			end if
		end if
	end if
	fString = Replace(fString, "'", "'")
	CleanCode = fString
end function

function Smile(fString)
'Smile Editing Mod by Eric J starts here
        	strsql = "Select smile_url, smile_code from " & strTablePrefix & "smiles"  'Bug
            set drs = my_conn.execute(strsql)
            Do until drs.eof
            smile_url = drs("smile_url")
            smile_code = drs("smile_code")
			
				fString = replace(fString, "["&smile_code&"]", "<img src=""" & strImageURL &smile_url&""" border=0>")
			drs.movenext
            loop
            set drs=nothing
	Smile = fString
'Ends here
end function

function chkBadWords(pString)
	fString = trim(pString)
	if fString = "" or IsNull(fString) then fString = " "
	bwords = split(strBadWords, "|")
	for i = 0 to ubound(bwords)
		fString = Replace(fString, bwords(i), string(len(bwords(i)),"*"), 1,-1,1)
	next
	chkBadWords = fString
end function

function HTMLEncode(fString)

	fString = replace(fString, ">", "&gt;")
	fString = replace(fString, "<", "&lt;")

	HTMLEncode = fString
end function

function HTMLDecode(fString)

	fString = replace(fString, "&gt;", ">")
	fString = replace(fString, "&lt;", "<")

	HTMLDecode = fString
end function


function ChkString(fString,fField_Type) '## Types - name, password, title, message, url, urlpath, email, number, list
	fString = trim(fString)
	if fString = "" then
		fString = " "
	end if
	if fField_Type = "title" or fField_Type = "preview" then
			' ### WormCN.net Update for 2001-06-23 9:13 ###
			fString = Replace(fString, "|", "")
			' ### WormCN.net Update for 2001-06-23 9:13 ###
			fString = Replace(fString, "'", "''")
			if strAllowHTML <> "1" then
				fString = HTMLEncode(fString)
			end if
			ChkBadWords(fString)
			ChkString = fString
			exit function
	end if
	if fField_Type = "decode" then
			fString = HTMLDecode(fString)
			ChkString = fString
			exit function
	end if
	if fField_Type = "urlpath" then
			fString = Server.URLEncode(fString)
			ChkString = fString
			exit function
	end if
	if fField_Type = "SQLString" then
		fString = Replace(fString, "'", "''")
		fString = HTMLEncode(fString)
		ChkString = fString
		exit function
	end if
	if fField_Type = "JSurlpath" then
		fString = Replace(fString, "'", "\'")
		fString = Server.URLEncode(fString)
		ChkString = fString
		exit function
	end if
	if fField_Type = "display" then
		if strAllowHTML <> "1" then
			fString = HTMLEncode(fString)
		end if
		ChkString = fString
		exit function
	elseif fField_Type = "message" then
		if strAllowHTML <> "1" then
			fString = HTMLEncode(fString)
		end if
		if strAllowCODE <> "1" then
			fString = HTMLEncode(fString)
		end if
	elseif fField_Type = "preview" then
		if strAllowHTML <> "1" then
			fString = HTMLEncode(fString)
		end if
	elseif fField_Type = "hidden" then
		fString = HTMLEncode(fString)
	end if
	if strAllowForumCode = "1" and fField_Type <> "signature" then
		fString = doCode(fString, "[b]", "[/b]", "<b>", "</b>")
		fString = doCode(fString, "[s]", "[/s]", "<s>", "</s>")
		fString = doCode(fString, "[strike]", "[/strike]", "<s>", "</s>")
		fString = doCode(fString, "[u]", "[/u]", "<u>", "</u>")
		fString = doCode(fString, "[i]", "[/i]", "<i>", "</i>")
		if fField_Type <> "title" then
			fString = doCode(fString, "[font=Andale Mono]", "[/font=Andale Mono]", "<font face='Andale Mono'>", "</font id='Andale Mono'>")
			fString = doCode(fString, "[font=Arial]", "[/font=Arial]", "<font face='Arial'>", "</font id='Arial'>")
			fString = doCode(fString, "[font=Arial Black]", "[/font=Arial Black]", "<font face='Arial Black'>", "</font id='Arial Black'>")
			fString = doCode(fString, "[font=Book Antiqua]", "[/font=Book Antiqua]", "<font face='Book Antiqua'>", "</font id='Book Antiqua'>")
			fString = doCode(fString, "[font=Century Gothic]", "[/font=Century Gothic]", "<font face='Century Gothic'>", "</font id='Century Gothic'>")
			fString = doCode(fString, "[font=Courier New]", "[/font=Courier New]", "<font face='Courier New'>", "</font id='Courier New'>")
			fString = doCode(fString, "[font=Comic Sans MS]", "[/font=Comic Sans MS]", "<font face='Comic Sans MS'>", "</font id='Comic Sans MS'>")
			fString = doCode(fString, "[font=Georgia]", "[/font=Georgia]", "<font face='Georgia'>", "</font id='Georgia'>")
			fString = doCode(fString, "[font=Impact]", "[/font=Impact]", "<font face='Impact'>", "</font id='Impact'>")
			fString = doCode(fString, "[font=Tahoma]", "[/font=Tahoma]", "<font face='Tahoma'>", "</font id='Tahoma'>")
			fString = doCode(fString, "[font=Times New Roman]", "[/font=Times New Roman]", "<font face='Times New Roman'>", "</font id='Times New Roman'>")
			fString = doCode(fString, "[font=Trebuchet MS]", "[/font=Trebuchet MS]", "<font face='Trebuchet MS'>", "</font id='Trebuchet MS'>")
			fString = doCode(fString, "[font=Script MT Bold]", "[/font=Script MT Bold]", "<font face='Script MT Bold'>", "</font id='Script MT Bold'>")
			fString = doCode(fString, "[font=Stencil]", "[/font=Stencil]", "<font face='Stencil'>", "</font id='Stencil'>")
			fString = doCode(fString, "[font=宋体]", "[/font=宋体]", "<font face='宋体'>", "</font id='宋体'>")
			fString = doCode(fString, "[font=Lucida Console]", "[/font=Lucida Console]", "<font face='Lucida Console'>", "</font id='Lucida Console'>")

			fString = doCode(fString, "[red]", "[/red]", "<font color=red>", "</font id=red>")
			fString = doCode(fString, "[green]", "[/green]", "<font color=green>", "</font id=green>")
			fString = doCode(fString, "[blue]", "[/blue]", "<font color=blue>", "</font id=blue>")
			fString = doCode(fString, "[white]", "[/white]", "<font color=white>", "</font id=white>")
			fString = doCode(fString, "[purple]", "[/purple]", "<font color=purple>", "</font id=purple>")
			fString = doCode(fString, "[yellow]", "[/yellow]", "<font color=yellow>", "</font id=yellow>")
			fString = doCode(fString, "[violet]", "[/violet]", "<font color=violet>", "</font id=violet>")
			fString = doCode(fString, "[brown]", "[/brown]", "<font color=brown>", "</font id=brown>")
			fString = doCode(fString, "[black]", "[/black]", "<font color=black>", "</font id=black>")
			fString = doCode(fString, "[pink]", "[/pink]", "<font color=pink>", "</font id=pink>")
			fString = doCode(fString, "[orange]", "[/orange]", "<font color=orange>", "</font id=orange>")
			fString = doCode(fString, "[gold]", "[/gold]", "<font color=gold>", "</font id=gold>")

			fString = doCode(fString, "[beige]", "[/beige]", "<font color=beige>", "</font id=beige>")
			fString = doCode(fString, "[teal]", "[/teal]", "<font color=teal>", "</font id=teal>")
			fString = doCode(fString, "[navy]", "[/navy]", "<font color=navy>", "</font id=navy>")
			fString = doCode(fString, "[maroon]", "[/maroon]", "<font color=maroon>", "</font id=maroon>")
			fString = doCode(fString, "[limegreen]", "[/limegreen]", "<font color=limegreen>", "</font id=limegreen>")

			fString = doCode(fString, "[h1]", "[/h1]", "<h1>", "</h1>")
			fString = doCode(fString, "[h2]", "[/h2]", "<h2>", "</h2>")
			fString = doCode(fString, "[h3]", "[/h3]", "<h3>", "</h3>")
			fString = doCode(fString, "[h4]", "[/h4]", "<h4>", "</h4>")
			fString = doCode(fString, "[h5]", "[/h5]", "<h5>", "</h5>")
			fString = doCode(fString, "[h6]", "[/h6]", "<h6>", "</h6>")
			fString = doCode(fString, "[size=1]", "[/size=1]", "<font size=""1>""", "</font>")
			fString = doCode(fString, "[size=2]", "[/size=2]", "<font size=""2"">", "</font>")
			fString = doCode(fString, "[size=3]", "[/size=3]", "<font size=""3"">", "</font>")
			fString = doCode(fString, "[size=4]", "[/size=4]", "<font size=""4"">", "</font>")
			fString = doCode(fString, "[size=5]", "[/size=5]", "<font size=""5"">", "</font>")
			fString = doCode(fString, "[size=6]", "[/size=6]", "<font size=""6"">", "</font>")
			fString = doCode(fString, "[list]", "[/list]", "<ul>", "</ul>")
			fString = doCode(fString, "[list=1]", "[/list=1]", "<ol type=1>", "</ol id=1>")
			fString = doCode(fString, "[list=a]", "[/list=a]", "<ol type=a>", "</ol id=a>")
			fString = doCode(fString, "[*]", "[/*]", "<li>", "</li>")
			fString = doCode(fString, "[left]", "[/left]", "<div align=left>", "</div id=left>")
			fString = doCode(fString, "[center]", "[/center]", "<center>", "</center>")
			fString = doCode(fString, "[centre]", "[/centre]", "<center>", "</center>")
			fString = doCode(fString, "[right]", "[/right]", "<div align=right>", "</div id=right>")

'			fString = doCode(fString, "[code]", "[/code]", "<pre id=code><font face=courier size=" & strDefaultFontSize & " id=code>", "</font id=code></pre id=code>")

			'############# Append By Guozi On 2001-09-28 13:55 ###############
			fString = doCode(fString, "[quote]", "[/quote]", "<BR><table cellpadding=0 cellspacing=0 border=0 WIDTH=94% bgcolor=#000000 align=center><tr><td><table width=100% cellpadding=5 cellspacing=1 border=0><TR><TD BGCOLOR=#F8F8F8><font size=" & strFooterFontSize & " face=""" & strDefaultFontFace & """ id=quote>", "</td></tr></table></td></tr></table>")
			'#################################################################

			'fString = doCode(fString, "[quote]", "[/quote]", "<BLOCKQUOTE id=quote><font size=" & strFooterFontSize & " face=""" & strDefaultFontFace & """ id=quote><hr height=1 noshade id=quote>", "<hr height=1 noshade id=quote></font id=quote></BLOCKQUOTE id=quote>")

' ###			fString = doCode(fString, "[quote]", "[/quote]", "<table cellpadding=0 cellspacing=0 border=0 WIDTH=94% bgcolor=#000000 align=center><tr><td><table width=100% cellpadding=5 cellspacing=1 border=0><TR><TD BGCOLOR=#eeeeee><font size=" & strFooterFontSize & " face=""" & strDefaultFontFace & """ id=quote>", "</td></tr></table></td></tr></table>")

			fString = doCode(fString, "[url=&quot;", "&quot;]", "[url=""", """]")
			fString = doCode(fString, "[URL=&quot;", "&quot;]", "[url=""", """]")
'			fString = doCode(fString, "[url", "[/url]", "<a>", "</a>")
			fString = replace(fString, "[br]", "<br>", 1, -1, 1)
	if stricons = "1" and _
	fField_Type <> "title" and _
		fField_Type <> "hidden" then
		fString= smile(fString)
	end if

⌨️ 快捷键说明

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