Parašė Dandžu· 2008 Lie. 5 10:07:04
#9
Koks dar userdata. ;D Bandyk šitą.
opentable("Vartotojo <b>".$data['user_name']."</b> draugai:");
echo"<table border='0' cellpadding='0' cellspacing='1'><tr><td>\n";
$result=dbquery("SELECT * FROM ".$db_prefix."users ORDER BY user_name, user_avatar");
while($data_buddy = dbarray($result)) {
$result_from=dbquery("SELECT * FROM ".$db_prefix."buddys WHERE
buddy_from = ".$data['user_id']." AND buddy_to = ".$data_buddy['user_id']."");
$data_from = dbarray($result_from);
$result_to=dbquery("SELECT * FROM ".$db_prefix."buddys WHERE
buddy_to = ".$data['user_id']." AND buddy_from = ".$data_buddy['user_id']."");
$data_to = dbarray($result_to);
if($data_to['buddy_id'] != "" AND $data_from['buddy_id'] != ""){
if ($data_buddy['user_avatar'] != "") {
echo "<img src='".IMAGES."avatars/".$data_buddy['user_avatar']."'>";
} else {
echo "<img src='".IMAGES."avatars/noavatar.gif'>";
}
echo "<br><a href='".BASEDIR."profile.php?lookup=".$data_buddy['user_id']."' target='_parent'>".$data_buddy['user_name']."</a> | ";
}
}
echo"</td></tr></table>\n";
closetable();