=$starttime ". "ORDER BY pu_lasttime DESC"; $res =&db_query($sql,$link); while ($udata=&db_fetch_array($res)) { $comment=build_online_message($udata); if (!$udata['u_hidden'] || $GLOBALS['inuserlevel']>=1000) online_entry($udata,$comment); } } function build_online_message($udata) { if ($udata['uo_module']=="main") $comment = MSG_view_mainpage; elseif ($udata['f_id'] && $udata['f_lview']>$GLOBALS['inuserlevel']) $comment = MSG_view_mainpage; elseif (strpos($udata['uo_action'],"_view")!==false && $udata['t_id']) { $ftmp['f_id']=$udata['f_id']; $ftmp['f_link']=$udata['f_link']; $comment = MSG_view_topic." \"".$udata['t_title']."\" ".MSG_view_inforum." \"".$udata['f_title']."\""; } elseif (strpos($udata['uo_action'],"_view")!==false && $udata['f_id']) $comment = MSG_view_forum." \"".$udata['f_title']."\""; elseif ($udata['uo_action']=="do_post") { $ftmp['f_id']=$udata['f_id']; $ftmp['f_link']=$udata['f_link']; $comment = MSG_view_dopost." \"".$udata['t_title']."\" ".MSG_view_inforum." \"".$udata['f_title']."\""; } elseif ($udata['uo_action']=="do_topic") $comment = MSG_view_dotopic." ".MSG_view_inforum. " \"".$udata['f_title']."\""; elseif ($udata['uo_module']=="stdforum" && $udata['uo_action']=="rules") $comment = MSG_view_rules." ". MSG_view_inforum." \"".$udata['f_title']."\""; elseif ($udata['uo_module']=="profile") { if ($udata['uo_action']=="rules") $comment = MSG_view_rules." ".MSG_view_before_register; elseif ($udata['uo_action']=="register") $comment = MSG_view_registering; elseif ($udata['uo_action']=="do_register") $comment = MSG_view_registered; elseif ($udata['uo_action']=="login") $comment = MSG_view_logging_in; elseif ($udata['uo_action']=="do_login") $comment = MSG_view_logged_in; elseif ($udata['uo_action']=="do_logout") $comment = MSG_view_logged_out; elseif ($udata['uo_action']=="view") $comment = MSG_view_profile; elseif ($udata['uo_action']=="listusers") $comment = MSG_view_userlist; elseif ($udata['uo_action']=="online") $comment = MSG_view_online; else $comment = MSG_view_undescribed; } elseif ($udata['uo_module']=="search") { if ($udata['uo_action']=="view") $comment = MSG_view_start_search; elseif ($udata['uo_action']=="result") $comment = MSG_view_search_topic; else $comment = MSG_view_undescribed; } elseif ($udata['uo_module']=="newpost") { if ($udata['uo_action']=="view_updated") $comment= MSG_view_updated; } else $comment = MSG_view_undescribed; return $comment; }