|
@@ -23,7 +23,6 @@ $htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jqu
|
|
|
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/thickbox.js" type="text/javascript" language="javascript"></script>';
|
|
|
$htmlHeadXtra[] = '<script type="text/javascript">
|
|
|
|
|
|
-
|
|
|
function delete_friend (element_div) {
|
|
|
id_image=$(element_div).attr("id");
|
|
|
user_id=id_image.split("_");
|
|
@@ -98,83 +97,92 @@ echo '<div id="social-content">';
|
|
|
$language_variable = api_xml_http_response_encode(get_lang('Contacts'));
|
|
|
$user_id = api_get_user_id();
|
|
|
|
|
|
-?>
|
|
|
-<div align="center" >
|
|
|
-<table width="100%" border="0" cellpadding="0" cellspacing="0" >
|
|
|
- <tr>
|
|
|
- <td height="25" valign="top">
|
|
|
- <table width="100%" border="0" cellpadding="0" cellspacing="0" >
|
|
|
- <tr>
|
|
|
- <td width="100%" valign="top" class="social-align-box"> <?php echo get_lang('Search') .' : '; ?>
|
|
|
- <input class="social-search-image" type="text" id="id_search_image" name="id_search_image" value="" onkeyup="search_image_social(this)" />
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </table></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td height="175" valign="top">
|
|
|
- <table width="100%" border="0" cellpadding="0" cellspacing="0" >
|
|
|
- <tr>
|
|
|
- <td height="153" valign="top">
|
|
|
- <?php
|
|
|
- echo '<div class="social-box-container2">';
|
|
|
- echo '<div>'.Display::return_icon('content-post-group1.jpg').'</div>';
|
|
|
- echo '<div id="div_content_table" class="social-box-content2">';
|
|
|
-
|
|
|
- $list_path_friends = array();
|
|
|
- $user_id = api_get_user_id();
|
|
|
- $name_search= Security::remove_XSS($_POST['search_name_q']);
|
|
|
- $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);
|
|
|
- }
|
|
|
-
|
|
|
- $friend_html = '';
|
|
|
- $number_of_images = 8;
|
|
|
+$list_path_friends = array();
|
|
|
+$user_id = api_get_user_id();
|
|
|
+$name_search= Security::remove_XSS($_POST['search_name_q']);
|
|
|
+$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').'<br /><br />';
|
|
|
+ echo '<a href="search.php">'.get_lang('TryAndFindSomeFriends').'</a>';
|
|
|
+} else {
|
|
|
+
|
|
|
+ ?>
|
|
|
+ <div align="center" >
|
|
|
+ <table width="100%" border="0" cellpadding="0" cellspacing="0" >
|
|
|
+ <tr>
|
|
|
+ <td height="25" valign="top">
|
|
|
+ <table width="100%" border="0" cellpadding="0" cellspacing="0" >
|
|
|
+ <tr>
|
|
|
+ <td width="100%" valign="top" class="social-align-box"> <?php echo get_lang('Search') .' : '; ?>
|
|
|
+ <input class="social-search-image" type="text" id="id_search_image" name="id_search_image" value="" onkeyup="search_image_social(this)" />
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td height="175" valign="top">
|
|
|
+ <table width="100%" border="0" cellpadding="0" cellspacing="0" >
|
|
|
+ <tr>
|
|
|
+ <td height="153" valign="top">
|
|
|
+ <?php
|
|
|
+ echo '<div class="social-box-container2">';
|
|
|
+ echo '<div>'.Display::return_icon('content-post-group1.jpg').'</div>';
|
|
|
+ echo '<div id="div_content_table" class="social-box-content2">';
|
|
|
|
|
|
- $number_friends = count($friends);
|
|
|
- if ($number_friends != 0) {
|
|
|
- $number_loop = ($number_friends/$number_of_images);
|
|
|
- $loop_friends = ceil($number_loop);
|
|
|
- $j=0;
|
|
|
- $friend_html.= '<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="" >';
|
|
|
- for ($k=0;$k<$loop_friends;$k++) {
|
|
|
- $friend_html.='<tr><td valign="top">';
|
|
|
- if ($j==$number_of_images) {
|
|
|
- $number_of_images=$number_of_images*2;
|
|
|
- }
|
|
|
- while ($j<$number_of_images) {
|
|
|
- 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.='<div onMouseover="show_icon_delete(this)" onMouseout="hide_icon_delete(this)" class="image-social-content" id=div_'.$friends[$j]['friend_user_id'].'>';
|
|
|
- $friend_html.='<span><a href="profile.php?u='.$friend['friend_user_id'].'"><center><img src="'.$friends_profile['file'].'" style="width:60px;height:60px;border:3pt solid #eee" id="imgfriend_'.$friend['friend_user_id'].'" title="'.$user_name.'" /></center></a></span>';
|
|
|
- $friend_html.='<img onclick="delete_friend (this)" id=img_'.$friend['friend_user_id'].' src="../img/blank.gif" alt="" title="" class="image-delete" /> <center class="friend">'.$user_name.'</center></div>';
|
|
|
+
|
|
|
+
|
|
|
+ $friend_html = '';
|
|
|
+ $number_of_images = 8;
|
|
|
+
|
|
|
+ $number_friends = count($friends);
|
|
|
+ if ($number_friends != 0) {
|
|
|
+ $number_loop = ($number_friends/$number_of_images);
|
|
|
+ $loop_friends = ceil($number_loop);
|
|
|
+ $j=0;
|
|
|
+ $friend_html.= '<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="" >';
|
|
|
+ for ($k=0;$k<$loop_friends;$k++) {
|
|
|
+ $friend_html.='<tr><td valign="top">';
|
|
|
+ if ($j==$number_of_images) {
|
|
|
+ $number_of_images=$number_of_images*2;
|
|
|
+ }
|
|
|
+ while ($j<$number_of_images) {
|
|
|
+ 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.='<div onMouseover="show_icon_delete(this)" onMouseout="hide_icon_delete(this)" class="image-social-content" id=div_'.$friends[$j]['friend_user_id'].'>';
|
|
|
+ $friend_html.='<span><a href="profile.php?u='.$friend['friend_user_id'].'"><center><img src="'.$friends_profile['file'].'" style="width:60px;height:60px;border:3pt solid #eee" id="imgfriend_'.$friend['friend_user_id'].'" title="'.$user_name.'" /></center></a></span>';
|
|
|
+ $friend_html.='<img onclick="delete_friend (this)" id=img_'.$friend['friend_user_id'].' src="../img/blank.gif" alt="" title="" class="image-delete" /> <center class="friend">'.$user_name.'</center></div>';
|
|
|
+ }
|
|
|
+ $j++;
|
|
|
}
|
|
|
- $j++;
|
|
|
+ $friend_html.='</td></tr>';
|
|
|
}
|
|
|
- $friend_html.='</td></tr>';
|
|
|
+ $friend_html.='<br/></table>';
|
|
|
}
|
|
|
- $friend_html.='<br/></table>';
|
|
|
- }
|
|
|
- echo $friend_html;
|
|
|
- echo '</div>';
|
|
|
- echo '</div>';
|
|
|
- ?>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </table></td>
|
|
|
- </tr>
|
|
|
-</table>
|
|
|
-</div>
|
|
|
-<?php
|
|
|
+ echo $friend_html;
|
|
|
+ echo '</div>';
|
|
|
+ echo '</div>';
|
|
|
+ ?>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table></td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ <?php
|
|
|
|
|
|
- echo '</div>';
|
|
|
-
|
|
|
-echo '</div>';
|
|
|
+ }
|
|
|
+ echo '</div>';
|
|
|
+ echo '</div>';
|
|
|
+
|
|
|
Display :: display_footer();
|
|
|
?>
|