newlines.asp
来自「flash_chatc聊天程序,需要asp环境支持的」· ASP 代码 · 共 38 行
ASP
38 行
<%@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 + =
减小字号Ctrl + -
显示快捷键?