*/
/**
* Initialization
*/
$language_file = array('userInfo');
$cidReset=true;
require_once '../inc/global.inc.php';
require_once api_get_path(CONFIGURATION_PATH).'profile.conf.php';
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
require_once api_get_path(LIBRARY_PATH).'fileUpload.lib.php';
api_block_anonymous_users();
if (api_get_setting('allow_social_tool') !='true') {
api_not_allowed();
}
$this_section = SECTION_SOCIAL;
$htmlHeadXtra[] = '';
$interbreadcrumb[]= array ('url' =>'profile.php','name' => get_lang('Social'));
$interbreadcrumb[]= array ('url' =>'#','name' => get_lang('Friends'));
Display :: display_header($tool_name, 'Groups');
echo '
';
echo '
';
//this include the social menu div
SocialManager::show_social_menu('friends');
echo '
';
echo '
';
$language_variable = api_xml_http_response_encode(get_lang('Contacts'));
$user_id = api_get_user_id();
$list_path_friends = array();
$user_id = api_get_user_id();
$name_search = isset($_POST['search_name_q']) ? $_POST['search_name_q']: null;
$number_friends = 0;
if (isset($name_search) && $name_search!='undefined') {
$friends = SocialManager::get_friends($user_id,null,$name_search);
} else {
$friends = SocialManager::get_friends($user_id);
}
if (count($friends) == 0 ) {
echo get_lang('NoFriendsInYourContactList').'
';
echo '
'.get_lang('TryAndFindSomeFriends').'';
} else {
?>
|
';
//echo '';
$friend_html.= ' ';
for ($k=0;$k<$number_friends;$k++) {
$friend_html.='';
while ($j<$number_friends) {
if (isset($friends[$j])) {
$friend = $friends[$j];
$user_name = api_xml_http_response_encode($friend['firstName'].' '.$friend['lastName']);
$friends_profile = SocialManager::get_picture_user($friend['friend_user_id'], $friend['image'], 92);
$friend_html.='';
$friend_html.='  ';
$friend_html.=' '.$user_name.' ';
}
$j++;
}
$friend_html.=' | ';
}
$friend_html.='
';
echo $friend_html;
echo ' ';
?>
|
|
';
echo '
';
Display :: display_footer();
'; echo ''.get_lang('TryAndFindSomeFriends').''; } else { ?>