Tomasz Golebiowski
|
| Posted: 02/26/2002, 1:43 PM |
|
I store in db login and logout dates and 'current_state' (online=1, offline=0).
Logout is stored after user clicks logout button. What if he/she forget to
click? 'current_state' is still =1 for hours, days, years...
Someone on newsgroup or gotocode said, that it could be done via comparing
login/logout dates with current date, andchange it's 'current_state' to 0 if
difference is bigger than X minutes. This is very bad solution; user would be
logged out during his work on db!
Does anybody has an idea how to manipulate open sessions in CC: code should
recognize user inactivity duration time and then make db query changing it's
'current_state' to 0 .
(Code should be included in global section)
|
|
|
 |
Alexey Alexapolsky
|
| Posted: 02/27/2002, 5:19 AM |
|
Impossibility to use some built-in ways of session timeout detection
is one of php drawbacks, if you come across some nifty solution
on the net please share it with other users.
--
Alex
CodeCharge Developer
"Tomasz Golebiowski" <tomasz@REMOVENOSPAMmax.pl> wrote in message
news:a5gvhf$hoi$1@news.codecharge.com...
> I store in db login and logout dates and 'current_state' (online=1,
offline=0).
> Logout is stored after user clicks logout button. What if he/she forget to
> click? 'current_state' is still =1 for hours, days, years...
>
> Someone on newsgroup or gotocode said, that it could be done via comparing
> login/logout dates with current date, andchange it's 'current_state' to 0
if
> difference is bigger than X minutes. This is very bad solution; user would
be
> logged out during his work on db!
>
> Does anybody has an idea how to manipulate open sessions in CC: code
should
> recognize user inactivity duration time and then make db query changing
it's
> 'current_state' to 0 .
>
> (Code should be included in global section)
>
>
|
|
|
 |
Tomasz Golebiowski
|
| Posted: 02/27/2002, 11:37 AM |
|
Alex,
is it possible to search through sessions?
I mean search for UserID's in all open session, then use it on page listing
online users...
It would be the best way to track users online.
"Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
news:a5imdh$epd$2@news.codecharge.com...
> Impossibility to use some built-in ways of session timeout detection
> is one of php drawbacks, if you come across some nifty solution
> on the net please share it with other users.
>
> --
> Alex
> CodeCharge Developer
>
>
> "Tomasz Golebiowski" <tomasz@REMOVENOSPAMmax.pl> wrote in message
>news:a5gvhf$hoi$1@news.codecharge.com...
> > I store in db login and logout dates and 'current_state' (online=1,
> offline=0).
> > Logout is stored after user clicks logout button. What if he/she forget to
> > click? 'current_state' is still =1 for hours, days, years...
> >
> > Someone on newsgroup or gotocode said, that it could be done via comparing
> > login/logout dates with current date, andchange it's 'current_state' to 0
> if
> > difference is bigger than X minutes. This is very bad solution; user would
> be
> > logged out during his work on db!
> >
> > Does anybody has an idea how to manipulate open sessions in CC: code
> should
> > recognize user inactivity duration time and then make db query changing
> it's
> > 'current_state' to 0 .
> >
> > (Code should be included in global section)
> >
> >
>
>
|
|
|
 |
Damian Small
|
| Posted: 02/27/2002, 2:01 PM |
|
I am currently using the global.asa file to reset the online state after the
session times out or if the user abandons a session. I also use the
global.asa file to return stock to the warehouse that was left abandoned
with the abandoned session. If this is of any help.
Regards Damian Small
"Tomasz Golebiowski" <tomasz@REMOVENOSPAMmax.pl> wrote in message
news:a5gvhf$hoi$1@news.codecharge.com...
> I store in db login and logout dates and 'current_state' (online=1,
offline=0).
> Logout is stored after user clicks logout button. What if he/she forget to
> click? 'current_state' is still =1 for hours, days, years...
>
> Someone on newsgroup or gotocode said, that it could be done via comparing
> login/logout dates with current date, andchange it's 'current_state' to 0
if
> difference is bigger than X minutes. This is very bad solution; user would
be
> logged out during his work on db!
>
> Does anybody has an idea how to manipulate open sessions in CC: code
should
> recognize user inactivity duration time and then make db query changing
it's
> 'current_state' to 0 .
>
> (Code should be included in global section)
>
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.313 / Virus Database: 174 - Release Date: 2/01/2002
|
|
|
 |
Tomasz Golebiowski
|
| Posted: 02/27/2002, 2:33 PM |
|
ASP, I suppose? I use PHP...:-\
"Damian Small" <dsmall@idx.com.au> wrote in message
news:a5jl02$689$1@news.codecharge.com...
> I am currently using the global.asa file to reset the online state after the
> session times out or if the user abandons a session. I also use the
> global.asa file to return stock to the warehouse that was left abandoned
> with the abandoned session. If this is of any help.
>
> Regards Damian Small
>
> "Tomasz Golebiowski" <tomasz@REMOVENOSPAMmax.pl> wrote in message
>news:a5gvhf$hoi$1@news.codecharge.com...
> > I store in db login and logout dates and 'current_state' (online=1,
> offline=0).
> > Logout is stored after user clicks logout button. What if he/she forget to
> > click? 'current_state' is still =1 for hours, days, years...
> >
> > Someone on newsgroup or gotocode said, that it could be done via comparing
> > login/logout dates with current date, andchange it's 'current_state' to 0
> if
> > difference is bigger than X minutes. This is very bad solution; user would
> be
> > logged out during his work on db!
> >
> > Does anybody has an idea how to manipulate open sessions in CC: code
> should
> > recognize user inactivity duration time and then make db query changing
> it's
> > 'current_state' to 0 .
> >
> > (Code should be included in global section)
> >
> >
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.313 / Virus Database: 174 - Release Date: 2/01/2002
>
>
|
|
|
 |
Damian Small
|
| Posted: 02/27/2002, 3:03 PM |
|
Ive read that there is a global.php equivelent actually called the
global.php which has trigger events based on sessions.
"Tomasz Golebiowski" <tomasz@REMOVENOSPAMmax.pl> wrote in message
news:a5gvhf$hoi$1@news.codecharge.com...
> I store in db login and logout dates and 'current_state' (online=1,
offline=0).
> Logout is stored after user clicks logout button. What if he/she forget to
> click? 'current_state' is still =1 for hours, days, years...
>
> Someone on newsgroup or gotocode said, that it could be done via comparing
> login/logout dates with current date, andchange it's 'current_state' to 0
if
> difference is bigger than X minutes. This is very bad solution; user would
be
> logged out during his work on db!
>
> Does anybody has an idea how to manipulate open sessions in CC: code
should
> recognize user inactivity duration time and then make db query changing
it's
> 'current_state' to 0 .
>
> (Code should be included in global section)
>
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.313 / Virus Database: 174 - Release Date: 2/01/2002
|
|
|
 |
|