Вход Регистрация
Файл: weatut.ru/profile.php
Строк: 301
<?php
require_once ('system/func.php');
auth(); // Закроем от не авторизованных


# Настройки #
$id abs(intval($_GET['id']));
if(
$id)$profile mysql_fetch_assoc(mysql_query("SELECT * FROM `users` WHERE `id` = '".$id."'"));
else 
$profile $user;
$amulet mysql_query("SELECT * FROM `amulet_user` WHERE `id_user` = '".$profile['id']."' ORDER BY `id` LIMIT 1");
$amulet mysql_fetch_array($amulet);
if(
$amulet['level'] < 1)$amulet['level'] = 0;
# Ошибки #
if(!$profile){
$_SESSION['msg'] == 'Такой игрок не существует';
header('Location: /online?search');
exit();
}
if(isset(
$_GET[clan_memb]) and $myID != $profile[id] and $user[clan_rang] > and $profile[id_clan] == and $profile[side] == $user[side]){
mysql_query("INSERT INTO `clan_memb` SET `id_user` = '$profile[id]', `id_clan` = '$user[id_clan]'");
$_SESSION[msg] = "Заявка отправлена!";
header('Location: ?');
exit();
}
if(
$myID != $profile['id']){
$l_ch mysql_query("SELECT * FROM `l_ch` WHERE `id_1` = '".$myID."' AND `id_2` = '$profile[id]' OR `id_1` = '".$profile['id']."' AND `id_2` = '$myID' ORDER BY `id` LIMIT 1");
$l_ch mysql_fetch_array($l_ch);
if(!
$l_ch){
mysql_query("INSERT INTO `l_ch` SET `id_1` = '$user[id]', `id_2` = '$profile[id]', `schet_1` = '0', `schet_2` = '0'");
header('Location: ?');
exit();
}
}
$title $profile['login'];
require_once (
'system/header.php');
# Информация #
if($user['access'] == and $myID != $profile['id'])echo "<a href='/settGame?sett_user=$profile[id]' class='link center' data-ajax>Редактировать игрока</a>";
if(
$user[access] >= 1){
echo 
"<table style='width:100%;'>";
if(
$user['access'] > $profile[access] and $myID != $profile['id'])echo "<td class='center' style='width:50%;'><a href='/ip_proverka/$profile[id]' class='link' data-ajax>Поверить IP</a></td>";
if(
$user['access'] > $profile[access] and $myID != $profile['id'])echo "<td class='center'><a href='/ban/$profile[id]/' class='link' data-ajax>Бан, нарушения</a></td>";
echo 
"</table>";
}
echo 
'<div class="bdr bg_main mb2"><div class="light"><div class="wr1"><div class="wr2"><div class="wr3"><div class="wr4"><div class="wr5"><div class="wr6"><div class="wr7"><div class="wr8">';
echo 
'<div class="oh"><a href="/avatar/'.$profile['id'].'"><img src="/manekenImage_'.$profile['id'].'.png"></a></div>';
echo 
'<br>'.ico('icons','str.png').'<font color=#eacc54> Атака: '.$profile['str'].'</font><br>';
echo 
ico('icons','def.png').'<font color=#eacc54> Защита: '.$profile['def'].'</font><br>';
echo 
ico('icons','health.png').'<font color=#eacc54> Жизнь: '.$profile['max_health'].'</font><br>';
echo 
ico('icons','energy.png').'<font color=#eacc54> Энергия: '.$profile['max_energy'].'</font>';
echo 
"<div style='clear:both;'></div>";
echo 
'</div></div></div></div></div></div></div></div></div></div>';

echo 
"</div>";
echo 
'<div class="bdr bg_main mb2"><div class="light"><div class="wr1"><div class="wr2"><div class="wr3"><div class="wr4"><div class="wr5"><div class="wr6"><div class="wr7"><div class="wr8"><div class="yell mlr10 mt5 mb5">';
echo 
icons_user($profile[id]).' <font color="'.$profile['color'].'"><b>'.isLogin($profile['id'],$n).' </b></font>
<img src="/images/icons/level.png" width="14px" alt="LVL" /><font color=#eacc54> '
.$profile['level'].'</font>';
echo 
'<font color=#eacc54> - </font>'.($profile['side'] == 'good' '<font color="GREEN">Добро</font>' '<font color="RED">Зло</font>').' <br/>';
$clan mysql_fetch_array(mysql_query("SELECT * FROM `clans` WHERE `id` = '".$profile[id_clan]."' LIMIT 1"));
switch(
$profile[clan_rang]){
case 
1:
$clan_rang '<font color=#eacc54>Новобранец</font>';
break;
case 
2:
$clan_rang '<font color=#eacc54>Боец</font>';
break;
case 
3:
$clan_rang '<font color=#eacc54>Офицер</font>';
break;
case 
4:
$clan_rang '<font color=#eacc54>Генерал</font>';
break;
case 
5:
$clan_rang "<font color='green'>Лидер клана</font>";
break;
}
if(
$clan){
echo 
ico('icons','clan.png')." <a href='/clan/$clan[id]/'>$clan[name]</a> - $clan_rang<br>";
}
echo 
ico('icons','prava.png')."<font color='#eacc54'> Роль в игре: </font>";
if(
$profile['access'] == 2){
echo 
"<span class='item-2'>Администратор</span>";
}elseif(
$profile['access'] == 1){
echo 
"<span class='item-1'>Модератор</span>";
}else{
echo 
"<span class='white'>Игрок</span>";
}
echo 
"<br>";
if(!empty(
$profile['name']))echo ''.ico('icons','pin.png').'<font color=#eacc54> Имя: </font><font color=orange>'.($profile['name']).'</font><br/>';
if(!empty(
$profile['info']))echo ''.ico('icons','pin.png').'<font color=#eacc54> Статус: </font><font color=yellow>'.($profile['info']).'</font><br/>';
echo 
' '.ico('icons','male.png').'<font color=#eacc54> Пол: </font>'.($profile['sex'] == 'w' '<font color="PINK">Женский</font>' '<font color="BLUE">Мужской</font>').'<br/>';
if(!empty(
$profile['coliseum_rating']))echo ''.ico('icons','arena.png').' Рейтинг колизея: <font color=yellow>'.($profile['coliseum_rating']).'</font><br/>';
if(
$myID != $profile['id'])echo ' '.ico('icons','level.png').'<font color=#eacc54> Качество Амулета: '.($amulet[level]).'</font><br/>';
if(
$myID == $profile['id']){
echo 
ico('icons','gold.png').'<font color=#eacc54> '.n_f($profile['gold']).'</font> '.ico('icons','crystal.png').'<font color=#eacc54> '.n_f($profile['crystals']).' </font><br/>
'
.ico('icons','exp.png').'<font color=#eacc54> Опыт: '.n_f($profile['exp']).'/'.n_f($exp).'('.round($profile['exp']/$exp*100,1).'%)</font><br>';
}
if (
$clan) {
echo 
'<span class="nowrap"><img class="icon" src="http://144.76.127.94/view/image/icons/calendar.png"> Дней в клане: '.round((time()-$profile['vstup'])/86400).'</span><br>';
}
// Верность клану 
if ($clan) { 
$daysround((time()-$profile['vstup'])/86400)*3
if (
$days<=or $profile['vstup']==0)$days=0
$trust=$profile['trust']+$days

if (
$profile['trust']==10) { 
$tcena=10
$perc=50
} elseif (
$profile['trust']==50) { 
$tcena=100
$perc=100
} elseif (
$profile['trust']==100){ 
$tcena=200
$perc=150

if(isset(
$_GET['trust']) && $profile['gold']>=$tcena && $profile['trust']<150){ 
mysql_query("UPDATE `users` SET `gold` = `gold` - '".$tcena."', `trust` = '".$perc."' WHERE `id` = '".$profile['id']."'"); 
header('Location: ?'); 
exit(); 

echo 
ico('icons','clan.png').' Верность клану: '.($trust>150?'150':''.$trust.'').'% '.($profile['trust']<150?''.($myID == $profile['id']?'(<a href="?trust">Повысить на '.$perc.'% за '.$tcena.' <img src="/images/icons/gold.png" alt="GOLD" /></a>)':null).'':null).' <br />'

echo 
' '.ico('icons','arrow_refresh.png').'<font color=#eacc54> Был в сети: '.vremja($profile['online']).'</font><br/>';
if(
$user[access] > or $myID == $profile[id])echo ' '.ico('icons','arrow_refresh.png').'<font color=#eacc54> Регистрация: '.vremja($profile['registr']).'</font><br/>';
echo 
'</div></div></div></div></div></div></div></div></div></div></div>';
if(
$myID != $profile['id']){
$pit mysql_query("SELECT * FROM `pit_users` WHERE `id_user` = '".$profile['id']."' ORDER BY `id` LIMIT 1");
$pit mysql_fetch_array($pit);
if(
$pit){
$params $pit['str']+$pit['def']+$pit['health'];
echo 
"<a class='btn-blue'>";
echo 
"<div class='oh'><img src='/images/pits/$pit[item].png' style='margin-right:3px;margin-top:-2px;'></div>";
echo 
"<b>$pit[name]</b><br>Уровень: ".ico('icons','level.png').$pit[level]<br>+$params к параметрам <div style='clear:both;'></div>";
echo 
"</a>";
}
}

echo 
'<div class="hr_g mb2"><div><div></div></div></div>';
if(
$profile['id'] == $myID)echo '<a class="mbtn mb2" href="/pitomnik"><img src="http://weatut.ru/images/icons/pit.png" class="icon"> Мой питомец </a>';
$snar mysql_result(mysql_query("SELECT COUNT(*) FROM `inv` WHERE `odeta` = 'da' AND `id_user` = '$profile[id]'"),0);
if(
$profile['id'] == $myID)echo '<a class="mbtn mb2" href="/amulet"><img src="http://weatut.ru/images/icons/koldun.png" class="icon"> Амулет ('.($amulet[level]).' из 37) </a>';
$snar mysql_result(mysql_query("SELECT COUNT(*) FROM `inv` WHERE `odeta` = 'da' AND `id_user` = '$profile[id]'"),0);
if(
$profile['id'] != $myID)echo '<a class="mbtn mb2" href="/snar/'.$profile['id'].'"><img src="http://weatut.ru/images/icons/slots.png" class="icon"> Снаряжение <span class="text_vmenu">('.$snar.' из 8)</span></a>';
else echo 
'<a class="mbtn mb2" href="/snar/"><img src="http://weatut.ru/images/icons/slots.png" class="icon"> Снаряжение <span class="text_vmenu">('.$snar.' из 8)</span></a>';
if(
$profile['id'] != $myID)echo '<a class="mbtn mb2" href="/mail/'.$profile['id'].'"><img src="http://weatut.ru/images/icons/mail.png" class="icon"> Отправить почту</a>';
if(
$myID != $id and $user[clan_rang] > and $profile[level] >=and $profile[id_clan] == and $user['side'] == $profile['side'] and mysql_result(mysql_query("SELECT COUNT(*) FROM `clan_memb` WHERE `id_user` = '$id' AND `id_clan` = '$user[id_clan]'"),0) == 0)echo "<a href='?clan_memb' class='link'>".ico('icons','clan.png')." Пригласить в клан</a>";
$narush mysql_result(mysql_query("SELECT COUNT(*) FROM `ban` WHERE `id_user` = '$profile[id]'"),0);
if(
$profile['id'] != $myID)echo '<a class="mbtn mb2" href="/narush/'.$profile['id'].'/"><img src="http://weatut.ru/images/icons/arrow.png" class="icon"> Нарушения ('.$narush.') </a>';
echo 
'<div class="hr_g mb2"><div><div></div></div></div>';
if(
$myID == $profile['id']){
$inv mysql_result(mysql_query("SELECT COUNT(*) FROM `inv` WHERE `odeta` = 'net' AND `id_user` = '$profile[id]'"),0);
echo 
'<a class="mbtn mb2" href="/inv"><img src="http://weatut.ru/images/icons/bag.png" class="icon"> Сумка ('.$inv.' из 20)</a>';
echo 
'<a class="mbtn mb2" href="/train"><img class="icon" src="http://weatut.ru/images/icons/ten.png"> Тренировка </a>';
echo 
'<a class="mbtn mb2" href="/mail/"><img src="http://weatut.ru/images/icons/mail.png" class="icon"> Моя Почта</a>';
echo 
'<a class="mbtn mb2" href="/narush/"><img src="http://weatut.ru/images/icons/arrow.png" class="icon"> Нарушения ('.$narush.') </a>';
echo 
'<div class="hr_g mb2"><div><div></div></div></div>';
}

$clan null;
require_once (
'system/footer.php');
?>
Онлайн: 2
Реклама