Parašė Qrmiz· 2007 Lie. 9 18:07:47
#16
gaminau, š gavos, bet gal pats ką nors sumąstysi, ar klaidą pamatysi:
openside($locale['010']);
$result = dbquery(
"SELECT ton.*, tu.user_id,user_name,user_avatar FROM ".$db_prefix."online ton
LEFT JOIN ".$db_prefix."users tu ON ton.online_user=tu.user_id"
);
$guests = 0; $members = array();
while ($data = dbarray($result)) {
if ($data['online_user'] == "0") {
$guests++;
} else {
array_push($members, array($data['user_id'], $data['user_name']));
}
}
if (count($members) > 0) {
$i = 1;
echo "";
while (list($key, $member) = each($members)) {
echo "<a href='".BASEDIR."profile.php?lookup=".$member[0]."' class='side'>".$member[1]."</a> | <a href='".BASEDIR."messages.php?msg_send=".$member[0]."' class='side'>Siųsti PM</a>";
if ($data['user_avatar'] != "") {
echo "<br><img src='".BASEDIR."images/avatars/".$data['user_avatar']."'><br>\n";
} else {
echo "<br><img src='".IMAGES."avatars/noavatar.jpg'><br>\n";
}
$i++;
}
echo "<br>\n";
} else {
echo $locale['013']."<br>\n";
}
closeside();