Changeset 1557 in ExiteCMS


Ignore:
Timestamp:
07/30/08 15:48:50 (4 years ago)
Author:
hverton
Message:

moved the code to register online users to the user_functions include

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/common/online_users_panel/php-files/modules/online_users_panel/online_users_panel.php

    r1357 r1557  
    2020// array's to store the variables for this panel 
    2121$variables = array(); 
    22  
    23 // update the last users online information 
    24 if ($settings['maintenance'] != "1") { 
    25     $cond = ($userdata['user_level'] != 0 ? "'".$userdata['user_id']."'" : "'0' AND online_ip='".USER_IP."'"); 
    26     $result = dbquery("SELECT * FROM ".$db_prefix."online WHERE online_user=".$cond.""); 
    27     if (dbrows($result) != 0) { 
    28         $result = dbquery("UPDATE ".$db_prefix."online SET online_lastactive='".time()."' WHERE online_user=".$cond.""); 
    29     } else { 
    30         $name = (iMEMBER ? $userdata['user_id'] : "0"); 
    31         $result = dbquery("INSERT INTO ".$db_prefix."online (online_user, online_ip, online_lastactive) VALUES ('$name', '".USER_IP."', '".time()."')"); 
    32     } 
    33     $result = dbquery("DELETE FROM ".$db_prefix."online WHERE online_lastactive<".(time()-60).""); 
    34 } 
    3522 
    3623$result = dbquery( 
Note: See TracChangeset for help on using the changeset viewer.