Re: I would like to display....

From: Mikael (micke.hellstrom_at_telia.com)
Date: 03/22/04


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"
>
>



Relevant Pages

  • Re: what is an "explicit instance of a class"
    ... public shared sub MyMethod() ... Is actually a "class" method called MyMethod. ... members. ... > visual basic code: Public Shared Function IsPortAvailableAs Boolean ...
    (microsoft.public.dotnet.languages.vb)
  • Password not working on exported Workbook / Worksheet.
    ... hidden columns in accessable to anyone other than executive members. ... password protection works fine on my computer, but when I transfer the file ... Sub ExecProtect() ...
    (microsoft.public.excel.programming)
  • Re: Can you pass a Property of a User Defined Object to a Sub ByRef and Update it?
    ... which defeats the purpose of the class. ... The private members *should not* ... Public Sub AddNewItem ... then s is a pointer to the Dictionary. ...
    (microsoft.public.scripting.vbscript)
  • Re: suffering
    ... SCHEDULE 1 The data protection principles ... Personal data processed for any purpose or purposes shall not be kept for longer than is necessary for that purpose or those purposes. ... you have no need for the information of all the ex members. ... No it was not mark, but it is all relevant to the death threats I received, ...
    (uk.rec.naturist)
  • Re: Displaying Data as a Pyramid
    ... Private Sub Report_Open ... Dim a As Integer, rsttest As DAO.Recordset ... Then make a sub report for the rest of your members. ... > Pyramid as Rank 1 and the person on the right hand end of row 5 having Rank ...
    (microsoft.public.access.reports)