echo '<div class="menu">';
$onltime = $realtime - 300;
$q = @mysql_query("select * from `users` where lastdate>='" . intval($onltime) . "';");
while ($arr = mysql_fetch_array($q)) {
echo '<a href="' . $set['homeurl'] . '/users/profile.php?user=' . $arr['id'] . '">' .$arr['name'] . '</a>,';
}
echo '</div>';