Файл: id.php
Строк: 388
<?
require_once ("core/cuctema/core.php");
if (isset($user))$ank['id']=$user['id'];
if (isset($_GET['id']))$ank['id']=intval($_GET['id']);
if ($ank['id']==0)
{
require_once ("core/cuctema/head.php");
aut();
echo '<div class="hide">Такого тут нет. Досвидания</div>';
require_once ("core/cuctema/foot.php");
exit;
}
$ank=get_user($ank['id']);
if(!$ank){
require_once ("core/cuctema/head.php");
aut();
echo '<div class="hide">Такого пользователя не существует!</div>';
require_once ("core/cuctema/foot.php");
exit;
exit;
}
$set['title']=$ank['nick'].' - анкета '; // заголовок страницы
require_once ("core/cuctema/head.php");
aut();
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('&','&',preg_replace('#^http://[^/]*/#','/', $_SERVER['HTTP_REFERER']));
if(isset($user) && $user['id']!=$ank['id'])
{
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `myguests` WHERE `id_ank` = '$ank[id]' AND `id_user`='$user[id]' LIMIT 5"),0)==0)
{
mysql_query("INSERT INTO `myguests` (`id_ank`, `id_user`, `time`) VALUES ('$ank[id]', '$user[id]', '$time')");
}
else
{
$guest=mysql_fetch_array(mysql_query("SELECT * FROM `myguests` WHERE `id_ank` = '$ank[id]' AND `id_user`='$user[id]' LIMIT 5"));
mysql_query("UPDATE `myguests` SET `count` = '".($guest['count']+1)."', `time`='$time' WHERE `id` = '$guest[id]' LIMIT 5");
}
}
if($ank['locked']==1){
if($ank['locked_reason']==1)$reason="У меня есть другой аккаунт на сайте";
elseif($ank['locked_reason']==2)$reason="Сайт слишком сложный. Не понимаю тут ничего";
elseif($ank['locked_reason']==3)$reason="На сайте скучно";
elseif($ank['locked_reason']==4)$reason="На сайте слишком строгие правила";
elseif($ank['locked_reason']==5)$reason="Модераторы несправедливые";
elseif($ank['locked_reason']==6)$reason="У меня тут мало друзей. Не с кем общаться.";
elseif($ank['locked_reason']==7)$reason="Рейтингоманы надоели";
elseif($ank['locked_reason']==8)$reason="Это временно. Я еще вернусь.";
elseif($ank['locked_reason']==9)$reason="Я провожу на сайте слишком много времени";
else $reason="Прочее";
echo "<div class='d2'>n
Пользователь <b>".$ank['nick']."</b> закрыл свою страничку!<br/>n
Причина: ".$reason."<br/>n
</div><div class='d1'>n
Комментарий: ".output_text($ank['locked_msg'])."<br/>n
</div>n";
require_once ("core/cuctema/foot.php");
exit;
}
if(isset($_GET['atreader']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `readers` WHERE `user` = '$ank[id]' AND `reader` = '$user[id]'"),0)==0)
{
if(isset($_GET['ract']))
{
mysql_query("INSERT INTO `readers` (`user`, `reader`, `time`, `i`) values('$ank[id]', '$user[id]', '$time', '1')");
msg("Вы успешно подписались на обновления $ank[nick]");
}
else
{
echo "<div class='main123 line_175'>";
echo "Вы действительно хотите подписаться на обновления <b>$ank[nick]</b> ? <br/>";
echo "<a href='/mysite/?name=$ank[nick]&atreader=1&ract=ok'>Да</a> n";
echo " <a href='/mysite/?name=$ank[nick]'>Нет</a><br/>n";
echo "</div>";
require_once ("core/cuctema/foot.php");
}
}
if (isset($user) && $ank['nam']==1){
echo"<div class='d1'>";
echo "<a href='/id".$ank['id']."'> ".$ank['name_ank'].".".$ank['famil']." </a> ". online($ank['id'])." ";
echo "</a> ".wap_web($ank['id'])."";
echo "<div>";
}
else if (isset($user) && $ank['nam']==2){
echo"<div class='d1'>";
echo "<a href='/id".$ank['id']."'>". online($ank['id'])." ";
echo GradientText("".$ank['nick']."", "".$ank['ncolor']."", "".$ank['ncolor2']."");
echo "</a> ".wap_web($ank['id'])."";
echo "</div>";
}
if ($ank['block_forever']==1){
echo "<div class='main123 line_175'>";
avatar($ank['id'],1,1);
echo "</div>";
echo "<div class='err'> Этoт aкayнт зaблoкиpoвaн зa нapyшeниe <a href='/pages/rules/?link_id=".$user['id']."'> пpaвил </a> cepвиca!</br />";
echo "Пpичинa: ".esc(stripcslashes(htmlspecialchars($ank['block_forever_p'])))."</div>";
if ($user['group_access']>=7){
echo "<div class='back123 line_175'><a href='/pages/blockforever/?r=block/link_id=".$user['id']."&bsort=2&id=$ank[id]'>Pазблoкиpoвaть</a><br/></div>";
}
require_once ("core/cuctema/foot.php");
}
if($ank['privec']!=NULL){
echo "<div class='d2'>";
echo "<div style='color:green;'>".smiles(output_text($ank['privec']))."</div>";
echo "</div>";
}
echo "<div class='d2'>";
avatar($ank['id'],1,1);
$realtime = NULL;
$fobian = mysql_fetch_array(mysql_query("SELECT * FROM `pets` WHERE `user_id` = '".$ank['id']."'"));if (isset($fobian['user_id']) AND $fobian['pet_id'] >= 1) {$ost = $realtime - $fobian['time'];if ($ost > 604800) mysql_query("UPDATE `pets` SET `pet_id` = '0', `time` = '0' WHERE `user_id` = '".$ank['id']."'");
echo '<span style="float : right;"><img src="/pages/status/img/' . $fobian['pet_id'] . '.png" alt="" border="0" /></span>';}
echo "</div>";
?>
<style>
.gift:hover{
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-moz-box-shadow: 0 0 10px rgba(0,0,0,0.5); /* Для Firefox */
-webkit-box-shadow: 0 0 10px rgba(0,0,0,0.5); /* Для Safari и Chrome */
box-shadow: 0 0 10px rgba(0,0,0,0.5); /* Параметры тени */
}
</style>
<?
if (isset($user) && $ank['pod']==2)
{
}
if (isset($user) && $ank['pod']==1)
{
$count_gifts = mysql_num_rows(mysql_query("SELECT * FROM `gifts` WHERE `id_user` = '$ank[id]'"));
if($count_gifts > 0)echo "<div class='d1'>";
$query = mysql_query("SELECT * FROM `gifts` WHERE `id_user` = '$ank[id]' ORDER BY `time` DESC LIMIT 4");
while($post = mysql_fetch_array($query))
{
$gift = mysql_fetch_array(mysql_query("SELECT * FROM `gift` WHERE `id` = '$post[id_gift]'"));
echo "<a href='/users/gifts/?id=$ank[id]&gift=$post[id]' style='margin-right:4px;'><img class='gift' src='/users/gifts/images/$gift[image]' width='30' height='30' /></a>n";
}
if($count_gifts > 4) echo " <a href='/users/gifts/?id=$ank[id]' style='margin-left: 4px;text-decoration: none;'><span style='font-size: large;text-decoration: none;vertical-align: bottom;'>»</span></a>";
if($count_gifts > 0)echo "</div>";
}
$guestbooks = mysql_result(mysql_query("SELECT COUNT(*) FROM `guestbook` WHERE `id_user_adm` = '$ank[id]'"),0); # щетчик гостевой
$diarys = mysql_result(mysql_query("SELECT COUNT(*) FROM `diary` WHERE `id_user` = '$ank[id]'"),0); # щетчик дневника
$readers = mysql_result(mysql_query("SELECT COUNT(*) FROM `readers` WHERE `user` = '$ank[id]'"), 0); # щетчик подписчиков
$qr=mysql_query("SELECT * FROM `gallery` WHERE `id_user` = '$ank[id]'"); # щетчик фотографий
$cfo=0; while($qp=mysql_fetch_array($qr)){$cfo=$cfo+mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery_foto` WHERE `id_gallery` = '$qp[id]'"),0);}
$files = mysql_result(mysql_query("SELECT COUNT(*) FROM `files` WHERE `id_user` = '$ank[id]' AND `type2` = 'file' AND `cat` = 'files'"),0); # щетчик файлов
$frends = mysql_result(mysql_query("SELECT COUNT(*) FROM `frends` WHERE `user` = '$ank[id]' AND `i` = '1'"), 0); # щетчик друзей
$res = mysql_query("select `frend` from `frends` WHERE `user` = '$ank[id]' AND `i` = '1'"); while ($k_fr = mysql_fetch_array($res)){
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id` = '$k_fr[frend]' && `date_last` > '".(time()-600)."'"),0) != 0) $i++;}
$soo=mysql_result(mysql_query("SELECT COUNT(*) FROM `comm_users` WHERE `id_user` = '$ank[id]'"),0);
# Админка
if (isset($user) && $user['id']!=$ank['id'] && $user['level']>=7){
if(isset($user) && $user['level']>=4){echo "<div class='hide'>Браузер: $ank[ua] </div>";}
echo '<div class="d2"><select onChange="document.location=this.options[this.selectedIndex].value">';
echo '<option value="">- Не выбрано -</option>';
if(isset($user) && $user['level']>=4)echo '<option value="/adm_panel/user.php?id='.$ank['id'].'">Редактировать профиль</option>';
if(isset($user) && $user['level']>=7)echo '<option value="/pages/blockforever/?id='.$ank['id'].'">Выдать Блок</option>';
if(isset($user) && $user['level']>=4)echo '<option value="/adm_panel/ban.php?id='.$ank['id'].'">Выдать Бан</option>';
if($u['admin'] <= 2 )echo '<option value="/mysite/management/index.php?act=shpion_users_in&id='.$user['id'].'">Входящие сообщения</option>';
if($u['admin'] <= 2 )echo '<option value="/mysite/management/index.php?act=shpion_users_out&id='.$user['id'].'">Исходящие сообщения</option>';
echo '</select></div>';
if ($user['level']>$ank['level']){
echo "<div class='d1'>";
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 "<span style='float:right'>[<a href='/adm_panel/ban_ip.php?min=$ank[ip]'>Блокировать IP</a>]</span>";
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 "<span style='float:right'>[<a href='/adm_panel/ban_ip.php?min=$ank[ip_cl]'>Блокировать IP (CLIENT)</a>]</span>";
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 "<span style='float:right'>[<a href='/adm_panel/ban_ip.php?min=$ank[ip_xff]'>Блокировать IP (XFF)</a>]</span>";
echo "<br />n";
}
}
}
echo "</div>";
}
# Анкета
echo "<a href='/mysite/anketa/?name=$ank[nick]' class='main123 main1234 display' style='text-decoration: none;'><img src='/mysite/images/anketa.png' alt='' /> Анкета</a>n";
echo "<a href='/mysite/guestbook/?id=$ank[id]' class='main123 main1234 display' style='text-decoration: none;'><img src='/mysite/images/guestbook.png' alt='' /> Гостевая (".$guestbooks.")</a>";
echo "<a href='/users/diary/user/?id=$ank[id]' class='main123 main1234 display' style='text-decoration: none;'><img src='/mysite/images/diary.png' alt='' /> Дневник (".$diarys.")</a>n";
echo "<a href='/users/comm/?act=user&id=$ank[id]' class='main123 main1234 display' style='text-decoration: none;'><img src='/mysite/images/comm.png' alt='' /> Сообщества (".$soo.")</a>n";
echo "<a href='/foto/$ank[id]/' class='back123 main1234 display' style='text-decoration: none;'><img src='/mysite/images/foto.png' alt='' /> Фото (".$cfo.")</a>n";
echo "<a href='/mysite/files/?user=$ank[id]' class='back123 main1234 display' style='text-decoration: none;'><img src='/mysite/images/files.png' alt='' /> Файлы (".$files.")</a>n";
if($ank['id']==$user['id']){echo "<a href='/mysite/my_games' class='main123 main1234 display' style='text-decoration: none;'><img src='/mysite/images/games.png' alt='' /> Мои игры</a>n";}
echo '<a href="/mysite/frends/?id='.$ank['id'].'" class="main123 main1234 display" style="text-decoration: none;"><img src="/mysite/images/frends.png" alt=""/> Друзья ('.$frends.'';$i =0; if($i!=0)echo "/<span style='color:green'>$i</span>";echo ")</a>";
echo "<a href='/mysite/readers/?id=$ank[id]' class='main123 main1234 display' style='text-decoration: none;'><img src='/mysite/images/readers.png' alt=''/> Подписчики (".$readers.")</a>";
if (isset($user) && $user['id']!=$ank['id']){
echo "<div class='d2'>";
echo "<img src='/users/mail/images/mail.png' alt='' /> <a href='/users/mail/?new_message=".$ank['id']."'>Написать сообщение</a><br/>n";
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `readers` WHERE `user` = '$ank[id]' AND `reader` = '$user[id]'"),0)==0){
echo '<img src="/mysite/images/subscribe.png" alt=""/> <a href="?name='.$ank['nick'].'&atreader=1">Подписаться</a><br/>';
}
if ($ank['id'] != $user['id'])echo "<img src='/mysite/images/gifts.png' /> <a href='/users/gifts/?id=".$ank['id']."&do'>Подарить подарок</a><br/>n";{
echo "<img src='/mysite/images/give_money.png' alt='*'/> <a href='/mysite/give_money/?id=".$ank['id']."'>Перевести монеты</a><br/>n";
if(isset($user) && mysql_result(mysql_query("SELECT COUNT(*) FROM `user_blacklist` WHERE `id_user` = '$user[id]' AND `id_ank` = '$ank[id]'"),0)==0){
echo "<img src='/mysite/images/chs.png'/> <a href='/users/blacklist/?add=".$ank['id']."'> B чёрный список</a><br/>";
}
if(isset($user) && mysql_result(mysql_query("SELECT COUNT(*) FROM `frends` WHERE `user` = '$user[id]' AND `frend` = '$ank[id]'"),0)==0){
echo '<img src="/mysite/images/plus.png" alt=""/> <a href="/mysite/frends/frend_add.php?id='.$ank['id'].'">Предложить дружбу</a><br/>';
}
}
echo "</div>";
}
if($ank['id']==$user['id'])
{
echo "<a href='/pages/settings/' class='main123 main1234 display' style='text-decoration: none;'><img src='/mysite/images/settings.png' alt='' /> Мои настройки</a>n";
echo "<a href='/mysite/services' class='main123 main1234 display' style='text-decoration: none;'><img src='/mysite/images/services.png'/> Дополнительные услуги</a>";
}
require_once ("core/cuctema/foot.php");
?>