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

📄 newlines.asp

📁 asp+flash 文字聊天源码 asp+flash 文字聊天源码
💻 ASP
字号:
<%@Language = "VBScript"%>
<%
Option Explicit
Response.Buffer = True
Response.Expires = -1000

Dim vRoomNo

vRoomNo = Session("RoomNo")
GetNewLines CLng(Session("LastLine"))

Response.Flush
Response.End

Sub GetNewLines(byVal vLastLine)

	Dim vCurrentLine, vChatLines
	Dim vNewLines, vLine, vLineText
	Dim vPrivatePrefix
		
	vPrivatePrefix = "/msg " & Session("ChatName") & " "
	vCurrentLine = Application("ChatLineCount" & vRoomNo)
	vChatLines = Application("ChatLines" & vRoomNo)
	For vLine = vLastLine To vCurrentLine - 1
		vLineText = vChatLines(vLine)
		If Instr(vLineText, "/msg ") = 1 Then
			If Instr(vLineText, vPrivatePrefix) = 1 Then
				vNewLines = vNewLines & "[Private] " & Right(vLineText, Len(vLineText) - Len(vPrivatePrefix)) & Chr(13)
			End If
		Else
			vNewLines = vNewLines & vLineText & Chr(13)
		End If
	Next
	Session("LastLine") = vCurrentLine
	Response.Write "NewLines=" & Server.URLEncode(vNewLines) & "&Result=OK"
	
End Sub
%>

⌨️ 快捷键说明

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