Re: I would like to display....
From: Mikael (micke.hellstrom_at_telia.com)
Date: 03/22/04
- Next message: Ken Schaefer: "Re: Carrying form values without cookies or sessions."
- Previous message: Fawke101: "Disabling a text box/list box after a selectio has been made."
- In reply to: Bob Barrows: "Re: I would like to display...."
- Next in thread: Bob Barrows: "Re: I would like to display...."
- Reply: Bob Barrows: "Re: I would like to display...."
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 22 Mar 2004 10:13:59 GMT
Hi Bob
Your code is a bit "hi tec" at least for me...
Im not sure it serve my purpose. But i have problem following exactly what
you are doing.
Let me explain more in detail.
My site are a place for people to meet. Dating and soo on.
1) When people get to my page they start a session..right? This is done
automatic. i dont care about
these people. They are not on any list because they are not logged in.
2) Members who are logged in to my site i whant to display on a list. Like
this:
Logged in
peter
mike
..
..
3) When my members logg in to my site i check in the database if all is ok
(username, password)
then i set session("memberId") and session("username")
But... what can i do to display all inlogged members. Do i have to use
the Application collection? How do i add people and how do i delete people
when they leve my site?
Hope u understand what im trying to say here :-)
Regards Mikael
"Bob Barrows" <reb01501@NOyahoo.SPAMcom> wrote in message
news:%23oaECp3DEHA.3344@tk2msftngp13.phx.gbl...
> Mikael wrote:
> > Hi all,
> > I would like to display all logged in member on my webpage.
> >
> > example
> >
> > 3 Inlogged members :
> > adam
> > cesar
> > Mike
> > ...
> > ...
> > ..
> >
> > How do i do this best? Can you give me some hints? session collection
> > or...? I use a global.asa. Give me some example if u can.
> >
> > Regards Mikael
>
> This will not be perfect, given the fact that the server does not know
when
> users close their browsers, but it may server your purpose. In global.asa,
> do this:
>
> sub session_onstart
> dim arUsers, sUser, i, bFound
> sUser = request.servervariables("LOGON_USER")
> session("user") = sUser
> application.lock
> arUsers = application("arUsers")
> if Not isArray(arUsers) then
> redim arUsers(0)
> arUsers(0) = sUser
> else
> bFound = false
> for i = 0 to Ubound(arUsers)
> if arUsers(i) = "" then
> arUsers(i) = sUser
> bFound = true
> exit for
> end if
> next
> if not bFound then
> redim preserve arUsers(ubound(arUsers)+1)
> arUsers(ubound(arUsers)) = sUser
> end if
> end if
> application("arUsers") = arUsers
> application_unlock
> end sub
>
> sub session_onend
> dim arUsers, i
> sUser = session("user")
> application.lock
> arUsers = application("arUsers")
> for i = 0 to Ubound(arUsers)
> if arUsers(i) = sUser then
> arUsers(i) = ""
> end if
> next
> application("arUsers") = arUsers
> application.unlock
> end sub
>
> This is assuming you have anonymous access turned off. If it is on, you
will
> need to use another method to populate session("user")
>
> Bob Barrows
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
>
- Next message: Ken Schaefer: "Re: Carrying form values without cookies or sessions."
- Previous message: Fawke101: "Disabling a text box/list box after a selectio has been made."
- In reply to: Bob Barrows: "Re: I would like to display...."
- Next in thread: Bob Barrows: "Re: I would like to display...."
- Reply: Bob Barrows: "Re: I would like to display...."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|