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

📄 formatpost.asp

📁 电子商务网络购物系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
		If lngEndPos > lngStartPos Then
			strQuotedMessage = Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos))
			strQuotedAuthor = Replace(strQuotedAuthor, """", "", 1, -1, 1)
			strBuildQuote = "<table width=""95%"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"">"
			strBuildQuote = strBuildQuote & vbCrLf & "<tr><td class=""bold"">" & strQuotedAuthor & ":<br>"
			strBuildQuote = strBuildQuote & vbCrLf & "   <table width=""100%"" border=""0"" cellpadding=""1"" cellspacing=""0"" bgcolor=""" & strTableQuoteBorderColour & """>"
			strBuildQuote = strBuildQuote & vbCrLf & "    <tr>"
			strBuildQuote = strBuildQuote & vbCrLf & "    <td><table width=""100%"" border=""0"" cellpadding=""2"" cellspacing=""0"" bgcolor=""" & strTableQuoteColour & """>"
			strBuildQuote = strBuildQuote & vbCrLf & "      <tr>"
			strBuildQuote = strBuildQuote & vbCrLf & "       <td class=""text"">" & strQuotedMessage & "</td>"
			strBuildQuote = strBuildQuote & vbCrLf & "      </tr>"
			strBuildQuote = strBuildQuote & vbCrLf & "     </table></td>"
			strBuildQuote = strBuildQuote & vbCrLf & "   </tr>"
			strBuildQuote = strBuildQuote & vbCrLf & "  </table></td>"
			strBuildQuote = strBuildQuote & vbCrLf & "</tr>"
			strBuildQuote = strBuildQuote & vbCrLf & "</table>"
		End If

		lngStartPos = InStr(1, strMessage, "[QUOTE=", 1)
		lngEndPos = InStr(lngStartPos, strMessage, "[/QUOTE]", 1) + 8
		If lngEndPos - lngStartPos =< 7 Then lngEndPos = lngStartPos + Len(strQuotedAuthor) + 8
		strOriginalQuote = Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos))
		If strBuildQuote <> "" Then
			strMessage = Replace(strMessage, strOriginalQuote, strBuildQuote, 1, -1, 1)
		Else
			strMessage = Replace(strMessage, strOriginalQuote, Replace(strOriginalQuote, "[", "&#91;", 1, -1, 1), 1, -1, 1)
		End If
	Loop
	formatQuote = strMessage
End Function

Function formatFlash(ByVal strMessage)
	Dim lngStartPos
	Dim lngEndPos
	Dim saryFlashAttributes
	Dim intAttrbuteLoop
	Dim strFlashWidth
	Dim intFlashWidth
	Dim strFlashHeight
	Dim intFlashHeight
	Dim strBuildFlashLink
	Dim strTempFlashMsg
	Dim strFlashLink

	Do While InStr(1, strMessage, "[FLASH", 1) > 0 AND InStr(1, strMessage, "[/FLASH]", 1) > 0
		intFlashWidth = 50
		intFlashHeight = 50
		strFlashLink = ""
		strBuildFlashLink = ""
		strTempFlashMsg = ""
		lngStartPos = InStr(1, strMessage, "[FLASH", 1)
		lngEndPos = InStr(lngStartPos, strMessage, "[/FLASH]", 1) + 8
		If lngEndPos - lngStartPos =< 7 Then lngEndPos = lngStartPos + 7
		strTempFlashMsg = Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos))
		lngStartPos = InStr(1, strTempFlashMsg, "[FLASH", 1) + 6
		lngEndPos = InStr(lngStartPos, strTempFlashMsg, "]", 1)
		If lngEndPos - lngStartPos =< 6 Then lngEndPos = lngStartPos + 5
		If strTempFlashMsg <> "" Then
			saryFlashAttributes = Split(Trim(Mid(strTempFlashMsg, lngStartPos, lngEndPos-lngStartPos)), " ")
			For intAttrbuteLoop = 0 To UBound(saryFlashAttributes)
				If InStr(1, saryFlashAttributes(intAttrbuteLoop), "WIDTH=", 1) Then
					strFlashWidth = Replace(saryFlashAttributes(intAttrbuteLoop), "WIDTH=", "", 1, -1, 1)
					If isNumeric(strFlashWidth) Then intFlashWidth = CInt(strFlashWidth)
				End If
				If InStr(1, saryFlashAttributes(intAttrbuteLoop), "HEIGHT=", 1) Then
					strFlashHeight = Replace(saryFlashAttributes(intAttrbuteLoop), "HEIGHT=", "", 1, -1, 1)
					If isNumeric(strFlashHeight) Then intFlashHeight = CInt(strFlashHeight)
				End If
			Next

			lngStartPos = InStr(1, strTempFlashMsg, "]", 1) + 1
			lngEndPos = InStr(lngStartPos, strTempFlashMsg, "[/FLASH]", 1)
			If lngEndPos - lngStartPos =< 0 Then lngEndPos = lngStartPos
			strFlashLink = Trim(Mid(strTempFlashMsg, lngStartPos, (lngEndPos - lngStartPos)))
			If strFlashLink <> "" Then
				strBuildFlashLink = "<embed src=""" & strFlashLink & """"
				strBuildFlashLink = strBuildFlashLink & " quality=high width=" & intFlashWidth & " height=" & intFlashHeight & " type=""application/x-shockwave-flash"" pluginspage=""http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash""></embed>"
			End If
		End If
		If strBuildFlashLink <> "" Then
			strMessage = Replace(strMessage, strTempFlashMsg, strBuildFlashLink, 1, -1, 1)
		Else
			strMessage = Replace(strMessage, strTempFlashMsg, Replace(strTempFlashMsg, "[", "&#91;", 1, -1, 1), 1, -1, 1)
		End If
	Loop
	formatFlash = strMessage
End Function

Function editedCovert(ByVal strMessage)
		Dim strEditedAuthor 
		Dim dtmEditedDate  
		Dim lngStartPos
		Dim lngEndPos

		lngStartPos = InStr(1, strMessage, "<editID>", 1) + 8
		lngEndPos = InStr(1, strMessage, "</editID>", 1)
		If lngStartPos > 8 AND lngEndPos > 0 Then
			strEditedAuthor = Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos))
		End If
		lngStartPos = InStr(1, strMessage, "<editDate>", 1) + 10
		lngEndPos = InStr(1, strMessage, "</editDate>", 1)
		If lngStartPos > 10 AND lngEndPos > 0 Then
			dtmEditedDate = Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos))
			If isNumeric(dtmEditedDate) Then dtmEditedDate = CDate(dtmEditedDate) Else dtmEditedDate = 0
		End If
		lngStartPos = InStr(1, strMessage, "<edited>", 1)
		lngEndPos = InStr(1, strMessage, "</edited>", 1) + 9
		If lngStartPos > 0 AND lngEndPos > 9 Then
			strMessage = Replace(strMessage, Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos)), "", 1, -1, 1)
		End If

		If strEditedAuthor <> "" Then
			editedCovert = strMessage & "<span class=""smText""><br /><br />编辑人:" & strEditedAuthor & " 编辑于: " & DateFormat(dtmEditedDate, saryDateTimeData) & "  " & TimeFormat(dtmEditedDate, saryDateTimeData) & "</span>"
		End If
End Function

Function ConvertToText(ByVal strMessage)

	Dim intLoop
	Dim strTempEmoticonAltTag

	strMessage = Replace(strMessage, " target=""_blank""", "", 1, -1, 1)
	strMessage = Replace(strMessage, " border=""0""", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<font color=""black"">", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<font color=""white"">", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<font color=""blue"">", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<font color=""red"">", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<font color=""green"">", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<font color=""yellow"">", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<font color=""orange"">", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<font color=""brown"">", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<font color=""magenta"">", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<font color=""cyan"">", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<font color=""limegreen"">", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<font color=black>", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<font color=white>", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<font color=blue>", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<font color=red>", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<font color=green>", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<font color=yellow>", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<font color=orange>", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<font color=brown>", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<font color=magenta>", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<font color=cyan>", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<font color=limegreen>", "", 1, -1, 1)
	strMessage = Replace(strMessage, "</font>", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<img src= """, "<img src=""", 1, -1, 1)

	For intLoop = 1 to UBound(saryEmoticons)
		strTempEmoticonAltTag = saryEmoticons(intLoop,2)
		strTempEmoticonAltTag = Replace(strTempEmoticonAltTag, "[", "", 1, -1, 1)
		strTempEmoticonAltTag = Replace(strTempEmoticonAltTag, "]", "", 1, -1, 1)
		strMessage = Replace(strMessage, "<img src=""" & saryEmoticons(intLoop,3) & """>", strTempEmoticonAltTag, 1, -1, 1)
	Next
	strMessage = Replace(strMessage, "<img src=""", " image: - ", 1, -1, 1)
	strMessage = Replace(strMessage, """>", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<a href=""", "", 1, -1, 1)
	strMessage = Replace(strMessage, "<a href= """, "", 1, -1, 1)
	strMessage = Replace(strMessage, "</a>", "", 1, -1, 1)
	ConvertToText = strMessage

End Function
%>

⌨️ 快捷键说明

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