SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2000
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, folks Quick question for all you guys and gals with ninja php skills.
    I'm setting up a script that will give multiple users access to the current content of a database, update it, archive older items and delete stuff.
    Different users will have different privelages. (admin, user)
    My question is this: is it better to set up seperate pages for the two groups of users or use the same page and load it differently depending on privledges? One seems like it would require more CPU time, the other more storage space (multiple pages for the two classes of users)...although the effects either way would be fairly minimal?
    Also is it possible to track the number of users on the system? My thought on that would be to just set up a table calles usersOnline and add to it when users logon and delete when they log off...but what if they just close the browser window without clicking "log out"? is there a way to detect that with php so I could still log them out?
    I think thats it...hehe.
    Thanks in advance and Merry Christmas!
    Luke

  2. #2
    SitePoint Evangelist
    Join Date
    May 2000
    Location
    Canada
    Posts
    533
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i'd use the same page and generate based on priveledge..

    as for loggin people off, have a script run every few minutes via cron job to check for activity, in your usersOnline table, you could update a timestamp every time they do something.. if no activity is logged for 10 mins, you can take them out of usersOnline or something of that sort

    ----------------------
    SitePoint Community Advisor
    my PHP host: when you want something MORE in a host

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2000
    Location
    USA
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, the one page thing would save a little storage and maybe even some time.

    It depends. If you have a lot of space and a a bit more time, try the separate pages.

    Living the OO way.
    Hardware Help | Desperados!


Bookmarks

Posting Permissions

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