static function housekeep() { // delete sessions that have timed out and not logged out or // deleted by check_session() and mark the user offline $st = "SELECT session FROM active_sessions WHERE session_time<=" . (time() - CSession::$session_timeout) . ""; $streturn = mysql_query($st, CSession::$db_link) or die(mysql_error()); $stnum = mysql_numrows($streturn); $i = 0; while ($i < $stnum) { CSession::check_session(mysql_result($streturn, 0, 0)); $i++; } }