get_largest_networks(FALSE, 5, 1, $sort_by);
if(sizeof($r)) {
foreach ( $r as $obj ) {
$links[] = array('picture'=>$obj->header_image,
'title'=>stripslashes($obj->name),
'network_id'=>$obj->network_id,
'network_url' => 'http://'.trim($obj->address).'.'.$domain_suffix.BASE_URL_REL.'/homepage.php',
'members'=>stripslashes($obj->members)
);
}
}
if(is_array($links) && sizeof($links)>0) {
$output .= "
";
foreach($links as $link) {
if (trim($link['picture'])!='') {
$img_path = $base_url."/files/".$link['picture'];
} else {
$img_path = $base_url."/images/default.jpg";
}
$gid = $link['group_id'];
$members = $link['members'];
$description = chop_string(stripslashes($link['description']), GROUP_TITLE_LENGTH);
$output .= "";
$output .= "

";
$output .= "
";
if ($link['members']!='') {
$output .= "
";
$output .= "$members members
";
}
if ($link['description']!='') {
$output .= "
";
$output .= "$description
";
}
$output .= "
";
}
}
else {
$output .= "";
$output .= "