message.asp

来自「聊天室源码呵呵你好用~~~~~~2.0版本」· ASP 代码 · 共 55 行

ASP
55
字号
<%Response.Expires=0
username=Session("a_c_user_name")
if username="" or Session("a_c_user_outchat")=1 then
 Response.Write "对不起,您尚未进入聊天室!"
 Response.End
end if
n=Year(date())
y=Month(date())
r=Day(date())
s=Hour(time())
f=Minute(time())
m=Second(time())
if len(y)=1 then y="0" & y
if len(r)=1 then r="0" & r
if len(s)=1 then s="0" & s
if len(f)=1 then f="0" & f
if len(m)=1 then m="0" & m
sj=n & "-" & y & "-" & r & " " & s & ":" & f & ":" & m
Session("a_c_user_lasttime")=sj
towho=Server.HTMLEncode(Trim(Request.Form("towho")))
zx=0
online=Application("a_c_user_online")
for i=1 to Application("a_c_user_inthechat")*4 step 4
 if towho=online(i) then
  zx=1
  exit for
 end if
next
if zx=0 then towho=""
info=Trim(Request.Form("info"))
if len(info)>400 then info=left(info,400)
info=Server.HTMLEncode(info)
if towho<>"" and info<>"" then
Application.Lock
icqdata=Application("a_c_icq_data")
icqline=Application("a_c_icq_line")
Dim newdata()
Redim Preserve newdata(1),newdata(2),newdata(3),newdata(4)
newdata(1)=towho
newdata(2)=username
newdata(3)=sj
newdata(4)=info
Application("a_c_icq_line")=Application("a_c_icq_line")+4
for i=1 to icqline step 4
 Redim Preserve newdata(i+4),newdata(i+5),newdata(i+6),newdata(i+7)
 newdata(i+4)=icqdata(i)
 newdata(i+5)=icqdata(i+1)
 newdata(i+6)=icqdata(i+2)
 newdata(i+7)=icqdata(i+3)
next
Application("a_c_icq_data")=newdata
Application.Unlock
end if%><script language="javascript">
window.close();
</script>

⌨️ 快捷键说明

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