Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - GLOBAL.ASA
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

GLOBAL.ASA

 Post Reply Post Reply
Author
skyworld View Drop Down
Senior Member
Senior Member


Joined: 12 December 2002
Location: United States
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote skyworld Quote  Post ReplyReply Direct Link To This Post Topic: GLOBAL.ASA
    Posted: 15 February 2003 at 3:46pm

i have a script that i made for my site using it.. My question is i want it to add one to application("guests") if they are not logged in and if they are i want it to be add 1 tto APPLICATION("members") but where would the script that ads it go ? I was thikning global.asa but that wouldnt work and dont i need to be in the file for something to get down. I also need it to minus 1 to them when they leave for guests and members

So far my code is....

<script language="vbscript" runat="server">

Sub application_OnStart
Application("totalonline") = 0
Application("Guests") = 0
Application("Members") = 0
end sub

Sub application_onend
end sub

Sub Session_OnStart
application.Lock
application("totalonline") = application("totalonline")+1
APPLICATION.lock
end sub

Sub Session_onend
application.lock
application("totalonline") = Application("totalonline")-1
application.unlock
end sub
</script>

Please help

Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 17 February 2003 at 8:24am

When they login you can go

<%applicarion("Members")+1%>

<%application("Guests")-1%>

Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 17 February 2003 at 8:25am
Don't quote me though
Back to Top
skyworld View Drop Down
Senior Member
Senior Member


Joined: 12 December 2002
Location: United States
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote skyworld Quote  Post ReplyReply Direct Link To This Post Posted: 17 February 2003 at 9:08am

about when they leave though?

Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 17 February 2003 at 9:42am

How about on your main page writing <%session("guest")=1%> then on the login success page writing <%session("member")=1%> then in global.asa try this:

Sub Session_onend
application.lock
application("totalonline") = Application("totalonline")-1

if session("member")=1 then

application("members")-1

else

application("guests")-1

end if
application.unlock
end sub

 

I dont know if you can use the if statement in global.asa but I think you probably can do it that way.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.