Файл: ferma/inc/friends.php
Строк: 48
<div class="event">
<font color='F9EDA2'><g1><b>Друзья</b></g1>
</div>
<div class="content">
<div class="block">
<ul>
<?
if(isset($_GET['blacklist']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `id` = '".intval($_GET['blacklist'])."'"),0)!=0 && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_blacklist` WHERE `id_user` = '$ku[id]' AND `id_ank` = '".intval($_GET['blacklist'])."'"),0)==0)
{
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_friends` WHERE `id_user` = '$ku[id]' AND `id_ank` = '".intval($_GET['blacklist'])."'"),0)!=0)mysql_query("DELETE FROM `kolhoz_friends` WHERE `id_user` = '$ku[id]' AND `id_ank` = '".intval($_GET['blacklist'])."'");
mysql_query("INSERT INTO `kolhoz_blacklist` SET `id_user` = '$ku[id]', `id_ank` = '".intval($_GET['blacklist'])."'");
}
$q=mysql_query("SELECT * FROM `kolhoz_friends` 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><sup><img width='8'height='8'src='i/icons/experience.png' alt='o'><font color='black' size='0.1'>$ank[level]</font></sup>";
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 width='16' height='16' src='i/i/4.png' alt='o'></a> <a href='?friends&blacklist=$ank[id]'><img width='16' height='16' src='i/i/ignor.png' alt='o'></a></li>";
}
echo '</ul>
<div>
</div>
<div class="pt">
<img width="16" height="16" src="i/i/fr.png" alt=""> <span>Друзья</span> <img width="16" height="16" src="i/i/ignor.png" alt=""> <a href="?blacklist">Чёрный список</a>
</div>
<div>
</div>
</div>';
include_once 'inc/foot.php';
?>