<?
//Автор: Алексей & TeaM ICQ 95-95-466
//Скрипт: VKRUGUKENTOV.ru
//Копирование,продажа,перепродажа без согласия автора строго запрещена и будет караться плачевными последствиями
//Соблюдайте авторские права
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';


if (isset($user))$ank['id']=$user['id'];
if (isset($_GET['id']))$ank['id']=intval($_GET['id']);


if ($ank['id']==0)
{
$ank=get_user($ank['id']);
$set['title']=$ank['nick'].' - анкета '; // заголовок страницы
include_once 'sys/inc/thead.php';
//title();

echo "<div class='title'>";
echo "<img src='/style/logo.png' alt='' />";
echo "</div>\n";

include_once 'sys/inc/tfoot.php';
exit;
}

$ank=get_user($ank['id']);
if(!$ank){header("Location: /index.php?".SID);exit;}








$ank['rating']=intval(@mysql_result(mysql_query("SELECT SUM(`rating`) FROM `user_voice2` WHERE `id_kont` = '$ank[id]'"),0));
$set['title']=$ank['nick'].' - страничка '; // заголовок страницы
include_once 'sys/inc/thead.php';
$show_all=true; // показ для всех
//title();
echo "<div class='title'>";
//echo "<img src='/style/logo.png' alt='' />";
echo "ВКругуКентов.ru";
echo "</div>\n";
if ((!isset($_SESSION['refer']) || $_SESSION['refer']==NULL)
&& isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER']!=NULL &&
!preg_match('#info\.php#',$_SERVER['HTTP_REFERER']))
$_SESSION['refer']=str_replace('&','&amp;',preg_replace('#^http://[^/]*/#','/', $_SERVER['HTTP_REFERER']));
/////////////Добавляем Рейтинг юзеру///////////////////
if (isset($user) && $user['id']!=$ank['id'] && $user['balls']>=0 && $user['rating']>=0 && mysql_result(mysql_query("SELECT COUNT(*) FROM `user_reiting` WHERE `id_user` = '$user[id]' AND `id_reiting` = '$ank[id]'"), 0)==0)
{
if (isset($_GET['reiting']) && $_GET['reiting']=='1'){
if($user['balls']<10){echo '<div class="msg"><font color="red">Оценка +1 стоит 10 монет у Вас нет столько монет!</font></div>';
}
else
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-10)."' WHERE `id` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `user` SET `reiting` = '".($ank['reiting']+1)."' WHERE `id` = '$ank[id]' LIMIT 1",$db);
mysql_query("INSERT INTO `user_reiting` (`id_user`, `id_reiting`) values('$user[id]', '$ank[id]')",$db);
$msg2="[url=/info.php?id=$user[id]/][b]$user[nick][/b][/url] поднял Вам рейтинг на [red]+1[/red]";
mysql_query("INSERT INTO `jurnal` (`id_user`, `id_kont`, `msg`, `time`) values('0', '$ank[id]', '$msg2', '$time')");
msg ('Успешно! Ваша оценка +1! (-10 монет)');$reit=mysql_fetch_assoc(mysql_query("SELECT * FROM `user` WHERE `id` = $user[id] LIMIT 1"));}
}

elseif(isset($_GET['reiting']) && $_GET['reiting']=='2'){
if($user['balls']<20){echo '<div class="msg"><font color="red">Оценка +2 стоит 20 монет у Вас нет столько монет!</font></div>';
}
else
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-20)."' WHERE `id` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `user` SET `reiting` = '".($ank['reiting']+2)."' WHERE `id` = '$ank[id]' LIMIT 1",$db);
mysql_query("INSERT INTO `user_reiting` (`id_user`, `id_reiting`) values('$user[id]', '$ank[id]')",$db);
$msg2="[url=/info.php?id=$user[id]/][b]$user[nick][/b][/url] поднял Вам рейтинг на [red]+2[/red]";
mysql_query("INSERT INTO `jurnal` (`id_user`, `id_kont`, `msg`, `time`) values('0', '$ank[id]', '$msg2', '$time')");
msg ('Успешно! Ваша оценка +2! (-20 монет)');$reit=mysql_fetch_assoc(mysql_query("SELECT * FROM `user` WHERE `id` = $user[id] LIMIT 1"));}
}

elseif(isset($_GET['reiting']) && $_GET['reiting']=='3'){
if($user['balls']<30){echo '<div class="msg"><font color="red">Оценка +3 стоит 30 монет у Вас нет столько монет!</font></div>';
}
else
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-30)."' WHERE `id` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `user` SET `reiting` = '".($ank['reiting']+3)."' WHERE `id` = '$ank[id]' LIMIT 1",$db);
mysql_query("INSERT INTO `user_reiting` (`id_user`, `id_reiting`) values('$user[id]', '$ank[id]')",$db);
$msg2="[url=/info.php?id=$user[id]/][b]$user[nick][/b][/url] поднял Вам рейтинг на [red]+3[/red]";
mysql_query("INSERT INTO `jurnal` (`id_user`, `id_kont`, `msg`, `time`) values('0', '$ank[id]', '$msg2', '$time')");
msg ('Успешно! Ваша оценка +3! (-30 монет)');$reit=mysql_fetch_assoc(mysql_query("SELECT * FROM `user` WHERE `id` = $user[id] LIMIT 1"));}
}

elseif(isset($_GET['reiting']) && $_GET['reiting']=='4'){
if($user['balls']<40){echo '<div class="msg"><font color="red">Оценка +4 стоит 40 монет у Вас нет столько монет!</font></div>';
}
else
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-40)."' WHERE `id` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `user` SET `reiting` = '".($ank['reiting']+4)."' WHERE `id` = '$ank[id]' LIMIT 1",$db);
mysql_query("INSERT INTO `user_reiting` (`id_user`, `id_reiting`) values('$user[id]', '$ank[id]')",$db);
$msg2="[url=/info.php?id=$user[id]/][b]$user[nick][/b][/url] поднял Вам рейтинг на [red]+4[/red]";
mysql_query("INSERT INTO `jurnal` (`id_user`, `id_kont`, `msg`, `time`) values('0', '$ank[id]', '$msg2', '$time')");
msg ('Успешно! Ваша оценка +4! (-40 монет)');$reit=mysql_fetch_assoc(mysql_query("SELECT * FROM `user` WHERE `id` = $user[id] LIMIT 1"));}
}

elseif(isset($_GET['reiting']) && $_GET['reiting']=='5'){
if($user['balls']<50){echo '<div class="msg"><font color="red">Оценка +5 стоит 50 монет у Вас нет столько монет!</font></div>';
}
else
{
mysql_query("UPDATE `user` SET `balls` = '".($user['balls']-50)."' WHERE `id` = '$user[id]' LIMIT 1");
mysql_query("UPDATE `user` SET `reiting` = '".($ank['reiting']+5)."' WHERE `id` = '$ank[id]' LIMIT 1",$db);
mysql_query("INSERT INTO `user_reiting` (`id_user`, `id_reiting`) values('$user[id]', '$ank[id]')",$db);
$msg2="[url=/info.php?id=$user[id]/][b]$user[nick][/b][/url] поднял Вам рейтинг на [red]+5[/red]";
mysql_query("INSERT INTO `jurnal` (`id_user`, `id_kont`, `msg`, `time`) values('0', '$ank[id]', '$msg2', '$time')");
msg ('Успешно! Ваша оценка +5! (-50 монет)');$reit=mysql_fetch_assoc(mysql_query("SELECT * FROM `user` WHERE `id` = $user[id] LIMIT 1"));}
}
}
/////////////Добавляем Рейтинг юзеру///////////////////
if (isset($_GET['frend']) && $_GET['frend']=='del')

{
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id` = '$ank[id]' LIMIT 1"),0)==0){header("Location: index.php?");exit;}
mysql_query("DELETE FROM `frends` WHERE `user` = '$user[id]' AND `frend` = '$ank[id]' LIMIT 1");
mysql_query("DELETE FROM `frends` WHERE `user` = '$ank[id]' AND `frend` = '$user[id]' LIMIT 1");
mysql_query("DELETE FROM `frends_new` WHERE `user` = '$ank[id]' AND `to` = '$user[id]' LIMIT 1");
mysql_query("DELETE FROM `frends_new` WHERE `user` = '$user[id]' AND `to` = '$ank[id]' LIMIT 1");
mysql_query("OPTIMIZE TABLE `frends`");
mysql_query("OPTIMIZE TABLE `frends_new`");
$msgno="К сожалению, пользователь [url=/info.php?id=$user[id]/][b]$user[nick][/b][/url] удалил вас из списка друзей!";
mysql_query("INSERT INTO `jurnal` (`id_user`, `id_kont`, `msg`, `time`) values('0', '$ank[id]', '$msgno', '$time')");
msg ('Пользователь успешно удален из списка ваших друзей');
}

if (isset($_GET['frend']) && $_GET['frend']=='add')
{
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id` = '$ank[id]' LIMIT 1"),0)==0){header("Location: index.php?".SID);exit;}
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `frends` WHERE (`user` = '$user[id]' AND `frend` = '$ank[id]') OR (`user` = '$ank[id]' AND `frend` = '$user[id]') LIMIT 1"),0)==1){header("Location: index.php?".SID);exit;}
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `frends_new` WHERE (`user` = '$user[id]' AND `to` = '$ank[id]') OR (`user` = '$ank[id]' AND `to` = '$user[id]') LIMIT 1"),0)==1){header("Location: index.php?".SID);exit;}
if ($ank['id']==$user['id']){header("Location: index.php?".SID);exit;}
mysql_query("INSERT INTO `frends_new` (`user`, `to`, `time`) values('$user[id]', '$ank[id]', '$time')");
mysql_query("OPTIMIZE TABLE `frends_new`");
msg ('Предложение дружбы успешно отправлено,после того как пользователь подтвердит что Вы друзья он будет добавлен в Ваш список!');
}

$d1sql = mysql_query("SELECT COUNT(*) FROM `frends_new` WHERE (`user` = '$user[id]' AND `to` = '$ank[id]') OR (`user` = '$ank[id]' AND `to` = '$user[id]') LIMIT 1");
$d2sql = mysql_query("SELECT COUNT(*) FROM `frends` WHERE (`user` = '$ank[id]' AND `frend` = '$user[id]') OR (`user` = '$user[id]' AND `frend` = '$ank[id]') LIMIT 1");

##############################################################
####################### НАЧАЛО Л.СТРАНИЦ #####################
##############################################################
echo "<div class='table'>\n";
if ($ank['group_access']>1)echo "<div class='p_t'><img src='/style/img/013.png' alt='' class='icon'/> <span style=\"color:$ank[mcolor]\">$ank[group_name]</span></div>\n";

//else
//echo "<span style=\"color:$ank[mcolor]\">Пользователь</span>\n";
echo "<table class='post'>\n";
echo "   <tr>\n";
echo "  <td class='icon48' rowspan='2'>\n";
avatar2($ank['id']);
echo "  </td>\n";
echo "  <td class='anput0'>\n";
echo "".online($ank['id'])."<span style=\"color:$ank[ncolor]\"> $ank[nick]</span> \n";
echo "(<span style=\"color:$ank[mcolor]\">$ank[reiting]%</span>)<br/>\n";

if ($ank['ank_city']!=NULL)echo " <font color='#424140'>$ank[ank_city]</font> \n";
else
echo " <font color='#8f8c85'>Город не указан</font> \n";
if ($ank['stran']==0)echo "\n";
if ($ank['stran']==1)echo "<font color='#424140'>(Россия)</font>\n";
if ($ank['stran']==2)echo "<font color='#424140'>(Украина)</font>\n";
if ($ank['stran']==3)echo "<font color='#424140'>(Белорусия)</font>\n";
if ($ank['stran']==4)echo "<font color='#424140'>(Азербайджан)</font>\n";
if ($ank['stran']==5)echo "<font color='#424140'>(Казахстан)</font>\n";
if ($ank['stran']==6)echo "<font color='#424140'>(Узбекистан)</font>\n";
if ($ank['stran']==7)echo "<font color='#424140'>(Англия)</font>\n";
if ($ank['stran']==8)echo "<font color='#424140'>(Германия)</font>\n";
echo "  <td>\n";
echo "  <td class='fs'>\n";
if (isset($user) && $user['id']!=$ank['id'])echo "<a href=\"/mail.php?id=$ank[id]\"><img src='/style/img/msg.png' alt='' class='icon'/></a><br />\n";
echo "  </td>\n";
echo "  </tr>\n";
echo "  <tr>\n";
echo "  <td class='p_mi'>\n";
echo "<font color='#827f7f'>".vremja($ank['date_last'])."</font>\n";
echo '</table>';
echo '<div class="hello">';
include_once 'dnev/incinfo.php';
echo '</div>';
include_once 'dnev/incinfokomm.php';
echo "<div class='userinfo'>\n";


echo "<div class='userline'></div>\n";

if (isset($user) && $user['id']==$ank['id'])
{
echo "<div class='userline'>\n";
echo "<img src='/style/info/online_fr.png' alt='' class='icon'/>\n";
echo '<a href="frendon.php?id='.$ank['id'].'"><font color="#686765"><b>Друзья на сайте</b></font></a>';
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `frends` INNER JOIN `user` ON `frends`.`frend`=`user`.`id` WHERE `frends`.`user` = '$ank[id]' AND `frends`.`i` = '1' AND `user`.`date_last`>'".(time()-900)."'"), 0);

echo ' '.( ($k_post==0) ? '0' : '<b>'.$k_post ).'</b><br/>';
echo "</div>\n";
}

include_once 'news/count.php';

if (isset($user) && $user['id']==$ank['id'])
{

$k_new=mysql_result(mysql_query("SELECT COUNT(`mail`.`id`) FROM `mail`
 LEFT JOIN `users_konts` ON `mail`.`id_user` = `users_konts`.`id_kont` AND `users_konts`.`id_user` = '$user[id]'
 WHERE `mail`.`id_kont` = '$user[id]' AND (`users_konts`.`type` IS NULL OR `users_konts`.`type` = 'common' OR `users_konts`.`type` = 'favorite') AND `mail`.`read` = '0'"),0);
$k_new_fav=mysql_result(mysql_query("SELECT COUNT(`mail`.`id`) FROM `mail`
 LEFT JOIN `users_konts` ON `mail`.`id_user` = `users_konts`.`id_kont` AND `users_konts`.`id_user` = '$user[id]'
 WHERE `mail`.`id_kont` = '$user[id]' AND (`users_konts`.`type` = 'favorite') AND `mail`.`read` = '0'"),0);

echo "<div class='userline'>\n";
if ($k_new_fav!=0)echo "<img src='/style/info/mail_info.png' alt='' class='icon'/> <b><a href='/new_mess.php'><font color='red'>Сообщени".($k_new_fav==1?'е':'я')." от избранных</font></a></b></font><br />\n";
else
if ($k_new!=0 && $k_new_fav==0)echo "<img src='/style/info/mail_info.png' alt='' class='icon'/> <a href='/new_mess.php'><font color='red'>Сообщения + $k_new</a></font> <br />\n";
else
echo "<img src='/style/info/mail_info.png' alt='' class='icon'/> <a href='/konts.php'><font color='#2d2d2d'>Сообщения</font></a>\n";
echo "</div>\n";
}
if (isset($user) && $user['id']==$ank['id'])
{

$nj=mysql_result(mysql_query("SELECT COUNT(*) FROM `jurnal` WHERE `id_kont` = '$user[id]' AND `read` = '0'"), 0);
if ($nj>0)echo "<div class='userline'><img src='/style/info/kol.png' alt='' /> <a href=\"/jurnal.php\" title=\"Jurnal\"><font color='red'>Оповещения + $nj</font></a></div>\n";
//else
//echo "<img src='/style/info/kol.png' alt='' /> <a href='/jurnal.php'><font color='#2d2d2d'>Оповещения</font></a>\n";

}

if (isset($user) && $user['id']==$ank['id'])
{
echo "<div class='userline'>\n";
$obsuzh = mysql_result(mysql_query("SELECT COUNT(*) FROM `obsuzh` WHERE `id_kont` = '$user[id]' AND `read` = '0' "),0);
if($obsuzh>0) echo "<img src='/style/info/obs.png' alt='' class='icon'/> <a href='/obsuzh.php'><font color='red'>Обсуждения + $obsuzh</font></a> ";
else
echo "<img src='/style/info/obs.png' alt='' class='icon'/> <a href='/obsuzh.php'><font color='#2d2d2d'>Обсуждения</font></a> ";
echo "</div>\n";
}
if (isset($user) && $user['id']==$ank['id'])
{
echo "<div class='userline'>\n";
$lenta = mysql_result(mysql_query("SELECT COUNT(*) FROM `lenta` WHERE `id_kont` = '$user[id]' AND `read` = '0' "),0);
if($lenta>0) echo "<img src='/style/info/lenta_info.png' alt='' class='icon'/> <a href='/lenta.php'><font color='red'>Лента + $lenta</font></a> ";
else
echo "<img src='/style/info/lenta_info.png' alt='' class='icon'/> <a href='/lenta.php'><font color='#2d2d2d'>Лента</font></a> ";
echo "</div>\n";
}
if (isset($user) && $user['id']==$ank['id'])
{

echo "<div class='userline'>\n";

$new_g=mysql_result(mysql_query("SELECT COUNT(*) FROM `myguests` WHERE `id_ank` = '$user[id]' AND `read`='1'"),0);
if($new_g!=0)echo "<img src='/style/info/gosti.png' alt='' /> <a href='/myguests.php'><font color='red'>Гости + $new_g</font></a> \n";
else
echo "<img src='/style/info/gosti.png' alt='' /> <a href='/myguests.php'><font color='#2d2d2d'>Гости</font></a> \n";

echo "  ";

$nj=mysql_result(mysql_query("SELECT COUNT(*) FROM `ocenka` WHERE `id_kont` = '$user[id]' AND `read` = '0'"), 0);
if ($nj>0)echo " <img src='/style/info/oc5.png' alt='' /> <a href=\"/ocenka.php\" title=\"оценки\"><font color='red'>Оценки + $nj</font></a> \n";
else
echo " <img src='/style/info/oc5.png' alt='' /> <a href=\"/ocenka.php\" title=\"оценки\"><font color='#2d2d2d'>Оценки</font></a> \n";
echo "</div>\n";
}
echo "<div class='userline'>\n";
$k_fr = mysql_result(mysql_query("SELECT COUNT(*) FROM `frends` WHERE `user` = '$ank[id]' AND `i` = '1'"), 0);
echo '<a href="frend.php?id='.$ank['id'].'"><font color="#2d2d2d">Друзья</font></a> <font color="#4d4c4c">'.$k_fr.'</font><br>';
echo "</div>\n";

echo "<div class='userline'>\n";
$dir = mysql_num_rows(mysql_query("SELECT * FROM `user_files_mod_papka` WHERE `kto_id` = '".$ank['id']."'"));
$files = mysql_num_rows(mysql_query("SELECT * FROM `user_files_mod_files` WHERE `kto_id` = '".$ank['id']."'"));
$files_t = mysql_num_rows(mysql_query("SELECT * FROM `user_files_mod_files` WHERE `kto_id` = '".$ank['id']."' and `time` > '".(time()-86400)."'"));
echo '<a href="/user/files/?id='.$ank['id'].'"><font color="#2d2d2d">Файлы</font></a> <font color="#4d4c4c">'.$files.'</font>';
if ($files_t>0){echo ' <font color="red">+'.$files_t.'</font>';}
echo "</div>\n";

echo "<div class='userline'>\n";
echo " <a href=\"/us_guest/index.php?id=$ank[id]\"><font color='#2d2d2d'>Гостевая</font></a> ";
$k_p_g=mysql_result(mysql_query("SELECT COUNT(*) FROM `us_guest` WHERE `id_user_adm` = $ank[id] ",$db), 0);
echo " <font color='#4d4c4c'>$k_p_g</font>";
echo "</div>\n";

echo "<div class='userline'>\n";
echo"<a href='/present/presentlist.php?user=$ank[id]'><font color='#2d2d2d'>Подарки</font></a> <font color='#4d4c4c'>".mysql_result(mysql_query("SELECT COUNT(*) FROM `present_give` WHERE `id_give` = '$ank[id]'"),0)."</font><br />\n";
echo "</div>\n";
echo "<div class='userline'>\n";

$foto = mysql_num_rows(mysql_query("SELECT `id` FROM `gallery` WHERE `id_user` = '$ank[id]'"));
echo "<a href='/foto/$ank[id]/'><font color='#2d2d2d'>Альбомы</font></a> <font color='#4d4c4c'>$foto</font><br/>";
echo "</div>\n";


echo "<div class='userline'>\n";
echo "<a href='umenu.php'><font color='#2d2d2d'>Меню настроек ></font></a>\n";
echo "</div>\n";

echo "<div class='userline'>\n";
echo "<a href='razdel.php'><font color='#2d2d2d'>Другие разделы ></font></a>\n";
echo "</div>\n";

echo "<div class='userline'>\n";
echo "<a href='/online.php'><font color='#2d2d2d'>Сейчас на сайте</font> \n";
$on1 = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `date_last` >".(time()-900).""), 0);
$on2= mysql_result(mysql_query("SELECT COUNT(*) FROM `guests` WHERE `date_last` > ".(time()-900)." AND `pereh` > '0'"), 0);
$on3 = $on1 + $on2;
echo " <font color='#2d2d2d'>$on3</font></a>\n";
echo "</div>\n";




if (isset($user) && $user['id']==$ank['id'])
{
include_once 'userssearch1.php';
}
##############################################################
####################### Конец данных #########################
##############################################################
echo "</div>\n";





echo "<div class='rekl'>\n";
include 'foto/inc/gallery_form1.php';

if (isset($user) && $user['id']!=$ank['id']) echo "<img src='/style/img/perevod.png' alt='' /> <a href='/perevod.php?id=" . $ank['id'] . "'><font color='black'>Перевести монет</font></a><br />\n";

if ( isset( $user ) && $user['id'] != $ank['id'] && mysql_result( $d1sql, 0 ) == 0 && mysql_result( $d2sql, 0 ) == 0 )
{
if (isset($user) && $user['id']!=$ank['id']) 
echo '<img src="style/img/addfr.png" alt="" class="icon"/> <a href="info.php?id='.$ank['id'].'&frend=add"><font color="black">Предложить дружбу</font></a><br>';
echo "</div>";
}
else
{
if (isset($user) && $user['id']!=$ank['id']) 
echo '<img src="style/img/delfr.png" alt="" class="icon"/> <a href="info.php?id='.$ank['id'].'&frend=del"><font color="black">Удалить из друзей</font></a><br>';
}

echo "</div>\n";
if ($user['level']>$ank['level']){

if ($ank['ip']!=NULL){
if (user_access('user_show_ip') && $ank['ip']!=0){
echo "<span class=\"ank_n\">IP:</span> <span class=\"ank_d\">".long2ip($ank['ip'])."</span>";
if (user_access('adm_ban_ip'))
echo " [<a href='/adm_panel/ban_ip.php?min=$ank[ip]'>Бан</a>]";
echo "<br />\n";
}
}

if ($ank['ip_cl']!=NULL){
if (user_access('user_show_ip') && $ank['ip_cl']!=0){
echo "<span class=\"ank_n\">IP (CLIENT):</span> <span class=\"ank_d\">".long2ip($ank['ip_cl'])."</span>";
if (user_access('adm_ban_ip'))
echo " [<a href='/adm_panel/ban_ip.php?min=$ank[ip_cl]'>Бан</a>]";
echo "<br />\n";
}
}

if ($ank['ip_xff']!=NULL){
if (user_access('user_show_ip') && $ank['ip_xff']!=0){
echo "<span class=\"ank_n\">IP (XFF):</span> <span class=\"ank_d\">".long2ip($ank['ip_xff'])."</span>";
if (user_access('adm_ban_ip'))
echo " [<a href='/adm_panel/ban_ip.php?min=$ank[ip_xff]'>Бан</a>]";
echo "<br />\n";
}
}

if (user_access('user_show_ua') && $ank['ua']!=NULL)
echo "<span class=\"ank_n\">UA:</span> <span class=\"ank_d\">$ank[ua]</span><br />\n";
if (user_access('user_show_ip') && opsos($ank['ip']))
echo "<span class=\"ank_n\">Пров:</span> <span class=\"ank_d\">".opsos($ank['ip'])."</span><br />\n";
if (user_access('user_show_ip') && opsos($ank['ip_cl']))
echo "<span class=\"ank_n\">Пров (CL):</span> <span class=\"ank_d\">".opsos($ank['ip_cl'])."</span><br />\n";
if (user_access('user_show_ip') && opsos($ank['ip_xff']))
echo "<span class=\"ank_n\">Пров (XFF):</span> <span class=\"ank_d\">".opsos($ank['ip_xff'])."</span><br />\n";
}

if (user_access('user_collisions') && $user['level']>$ank['level'])
{
$mass[0]=$ank['id'];
$collisions=user_collision($mass);


if (count($collisions)>1)
{
echo "<span class=\"ank_n\">Возможные ники:</span><br />\n";
echo "<span class=\"ank_d\">\n";

for ($i=1;$i<count($collisions);$i++)
{
$ank_coll=mysql_fetch_assoc(mysql_query("SELECT * FROM `user` WHERE `id` = '$collisions[$i]' LIMIT 1"));
echo "\"<a href='/info.php?id=$ank_coll[id]'>$ank_coll[nick]</a>\"<br />\n";
}

echo "</span>\n";
}
}
if (user_access('adm_ref') && ($ank['level']<$user['level'] || $user['id']==$ank['id']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `user_ref` WHERE `id_user` = '$ank[id]'"), 0))
{
$q=mysql_query("SELECT * FROM `user_ref` WHERE `id_user` = '$ank[id]' ORDER BY `time` DESC LIMIT $set[p_str]");
echo "Посещаемые сайты:<br />\n";
while ($url=mysql_fetch_assoc($q)) {
$site=htmlentities($url['url'], ENT_QUOTES, 'UTF-8');
echo "<a".($set['web']?" target='_blank'":null)." href='/go.php?go=".base64_encode("http://$site")."'>$site</a> (".vremja($url['time']).")<br />\n";
}
echo "<br />\n";
}

if ($user['level']>$ank['level']){

if (user_access('user_prof_edit'))
echo "&raquo;<a href='/adm_panel/user.php?id=$ank[id]'>Редактировать профиль</a><br />\n";

if ($user['id']!=$ank['id']){

if (user_access('user_ban_set') || user_access('user_ban_set_h') || user_access('user_ban_unset'))
echo "&raquo;<a href='/adm_panel/ban.php?id=$ank[id]'>Нарушения (бан)</a><br />\n";

if (user_access('user_delete'))
{

echo "&raquo;<a href='/adm_panel/delete_user.php?id=$ank[id]'>Удалить пользователя</a>";
if (count(user_collision($mass,1))>1)
echo " (<a href='/adm_panel/delete_user.php?id=$ank[id]&amp;all'>Все ники</a>)";
echo "<br />\n";

}
}
}

if (user_access('adm_log_read') && $ank['level']!=0 && ($ank['id']==$user['id'] || $ank['level']<$user['level']))
echo "&raquo;<a href='/adm_panel/adm_log.php?id=$ank[id]'>Отчет по администрированию</a><br />\n";

echo "</div>\n";

include_once 'sys/inc/gfoot.php';
//Автор: Алексей & TeaM ICQ 95-95-466
//Скрипт: VKRUGUKENTOV.ru
//Копирование,продажа,перепродажа без согласия автора строго запрещена и будет караться плачевными последствиями
//Соблюдайте авторские права
?>