瀏覽代碼

[svn r20432] FS#306 and FS#3958 - Improvements in encoding management for the Social network tool.

Ivan Tcholakov 16 年之前
父節點
當前提交
292bd7f526

+ 5 - 5
main/social/contacts.inc.php

@@ -11,7 +11,7 @@ $this_section = SECTION_MYPROFILE;
 $_SESSION['this_section']=$this_section;
 //$list_path_friends=array();
 $request=api_is_xml_http_request();
-$language_variable=($request===true) ? mb_convert_encoding(get_lang('Contacts'),'UTF-8',$charset) : get_lang('Contacts');
+$language_variable=($request===true) ? api_convert_encoding(get_lang('Contacts'),'UTF-8',$charset) : get_lang('Contacts');
 //api_display_tool_title($language_variable);
 
 $user_id=api_get_user_id();
@@ -27,7 +27,7 @@ $image_path = UserManager::get_user_picture_path_by_id ($user_id,'web',false,tru
         echo '  Dokeos  -  ';
         $user_id=api_get_user_id();
         $user_info=api_get_user_info($user_id);
-        echo $name_user=mb_convert_encoding($user_info['firstName'].' '.$user_info['lastName'],'UTF-8',$charset) ; 
+        echo $name_user=api_convert_encoding($user_info['firstName'].' '.$user_info['lastName'],'UTF-8',$charset) ; 
          ?></td>
         </tr>
     </table>
@@ -37,7 +37,7 @@ $image_path = UserManager::get_user_picture_path_by_id ($user_id,'web',false,tru
     <td height="25" valign="top">
     <table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-subtitle-search">
       <tr>
-        <td width="100%" height="25" valign="top" class="social-align-box">&nbsp;&nbsp;<?php echo mb_convert_encoding(get_lang('Search'),'UTF-8',$charset) .'&nbsp;&nbsp; : &nbsp;&nbsp;'; ?><input class="social-search-image" type="text" class="search-image" id="id_search_image" name="id_search_image" value="" onkeyup="search_image_social(this)" /></td>
+        <td width="100%" height="25" valign="top" class="social-align-box">&nbsp;&nbsp;<?php echo api_convert_encoding(get_lang('Search'),'UTF-8',$charset) .'&nbsp;&nbsp; : &nbsp;&nbsp;'; ?><input class="social-search-image" type="text" class="search-image" id="id_search_image" name="id_search_image" value="" onkeyup="search_image_social(this)" /></td>
       </tr>
     </table></td>
   </tr>
@@ -48,7 +48,7 @@ $image_path = UserManager::get_user_picture_path_by_id ($user_id,'web',false,tru
         <td width="100%" height="22" valign="top">
         <table width="100%" border="0" cellpadding="0" cellspacing="0" class="social-align-box">
           <tr>
-            <td width="100%" height="22" valign="top">&nbsp;&nbsp;<?php echo mb_convert_encoding(get_lang('ContactsList'),'UTF-8',$charset); ?></td>
+            <td width="100%" height="22" valign="top">&nbsp;&nbsp;<?php echo api_convert_encoding(get_lang('ContactsList'),'UTF-8',$charset); ?></td>
               </tr>
         </table></td>
         </tr>
@@ -65,4 +65,4 @@ echo '</div>';
     </table></td>
   </tr>
 </table>
-</div>
+</div>

+ 16 - 16
main/social/data_personal.inc.php

@@ -108,13 +108,13 @@ if (isset($_POST['load_ajax'])) {
 } else {
 	// normal behavior
 $request=api_is_xml_http_request();
-$language_variable=($request===true) ? mb_convert_encoding(get_lang('PersonalData'),'UTF-8',$charset) : get_lang('PersonalData');
+$language_variable=($request===true) ? api_convert_encoding(get_lang('PersonalData'),'UTF-8',$charset) : get_lang('PersonalData');
 //api_display_tool_title($language_variable);
 
 	echo '<div class="actions">';
-	echo '<a href="../auth/profile.php?show=1"">'.Display::return_icon('edit.gif',mb_convert_encoding(get_lang('EditInformation'),'UTF-8',$charset)).'&nbsp;'.mb_convert_encoding(get_lang('EditInformation'),'UTF-8',$charset).'</a>&nbsp;&nbsp;';
+	echo '<a href="../auth/profile.php?show=1"">'.Display::return_icon('edit.gif',api_convert_encoding(get_lang('EditInformation'),'UTF-8',$charset)).'&nbsp;'.api_convert_encoding(get_lang('EditInformation'),'UTF-8',$charset).'</a>&nbsp;&nbsp;';
 	if (api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true' && api_get_user_id()<>2 && api_get_user_id()<>0) {
-		echo '<a href="../social/profile.php?shared=true">'.Display::return_icon('shared_profile.png',mb_convert_encoding(get_lang('ViewSharedProfile'),'UTF-8',$charset)).'&nbsp;'.mb_convert_encoding(get_lang('ViewSharedProfile'),'UTF-8',$charset).'</a>';		
+		echo '<a href="../social/profile.php?shared=true">'.Display::return_icon('shared_profile.png',api_convert_encoding(get_lang('ViewSharedProfile'),'UTF-8',$charset)).'&nbsp;'.api_convert_encoding(get_lang('ViewSharedProfile'),'UTF-8',$charset).'</a>';		
 	}
 	echo '</div>';	
 	echo '<div id="profile_container" style="width:550px;display:block;">';
@@ -122,19 +122,19 @@ $language_variable=($request===true) ? mb_convert_encoding(get_lang('PersonalDat
 			echo '<img src='.$img_array['dir'].$img_array['file'].' />';
 		echo '</div>';	
 		echo '<div class="social-profile-info">';			
-			echo '<dt>'.mb_convert_encoding(get_lang('UserName'),'UTF-8',$charset).'</dt>
-			<dd>'. mb_convert_encoding($user_info['username'],'UTF-8',$charset).'	</dd>';
-			echo '<dt>'.mb_convert_encoding(get_lang('FirstName'),'UTF-8',$charset).'</dt>
-			<dd>'. mb_convert_encoding($user_info['firstname'],'UTF-8',$charset).'</dd>';
-			echo '<dt>'.mb_convert_encoding(get_lang('LastName'),'UTF-8',$charset).'</dt>
-			<dd>'. mb_convert_encoding($user_info['lastname'],'UTF-8',$charset).'</dd>';
-			echo '<dt>'.mb_convert_encoding(get_lang('OfficialCode'),'UTF-8',$charset).'</dt>	
-			<dd>'. mb_convert_encoding($user_info['official_code'],'UTF-8',$charset).'</dd>';
-			echo '<dt>'.mb_convert_encoding(get_lang('Email'),'UTF-8',$charset).'</dt>
-			<dd>'. mb_convert_encoding($user_info['email'],'UTF-8',$charset).'</dd>';
-			echo '<dt>'.mb_convert_encoding(get_lang('Phone'),'UTF-8',$charset).'</dt>
-			<dd>'. mb_convert_encoding($user_info['phone'],'UTF-8',$charset).'</dd>';			
+			echo '<dt>'.api_convert_encoding(get_lang('UserName'),'UTF-8',$charset).'</dt>
+			<dd>'. api_convert_encoding($user_info['username'],'UTF-8',$charset).'	</dd>';
+			echo '<dt>'.api_convert_encoding(get_lang('FirstName'),'UTF-8',$charset).'</dt>
+			<dd>'. api_convert_encoding($user_info['firstname'],'UTF-8',$charset).'</dd>';
+			echo '<dt>'.api_convert_encoding(get_lang('LastName'),'UTF-8',$charset).'</dt>
+			<dd>'. api_convert_encoding($user_info['lastname'],'UTF-8',$charset).'</dd>';
+			echo '<dt>'.api_convert_encoding(get_lang('OfficialCode'),'UTF-8',$charset).'</dt>	
+			<dd>'. api_convert_encoding($user_info['official_code'],'UTF-8',$charset).'</dd>';
+			echo '<dt>'.api_convert_encoding(get_lang('Email'),'UTF-8',$charset).'</dt>
+			<dd>'. api_convert_encoding($user_info['email'],'UTF-8',$charset).'</dd>';
+			echo '<dt>'.api_convert_encoding(get_lang('Phone'),'UTF-8',$charset).'</dt>
+			<dd>'. api_convert_encoding($user_info['phone'],'UTF-8',$charset).'</dd>';			
 		echo '</div>';
 	echo '</div>';	
 }
-?>
+?>

+ 4 - 4
main/social/group_contact.inc.php

@@ -12,7 +12,7 @@ $_SESSION['this_section']=$this_section;
 $list_path_friends=array();
 $list_groups=array();
 $request=api_is_xml_http_request();
-$language_variable=($request===true) ? mb_convert_encoding(get_lang('ContactsGroups'),'UTF-8',$charset) : get_lang('ContactsGroups');
+$language_variable=($request===true) ? api_convert_encoding(get_lang('ContactsGroups'),'UTF-8',$charset) : get_lang('ContactsGroups');
 //api_display_tool_title($language_variable);
 $user_id=api_get_user_id();
 $list_groups=UserFriend::show_list_type_friends();
@@ -58,7 +58,7 @@ for ($p=0;$p<count($list_groups);$p++) {
 		while ($j<$number_of_images) {
 			if ($list_friends_file[$j]<>"") {
 				$user_info=api_get_user_info($list_friends_id[$j]);				
-				$user_name=mb_convert_encoding($user_info['firstName'].' '.$user_info['lastName'],'UTF-8',$charset) ;
+				$user_name=api_convert_encoding($user_info['firstName'].' '.$user_info['lastName'],'UTF-8',$charset) ;
 				if($list_friends_file[$j]==='unknown.jpg') {
 					$big='';
 				} else {
@@ -73,7 +73,7 @@ for ($p=0;$p<count($list_groups);$p++) {
 	echo $friend_html; 
 		}  
 		else {
-			echo mb_convert_encoding(get_lang('YouDontHaveContactsInThisGroup'),'UTF-8',$charset);
+			echo api_convert_encoding(get_lang('YouDontHaveContactsInThisGroup'),'UTF-8',$charset);
 		}
 		?>
 		</div>
@@ -82,4 +82,4 @@ for ($p=0;$p<count($list_groups);$p++) {
 </table>
 <?php
 }
-?>
+?>

+ 19 - 19
main/social/index.php

@@ -46,7 +46,7 @@ function register_friend(element_input) {
 	 $.ajax({
 		contentType: "application/x-www-form-urlencoded",
 		beforeSend: function(objeto) {
-		$("#id_response").html("'.get_lang('Loading').'"); },
+		$("#id_response").html("'.get_lang('Loading', '').'"); },
 		type: "POST",
 		url: "../social/register_friend.php",
 		data: "friend_id="+user_friend_id,
@@ -64,7 +64,7 @@ function denied_friend (element_input) {
 	 $.ajax({
 		contentType: "application/x-www-form-urlencoded",
 		beforeSend: function(objeto) {
-		$("#id_response").html("'.get_lang('Loading').'"); },
+		$("#id_response").html("'.get_lang('Loading', '').'"); },
 		type: "POST",
 		url: "../social/register_friend.php",
 		data: "denied_friend_id="+friend_user_id,
@@ -77,7 +77,7 @@ function denied_friend (element_input) {
 function delete_friend (element_div) {
 	id_image=$(element_div).attr("id");
 	user_id=id_image.split("_");
-	if (confirm("'.get_lang('Delete').'")) {
+	if (confirm("'.get_lang('Delete', '').'")) {
 		 $.ajax({
 			contentType: "application/x-www-form-urlencoded",
 			beforeSend: function(objeto) {
@@ -109,14 +109,14 @@ function set_qualify_friend() {
 	user_id_friend = $("#user_cod_qualify").attr("value");
 	type_friend    = $("input[@name=list_type_friend]:checked").val();
 	if (user_id_friend==0) {
-		alert("'.get_lang('SelectOneContact').'");
+		alert("'.get_lang('SelectOneContact', '').'");
 		return false;
 	}
 	if (type_friend==null) {
-		alert("'.get_lang('SelectOneGroup').'");
+		alert("'.get_lang('SelectOneGroup', '').'");
 		return false;		
 	}	
-	if (confirm("'.get_lang('AttachContactsPersonal').' ?")) {
+	if (confirm("'.get_lang('AttachContactsPersonal', '').' ?")) {
 		 $.ajax({
 			contentType: "application/x-www-form-urlencoded",
 			beforeSend: function(objeto) {
@@ -137,8 +137,8 @@ function show_icon_delete(element_html) {
 	id_elem=elem_id.split("_");
 	ident="#img_"+id_elem[1];
 	$(ident).attr("src","../img/delete.gif");
-	$(ident).attr("alt","'.get_lang('Delete').'");
-	$(ident).attr("title","'.get_lang('Delete').'");
+	$(ident).attr("alt","'.get_lang('Delete', '').'");
+	$(ident).attr("title","'.get_lang('Delete', '').'");
 }
 function hide_icon_delete(element_html)  {
 	elem_id=$(element_html).attr("id");
@@ -153,7 +153,7 @@ function search_image_social(element_html)  {
 	 $.ajax({
 		contentType: "application/x-www-form-urlencoded",
 		beforeSend: function(objeto) {
-		$("#div_content_table").html("'.get_lang('Searching').'"); },
+		$("#div_content_table").html("'.get_lang('Searching', '').'"); },
 		type: "POST",
 		url: "../social/show_search_image.inc.php",
 		data: "search_name_q="+name_search,
@@ -197,21 +197,21 @@ function submit_form (path_submit) {
 	if (path_submit=="inbox") {
 		if (count_checkbox("inbox") > 0) {
 		   document.getElementById(\'form_send\').action="../social/index.php?inbox=true#remote-tab-2";		
-		   if (confirm("'.get_lang('ConfirmYourChoice').'")) {
+		   if (confirm("'.get_lang('ConfirmYourChoice', '').'")) {
 		   		$("#form_send").submit();
 		   }	
 		} else {
-			alert("'.get_lang('SelectTheCheckbox').'");
+			alert("'.get_lang('SelectTheCheckbox', '').'");
 		}
 
 	} else {
 		if (count_checkbox("outbox") > 0) {
 			document.getElementById(\'form_send_out\').action="../social/index.php?outbox=true#remote-tab-3";		
-		   if (confirm("'.get_lang('ConfirmYourChoice').'")) {			
+		   if (confirm("'.get_lang('ConfirmYourChoice', '').'")) {			
 				$("#form_send_out").submit();
 		   }
 		} else {
-			alert("'.get_lang('SelectedMoreOptions').'");
+			alert("'.get_lang('SelectedMoreOptions', '').'");
 		}			
 	}
 }
@@ -240,7 +240,7 @@ function get_action_url_and_show_messages (name_rs,name_id) {
 		 $.ajax({
 			contentType: "application/x-www-form-urlencoded",
 			beforeSend: function(objeto) {
-			$("#id_response").html("'.get_lang('Loading').'"); },
+			$("#id_response").html("'.get_lang('Loading', '').'"); },
 			type: "GET",
 			url: "../messages/view_message.php",
 			data: "rs="+name_rs+"&id="+name_id,
@@ -255,7 +255,7 @@ function close_div_show (my_div) {
 		 $.ajax({
 			contentType: "application/x-www-form-urlencoded",
 			beforeSend: function(objeto) {
-			$("#id_response").html("'.get_lang('Loading').'"); },
+			$("#id_response").html("'.get_lang('Loading', '').'"); },
 			type: "POST",
 			url: "../messages/inbox.php",
 			data:"",
@@ -271,7 +271,7 @@ function reply_to_messages (my_action,name_rs,name_id) {
 		 $.ajax({
 			contentType: "application/x-www-form-urlencoded",
 			beforeSend: function(objeto) {
-			$("#id_response").html("'.get_lang('Loading').'"); },
+			$("#id_response").html("'.get_lang('Loading', '').'"); },
 			type: "GET",
 			url: "../messages/new_message.php",
 			data:"re_id="+name_rs+"&id="+name_id,
@@ -288,7 +288,7 @@ function compose_and_show_message (my_action,name_rs) {
 			$.ajax({
 			contentType: "application/x-www-form-urlencoded",
 			beforeSend: function(objeto) {
-			$("#id_response").html("'.get_lang('Loading').'"); },
+			$("#id_response").html("'.get_lang('Loading', '').'"); },
 			type: "GET",
 			url: "../messages/new_message.php",
 			data:"rs="+name_rs,
@@ -360,7 +360,7 @@ function close_and_open_outbox() {
 		 $.ajax({
 			contentType: "application/x-www-form-urlencoded",
 			beforeSend: function(objeto) {
-			$("#id_response").html("'.get_lang('Loading').'"); },
+			$("#id_response").html("'.get_lang('Loading', '').'"); },
 			type: "POST",
 			url: "../messages/outbox.php",
 			data:"",
@@ -496,4 +496,4 @@ $form_url_send=isset($form_send_data_message) ? $form_send_data_message :'';
 </div>
 <?php
 Display :: display_footer();
-?>
+?>

+ 4 - 4
main/social/profile.php

@@ -98,7 +98,7 @@ function toogle_function (element_html, course_code){
 $htmlHeadXtra[] = '<script type="text/javascript">
 $(document).ready(function (){
 	$("input#id_btn_send_invitation").bind("click", function(){
-		if (confirm("'.get_lang('SendMessageInvitation').'")) {
+		if (confirm("'.get_lang('SendMessageInvitation', '').'")) {
 			$("#form_register_friend").submit();
 		}
 	}); 
@@ -126,7 +126,7 @@ function action_database_panel (option_id,myuser_id) {
 	}
 		my_txt_content=$("#txt_area_invite").val();
 	if (my_txt_content.length==0 || my_txt_subject.length==0) {
-		$("#display_response_id").html("&nbsp;&nbsp;&nbsp;'.get_lang('MessageInvitationNotSent').'");
+		$("#display_response_id").html("&nbsp;&nbsp;&nbsp;'.get_lang('MessageInvitationNotSent', '').'");
 		setTimeout("message_information_display()",3000);
 		return false;
 	}
@@ -158,7 +158,7 @@ function hide_display_message () {
 	}
 }	
 function register_friend(element_input) {
- if(confirm("'.get_lang('AddToFriends').'")) {
+ if(confirm("'.get_lang('AddToFriends', '').'")) {
 		name_button=$(element_input).attr("id");
 		name_div_id="id_"+name_button.substring(13);
 		user_id=name_div_id.split("_");
@@ -820,4 +820,4 @@ echo '</div>';
 echo '</div>'; //from the main
 echo '<form id="id_reload" action="#"></form>';
 Display :: display_footer();
-?>
+?>

+ 4 - 4
main/social/qualify_contact.inc.php

@@ -49,7 +49,7 @@ $user_friend_relation=UserFriend::get_relation_between_contacts(api_get_user_id(
 	   	 	<td width="50%"><br/>	   	 		
 	   	 		<img src="<?php echo $img_user[1]; ?>" />
 	   	 		<?php
-	   	 		echo '<br /><br />'.$name_user=mb_convert_encoding($user_info['firstName'].' '.$user_info['lastName'],'UTF-8',$charset) ; 
+	   	 		echo '<br /><br />'.$name_user=api_convert_encoding($user_info['firstName'].' '.$user_info['lastName'],'UTF-8',$charset) ; 
 	   	 		?>
 	   	 	</td>
 	   	 <td width="50%"><div align="left">
@@ -65,14 +65,14 @@ for ($k=0;$k<$number_list;$k++) {
 					    
 	<input <?php echo $check; ?> style="margin-left:50px" type="radio" class="radio" name="list_type_friend"  value="<?php echo $list_of_options[$k]['id']; ?>" />
 	<?php 
-	echo  mb_convert_encoding(get_lang($list_of_options[$k]['title']),'UTF-8',$charset); 
+	echo  api_convert_encoding(get_lang($list_of_options[$k]['title']),'UTF-8',$charset); 
 	echo '<br/>';
 	?>
 	<?php
 }
 echo '<br/>';
 ?>
-<input  style="margin-left:50px" type="button" value="<?php echo mb_convert_encoding(get_lang('AttachToGroup'),'UTF-8',$charset); ?>" onclick="set_qualify_friend()"/>
+<input  style="margin-left:50px" type="button" value="<?php echo api_convert_encoding(get_lang('AttachToGroup'),'UTF-8',$charset); ?>" onclick="set_qualify_friend()"/>
 			</div></td>
 			</td>
 		</tr>
@@ -80,4 +80,4 @@ echo '<br/>';
 
 </td>
 </tr>
-</table>
+</table>

+ 9 - 9
main/social/select_friend_response.php

@@ -8,8 +8,8 @@ $this_section = SECTION_MYPROFILE;
 $_SESSION['this_section']=$this_section;
 api_block_anonymous_users();
 $request=api_is_xml_http_request();
-$language_variable=($request===true) ? mb_convert_encoding(get_lang('PendingInvitations'),'UTF-8',$charset) : get_lang('PendingInvitations');
-$language_comment=($request===true) ? mb_convert_encoding(get_lang('SocialInvitesComment'),'UTF-8',$charset) : get_lang('SocialInvitesComment');
+$language_variable=($request===true) ? api_convert_encoding(get_lang('PendingInvitations'),'UTF-8',$charset) : get_lang('PendingInvitations');
+$language_comment=($request===true) ? api_convert_encoding(get_lang('SocialInvitesComment'),'UTF-8',$charset) : get_lang('SocialInvitesComment');
 //api_display_tool_title($language_variable);
 ?>
 <div id="id_response" align="center"></div>
@@ -21,7 +21,7 @@ $list_get_invitation=UserFriend::get_list_invitation_of_friends_by_user_id($user
 $list_get_path_web=UserFriend::get_list_web_path_user_invitation_by_user_id($user_id);
 $number_loop=count($list_get_invitation);
 if ($number_loop==0) {
-	Display::display_normal_message(mb_convert_encoding(get_lang('YouDontHaveInvites'),'UTF-8',$charset));
+	Display::display_normal_message(api_convert_encoding(get_lang('YouDontHaveInvites'),'UTF-8',$charset));
 	
 }
 for ($i=0;$i<$number_loop;$i++) {
@@ -32,7 +32,7 @@ for ($i=0;$i<$number_loop;$i++) {
     <td width="600" height="20" valign="top"><table width="100%" border="0"
 cellpadding="0" cellspacing="0" bgcolor="#9DACBF">
       <tr>
-        <td width="600" height="20" valign="top"><div align="left"><?php echo mb_convert_encoding(get_lang('RequestContact'),'UTF-8',$charset); ?></div></td>
+        <td width="600" height="20" valign="top"><div align="left"><?php echo api_convert_encoding(get_lang('RequestContact'),'UTF-8',$charset); ?></div></td>
         </tr>
     </table></td>
   </tr>
@@ -65,7 +65,7 @@ width="100%" border="0" cellpadding="0" cellspacing="0">
                                 <?php 
                                 $user_id=$list_get_invitation[$i]['user_sender_id'];
                                 $user_info=api_get_user_info($user_id);
-                                echo mb_convert_encoding($user_info['firstName'],'UTF-8',$charset) .' '.mb_convert_encoding($user_info['lastName'],'UTF-8',$charset);
+                                echo api_convert_encoding($user_info['firstName'],'UTF-8',$charset) .' '.api_convert_encoding($user_info['lastName'],'UTF-8',$charset);
                                 ?></td>
                                 </tr>
                             </table></td>
@@ -86,7 +86,7 @@ border="0" cellpadding="0" cellspacing="0">
                                 <td width="500" height="22" valign="top"><?php
                                 $title=get_lang($list_get_invitation[$i]['title']);
                                 $content=get_lang($list_get_invitation[$i]['content']);
-                                echo mb_convert_encoding($title,'UTF-8',$charset).' : '.mb_convert_encoding($content,'UTF-8',$charset);
+                                echo api_convert_encoding($title,'UTF-8',$charset).' : '.api_convert_encoding($content,'UTF-8',$charset);
                                 ?> </td>
                                 </tr>
                             </table></td>
@@ -106,8 +106,8 @@ border="0" cellpadding="0" cellspacing="0">
 cellpadding="0" cellspacing="0" bgcolor="#9DACBF">
               <tr>
                 <td width="600" height="25" valign="top"><div align="right">
-                  <input type="submit" name="btn_accepted" id="<?php echo "btn_accepted_".$user_id ?>" value="<?php echo mb_convert_encoding(get_lang('Accept'),'UTF-8',$charset); ?>" onclick="javascript:register_friend(this)"  />
-                  <input type="submit" name="btn_denied" id="<?php echo "btn_deniedst_".$user_id ?>" value="<?php echo mb_convert_encoding(get_lang('Deny'),'UTF-8',$charset); ?>" onclick="javascript:denied_friend(this)" />
+                  <input type="submit" name="btn_accepted" id="<?php echo "btn_accepted_".$user_id ?>" value="<?php echo api_convert_encoding(get_lang('Accept'),'UTF-8',$charset); ?>" onclick="javascript:register_friend(this)"  />
+                  <input type="submit" name="btn_denied" id="<?php echo "btn_deniedst_".$user_id ?>" value="<?php echo api_convert_encoding(get_lang('Deny'),'UTF-8',$charset); ?>" onclick="javascript:denied_friend(this)" />
                   </div></td>
                     </tr>
             </table></td>
@@ -123,4 +123,4 @@ cellpadding="0" cellspacing="0" bgcolor="#9DACBF">
 <br/>
 <?php
 }
-?>
+?>

+ 1 - 1
main/social/show_search_image.inc.php

@@ -63,7 +63,7 @@ if (count($list_path_friends)!=0) {
 		while ($j<$number_of_images) {
 			if ($list_friends_file[$j]<>"") {
 				$user_info=api_get_user_info($list_friends_id[$j]);
-				$user_name=mb_convert_encoding($user_info['firstName'].' '.$user_info['lastName'],'UTF-8',$charset) ;
+				$user_name=api_convert_encoding($user_info['firstName'].' '.$user_info['lastName'],'UTF-8',$charset) ;
 /*$friend_html.='&nbsp;<div onMouseover="show_icon_delete(this)" onMouseout="hide_icon_delete(this)" class="image-social-content" id=div_'.$list_friends_id[$j].' style="float:left" >
 <img src="'.$list_friends_dir[$j]."/".$list_friends_file[$j].'" width="90" height="110" style="margin-left:3px ;margin-rigth:3px;margin-top:10px;margin-bottom:3px;" id="imgfriend_'.$list_friends_id[$j].'" title="'.$user_name.'" onclick="qualify_friend(this)"/>
 <img onclick="delete_friend (this)" id=img_'.$list_friends_id[$j].' src="../img/blank.gif" alt="" title=""  class="image-delete" /></div>&nbsp;';	*/