load($uid); $html = '
'; $html .= "

user_id\">$user->first_name $user->last_name's $show_what:

"; $show_all_url = ""; switch ($show_what) { case 'friends': $cols = 2; $col_width_pix = 90; $badge_width_pix = $cols * $col_width_pix; $html .= << EOF; $relations = Relation::get_all_relations($user->user_id, 0, FALSE, $perpage, $page); $n = count($relations); $rows = intval($n/3) + ($n % 3 ? 1 : 0); $pos = 0; $html .= ""; for ($y = 0; $y < $rows; ++$y) { $html .= ""; for ($x = 0; $x < $cols && $pos < $n; ++$x, ++$pos) { $html .= '"; } $html .= ""; } $show_all_url = "$base_url/view_all_members.php?view_type=relations&uid=$user->user_id"; $html .= ""; for ($i = 0; $i < $cols - 1; ++$i) $html .= ''; $html .= ""; $html .= "
'; $rel = $relations[$pos]; $html .= ''; if ($rel['picture'] && file_exists("files/".$rel['picture'])) { $html .= uihelper_resize_mk_user_img($rel['picture'], 50, 50) . "
"; } $html .= htmlspecialchars($rel['login_name']).'
'; $html .= "
show all
"; break; case 'groups': $html .= ""; break; case 'networks': break; } $html .= '

'; $html .= "
"; } else { $html = "Error parsing URL ($path)."; } switch ($format) { case 'js': header("Content-Type: application/x-javascript"); echo "document.write('".str_replace("\n", "\\n", str_replace("'", "\\'", $html))."');"; break; case 'html': echo $html; break; } ?>