here if you are sure.",false); if ($type == 'friend') { sql_query("DELETE FROM friends WHERE userid=$userid AND friendid=$targetid") or sqlerr(__FILE__, __LINE__); if (mysql_affected_rows() == 0) stderr("Error", "No friend found with ID $targetid"); $frag = "friends"; } elseif ($type == 'block') { sql_query("DELETE FROM blocks WHERE userid=$userid AND blockid=$targetid") or sqlerr(__FILE__, __LINE__); if (mysql_affected_rows() == 0) stderr("Error", "No block found with ID $targetid"); $frag = "blocks"; } else stderr("Error", "Unknown type $type"); header("Location: $BASEURL/friends.php"); die; } // main body ----------------------------------------------------------------- if($action == 'flist') { stdhead("Personal lists for " . $user['username']); if ($user["donor"] == "yes") $donor = "Donor"; if ($user["warned"] == "yes") $warned = "Warned"; fmenu(); print("
"); print("

Friends list for $CURUSER[username]

\n"); print(""); $i = 0; $dt = gmtime() - 180; $dt = sqlesc(get_date_time($dt)); $res = sql_query("SELECT f.friendid as id, u.username AS name, u.class, u.avatar, u.title, u.donor, u.warned, u.enabled, u.last_access, u.gender FROM friends AS f LEFT JOIN users as u ON f.friendid = u.id WHERE userid=$userid ORDER BY name") or sqlerr(__FILE__, __LINE__); if(mysql_num_rows($res) <= 0) echo "No frieds yet"; else while ($friend = mysql_fetch_array($res)) { $avatar = ($CURUSER["avatars"] == "yes" ? htmlspecialchars($friend["avatar"]) : ""); if (!$avatar) $avatar = "pic/default_avatar.gif"; ?> \n"); print("

N/A Male Male '.get_style($friend['class'],$friend['name']).''?> ()
$dt) $status = 'online.png'; else $status = 'offline.png'; ?>
"); stdfoot(); die; } elseif($action == 'added') { stdhead(); fmenu(); print("
"); print("

Added you to friendslist

\n"); print(""); $i = 0; $friendadd = sql_query("SELECT f.userid AS id, u.username AS name, u.id AS uid, u.class, u.avatar, u.title, u.donor, u.warned, u.enabled, u.last_access, u.gender FROM friends AS f LEFT JOIN users AS u ON f.userid = u.id WHERE friendid = $CURUSER[id] ORDER BY name") or sqlerr(__FILE__, __LINE__); if(mysql_num_rows($friendadd) == 0) $friendsno = "No friends yet"; else while ($friend = mysql_fetch_array($friendadd)) { $title = $friend["title"]; if (!$title) $title = get_user_class_name($friend["class"]); $avatar = ($CURUSER["avatars"] == "yes" ? htmlspecialchars($friend["avatar"]) : ""); if (!$avatar) $avatar = "pic/default_avatar.gif"; ?>  
N/A Male Female '.get_style($friend['class'],$friend['name']).''?> ()
$dt) $status = 'online.png'; else $status = 'offline.png'; ?>
\n"); print($friendsno); print("

\n"); stdfoot(); die; } elseif($action == 'blocked') { stdhead(); fmenu(); $res = sql_query("SELECT b.blockid as id, u.username AS name, u.donor, u.warned, u.enabled, u.last_access FROM blocks AS b LEFT JOIN users as u ON b.blockid = u.id WHERE userid=$userid ORDER BY name") or sqlerr(__FILE__, __LINE__); if(mysql_num_rows($res) == 0) $blocks = "Your blocked userlist is empty"; else { $i = 0; $blocks = ""; while ($block = mysql_fetch_array($res)) { if ($i % 6 == 0) $blocks .= ""; $blocks .= ""; if ($i % 6 == 5) $blocks .= ""; $i++; } print("
[D] " . $block['name'] . "" . get_user_icons($block) . "
\n"); } print(""); print("
"); print("

Blocked Users

"); print("$blocks\n"); print("
\n"); print("

Find user/browse users list

"); stdfoot(); } else { die; } ?>