3 // Given a user ID as a parameter, will display a list of communities
7 if (isset($parameter[0])) {
9 $user_id = (int) $parameter[0];
11 $result = db_query("select users.*, friends.ident as friendident from friends
12 left join users on users.ident = friends.owner
13 where friends.friend = $user_id and users.user_type = 'person'");
16 <div
class="networktable">
21 if (sizeof ($result) > 0) {
22 foreach($result as $key => $info) {
24 if ($info->icon
!= -1) {
25 $icon = db_query("select filename from icons where ident = " . $info->icon
. " and owner = " . $info->ident
);
26 if (sizeof($icon) == 1) {
27 $icon = $icon[0]->filename
;
29 $icon = "default.png";
32 $icon = "default.png";
34 list($width, $height, $type, $attr) = getimagesize(path
. "_icons/data/" . $icon);
35 if (sizeof($parameter[1]) > 4) {
36 $width = round($width / 2);
37 $height = round($height / 2);
39 $friends_username = stripslashes($info->username
);
40 $friends_name = htmlentities(stripslashes($info->name
));
41 // $friends_menu = run("users:infobox:menu",array($info->ident));
45 <a href
="{$url}{$friends_username}/">
46 <img src
="{$url}_icons/data/{$icon}" width
="{$width}" height
="{$height}" alt
="{$friends_name}" border
="0" /></a
><br
/>
47 <span
class="userdetails">
59 $body .= "<td><p>". gettext("This community doesn't currently have any members.") . "</p></td>";