echo $sql_exist='SELECT COUNT(*) AS count FROM '.$tbl_message.' WHERE user_sender_id='.($user_id).' AND user_receiver_id='.($friend_id).' AND msg_status IN(5,6,7);';
$sql_exist='SELECT COUNT(*) AS count FROM '.$tbl_message.' WHERE user_sender_id='.($user_id).' AND user_receiver_id='.($friend_id).' AND msg_status IN(5,6,7);';
$sql='UPDATE '.$tbl_message.' SET msg_status='.MESSAGE_STATUS_INVITATION_ACCEPTED.' WHERE user_sender_id='.((int)$user_send_id).' AND user_receiver_id='.((int)$user_receiver_id).';';
echo $sql='UPDATE '.$tbl_message.' SET msg_status='.MESSAGE_STATUS_INVITATION_ACCEPTED.' WHERE user_sender_id='.((int)$user_send_id).' AND user_receiver_id='.((int)$user_receiver_id).';';
Database::query($sql,__FILE__,__LINE__);
}
/**
@ -388,6 +392,8 @@ class SocialManager extends UserManager {
* @return string message invitation
*/
public static function send_invitation_friend_user ($userfriend_id,$subject_message='',$content_message='') {
global $charset;
//$id_user_friend=array();
$user_info = array();
$user_info = api_get_user_info($userfriend_id);
@ -407,10 +413,11 @@ class SocialManager extends UserManager {