<?
function online($user=NULL){
global $set,$time;
static $users;
if (!isset($users[$user])){
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id` = '$user' AND `online` > '".(time()-600)."' LIMIT 1"),0)==1){
echo "<img src='/images/icon/user.png'>";
}else{
echo "<img style='opacity:0.4;' src='/images/icon/user.png'>";
}
}
}
?>