View file sdark.mobi/user/equipment.php

File size: 32.54Kb
<?php
require_once '../core/system.php';
echo only_reg();
echo ban();
$ank = mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = '".abs(intval($_GET['id']))."' LIMIT 1"));
$header = 'Экипировка '.$ank['nick'].'';
mysql_query("UPDATE `user` set `mesto` = 'Экипировка' where `id` = '".$user['id']."'");

require_once '../core/head.php';
$reqv = mysql_query("SELECT * from `kompl_us` where `id_us` = '".$user['id']."' and `sunduk`!='1' and `act` != '1' ");
$rukzak= mysql_num_rows($reqv);
if(isset($_GET['remove'])){
$up = mysql_fetch_array(mysql_query("SELECT * FROM `kompl_us` where `id_us` = '".$user['id']."' and `id` = '".intval($_GET['remove'])."' limit 1"));
if(empty($up['id'])){
header('location:/'); exit;
}
else{
$req = mysql_query("SELECT * from `kompl_us` where `id_us` = '".$user['id']."' and `act` = '1' and `type` =  '".$up['type']."'");
$avto = mysql_num_rows($req);

if($up['id']<=0){
header('location: ?');
$_SESSION['err'] = 'Ошибка'; exit;}

if($user['battle']>0){
header('location: ?id='.$user['id'].'');
$_SESSION['err'] = 'Во время боя нельзя снимать вещи!'; 
exit;
}

if($avto==0){
header('location: ?id='.$user['id'].'');
$_SESSION['err'] = 'Вещь не надета';}else{
if($rukzak>=$user['rukzak']){header("location: ?id=".$user['id'].""); $_SESSION['err'] = 'Рюкзак заполнен!';}else{

$up2 = mysql_fetch_array(mysql_query("SELECT stats from `kompl` where `id` = '".$up['id_komp']."' limit 1"));
$stat2 = explode(';',$up2['stats']);
$req = mysql_query("SELECT * from `kompl_us` where `id_us` = '".$user['id']."' and `act` = '1' and `komplekt`='".$up['komplekt']."'");
$weap = mysql_fetch_array($req);
$avto = mysql_num_rows($req);
$req1 = mysql_query("SELECT * from `komplekt` where `id`='".$up['komplekt']."'");
$bonus = mysql_fetch_array($req1);
if($avto==8 && $weap['komplekt']==$up['komplekt']){
mysql_query("DELETE FROM `bonus` WHERE `usr` = ".$user['id']." and `name` = 'Полный комплект' and `bonus`='+".$bonus['bon']." к параметрам'");
mysql_query("UPDATE `user` set `sila` = `sila` - '".$bonus['bon']."', `max_health` = `max_health` - ('".$bonus['bon']."'*'10'), `zashit` = `zashit` -  '".$bonus['bon']."' where `id` = '".$user['id']."'");
}
$kompls = mysql_query("SELECT * from `kompl_us` where `id` = '".intval($_GET['remove'])."' and `id_us`='".$user['id']."'");
$komplls = mysql_query("SELECT * from `kompl_us` where `id` = '".intval($_GET['remove'])."' and `id_us`='".$user['id']."' and `fleece`>'0'");
$komp2 = mysql_fetch_array($kompls);
$komp4 = mysql_fetch_array($komplls);
mysql_query("UPDATE `user` set `sila` = `sila` - '".$komp2['sila']."', `max_health` = `max_health` - ('".$komp2['hp']."'*'10'), `zashit` = `zashit` - '".$komp2['prot']."' where `id` = '".$user['id']."'");
$avto=mysql_num_rows($komplls);
if($avto>0){
mysql_query("UPDATE `user` set `sila`=`sila`-".$komp4['fleece'].", `zashit`=`zashit`-".$komp4['fleece'].", `max_health`=`max_health`-('".$komp4['fleece']."'*'10') where `id` = '".$user['id']."' limit 1");
}
$_SESSION['message'] = 'Вы сняли вещь';$act=0;
mysql_query("UPDATE `kompl_us` set `act` = '".$act."' where `id` = '".abs(intval($_GET['remove']))."'");
header('location: ?id='.$user['id'].''); exit;
}}}
}

$kompls = mysql_query("SELECT * from `kompl_us` where `id_us` = '".$ank['id']."' and `act` = '1' and `type` = 'голова' limit 1");
$avto = mysql_num_rows($kompls);
if($avto>0){while($komp2 = mysql_fetch_array($kompls)){
$komp = mysql_fetch_array(mysql_query("SELECT * FROM `kompl` where `id` = '".$komp2['id_komp']."' limit 1"));
$stat = mysql_fetch_array(mysql_query("SELECT * FROM `kompl_us` where `id_us` = '".abs(intval($_GET['id']))."' and `type` = 'голова' and `act` = '1' "));
$s=$stat['sila']+$stat['hp']+$stat['prot'];
$stat2 = mysql_fetch_array(mysql_query("SELECT * FROM `kompl_us` where `id_us` = '".$user['id']."' and `type` = 'голова' and `act` = '1' "));
$v=$stat2['sila']+$stat2['hp']+$stat2['prot'];
$st=$s-$v;
echo'<div class="foot"><table width="100%">
<tbody><tr><td width="40" height="40">
    <span><img style="border:1.4px solid #131313;border-radius:3px" width="40" height="40" src="'.$komp['url'].'">
	</span><span> <div class="level">'.$komp2['lvl'].'</div></span>
  </td><td>';
if($komp2['fleece']==0){$fleece="пусто";}
if($komp2['fleece']>0){$fleece="+".$komp2['fleece']."";}
if($komp2['fleece']==0){$fleece_img='A4A4A4';}
if($komp2['fleece']==50){$fleece_img='F5D188';}
if($komp2['fleece']==100){$fleece_img='67EE70';}
if($komp2['fleece']==300){$fleece_img='4385F0';}
if($komp2['fleece']==600){$fleece_img='9A52E8';}
if($komp2['fleece']==1200){$fleece_img='FF3042';}
if($komp2['fleece']==2500){$fleece_img='D1D439';}
if($komp['ur']==5){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Простая";$f="<font color='F5D188'>";}
if($komp['ur']==4){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Обычная";$f="<font color='67EE70'>";}
if($komp['ur']==3){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Редкая";$f="<font color='4385F0'>";}
if($komp['ur']==2){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Эпическая";$f="<font color='9A52E8'>";}
if($komp['ur']==1){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Легендарная";$f="<font color='FF3042'>";}echo'
</td><td> '.$komp['name'].'<span class=float-right><div class="empty"></div>'.$j.''.$f.''.$k.'</font></br>Тип: <font color="E2E2E2">'.$komp['type'].'</font></br> Руна: <font color="'.$fleece_img.'">'.$fleece.'</font></span> ';
if($user['id'] != $ank['id']){
 if($st>0){echo" <font color='71cc71'> (+".$st.")</font>";}
 if($st<0){echo" <font color='FF6633'> (".$st.")</font>";}
 }echo'
<font color="CDCFCF">
 <div class="empty"></div><img src="/images/icon/stat/prot.png" width="16" height="16"> '.$komp2['prot'].' <img src="/images/icon/stat/hp.png" width="16" height="16"> '.$komp2['hp'].' <img src="/images/icon/stat/sila.png" width="16" height="16"> '.$komp2['sila'].'<div class="empty"></div></font>';
if($user['id'] == $ank['id']){echo' <a class="btn2" href="?remove='.$komp2['id'].'">
         <span class="but">
        Снять
      </span>  </a>';
	  if($komp2['lvl']<40){echo' <a class="btn2" href="/smith/level?id='.$komp2['id'].'"><span class="but">Улучшить</span></a>';}}
	  echo'</td><td></table></font></div>
<hr>';

}}else{
echo'<div class="foot"><table width="100%">
<tbody><tr><td width="40" height="40">
    <img  src="/images/weapon/03.jpg" style="border:1px solid #131313;border-radius:4px; height:40px; width:40px">
  </td><td>Пусто<span class=float-right>Тип: <font color="E2E2E2">голова</font>';
echo'</table></font></div><hr>';
}
/* .............................................................................
.............................................................................*/
$kompls = mysql_query("SELECT * from `kompl_us` where `id_us` = '".$ank['id']."' and `act` = '1' and `type` = 'плечи' limit 1");
$avto = mysql_num_rows($kompls);
if($avto>0){while($komp2 = mysql_fetch_array($kompls)){
$komp = mysql_fetch_array(mysql_query("SELECT * FROM `kompl` where `id` = '".$komp2['id_komp']."' limit 1"));
$stat = mysql_fetch_array(mysql_query("SELECT * FROM `kompl_us` where `id_us` = '".abs(intval($_GET['id']))."' and `type` = 'плечи' and `act` = '1' "));
$s=$stat['sila']+$stat['hp']+$stat['prot'];
$stat2 = mysql_fetch_array(mysql_query("SELECT * FROM `kompl_us` where `id_us` = '".$user['id']."' and `type` = 'плечи' and `act` = '1' "));
$v=$stat2['sila']+$stat2['hp']+$stat2['prot'];
$st=$s-$v;
echo'<div class="foot"><table width="100%">
<tbody><tr><td width="40" height="40">
    <span><img style="border:1.4px solid #131313;border-radius:3px" width="40" height="40" src="'.$komp['url'].'">
	</span><span> <div class="level">'.$komp2['lvl'].'</div></span>
  </td><td>';
  if($komp2['fleece']==0){$fleece="пусто";}
if($komp2['fleece']>0){$fleece="+".$komp2['fleece']."";}
if($komp2['fleece']==0){$fleece_img='A4A4A4';}
if($komp2['fleece']==50){$fleece_img='F5D188';}
if($komp2['fleece']==100){$fleece_img='67EE70';}
if($komp2['fleece']==300){$fleece_img='4385F0';}
if($komp2['fleece']==600){$fleece_img='9A52E8';}
if($komp2['fleece']==1200){$fleece_img='FF3042';}
if($komp2['fleece']==2500){$fleece_img='D1D439';}
if($komp['ur']==5){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Простая";$f="<font color='F5D188'>";}
if($komp['ur']==4){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Обычная";$f="<font color='67EE70'>";}
if($komp['ur']==3){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Редкая";$f="<font color='4385F0'>";}
if($komp['ur']==2){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Эпическая";$f="<font color='9A52E8'>";}
if($komp['ur']==1){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Легендарная";$f="<font color='FF3042'>";}echo'
</td><td > '.$komp['name'].'<span class=float-right><div class="empty"></div>'.$j.''.$f.''.$k.'</font></br>Тип: <font color="E2E2E2">'.$komp['type'].'</font></br> Руна: <font color="'.$fleece_img.'">'.$fleece.'</font></span> ';
if($user['id'] != $ank['id']){
 if($st>0){echo" <font color='71cc71'> (+".$st.")</font>";}
 if($st<0){echo" <font color='FF6633'> (".$st.")</font>";}
 }echo'
<font color="CDCFCF">
 <div class="empty"></div><img src="/images/icon/stat/prot.png" width="16" height="16"> '.$komp2['prot'].' <img src="/images/icon/stat/hp.png" width="16" height="16"> '.$komp2['hp'].' <img src="/images/icon/stat/sila.png" width="16" height="16"> '.$komp2['sila'].'<div class="empty"></div></font>';
if($user['id'] == $ank['id']){echo' <a class="btn2" href="?remove='.$komp2['id'].'">
         <span class="but">
        Снять
      </span>  </a>';
	  if($komp2['lvl']<40){echo' <a class="btn2" href="/smith/level?id='.$komp2['id'].'"><span class="but">Улучшить</span></a>';}}
	  echo'</td><td></table></font></div>
<hr>';

}}else{
echo'<div class="foot"><table width="100%">
<tbody><tr><td width="40" height="40">
    <img  src="/images/weapon/08.jpg" style="border:1px solid #131313;border-radius:4px; height:40px; width:40px">
  </td><td>Пусто<span class=float-right>Тип: <font color="E2E2E2">плечи</font>';
echo'</table></font></div><hr>';
}
/* .............................................................................
.............................................................................*/
$kompls = mysql_query("SELECT * from `kompl_us` where `id_us` = '".$ank['id']."' and `act` = '1' and `type` = 'тело' limit 1");
$avto = mysql_num_rows($kompls);
if($avto>0){while($komp2 = mysql_fetch_array($kompls)){
$komp = mysql_fetch_array(mysql_query("SELECT * FROM `kompl` where `id` = '".$komp2['id_komp']."' limit 1"));
$stat = mysql_fetch_array(mysql_query("SELECT * FROM `kompl_us` where `id_us` = '".abs(intval($_GET['id']))."' and `type` = 'тело' and `act` = '1' "));
$s=$stat['sila']+$stat['hp']+$stat['prot'];
$stat2 = mysql_fetch_array(mysql_query("SELECT * FROM `kompl_us` where `id_us` = '".$user['id']."' and `type` = 'тело' and `act` = '1' "));
$v=$stat2['sila']+$stat2['hp']+$stat2['prot'];
$st=$s-$v;
echo'<div class="foot"><table width="100%">
<tbody><tr><td width="40" height="40">
    <span><img style="border:1.4px solid #131313;border-radius:3px" width="40" height="40" src="'.$komp['url'].'">
	</span><span> <div class="level">'.$komp2['lvl'].'</div></span>
  </td><td>';
  if($komp2['fleece']==0){$fleece="пусто";}
if($komp2['fleece']>0){$fleece="+".$komp2['fleece']."";}
if($komp2['fleece']==0){$fleece_img='A4A4A4';}
if($komp2['fleece']==50){$fleece_img='F5D188';}
if($komp2['fleece']==100){$fleece_img='67EE70';}
if($komp2['fleece']==300){$fleece_img='4385F0';}
if($komp2['fleece']==600){$fleece_img='9A52E8';}
if($komp2['fleece']==1200){$fleece_img='FF3042';}
if($komp2['fleece']==2500){$fleece_img='D1D439';}
if($komp['ur']==5){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Простая";$f="<font color='F5D188'>";}
if($komp['ur']==4){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Обычная";$f="<font color='67EE70'>";}
if($komp['ur']==3){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Редкая";$f="<font color='4385F0'>";}
if($komp['ur']==2){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Эпическая";$f="<font color='9A52E8'>";}
if($komp['ur']==1){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Легендарная";$f="<font color='FF3042'>";}
echo'</td><td > '.$komp['name'].'<span class=float-right><div class="empty"></div>'.$j.''.$f.''.$k.'</font></br>Тип: <font color="E2E2E2">'.$komp['type'].'</font></br> Руна: <font color="'.$fleece_img.'">'.$fleece.'</font></span> ';
if($user['id'] != $ank['id']){
 if($st>0){echo" <font color='71cc71'> (+".$st.")</font>";}
 if($st<0){echo" <font color='FF6633'> (".$st.")</font>";}
 }echo'
<font color="CDCFCF">
 <div class="empty"></div><img src="/images/icon/stat/prot.png" width="16" height="16"> '.$komp2['prot'].' <img src="/images/icon/stat/hp.png" width="16" height="16"> '.$komp2['hp'].' <img src="/images/icon/stat/sila.png" width="16" height="16"> '.$komp2['sila'].'<div class="empty"></div></font>';
if($user['id'] == $ank['id']){echo' <a class="btn2" href="?remove='.$komp2['id'].'">
         <span class="but">  Снять  </span> </a>';
	  if($komp2['lvl']<40){
echo' <a class="btn2" href="/smith/level?id='.$komp2['id'].'"><span class="but">Улучшить</span></a>';
}
}
echo'</td><td></table></font></div>
<hr>';
}
}
else
{
echo'<div class="foot"><table width="100%">
<tbody><tr><td width="40" height="40">
    <img  src="/images/weapon/04.jpg" style="border:1px solid #131313;border-radius:4px; height:40px; width:40px">
  </td><td>Пусто<span class=float-right>Тип: <font color="E2E2E2">тело</font>';
echo'</table></font></div><hr>';
}
/* .............................................................................
.............................................................................*/
$kompls = mysql_query("SELECT * from `kompl_us` where `id_us` = '".$ank['id']."' and `act` = '1' and `type` = 'рука 1' limit 1");
$avto = mysql_num_rows($kompls);
if($avto>0){while($komp2 = mysql_fetch_array($kompls)){
$komp = mysql_fetch_array(mysql_query("SELECT * FROM `kompl` where `id` = '".$komp2['id_komp']."' limit 1"));
$stat = mysql_fetch_array(mysql_query("SELECT * FROM `kompl_us` where `id_us` = '".abs(intval($_GET['id']))."' and `type` = 'рука 1' and `act` = '1' "));
$s=$stat['sila']+$stat['hp']+$stat['prot'];
$stat2 = mysql_fetch_array(mysql_query("SELECT * FROM `kompl_us` where `id_us` = '".$user['id']."' and `type` = 'рука 1' and `act` = '1' "));
$v=$stat2['sila']+$stat2['hp']+$stat2['prot'];
$st=$s-$v;
echo'<div class="foot"><table width="100%">
<tbody><tr><td width="40" height="40">
    <span><img style="border:1.4px solid #131313;border-radius:3px" width="40" height="40" src="'.$komp['url'].'">
	</span><span> <div class="level">'.$komp2['lvl'].'</div></span>
  </td><td>';
  if($komp2['fleece']==0){$fleece="пусто";}
if($komp2['fleece']>0){$fleece="+".$komp2['fleece']."";}
if($komp2['fleece']==0){$fleece_img='A4A4A4';}
if($komp2['fleece']==50){$fleece_img='F5D188';}
if($komp2['fleece']==100){$fleece_img='67EE70';}
if($komp2['fleece']==300){$fleece_img='4385F0';}
if($komp2['fleece']==600){$fleece_img='9A52E8';}
if($komp2['fleece']==1200){$fleece_img='FF3042';}
if($komp2['fleece']==2500){$fleece_img='D1D439';}
if($komp['ur']==5){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Простая";$f="<font color='F5D188'>";}
if($komp['ur']==4){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Обычная";$f="<font color='67EE70'>";}
if($komp['ur']==3){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Редкая";$f="<font color='4385F0'>";}
if($komp['ur']==2){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Эпическая";$f="<font color='9A52E8'>";}
if($komp['ur']==1){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Легендарная";$f="<font color='FF3042'>";}
echo'</td><td > '.$komp['name'].'<span class=float-right><div class="empty"></div>'.$j.''.$f.''.$k.'</font></br>Тип: <font color="E2E2E2">'.$komp['type'].'</font></br> Руна: <font color="'.$fleece_img.'">'.$fleece.'</font></span> ';
if($user['id'] != $ank['id']){
 if($st>0){echo" <font color='71cc71'> (+".$st.")</font>";}
 if($st<0){echo" <font color='FF6633'> (".$st.")</font>";}
 }
 echo'<font color="CDCFCF"> <div class="empty"></div><img src="/images/icon/stat/prot.png" width="16" height="16"> '.$komp2['prot'].' <img src="/images/icon/stat/hp.png" width="16" height="16"> '.$komp2['hp'].' <img src="/images/icon/stat/sila.png" width="16" height="16"> '.$komp2['sila'].'<div class="empty"></div></font>';
if($user['id'] == $ank['id']){echo' <a class="btn2" href="?remove='.$komp2['id'].'">
 <span class="but">        Снять      </span>  </a>';
if($komp2['lvl']<40){echo' <a class="btn2" href="/smith/level?id='.$komp2['id'].'"><span class="but">Улучшить</span></a>';}}
echo'</td><td></table></font></div><hr>';
}
} else {
echo'<div class="foot"><table width="100%">
<tbody><tr><td width="40" height="40">
    <img  src="/images/weapon/01.jpg" style="border:1px solid #131313;border-radius:4px; height:40px; width:40px">
  </td><td>Пусто<span class=float-right>Тип: <font color="E2E2E2">рука 1</font>';
echo'</table></font></div><hr>';
}
/* .............................................................................
.............................................................................*/
$kompls = mysql_query("SELECT * from `kompl_us` where `id_us` = '".$ank['id']."' and `act` = '1' and `type` = 'рука 2' limit 1 ");
$avto = mysql_num_rows($kompls);
if($avto>0){while($komp2 = mysql_fetch_array($kompls)){
$komp = mysql_fetch_array(mysql_query("SELECT * FROM `kompl` where `id` = '".$komp2['id_komp']."' limit 1"));
$stat = mysql_fetch_array(mysql_query("SELECT * FROM `kompl_us` where `id_us` = '".abs(intval($_GET['id']))."' and `type` = 'рука 2' and `act` = '1' "));
$s=$stat['sila']+$stat['hp']+$stat['prot'];
$stat2 = mysql_fetch_array(mysql_query("SELECT * FROM `kompl_us` where `id_us` = '".$user['id']."' and `type` = 'рука 2' and `act` = '1' "));
$v=$stat2['sila']+$stat2['hp']+$stat2['prot'];
$st=$s-$v;
echo'<div class="foot"><table width="100%">
<tbody><tr><td width="40" height="40">
    <span><img style="border:1.4px solid #131313;border-radius:3px" width="40" height="40" src="'.$komp['url'].'">
	</span><span> <div class="level">'.$komp2['lvl'].'</div></span>
  </td><td>';
  if($komp2['fleece']==0){$fleece="пусто";}
if($komp2['fleece']>0){$fleece="+".$komp2['fleece']."";}
if($komp2['fleece']==0){$fleece_img='A4A4A4';}
if($komp2['fleece']==50){$fleece_img='F5D188';}
if($komp2['fleece']==100){$fleece_img='67EE70';}
if($komp2['fleece']==300){$fleece_img='4385F0';}
if($komp2['fleece']==600){$fleece_img='9A52E8';}
if($komp2['fleece']==1200){$fleece_img='FF3042';}
if($komp2['fleece']==2500){$fleece_img='D1D439';}
if($komp['ur']==5){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Простая";$f="<font color='F5D188'>";}
if($komp['ur']==4){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Обычная";$f="<font color='67EE70'>";}
if($komp['ur']==3){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Редкая";$f="<font color='4385F0'>";}
if($komp['ur']==2){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Эпическая";$f="<font color='9A52E8'>";}
if($komp['ur']==1){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Легендарная";$f="<font color='FF3042'>";}echo'
</td><td > '.$komp['name'].'<span class=float-right><div class="empty"></div>'.$j.''.$f.''.$k.'</font></br>Тип: <font color="E2E2E2">'.$komp['type'].'</font></br> Руна: </font><font color="'.$fleece_img.'">'.$fleece.'</font></span> ';
if($user['id'] != $ank['id']){
 if($st>0){echo" <font color='71cc71'> (+".$st.")</font>";}
 if($st<0){echo" <font color='FF6633'> (".$st.")</font>";}
 }echo'
<font color="CDCFCF">
 <div class="empty"></div><img src="/images/icon/stat/prot.png" width="16" height="16"> '.$komp2['prot'].' <img src="/images/icon/stat/hp.png" width="16" height="16"> '.$komp2['hp'].' <img src="/images/icon/stat/sila.png" width="16" height="16"> '.$komp2['sila'].'<div class="empty"></div></font>';
if($user['id'] == $ank['id']){echo' <a class="btn2" href="?remove='.$komp2['id'].'">
         <span class="but">
        Снять
      </span>  </a>';
	  if($komp2['lvl']<40){echo' <a class="btn2" href="/smith/level?id='.$komp2['id'].'"><span class="but">Улучшить</span></a>';}}
	  echo'</td><td></table></font></div>
<hr>';
}
}else{
echo'<div class="foot"><table width="100%">
<tbody><tr><td width="40" height="40">
    <img  src="/images/weapon/02.jpg" style="border:1px solid #131313;border-radius:4px; height:40px; width:40px">
  </td><td>Пусто<span class=float-right>Тип: <font color="E2E2E2">рука 2</font>';
echo'</table></font></div><hr>';
}
/* .............................................................................
.............................................................................*/
$kompls = mysql_query("SELECT * from `kompl_us` where `id_us` = '".$ank['id']."' and `act` = '1' and `type` = 'ноги' limit 1");
$avto = mysql_num_rows($kompls);
if($avto>0){while($komp2 = mysql_fetch_array($kompls)){
$komp = mysql_fetch_array(mysql_query("SELECT * FROM `kompl` where `id` = '".$komp2['id_komp']."' limit 1"));
$stat = mysql_fetch_array(mysql_query("SELECT * FROM `kompl_us` where `id_us` = '".abs(intval($_GET['id']))."' and `type` = 'ноги' and `act` = '1' "));
$s=$stat['sila']+$stat['hp']+$stat['prot'];
$stat2 = mysql_fetch_array(mysql_query("SELECT * FROM `kompl_us` where `id_us` = '".$user['id']."' and `type` = 'ноги' and `act` = '1' "));
$v=$stat2['sila']+$stat2['hp']+$stat2['prot'];
$st=$s-$v;
echo'<div class="foot"><table width="100%">
<tbody><tr><td width="40" height="40">
    <span><img style="border:1.4px solid #131313;border-radius:3px" width="40" height="40" src="'.$komp['url'].'">
	</span><span> <div class="level">'.$komp2['lvl'].'</div></span>
  </td><td>';
  if($komp2['fleece']==0){$fleece="пусто";}
if($komp2['fleece']>0){$fleece="+".$komp2['fleece']."";}
if($komp2['fleece']==0){$fleece_img='A4A4A4';}
if($komp2['fleece']==50){$fleece_img='F5D188';}
if($komp2['fleece']==100){$fleece_img='67EE70';}
if($komp2['fleece']==300){$fleece_img='4385F0';}
if($komp2['fleece']==600){$fleece_img='9A52E8';}
if($komp2['fleece']==1200){$fleece_img='FF3042';}
if($komp2['fleece']==2500){$fleece_img='D1D439';}
if($komp['ur']==5){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Простая";$f="<font color='F5D188'>";}
if($komp['ur']==4){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Обычная";$f="<font color='67EE70'>";}
if($komp['ur']==3){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Редкая";$f="<font color='4385F0'>";}
if($komp['ur']==2){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Эпическая";$f="<font color='9A52E8'>";}
if($komp['ur']==1){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Легендарная";$f="<font color='FF3042'>";}echo'
</td><td > '.$komp['name'].'<span class=float-right><div class="empty"></div>'.$j.''.$f.''.$k.'</font></br>Тип: <font color="E2E2E2">'.$komp['type'].'</font></br> Руна: <font color="'.$fleece_img.'">'.$fleece.'</font></span> ';
if($user['id'] != $ank['id']){
 if($st>0){echo" <font color='71cc71'> (+".$st.")</font>";}
 if($st<0){echo" <font color='FF6633'> (".$st.")</font>";}
 }echo'
<font color="CDCFCF">
 <div class="empty"></div><img src="/images/icon/stat/prot.png" width="16" height="16"> '.$komp2['prot'].' <img src="/images/icon/stat/hp.png" width="16" height="16"> '.$komp2['hp'].' <img src="/images/icon/stat/sila.png" width="16" height="16"> '.$komp2['sila'].'<div class="empty"></div></font>';
if($user['id'] == $ank['id']){echo' <a class="btn2" href="?remove='.$komp2['id'].'">
         <span class="but">
        Снять
      </span>  </a>';
	  if($komp2['lvl']<40){echo' <a class="btn2" href="/smith/level?id='.$komp2['id'].'"><span class="but">Улучшить</span></a>';}}
	  echo'</td><td></table></font></div>
<hr>';

}}else{
echo'<div class="foot"><table width="100%">
<tbody><tr><td width="40" height="40">
    <img  src="/images/weapon/06.jpg" style="border:1px solid #131313;border-radius:4px; height:40px; width:40px">
  </td><td>Пусто<span class=float-right>Тип: <font color="E2E2E2">ноги</font>';
echo'</table></font></div><hr>';
}
/* .............................................................................
.............................................................................*/
$kompls = mysql_query("SELECT * from `kompl_us` where `id_us` = '".$ank['id']."' and `act` = '1' and `type` = 'кольцо' limit 1");
$avto = mysql_num_rows($kompls);
if($avto>0){while($komp2 = mysql_fetch_array($kompls)){
$komp = mysql_fetch_array(mysql_query("SELECT * FROM `kompl` where `id` = '".$komp2['id_komp']."' limit 1"));
$stat = mysql_fetch_array(mysql_query("SELECT * FROM `kompl_us` where `id_us` = '".abs(intval($_GET['id']))."' and `type` = 'кольцо' and `act` = '1' "));
$s=$stat['sila']+$stat['hp']+$stat['prot'];
$stat2 = mysql_fetch_array(mysql_query("SELECT * FROM `kompl_us` where `id_us` = '".$user['id']."' and `type` = 'кольцо' and `act` = '1' "));
$v=$stat2['sila']+$stat2['hp']+$stat2['prot'];
$st=$s-$v;
echo'<div class="foot"><table width="100%">
<tbody><tr><td width="40" height="40">
    <span><img style="border:1.4px solid #131313;border-radius:3px" width="40" height="40" src="'.$komp['url'].'">
	</span><span> <div class="level">'.$komp2['lvl'].'</div></span>
  </td><td>';
  if($komp2['fleece']==0){$fleece="пусто";}
if($komp2['fleece']>0){$fleece="+".$komp2['fleece']."";}
if($komp2['fleece']==0){$fleece_img='A4A4A4';}
if($komp2['fleece']==50){$fleece_img='F5D188';}
if($komp2['fleece']==100){$fleece_img='67EE70';}
if($komp2['fleece']==300){$fleece_img='4385F0';}
if($komp2['fleece']==600){$fleece_img='9A52E8';}
if($komp2['fleece']==1200){$fleece_img='FF3042';}
if($komp2['fleece']==2500){$fleece_img='D1D439';}
if($komp['ur']==5){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Простая";$f="<font color='F5D188'>";}
if($komp['ur']==4){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Обычная";$f="<font color='67EE70'>";}
if($komp['ur']==3){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Редкая";$f="<font color='4385F0'>";}
if($komp['ur']==2){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Эпическая";$f="<font color='9A52E8'>";}
if($komp['ur']==1){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Легендарная";$f="<font color='FF3042'>";}echo'
</td><td > '.$komp['name'].'<span class=float-right><div class="empty"></div>'.$j.''.$f.''.$k.'</font></br>Тип: <font color="E2E2E2">'.$komp['type'].'</font></br> Руна: <font color="'.$fleece_img.'">'.$fleece.'</font></span> ';
if($user['id'] != $ank['id']){
 if($st>0){echo" <font color='71cc71'> (+$st)</font>";}
 if($st<0){echo" <font color='FF6633'> ($st)</font>";}
 }echo'
<font color="CDCFCF">
 <div class="empty"></div><img src="/images/icon/stat/prot.png" width="16" height="16"> '.$komp2['prot'].' <img src="/images/icon/stat/hp.png" width="16" height="16"> '.$komp2['hp'].' <img src="/images/icon/stat/sila.png" width="16" height="16"> '.$komp2['sila'].'<div class="empty"></div></font>';
if($user['id'] == $ank['id']){echo' <a class="btn2" href="?remove='.$komp2['id'].'">
         <span class="but">
        Снять
      </span>  </a>';
	  if($komp2['lvl']<40){echo' <a class="btn2" href="/smith/level?id='.$komp2['id'].'"><span class="but">Улучшить</span></a>';}}
	  echo'</td><td></table></font></div>
<hr>';

}}else{
echo'<div class="foot"><table width="100%">
<tbody><tr><td width="40" height="40">
    <img  src="/images/weapon/09.jpg" style="border:1px solid #131313;border-radius:4px; height:40px; width:40px">
  </td><td>Пусто<span class=float-right>Тип: <font color="E2E2E2">кольцо</font>';
echo'</table></font></div><hr>';
}
/* .............................................................................
.............................................................................*/
$kompls = mysql_query("SELECT * from `kompl_us` where `id_us` = '".$ank['id']."' and `act` = '1' and `type` = 'шея' limit 1");
$avto = mysql_num_rows($kompls);
if($avto>0){while($komp2 = mysql_fetch_array($kompls)){
$komp = mysql_fetch_array(mysql_query("SELECT * FROM `kompl` where `id` = '".$komp2['id_komp']."' limit 1"));
$stat = mysql_fetch_array(mysql_query("SELECT * FROM `kompl_us` where `id_us` = '".abs(intval($_GET['id']))."' and `type` = 'шея' and `act` = '1' "));
$s=$stat['sila']+$stat['hp']+$stat['prot'];
$stat2 = mysql_fetch_array(mysql_query("SELECT * FROM `kompl_us` where `id_us` = '".$user['id']."' and `type` = 'шея' and `act` = '1' "));
$v=$stat2['sila']+$stat2['hp']+$stat2['prot'];
$st=$s-$v;
echo'<div class="foot"><table width="100%">
<tbody><tr><td width="40" height="40">
    <span><img style="border:1.4px solid #131313;border-radius:3px" width="40" height="40" src="'.$komp['url'].'">
	</span><span> <div class="level">'.$komp2['lvl'].'</div></span>
  </td><td>';
  if($komp2['fleece']==0){$fleece="пусто";}
if($komp2['fleece']>0){$fleece="+$komp2[fleece]";}
if($komp2['fleece']==0){$fleece_img='A4A4A4';}
if($komp2['fleece']==50){$fleece_img='F5D188';}
if($komp2['fleece']==100){$fleece_img='67EE70';}
if($komp2['fleece']==300){$fleece_img='4385F0';}
if($komp2['fleece']==600){$fleece_img='9A52E8';}
if($komp2['fleece']==1200){$fleece_img='FF3042';}
if($komp2['fleece']==2500){$fleece_img='D1D439';}
if($komp['ur']==5){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Простая";$f="<font color='F5D188'>";}
if($komp['ur']==4){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Обычная";$f="<font color='67EE70'>";}
if($komp['ur']==3){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Редкая";$f="<font color='4385F0'>";}
if($komp['ur']==2){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Эпическая";$f="<font color='9A52E8'>";}
if($komp['ur']==1){$j="<img src='/images/icon/crys/".$komp['ur'].".png'>";$k="Легендарная";$f="<font color='FF3042'>";}echo'
</td><td > '.$komp['name'].'<span class=float-right><div class="empty"></div>'.$j.''.$f.''.$k.'</font></br>Тип: <font color="E2E2E2">'.$komp['type'].'</font></br> Руна: <font color="'.$fleece_img.'">'.$fleece.'</font></span> ';
if($user['id'] != $ank['id']){
 if($st>0){echo" <font color='71cc71'> (+".$st.")</font>";}
 if($st<0){echo" <font color='FF6633'> (".$st.")</font>";}
 }
 echo'
<font color="CDCFCF">
 <div class="empty"></div><img src="/images/icon/stat/prot.png" width="16" height="16"> '.$komp2['prot'].' <img src="/images/icon/stat/hp.png" width="16" height="16"> '.$komp2['hp'].' <img src="/images/icon/stat/sila.png" width="16" height="16"> '.$komp2['sila'].'<div class="empty"></div></font>';
if($user['id'] == $ank['id']){echo' <a class="btn2" href="?remove='.$komp2['id'].'">
         <span class="but">
        Снять
      </span>  </a>';
	  if($komp2['lvl']<40){echo' <a class="btn2" href="/smith/level?id='.$komp2['id'].'"><span class="but">Улучшить</span></a>';}}
	  echo'</td><td></table></font></div>
<div class="line"></div>';

}}else{
echo'<div class="foot"><table width="100%">
<tbody><tr><td width="40" height="40">
    <img  src="/images/weapon/010.jpg" style="border:1px solid #131313;border-radius:4px; height:40px; width:40px">
  </td><td>Пусто<span class=float-right>Тип: <font color="E2E2E2">шея</font>';
echo'</table></font></div><div class="line"></div>';
}


echo"<div class='main'><div class='empty'></div><div class='empty2'></div><center>Собирайте полные комплекты и получайте дополнительные бонусы!</center><div class='empty'></div><div class='empty2'></div></div>";

if($ank['id']==$user['id']){
$reqqqv = mysql_query("SELECT * from `kompl_us` where `id_us` = '".$user['id']."' and `act` != '1' and `sunduk`='1' ");
$sunduk = mysql_num_rows($reqqqv);
echo"<div class='line'></div>
<div class='foot'><table  width='100%' border='0' cellpadding='0' cellspacing='0' style='padding-top: 5px;'>
<tbody><tr>
<td width='49%'><a class='big-but' href='/backpack/'><div class='imgwrap'><img src='/images/icon/backpack_color.png'></div> Рюкзак (".$rukzak."/".$user['rukzak'].")</a></td>
<td width='49%'><a class='big-but' href='/chest/'><div class='imgwrap'><img src='/images/icon/chest.png'></div> Сундук (".$sunduk."/".$user['sunduk'].") </a> </td></tbody></table></div></div>";
}
echo'</body>
</html>';
echo "</div>";

include_once '../core/foot.php';
?>