![]() |
|
|
+ Search |
![]()
|
Mar 12th, 2003 12:31
Chris White, ger cotter,
You could add the user name as an Application variable at log-on time.
E.g.
<%
'login
' userid = username of current user
Application("@User_" & userid) = now()
Session(userid) = now
%>
then to display list of current users use this
<%
for each content in Application.Contents
If Left(content, 6) = "@User_" Then
' User, print user name
Response.write(Right(content, Len(content) - 6))
Else
' other application variable, ignore
End If
next
%>
Youll need to add the following code to your global.asa or logout
screen
<%
' in logout.asp
Application.Contents.Remove(session("userid"))
Session.abandon()
' in global.asa
Sub Session_OnEnd
If Session("userid") = "" Then
Application.Contents.Remove(session("userid"))
End If
End Sub
%>
© 1999-2004 Synop Pty Ltd