chat_log.asp:
<!--#include file="conn.asp"-->
<!--#include file="chklogin.asp"-->
<%
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.cachecontrol = "no-cache"
if isnumeric(request("id")) then
set rs=conn.execute("select top 50 * from chat_log where chat_id>"&request("id")&" order by chat_id desc")
while not rs.eof
response.Write(escape(rs("chat_id")&"*"&rs("roomid")&"*"&rs("sendtime")&rs("msgBody")&"#" ))
rs.movenext
wend
end if
%>
chat_room.asp:
<!--#include file="conn.asp"-->
<!--#include file="chklogin.asp"-->
<%
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.cachecontrol = "no-cache"
set rs=conn.execute("select * from chat_room order by id desc")
while not rs.eof
response.Write(escape( rs("id")&"*"&rs("roomname")&"#" ))
rs.movenext
wend
%>
chat_user.asp:
<!--#include file="conn.asp"-->
<!--#include file="chklogin.asp"-->
<%
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.cachecontrol = "no-cache"
set rs=conn.execute("select * from chat_user where state=1 order by userid")
while not rs.eof
response.Write(escape( rs("srcphone")&rs("userid")&"*"&rs("nickname")&"*"&rs("roomid")&"#" ))
rs.movenext
wend
%>
chat_send.asp:
<!--#include file="conn.asp"-->
<!--#include file="chklogin.asp"-->
<%
'exec chat '13500000000','ME','278810','571','1'
phone=session("phone")
province=session("province")
content=Request("content")
srcphone=Request("srcphone")
conn.execute("exec chat '"&phone&"','"&content&"','"&srcphone&"','"&province&"','1'")
'savefile "chat '"&phone&"','"&content&"','"&srcphone&"','"&province&"','1'"
'function savefile(str)
' set fso=server.CreateObject("scripting.filesystemobject")
' set f1=fso.opentextfile(server.MapPath("./test.txt"),8,true)
' f1.write(str)
' f1.close
' set fso=nothing
'end function
%>