javascript|xml| Chat Room | refresh | no refresh
####### #say. asp##############
<% Option Explicit
Dim f,t,sc,cl,e,w,sj
Response.contenttype= "Text/xml"
F=request.form ("F")
T=request.form ("T")
Sc=request.form ("SC")
Cl=request.form ("CL")
E=request.form ("E")
' W=request.form ("W")
w= "0"
' Speaking time
Sj=gettime ()
If Request.ServerVariables ("request_method") = "POST" Then
Sc= "" &trim (F) & "" &trim (T) & "" &E& " "&trim (SC) &" "&trim (CL) &" "&sJ&" "
Else
Response.End
End If
Dim c_info,c_lid,c_ip,u_lid,newlid,u_name,i
Application.Lock
C_info=application ("C_info")
C_lid=application ("C_lid") +1
Application ("C_lid") =c_lid
c_ip= (c_info (0) +6) MoD 240
C_info (0) =c_ip
C_info (C_IP) =c_lid
C_info (c_ip+1) =f
C_info (c_ip+2) =t
C_info (c_ip+3) =w
C_info (c_ip+4) = ""
C_info (c_ip+5) =sc ' "" &trim (F) & "" &trim (T) & "" & e& "" &trim (SC) & "" &trim (CL) & "" &sJ& ""
Application ("C_info") =c_info
Application.UnLock
U_lid=session ("U_lid")
Newlid=u_lid
U_name=session ("U_name")
' &application ("C_lid") & "%" &c_info (0)
Response.Write ""
For I=c_info (0) +6 to 6
if (C_info (i) >u_lid) and (C_info (i+1) =u_name) or (C_info (i+2) =u_name) or (C_info (i+2) = "Everyone") or (C_info (i+3) = "0")) Then
Response.Write C_info (i+5)
if (NewlidEnd If
Next
For I=1 to C_info (0) Step 6
if (C_info (i) >u_lid) and (C_info (i+1) =u_name) or (C_info (i+2) =u_name) or (C_info (i+2) = "Everyone") or (C_info (i+3) = "0")) Then
Response.Write C_info (i+5)
if (NewlidEnd If
Next
Response.Write ""
Session ("U_lid") =newlid
function GetTime ()
Dim y,m,d,h,n,s
Y=year (date ())
M=month (date ())
D=day (date ())
H=hour (Time ())
N=minute (Time ())
S=second (Time ()) ' When it is one, add 0 to the front
If Len (m) =1 then m= "0" & M
If Len (d) =1 then d= "0" & D
If Len (h) =1 then h= "0" & H
If Len (n) =1 then n= "0" & N
If Len (s) =1 then s= "0" & S
gettime=y& "/" &m& "/" &d & "" & h& ":" & n& ":" &s
End Function%>