Файл: tankon.mobi/tanks/blacklist.php
Строк: 96
<?
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';
include_once '../sys/inc/thead.php';
title();
err();
aut();
echo '<link rel="stylesheet" href="style.css" type="text/css" />';
include_once 'function.php';
echo'<table><tr>
</td>
<td style="width:25%;padding-left:2px;">
<div style="position:relative;">
<a class="simple-but mb5 gray" w:id="selectUsa" href="friends"><span><span>Друзья</span></span></a>
</div>
</td><td style="width:25%;padding:0 2px;">
<div style="position:relative;">
<div class="simple-but mb5 blue" w:id="selectGermany"><span><span>ЧС</span></span></div>
</div>
</tr></table>
';
if(isset($_GET['friend']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id` = '".intval($_GET['friend'])."'"),0)!=0 && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_friends` WHERE `id_user` = '$user[id]' AND `id_ank` = '".intval($_GET['friend'])."'"),0)==0)
{
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_blacklist` WHERE `id_user` = '$user[id]' AND `id_ank` = '".intval($_GET['friend'])."'"),0)!=0)mysql_query("DELETE FROM `kolhoz_blacklist` WHERE `id_user` = '$user[id]' AND `id_ank` = '".intval($_GET['friend'])."'");
mysql_query("INSERT INTO `kolhoz_friends` SET `id_user` = '$user[id]', `id_ank` = '".intval($_GET['friend'])."'");
}
$q=mysql_query("SELECT * FROM `kolhoz_blacklist` WHERE `id_user` = '$user[id]'");
$spost= mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_blacklist` WHERE `id_user` = '".$user['id']."'"),0);
echo '<div class="trnt-block">
<div class="wrap1">
<div class="wrap2">
<div class="wrap3">
<div class="wrap4">
<div class="wrap5">
<div class="wrap6">
<div class="wrap7">
<div class="wrap8">
<div class="wrap-content"><div class="small white sh_b bold">';
echo'<table class="mb5 ">
<tbody>';
if ($spost==0)
{
echo "Список пуст...";
}
while($post=mysql_fetch_array($q))
{
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = '$post[id_ank]'"));
echo'<tr><td class="va_m w100 pl5 pt5">
<a href="/profile?id='.$ank['id'].'">
'.$ank['nick'].' '.online($ank['id']).'</a>
</td><td>';
echo'<div style="margin-right:10px"><a class="simple-but mb0 inbl" href="?blacklist&friend='.$ank['id'].'"><span><span>В друзья</span></span></a></div>';
echo'</tr>';
}
echo'</tbody></table>';
echo'</div></div>
</div>
</div>
</div>
</div>
</div>
</div></div></div></div>
</div>';
echo'</div><a class="simple-but gray " href="/"><span>
<span>Вернутся в ангар</span>
</span></a></div>';
include_once 'foots.php';
?>