Файл: inc/user/blacklist.php
Строк: 55
<?
$title='Черный список';
include_once '../system/config.php';
echo"<div class='rzd2'></div><div class='menuin2'>";
?>
<div class="title">Чёрный список
</div>
<div class="content">
<div class="div">
<ul>
<?
if(isset($_GET['friend']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `id` = '".intval($_GET['friend'])."'"),0)!=0 && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_friends` WHERE `id_user` = '$ku[id]' AND `id_ank` = '".intval($_GET['friend'])."'"),0)==0)
{
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_blacklist` WHERE `id_user` = '$ku[id]' AND `id_ank` = '".intval($_GET['friend'])."'"),0)!=0)mysql_query("DELETE FROM `kolhoz_blacklist` WHERE `id_user` = '$ku[id]' AND `id_ank` = '".intval($_GET['friend'])."'");
mysql_query("INSERT INTO `kolhoz_friends` SET `id_user` = '$ku[id]', `id_ank` = '".intval($_GET['friend'])."'");
}
$q=mysql_query("SELECT * FROM `kolhoz_blacklist` WHERE `id_user` = '$ku[id]'");
while($post=mysql_fetch_array($q))
{
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '$post[id_ank]'"));
echo "<li><span>";
echo on_k($ank['id']);
echo " <a class='' href='/user/$ank[id]'><span>".nc($ank['id'])."</span></a></span> <a href='/mail/history/$ank[id]'><img src='/img/icons/correspondence.png' alt='o'></a> <a href='/blacklist/friend/$ank[id]'><img src='/img/icons/favorite.png' alt='o'></a></li>";
}
echo '</ul>
<div>
</div>
<div class="pt">
<img src="/img/icons/favorite.png" alt=""> <a href="/friends">Друзья</a> <img src="/img/icons/ignore.png" alt=""> <span>Чёрный список</span>
</div>
<div>
</div>
</div>';
echo"</div></div><div class='rzd2'></div>";
include_once '../system/foot.php';
?>