<?php
if ($user['closed'] == 1) {
 if ($user['id'] != $user_id) {
  if (!functions::is_friend($user['id'])) {
   if ($rights < 6) {

   
   echo '<div class="list2">Ushbu foydalanuvchi o\'z anketasini berkitgan. uning ma\'lumotlarini faqat do\'stlari ko\'rishi mumkin</div>';
  // echo '<div class="list1">'.functions::image('add.gif').'&nbsp;';	
	echo '<div class="list1"><center>&nbsp;';	
	$fr_in = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_contact` WHERE `type`='2' AND `from_id`='$user_id' AND `user_id`='{$user['id']}'"), 0);
    $fr_out = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_contact` WHERE `type`='2' AND `user_id`='$user_id' AND `from_id`='{$user['id']}'"), 0);
if ($fr_in == 1) {
    $friend = '<div class="post_item" style="padding-top: 5px; padding-bottom: 5px; "> <a href="profile.php?act=friends&amp;do=ok&amp;id=' . $user['id'] . '" class="ssilka" style="display: block; max-width: 200px;">Do\'stlikni qabul qilish</a> | <a class="underline" href="profile.php?act=friends&amp;do=no&amp;id=' . $user['id'] . '">Rad etish</a></div>';
    } else if ($fr_out == 1) {
    $friend = '<div class="post_item" style="padding-top: 5px; padding-bottom: 5px; "> <a href="profile.php?act=friends&amp;do=cancel&amp;id=' . $user['id'] . '" class="ssilka" style="display: block; max-width: 200px;">Do\'stlik taklifini bekor qilish</a></div>';
    } else {
    $friend = '<div class="post_item" style="padding-top: 5px; padding-bottom: 5px; "> <a href="profile.php?act=friends&amp;do=add&amp;id=' . $user['id'] . '" class="ssilka" style="display: block; max-width: 200px;">Do‘stlashish</a></div>';
    }
   echo $friend;	
   
	if (functions::is_contact($user['id']) != 2) {
   echo '<div class="post_item" style="padding-top: 5px; padding-bottom: 5px; ">&#160;<a href="../mail/index.php?act=ignor&amp;id=' . $user['id'] . '&amp;add" class="ssilka2" style="display: block; max-width: 200px;">Qora ro\'yxatga qo\'shish</a></center></div>';
    } else {
   echo '<div class="post_item" style="padding-top: 5px; padding-bottom: 5px; ">&#160;<a href="../mail/index.php?act=ignor&amp;id=' . $user['id'] . '&amp;del" class="ssilka" style="display: block; max-width: 200px;">Qora ro\'yxatdan olish</a></div>';
    }
	
	require('../incfiles/end.php');
	exit();
   }
  }
 }
} 
?>
