function get_links()
 {
     // Loading the Searching data
     if ($this->sort_by == 'alphabetic') {
         $this->sort_by = 'login_name';
         $sorting_direction = 'ASC';
     } else {
         $this->sort_by = 'created';
         $sorting_direction = 'DESC';
     }
     global $network_info;
     $users = array();
     if ($this->search_data) {
         // load users on the basis of the search parameters.
         $users_count = User::user_search($this->search_data, $this->viewer_uid, $network_info->network_id);
         $this->Paging["count"] = $users_count['total_users'];
         $users = User::user_search($this->search_data, $this->viewer_uid, $network_info->network_id, FALSE, $this->Paging["show"], $this->Paging["page"], 'U.' . $this->sort_by, $sorting_direction);
     } else {
         $this->Paging["count"] = Network::get_network_members($network_info->network_id, array('cnt' => TRUE));
         $params = array('page' => $this->Paging["page"], 'show' => $this->Paging["show"], 'sort_by' => $this->sort_by, 'direction' => $sorting_direction);
         $users = Network::get_network_members($network_info->network_id, $params);
     }
     // echo "<pre>" . print_r($users,1) . "</pre>";
     $this->users_data = $users['users_data'];
 }
include "includes/page.php";
require "{$current_blockmodule_path}/MembersFacewallModule/MembersFacewallModule.php";
$uid = @$_GET['uid'];
$sort_by = $selected_option = @$_GET['sort_by'];
$sorting_options[] = array('caption' => __('Last Login'), 'value' => 'last_login');
$sorting_options[] = array('caption' => __('Latest Registered'), 'value' => 'latest_registered');
if (CURRENT_NETWORK_URL_PREFIX != 'www' && CURRENT_NETWORK_URL_PREFIX != '') {
    $network = new Network();
    $where = "address = '" . CURRENT_NETWORK_URL_PREFIX . "'";
    $netinfo = $network->get(NULL, $where);
    $params = array('page' => 1, 'show' => 5);
    if ($sort_by == 'last_login') {
        $a = array('sort_by' => 'U.last_login');
        $params = array_merge($params, $a);
    }
    $users = Network::get_network_members($netinfo[0]->network_id, $params);
} else {
    if ($sort_by == 'last_login') {
        $users = User::allUsers(10, 'last_login', 5);
    } else {
        if ($sort_by == 'latest_registered') {
            $users = User::allUsers(10, 'latest', 5);
        }
    }
    for ($i = 0; $i < count($users['users_data']); $i++) {
        $count_relations = Relation::get_relations($users['users_data'][$i]['user_id']);
        $users['users_data'][$i]['no_of_relations'] = count($count_relations);
    }
}
$obj = new MembersFacewallModule();
$obj->mode = $obj->sort_by = SORT_BY;
 function get_links()
 {
     // Loading the Searching data
     if ($this->sort_by == 'alphabetic') {
         $this->sort_by = 'login_name';
         $sorting_direction = 'ASC';
     } else {
         $this->sort_by = 'created';
         $sorting_direction = 'DESC';
     }
     $this->only_with_photo = !$this->no_photo_ok;
     $extra_condition = null;
     if ($this->only_with_photo) {
         $extra_condition = "U.picture IS NOT NULL";
     }
     $users = array();
     $this->users_data = array();
     if (empty($this->search_data)) {
         $this->search_data = @$this->search;
     }
     if ($this->search_data) {
         // load users on the basis of the search parameters.
         if ($this->only_with_photo) {
             $users_count = User::user_search($this->search_data, $this->viewer_uid, PA::$network_info->network_id, TRUE, 'ALL', 0, 'U.' . $this->sort_by, 'DESC', $extra_condition);
             $this->Paging["count"] = $users_count['total_users'];
             $users = User::user_search($this->search_data, $this->viewer_uid, PA::$network_info->network_id, FALSE, $this->Paging["show"], $this->Paging["page"], 'U.' . $this->sort_by, $sorting_direction, $extra_condition);
         } else {
             $users_count = User::user_search($this->search_data, $this->viewer_uid, PA::$network_info->network_id, FALSE);
             $this->Paging["count"] = $users_count['total_users'];
             $users = User::user_search($this->search_data, $this->viewer_uid, PA::$network_info->network_id, FALSE, $this->Paging["show"], $this->Paging["page"], 'U.' . $this->sort_by, $sorting_direction);
         }
     } else {
         if ($this->only_with_photo) {
             $this->Paging["count"] = Network::get_network_members(PA::$network_info->network_id, array('cnt' => TRUE, 'extra_condition' => $extra_condition));
             $params = array('page' => $this->Paging["page"], 'show' => $this->Paging["show"], 'sort_by' => $this->sort_by, 'direction' => $sorting_direction, 'extra_condition' => $extra_condition);
             $users = Network::get_network_members(PA::$network_info->network_id, $params);
         } else {
             $this->Paging["count"] = Network::get_network_members(PA::$network_info->network_id, array('cnt' => TRUE));
             $params = array('page' => $this->Paging["page"], 'show' => $this->Paging["show"], 'sort_by' => $this->sort_by, 'direction' => $sorting_direction);
             $users = Network::get_network_members(PA::$network_info->network_id, $params);
         }
     }
     $users_count = count(@$users['users_data']);
     if ($users_count) {
         $user_profiles = $this->get_profile_data($users['users_data']);
         for ($cnt = 0; $cnt < $users_count; $cnt++) {
             if (empty($users['users_data'][$cnt]['picture'])) {
                 $users['users_data'][$cnt]['picture'] = 'files/default.png';
                 $big_img = uihelper_resize_img($users['users_data'][$cnt]['picture'], 120, 120, NULL, "alt=\"" . $users['users_data'][$cnt]['login_name'] . "\"");
                 $users['users_data'][$cnt]['big_picture'] = $big_img['url'];
             } else {
                 $img = uihelper_resize_mk_user_img($users['users_data'][$cnt]['picture'], 80, 80, 'alt="PA"');
                 $big_img = uihelper_resize_img($users['users_data'][$cnt]['picture'], 120, 120, NULL, "alt=\"" . $users['users_data'][$cnt]['login_name'] . "\"");
                 $users['users_data'][$cnt]['big_picture'] = $big_img['url'];
                 preg_match("/src=\"([^']*?)\"/", $img, $match);
                 //preg_match to get the src of the image
                 $users['users_data'][$cnt]['picture'] = $match[1];
             }
             $users['users_data'][$cnt] = array_merge($users['users_data'][$cnt], $user_profiles[$cnt]);
         }
         $this->users_data = $users['users_data'];
     }
 }
 function get_links()
 {
     // Loading the Searching data
     if ($this->sort_by == 'alphabetic') {
         $this->sort_by = 'login_name';
         $sorting_direction = 'ASC';
     } else {
         $this->sort_by = 'display_name';
         $sorting_direction = 'ASC';
     }
     $this->only_with_photo = !$this->no_photo_ok;
     $extra_condition = null;
     if ($this->only_with_photo) {
         $extra_condition = "U.picture IS NOT NULL";
     }
     $users = array();
     $this->users_data = array();
     if (empty($this->search_data)) {
         $this->search_data = @$this->search;
     }
     if ($this->search_data) {
         // load users on the basis of the search parameters.
         if ($this->only_with_photo) {
             $users_count = User::user_search($this->search_data, $this->viewer_uid, PA::$network_info->network_id, TRUE, 'ALL', 0, 'U.' . $this->sort_by, 'DESC', $extra_condition);
             $this->Paging["count"] = $users_count['total_users'];
             $users = User::user_search($this->search_data, $this->viewer_uid, PA::$network_info->network_id, FALSE, $this->Paging["show"], $this->Paging["page"], 'U.' . $this->sort_by, $sorting_direction, $extra_condition);
         } else {
             $users_count = User::user_search($this->search_data, $this->viewer_uid, PA::$network_info->network_id, FALSE);
             $this->Paging["count"] = $users_count['total_users'];
             $users = User::user_search($this->search_data, $this->viewer_uid, PA::$network_info->network_id, FALSE, $this->Paging["show"], $this->Paging["page"], 'U.' . $this->sort_by, $sorting_direction);
         }
     } else {
         if ($this->only_with_photo) {
             $this->Paging["count"] = Network::get_network_members(PA::$network_info->network_id, array('cnt' => TRUE, 'extra_condition' => $extra_condition));
             $params = array('page' => $this->Paging["page"], 'show' => $this->Paging["show"], 'sort_by' => $this->sort_by, 'direction' => $sorting_direction, 'extra_condition' => $extra_condition);
             $users = Network::get_network_members(PA::$network_info->network_id, $params);
         } else {
             $this->Paging["count"] = Network::get_network_members(PA::$network_info->network_id, array('cnt' => TRUE));
             $params = array('page' => $this->Paging["page"], 'show' => $this->Paging["show"], 'sort_by' => $this->sort_by, 'direction' => $sorting_direction);
             $users = Network::get_network_members(PA::$network_info->network_id, $params);
         }
     }
     // Parag Jagdale - 10-17-10:	Modified to support new avatar image URL, width and height
     $users_count = count(@$users['users_data']);
     $users_to_show = array();
     if ($users_count) {
         $user_profiles = $this->get_profile_data($users['users_data']);
         for ($cnt = 0; $cnt < $users_count; $cnt++) {
             $userCreatedDate = $users['users_data'][$cnt]['created'];
             $userLoginDate = $users['users_data'][$cnt]['last_login'];
             if ($userCreatedDate != $userLoginDate) {
                 if (!isset($user_profiles[$cnt]['avatar']) || empty($user_profiles[$cnt]['avatar'])) {
                     $users['users_data'][$cnt]['avatar'] = PA::$url . '/files/default.png';
                     $big_img['url'] = PA::$url . '/files/default.png';
                     $users['users_data'][$cnt]['big_picture'] = $big_img['url'];
                 } else {
                     if (preg_match("|^http://|", $user_profiles[$cnt]['avatar'])) {
                         $users['users_data'][$cnt]['big_picture'] = $user_profiles[$cnt]['avatar'];
                         $users['users_data'][$cnt]['big_picture_width'] = $user_profiles[$cnt]['avatar_width'];
                         $users['users_data'][$cnt]['big_picture_height'] = $user_profiles[$cnt]['avatar_height'];
                     } else {
                         $amazon_full_url = get_full_amazon_s3_url($user_profiles[$cnt]['avatar']);
                         $users['users_data'][$cnt]['big_picture'] = $amazon_full_url;
                     }
                 }
                 $users_to_show['users_data'][$cnt] = array_merge($user_profiles[$cnt], $users['users_data'][$cnt]);
             }
         }
         $this->users_data = $users_to_show['users_data'];
     }
 }
 <? if(!empty($network_info->inner_logo_image)) { ?>
<div style="width:160px; height:110px; float:left;"><img src="<?=$base_url?>/files/<?=$network_info->inner_logo_image?>" width=160px; height= 100px;></div>
<? } ?>
<div id="mainnav">
    <ul>
      <li><a href="<?=$base_url;?>/homepage.php" class='static'>Home</a></li>
      <li><a href="http://broadbandmechanics.com/who.html" class='static'>About</a></li>
      <li><a href="mailto:marc@broadbandmechanics.com" class='static'>Contact</a></li>
    </ul>
 </div>
</div>
<div class="maincontent">
<div style="width:650px; float:left;">
<?php 
  $net_var = new Network;
 	$mem = $net_var->get_network_members($network_info->network_id);
  
?>
<div class="fleft width-100">
	<span class="fleft"><h1><?php echo stripslashes($network_info->name); ?></h1></span>
 <span class="fleft" style="width:450px;margin-top:23px; margin-left:10px;"><a href="http://<? echo $network_info->address .'.' . PA::$domain_suffix.BASE_URL_REL;?>/view_all_members.php">( <?php echo $mem['total_users'].' Members'; ?> )</a></span>
	</div>
<div class="fleft">
	<span class="fleft" style="width:450px; margin-left:15px;margin-top:2px;"><?php echo $network_info->description; ?></span>
</div>
</div>

<div style="width:160px; height:160px; float:left;margin-top:23px;"><img src="<?=$base_url?>/files/<?=$network_info->header_image?>" width=160px; height= 160px;></div>

</div>
<div class="static_footer fleft" style="width:100%;">