Forums
This topic is locked
Showing name of the users currently online
Posted 04 May 2002 10:00:43
1
has voted
04 May 2002 10:00:43 scre wdanger posted:
<img src=../images/dmxzone/forum/icon_smile_blush.gif border=0 align=middle>n many other snitz forum i have seen the name of user currently logged in. Well showing the no. of users is no problem, does any body know how to do this??Any tutorials???
Replies
Replied 11 May 2002 20:15:04
11 May 2002 20:15:04 stellan karlgren replied:
This is easy.
Just make a page that updates the post in the database. Something like this:
rsMembers("latestVisit" = Now 'rsMembers is filtered by session("MM_Username"'
rsMembers("Status" = "Online"
rsMembers.Update
'rsUppdateStatus is not filtered at all'
Do Until rsUppdateStatus.EOF
If rsUppdateStatus.Fields.Item("Status".Value = "Online" AND DateDiff("n", rsUppdateStatus.Fields.Item("latestVisit".Value, Now) > 30 Then
rsUppdateStatus.Fields.Item("Status".Value = "Offline"
rsUppdateStatus.Update
End If
rsUppdateStatus.MoveNext
Loop
Response.Redirect "something.asp"
And with logout can you make something like this:
rsMembers("latestVisit" = "offline"
rsMembers.Update
It should work, i have not tried it.
Just make a page that updates the post in the database. Something like this:
rsMembers("latestVisit" = Now 'rsMembers is filtered by session("MM_Username"'
rsMembers("Status" = "Online"
rsMembers.Update
'rsUppdateStatus is not filtered at all'
Do Until rsUppdateStatus.EOF
If rsUppdateStatus.Fields.Item("Status".Value = "Online" AND DateDiff("n", rsUppdateStatus.Fields.Item("latestVisit".Value, Now) > 30 Then
rsUppdateStatus.Fields.Item("Status".Value = "Offline"
rsUppdateStatus.Update
End If
rsUppdateStatus.MoveNext
Loop
Response.Redirect "something.asp"
And with logout can you make something like this:
rsMembers("latestVisit" = "offline"
rsMembers.Update
It should work, i have not tried it.