2011-10-12 - Re: [GRASE-Hotspot] HTML redirection
Header Data
From: Tim White <ti***8@gmail.com>
Message Hash: ba3676db508b651e7065637f9e344eff395d329811975b1c0c6bd0c46abc025e
Message ID: <4E958A2A.1070409@gmail.com>
Reply To: <1318406920.68373.YahooMailNeo@web112013.mail.gq1.yahoo.com>
UTC Datetime: 2011-10-12 05:38:02 UTC
Raw Date: Wed, 12 Oct 2011 22:38:02 +1000
Raw message
On 12/10/11 18:08, Nazanin TB wrote:
> Hello Everyone:
> I need to redirect the users after they have logged in to another page
> every n minutes , ( for advertisement ), I know that I should put the
> html code for redirection in the login page . first can you tell me is
> this possible at all ? and second which file in the source I should
> change ? in other words how can I expire the users account every n
> minutes to come back to the log in page
You can put what ever code you like on the login page through the web
interface (look under portal customisation). If you change files in the
source code, your changes will be lost on upgrade. However, as the user
will leave the login page as soon as they are logged in, any code you
have on there won't run once they are off that page. You'll need to open
a popup window, or another window that they have to keep open if you
want your code to run.
The only way to expire users every X minutes is with a script on the
server. Something like the following called by a cron job ever X minutes
will logoff all users.
chilli_query list|awk '{ print $1 }'|xargs chilli_query logout
This will list all the active sessions, get the mac address for all
sessions, and run the logout command for each one.
My suggested way would be a popup that the user must leave open, it has
a meta-refresh tag in there to get new ads every minute or so, you have
a process on the server that checks for all active sessions when the
last ad refresh was, if it was more than 2 or 3 cycles then you
disconnect them. This way users who keep the ads window open aren't
inconvenienced by having to login every X minutes.
Hope that helps.
Tim
Thread
-
Return to October 2011
- Return to “Nazanin TB <na***0@yahoo.com>”
-
Return to “Tim White <ti***8@gmail.com>”
- 2011-10-12 (Wed, 12 Oct 2011 01:08:40 -0700) - [GRASE-Hotspot] HTML redirection - Nazanin TB <na***0@yahoo.com>
- 2011-10-12 (Wed, 12 Oct 2011 22:38:02 +1000) - Re: [GRASE-Hotspot] HTML redirection - Tim White <ti***8@gmail.com>