Here is a little enhancement : to know how long ago a person was connected.
In
whoisonline.php, change to :
/* Counting registered users */
$registeredCount=sizeof($w_logged_users);
function secsToText($time = 0) {
$hours = (int)floor($time/3600);
$minutes = (int)floor($time/60)%60;
$seconds = (int)$time%60;
if($hours==1) $txt = "$hours hour";
else if($hours>1) $txt = "$hours hours";
if($txt and $minutes>0 and $seconds>0) $txt .= ", ";
else if($txt and $minutes>0 and $seconds==0) $txt .= " and ";
$s = ($minutes>1) ? "s" : NULL;
if($minutes>0) $txt .= "$minutes minute$s";
$s = ($seconds>1) ? "s" : NULL;
if($txt and $seconds>0) $txt .= " and ";
if($seconds>0) $txt .= "$seconds second$s";
else if(!$txt and $seconds==0) $txt = "0 seconds";
return $txt;
}
if($registeredCount>0){
$registeredList.='[';
foreach($w_logged_users as $key=>$val){
$howlong = secsToText(time() - $val[1]);
$registeredList.=" <a href=\"{$main_url}/{$indexphp}action=userinfo&user={$key}\" target=\"new{$key}\" title=\"connected {$howlong} ago\">{$val[0]}</a>, ";
}
$registeredList=substr($registeredList,0,strlen($registeredList)-2).' ]';
}