Вход Регистрация
Файл: slando.icu/modules/game/anketa.php
Строк: 432
<?php
$mem_start 
memory_get_usage();
require 
'../../system/func_for_game2.inc.php';
require 
'../../system/smiles.inc.php';
if (isset(
$_GET['id'])){$nid=num($_GET['id']);}else{head2('Ошибка');error();}
$search_user mysqli_fetch_array(mysqli_query($link,"SELECT id,login,adm,sex,att,opit,clan,lvl,datereg,authtime,ignor,age,info,avatar,lvl_shlupka,lvl_korp,lvl_push,att_push,att_mortira,lvl_knippeli,att_knippeli
,lvl_garpun,att_garpun,lvl_truba,lvl_parusa,hp_us,att_user,att_ekipazh,hp_ekipazh,manevr,toch,hp_dop,gorod,boat,clan_zvanie FROM `users` WHERE `id`='
$nid' "));
if(
$search_user['id']==0){go("/online");}
//////////if($search_user['id']==$user['id']){go("/profile");}
if (isset($_GET['m'])) {$mod=vvod($_GET['m']);} else {$mod="";}

switch(
$mod
{
default:
$id_send=$search_user['id'];
$logsend=$search_user['adm'];$logadm=$search_user['login'];$name color_nick($search_user['login']);

$opitlvl=($search_user['lvl']*100)*pow($search_user['lvl'],2.4);
$lmin=0;$opitkl=0;
for (
$i=$search_user['lvl']-1$i>$lmin$i-- )
{
$opitkl=(($i*100)*pow($i,2.4))+$opitkl;
}
$opitlvl2=$search_user['opit']-$opitkl;
$sledlvl=num($opitkl+$opitlvl);
$procl2=($opitlvl2/$opitlvl)*100;


///////корабль
$deff_shlupka=$search_user['lvl_shlupka']*50+20;
$max_uron=num(pow($search_user['lvl_korp'],2)*150);
$kol_push=$search_user['lvl_push']*3+4;
$att_push=$search_user['att_push']*2+2;
$att_mortira=$search_user['att_mortira']*120+10;
$kol_knippeli=$search_user['lvl_knippeli'];
$att_knippeli=$search_user['att_knippeli']*13;
$max_garpun=$search_user['lvl_garpun']*10+15;
$att_garpun=$search_user['att_garpun']*5+20;
$toch_truba=$search_user['lvl_truba']*7;
$manevr_parusa=$search_user['lvl_parusa']*7;
$hp_user=$search_user['hp_us'];
$att_user=$search_user['att_user'];
$att_ekipazh=$search_user['att_ekipazh'];
$hp_ekipazh=$search_user['hp_ekipazh'];


$rgac=mysqli_query($link,"SELECT * FROM `inventar` WHERE `id_user`= '".$search_user['id']."' and `act`='1'   ");
while(
$rgacv mysqli_fetch_array($rgac))
{
if(
$rgacv['tip']==0){
if(
$rgacv['chast']==2){$t_p_pistol=$rgacv['skor'];$uron_pistol=$rgacv['att']+$search_user['att']+num(pow($rgacv['ul'],1.2)*1.5);}
elseif(
$rgacv['chast']==1){$att_user=$att_user+$rgacv['att']+num(pow($rgacv['ul'],1.2)*1.5);}
else{
$hp_user=$hp_user+$rgacv['hp']+num(pow($rgacv['ul'],1.3)*2);}
}elseif(
$rgacv['tip']==1){

if(
$rgacv['id_shop']==or $rgacv['chast']==1){$att_push=$att_push+$rgacv['att'];}
elseif(
$rgacv['id_shop']==or $rgacv['chast']==2){$kol_push=$kol_push+$rgacv['att'];}
elseif(
$rgacv['id_shop']==or $rgacv['chast']==3){$att_mortira=$att_mortira+$rgacv['att'];}
elseif(
$rgacv['id_shop']==or $rgacv['chast']==4){$att_knippeli=$att_knippeli+$rgacv['att'];}
elseif(
$rgacv['chast']==5){$att_garpun=$att_garpun+$rgacv['att'];}
elseif(
$rgacv['chast']==6){$max_uron=$max_uron+$rgacv['att'];}
elseif(
$rgacv['chast']==7){$max_trum=$max_trum+$rgacv['att'];}
elseif(
$rgacv['chast']==8){$manevr_parusa=$manevr_parusa+$rgacv['att'];}
elseif(
$rgacv['chast']==9){$toch_truba=$toch_truba+$rgacv['att'];}
elseif(
$rgacv['chast']==10){$att_ekipazh=$att_ekipazh+$rgacv['att'];}
elseif(
$rgacv['chast']==11){$hp_ekipazh=$hp_ekipazh+$rgacv['att'];}



}

}


if(
$search_user['opit']<1000){$opit=$search_user['opit'];}elseif($search_user['opit']>999 and $search_user['opit']<999999){$opit=''.round($search_user['opit']/1000,2).' К';}
elseif(
$search_user['opit']>999999){$opit=''.round($search_user['opit']/1000000,2).' М';}
if(
$sledlvl<1000){$opitsled=$sledlvl;}elseif($sledlvl>999 and $sledlvl<999999){$opitsled=''.round($sledlvl/1000,2).' К';}
elseif(
$sledlvl>999999){$opitsled=''.round($sledlvl/1000000,2).' М';}
$vips mysqli_fetch_array(mysqli_query($link,"SELECT * FROM `vip` WHERE `id_user`='$search_user[id]' and `tip`='1'"));
if(
$vips['id']>0){
$max_uron=num($max_uron*1.1);$att_push=num($att_push*1.1);
$att_mortira=num($att_mortira*1.1);$kol_knippeli=num($kol_knippeli*1.1);$att_knippeli=num($att_knippeli*1.1);
$att_garpun=num($att_garpun*1.1);$toch_truba=num($toch_truba*1.1);$manevr_parusa=num($manevr_parusa*1.1);
$hp_user=num($hp_user*1.1);$att_user=num($att_user*1.1);$att_ekipazh=num($att_ekipazh*1.1);$hp_ekipazh=num($hp_ekipazh*1.1);

}

$uron_push=$kol_push*$att_push;$uron_mortira=$att_mortira;$uron_garpun=$att_garpun;
$uron_knippeli=$kol_knippeli*$att_knippeli;$uron_falk=$att_falk;
$manevr=$manevr_parusa+$search_user['manevr'];$toch=$toch_truba+$search_user['toch'];
$max_uron=$max_uron+$search_user['hp_dop'];$uron_push=$uron_push+$search_user['att'];$uron_mortira=$uron_mortira+$search_user['att'];$uron_garpun=$uron_garpun;$uron_knippeli=$uron_knippeli+$search_user['att'];
$hp_user=$hp_user+$search_user['hp_dop'];$att_user=$att_user+$search_user['att'];

if(
$search_user['boat']!=0){
$boat=mysqli_fetch_array(mysqli_query($link,"SELECT * FROM `boat` WHERE `id`='$search_user[boat]'"));
$max_uron=$max_uron+$boat['hp'];$max_trum=$max_trum+$boat['trum'];
$uron_push=$uron_push+$boat['uron_push'];$uron_mortira=$uron_mortira+$boat['uron_mortira'];$uron_knippeli=$uron_knippeli+$boat['uron_knippeli'];
}

if (
$search_user['clan'] != "0"
{
$clan=mysqli_fetch_array(mysqli_query($link,"SELECT id,name,lvl,time_att,build1,build2,build3 FROM `clans` WHERE `id`='".num($search_user['clan'])."'"));
$gorod3mysqli_fetch_array(mysqli_query($link,"SELECT clan,verf,taverna FROM `gorod` WHERE `id`='".num($search_user['gorod'])."' limit 1  "));
if(
$gorod3['clan']==$search_user['clan']){
$bon_sh=1+($gorod3['verf']*3+4)/100;$bon_sh2=1+($gorod3['taverna']*3+4)/100;
$max_uron=num($max_uron*$bon_sh);$uron_push=num($uron_push*$bon_sh);
$uron_mortira=num($uron_mortira*$bon_sh);$uron_knippeli=num($uron_knippeli*$bon_sh);
$uron_garpun=num($uron_garpun*$bon_sh);$toch=num($toch*$bon_sh);$manevr=num($manevr*$bon_sh);


$att_user=num($att_user*$bon_sh2);$hp_user=num($hp_user*$bon_sh2);$hp_ekipazh=num($hp_ekipazh*$bon_sh2);$att_ekipazh=num($att_ekipazh*$bon_sh2);

}
$bon_sh=1+$clan['build1']*0.005;
$max_uron=num($max_uron*$bon_sh);$uron_push=num($uron_push*$bon_sh);
$uron_mortira=num($uron_mortira*$bon_sh);$uron_knippeli=num($uron_knippeli*$bon_sh);
$uron_garpun=num($uron_garpun*$bon_sh);$toch=num($toch*$bon_sh);$manevr=num($manevr*$bon_sh);
$bon_sh2=1+$clan['build2']*0.005;
$att_user=num($att_user*$bon_sh2);$hp_user=num($hp_user*$bon_sh2);$hp_ekipazh=num($hp_ekipazh*$bon_sh2);$att_ekipazh=num($att_ekipazh*$bon_sh2);

$opit_b=$opit_b+$clan['build3']/100;
if(
$search_user['clan_zvanie']==5){$zvanie='<span style="color:#00D6E5">Капитан</span>';}elseif($search_user['clan_zvanie']==4){$zvanie='<span style="color:#C19E00">Первый помощник</span>';}
elseif(
$search_user['clan_zvanie']==3){$zvanie='<span style="color:#709900">Штурман</span>';}
elseif(
$search_user['clan_zvanie']==2){$zvanie='<span style="color:#6270C4">Шкипер</span>';}elseif($search_user['clan_zvanie']==1){$zvanie='<span style="color:#C45800">Юнга</span>';}


$clan='<div>Флот:<br/><a href="/flot/view?id='.num($clan['id']).'"><span class="clrt1">'.vivod($clan['name']).'</span></a><br/>'.$zvanie.'</div>';
} else {
$clan='';}



if(
$search_user['sex']==0){$search_user['sex']=1;}
head2('Профиль');
echo
'<div class="block1 center">
<div>'
.sex($search_user['sex']).''.$name.' <span class="clrt1">'.$search_user['lvl'].' ур</span>.</div>
'
.$clan.'';

if(
$search_user['avatar']==100){
echo
'<img width="50%" style="margin:5px 0px 15px 0px;" src="/images/icon/avatar/'.md5(md5($search_user['id'].$search_user['datereg'])).'.png" alt="" />';
}else{
echo
'<img width="50%" style="margin:5px 0px 15px 0px;" src="/images/icon/avatar/'.$search_user['sex'].'/'.$search_user['avatar'].'.png" alt="" />';
}
echo
'<div class="razriv7"></div>';
if(
$search_user['age']>or mb_strlen($search_user['info'],'utf-8') > ){echo'<div class="block4 clrt7 left">Возраст:'.$search_user['age'].'  <br>О себе:'.smile(vivod($search_user['info'])).' </div><div class="razriv7"></div>';}

echo
'<a class="ssilki4" href="/msg/add?id='.$search_user['id'].'">Написать</a>
<a class="ssilki4" href="/anketa?m=arts&amp;id='
.$search_user['id'].'">Артефакты</a>
<a class="ssilki4" href="/anketa?m=rig&amp;id='
.$search_user['id'].'">Снаряжение</a>';
if (
$search_user['clan'] == "0" and $search_user['id'] != $user['id'] and $user['clan_zvanie']>and $search_user['lvl']>)
{echo
'<a class="ssilki4" href="/flot/prigl?id='.$search_user['id'].'">Пригласить во флот</a>';}
if(
$user['adm'] == "razrab" or $user['adm'] == "admin" or $user['adm'] == "moder" )
{
$prov_block =mysqli_num_rows(mysqli_query($link,"SELECT * FROM `users_block` WHERE `id_user_block`='".num($search_user['id'])."'"));
echo 
'<div class="main2">';
if(
$search_user['ignor']< time()) {
echo 
'<a class="ssilki4" href="/panels/ignor?id='.$nid.'">Бан чат/форум</a>';}else{echo '<a class="ssilki4" href="/panels/ignor?id='.$nid.'">Снять бан чат</a>';}
if(
$prov_block==0){echo '<a class="ssilki4" href="/panels/block?id='.$nid.'">Блокировка</a>';}else{echo '<a class="ssilki4" href="/panels/block?id='.$nid.'">Разблокировать</a>';}
if(
$user['adm'] == "razrab" or $user['adm'] == "admin"){
echo 
'<a class="ssilki4" href="/panels/act">Акция</a><a class="ssilki4" href="/panels/log?id='.$nid.'">Логи</a>';}
if(
$user['adm'] == "moder"){
echo 
'
<a class="ssilki4" href="/panels/log?id='
.$nid.'&amp;m=m">Мульты</a>
<a class="ssilki4" href="/panels/log?id='
.$nid.'&amp;m=rinok">Лог рынка</a>
<a class="ssilki4" href="/panels/log?id='
.$nid.'&amp;m=b">История банов</a>';}
echo
'</div>';}
echo
'
<div class="razriv7"></div>
<div class="block4 left">
<div class="clrt7 left">Пушка: '
.$uron_push.'</div>
<div class="clrt7 left">Гарпуны: '
.$uron_garpun.'</div>
<div class="clrt7 left">Мортиры: '
.$uron_mortira.'</div>
<div class="clrt7 left">Точность: '
.$toch.'</div>
<div class="clrt7 left">Книппели: '
.$uron_knippeli.'</div>
<div class="clrt7 left">Атака героя: '
.$att_user.'</div>
<div class="clrt7 left">Атака экипажа: '
.$att_ekipazh.'</div>
<div class="clrt7 left">Атака пистолета: '
.$uron_pistol.'</div>
<div class="clrt7 left">Маневренность: '
.$manevr.'</div>
<div class="clrt7 left">Здоровье героя: '
.$hp_user.'</div>
<div class="clrt7 left">Здоровье экипажа: '
.$hp_ekipazh.'</div>



</div>
<div class="razriv7"></div>
<div class="block4">
<div class="clrt7 left">'
.img(42,'png').' Опыт: '.$opit.'/'.$opitsled.' ('.round($procl2,2).'%)</div>
<div class="clrt7 left">Дата регистрации: '
.date("d.m.Y",num($search_user['datereg'])).'</div>
<div class="clrt7 left">'
;
if (
$search_user['authtime'] > $time 600 and $search_user['id']!=and $search_user['id']!=6065){
echo 
'<div><span style="color:#95C160">online '.difference(time() - $search_user['authtime']).' назад </span></div>';} elseif ($search_user['authtime'] < $time 600 and $search_user['authtime'] > $time 7200){
echo 
'<div><span style="color:#95C160">online 10 м назад</span></div>';
}
else {if(
$search_user['id']!=1){echo '<div><span style="color:#D98282">offline '.date("d.m.Y",num($search_user['authtime'])).' '.date("H:i",num($search_user['authtime'])).'</span></div>';}}

echo
'</div></div>';
break;
/////////////
case'rig':
$naz['1']='Оружие';$naz['2']='Пистолет';$naz['3']='Шляпа';$naz['4']='Плащ';$naz['5']='Пояс';
$naz['6']='Сапоги';
head2('Снаряжение');


echo
'<div class="block1 center">
<table style="margin:10px 0 10px 0;vertical-align:top;"  >'
;
for (
$i=1$i<7$i++ )
{
$sr=mysqli_fetch_array(mysqli_query($link,"SELECT * FROM `inventar` WHERE `id_user`='".num($search_user['id'])."' and `chast`='$i' and `act`='1'  and `tip`='0' "));
if(
$sr['id']>0){

echo
'<tr><td style="padding:5px;" width="70px"><img src="/images/icon/shop/'.$sr['id_shop'].'.png" alt="" /></td>
<td width="75%" style="padding:0px 2px 2px 5px;vertical-align:top;text-align:left;">
<div><span class="clrt2">'
.$sr['name'].'</span></div>';
if(
$sr['att']>0){echo'<span class="clrt7">Атака: '.$sr['att'].'</span>';if($sr['ul']>0){echo' <span class="clrt9 medium">+'.num(pow($sr['ul'],1.2)*1.5).'</span>';}if($sr['skor']>0){echo', <span class="clrt7">Скорость: '.$sr['skor'].'</span>';}}
if(
$sr['hp']>0){echo'<span class="clrt7">Здоровье</span>: <span class="clrt7">'.$sr['hp'].'</span>';if($sr['ul']>0){echo' <span class="clrt9 medium">+'.num(pow($sr['ul'],1.3)*2).'</span>';}}
echo
'<div class="clrt7 left">'.$naz[''.$sr['chast'].''].', '.$sr['lvlmin'].' ур</div></td></tr>';
}else{

echo
'<tr><td width="80px"><img src="/images/icon/shop/nn.png" alt="" /></td><td width="55%" style="padding:0px 2px 2px 5px;vertical-align:top;text-align:left;"><div class="clrt2">'.$naz[''.$i.''].'</div></td><td width="25%"></td></tr>';

}
echo
'<tr><th colspan="4" style="font-weight:normal;"><div style="margin:10px 0px 0px 0px;" class="razriv7"></div></th></tr>';
}
echo
'</table><a class="ssilki3" href="/anketa?id='.$search_user['id'].'">Назад</a>';
break;
/////////////
case'arts':
$q=mysqli_query($link,"SELECT * FROM `inventar` WHERE `id_user`= '".$search_user['id']."' and `act`='1' and `tip`='1' order by `id`  desc ");
if(
$search_user['boat']!=0){
$boat=mysqli_fetch_array(mysqli_query($link,"SELECT arts FROM `boat` WHERE `id`='$search_user[boat]'"));$arts_max=$boat['arts']+1;
}else{
$arts_max=5;}
head2('Артефакты');
echo
'<div class="block1 center">
<table style="margin:10px 0 10px 0;vertical-align:top;"  >'
;
$n=1;
while(
$r mysqli_fetch_array($q))
{
if(
$r['chast']==or $r['chast']==or $r['chast']==or $r['chast']==or $r['chast']==5){$text_art='Атака';}elseif($r['chast']==6){$text_art='Корпус';}
elseif(
$r['chast']==7){$text_art='Трюм';}elseif($r['chast']==8){$text_art='Маневренность';}elseif($r['chast']==9){$text_art='Точность';}
elseif(
$r['chast']==10){$text_art='Атака';}elseif($r['chast']==11){$text_art='Здоровье';}

echo
'
<tr>
<td style="padding:5px;" width="70px"><div><img width="60px" src="/images/icon/arts/'
.$r['id_shop'].'.png" alt=" " /></div></td>
<td width="75%" style="padding:0px 2px 2px 5px;vertical-align:top;text-align:left;">
<div><span class="clrt2">'
.$r['name'].'</span></div>
<span class="clrt7">'
.$text_art.': '.$r['att'].'</span>
</td>
<tr><th colspan="4" style="font-weight:normal;"><div style="margin:10px 0px 0px 0px;" class="razriv7"></div></th></tr>'
;
$n=$n+1;
}


for(
$i=$n;$i<$arts_max;$i++){
echo
'<tr><td style="padding:5px;" width="70px"><img width="60px" src="/images/icon/shop/nn.png" alt="" /></td><td width="55%" style="padding:0px 2px 2px 5px;vertical-align:top;text-align:left;"><div class="clrt2">Свободный слот</div></td><td width="25%"></td></tr>
<tr><th colspan="4" style="font-weight:normal;"><div style="margin:10px 0px 0px 0px;" class="razriv7"></div></th></tr>'
;


}

echo
'</table><a class="ssilki3" href="/anketa?id='.$search_user['id'].'">Назад</a>';
break;

}
foot();
?>
Онлайн: 0
Реклама