Results 1 to 6 of 6

Thread: can someone tell me what the following code do

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2003
    Posts
    175

    can someone tell me what the following code do

    <SCRIPT LANGUAGE=vbscript runat=server>
    sub Application_OnStart
    dim arrOnLine(50,3) Application("OnLineUsers") = arrOnLine
    end sub
    </SCRIPT>

    <SCRIPT LANGUAGE=vbscript runat=server>
    sub Application_OnEnd
    ' Remove Session Users
    Application.Lock
    arrOnLine = Application("OnLineUsers")
    for i=0 to UBOUND(arrOnLine,2) if arrOnLine(0,i) = Session.SessionID then
    arrOnLine(0,i) = ""
    arrOnLine(1,i) = ""
    exit for
    end if
    next
    Application("OnLineUsers") = arrOnLine
    Application.UnLock
    end sub
    </SCRIPT>

    what is the structure of the array????? its location is in global .asa
    thanks

  2. #2
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861
    When a user starts the application it adds their SessionID to a 2 dimensional array considting of 50 rows and 3 columns, then when the user ends the application it looks through the array and removes that users SessionID from the array.
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2003
    Posts
    175

    UBOUND meaning?

    ok thanks
    so how is the array structured???
    UBOUND(arrOnLine,2) - what is the answer of this finction
    its hard for me to imagine the array
    sorry
    pls help

  4. #4
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  5. #5
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602
    Just out of curiosity... don't you set those things(events) in the global.asa file, not in the.asp file?


    kind regards
    Henrik

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jan 2003
    Posts
    175

    global.asa

    yup this events are in the global.asa file but i wants to know the structure af the array. does it like a string that separates users with coma (,) or array in the server cache
    ron

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width