Parašė Gugiss· 2008 Lie. 5 09:07:13
#2
Bandyk
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");
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'] != ""){
echo "<img src='".IMAGES."avatars/".$data['user_avatar']."'><br>
<a href='".BASEDIR."profile.php?lookup=".$data_buddy['user_id']."' target='_parent'>".$data_buddy['user_name']."</a><br>";
}
}
echo"</td></tr></table>\n";
closetable();
Redagavo Gugiss· 2008 Lie. 5 10:07:18