Просмотр файла sdark.mobi/smith/index.php

Размер файла: 9.39Kb
<?php
require_once '../core/system.php';
echo only_reg();
echo ban();
echo blok();
$header = "Кузнец";
require_once '../core/head.php';
if($user['level'] < 10){
header('location: /'); 
$_SESSION['err'] = 'Доступно только с 10 уровня';
}
if($user['mesto'] != 'Кузнец')mysql_query("UPDATE `user` set `mesto` = 'Кузнец' where `id` = '".$user['id']."'");
?>
<img src="/images/smith.jpg" width="100%">
<hr>
<table class="foot" width="100%" border="0" cellpadding="0" cellspacing="0" style="padding-top: 5px;">
<tbody>
<tr>
<td width="33%"><a class="big-but" href="/smith/?equip"><div class="imgwrap"><img src="/images/icon/equip.png"></div>Надетые</a></td>
<td width="33%"><a class="big-but" href="/smith/?backpack"><div class="imgwrap"><img src="/images/icon/backpack_color.png"></div>Рюкзак</a></td>
<td width="33%"><a class="big-but" href="/smith/?chest"><div class="imgwrap"><img src="/images/icon/chest.png"></div>Сундук</a></td>
</tbody>
</table>
<hr>
<?php
if(isset($_GET['equip'])){
$kompls = mysql_query("SELECT * from `kompl_us` where `id_us` = '".$user['id']."' and `act`='1' order by `id` DESC ");
$avto=mysql_num_rows($kompls);
while($komp2 = mysql_fetch_array($kompls)){
$komp = mysql_fetch_array(mysql_query("SELECT * FROM `kompl` where `id` = '".$komp2['id_komp']."' limit 1"));
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> ';
echo'<font color="CDCFCF"> <div class="empty2"></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($komp2['lvl']<40){
	echo' <a class="btn2" href="/smith/level?id='.$komp2['id'].'"><span class="but">Улучшить</span></a>';
	}
if($komp2['fleece']<1200){
echo'  <a class="btn2" href="/smith/fleece?id='.$komp2['id'].'"><span class="but">Вставить руну</span></a>';
}
echo' </table></font></div><hr>';
}

if($avto==0){echo "<div class='foot center'>Нет вещей</div><div class='line'></div>";}
}
/////////////////////////////////    Рюкзак    /////////////////////////////////
if(isset($_GET['backpack'])){
$kompls = mysql_query("SELECT * from `kompl_us` where `id_us` = '".$user['id']."' and `act`!='1' and `sunduk`!='1'  order by `id` DESC ");
$avto=mysql_num_rows($kompls);
while($komp2 = mysql_fetch_array($kompls)){
$komp = mysql_fetch_array(mysql_query("SELECT * FROM `kompl` where `id` = '".$komp2['id_komp']."' limit 1"));
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> ';
echo'<font color="CDCFCF">
 <div class="empty2"></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($komp2['lvl']<20){
	echo' <a class="btn2" href="/smith/level?id='.$komp2['id'].'"><span class="but">Улучшить</span></a>';
	}
if($komp2['fleece']<2500){
	echo'  <a class="btn2" href="/smith/fleece?id='.$komp2['id'].'"><span class="but">Вставить руну</span></a>';
	}
echo' </table></font></div><hr>';}

if($avto==0){echo "<div class='foot center'>Нет вещей</div><div class='line'></div>";}
}

/////////////////////////////////    Сундук    /////////////////////////////////
if(isset($_GET['chest'])){
$kompls = mysql_query("SELECT * from `kompl_us` where `id_us` = '".$user['id']."' and `act`!='1'  and `sunduk`!='0'  order by `id` DESC ");
$avto=mysql_num_rows($kompls);
while($komp2 = mysql_fetch_array($kompls)){
$komp = mysql_fetch_array(mysql_query("SELECT * FROM `kompl` where `id` = '".$komp2['id_komp']."' limit 1"));
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> ';
echo'<font color="CDCFCF"> <div class="empty2"></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($komp2['lvl']<20){
	echo' <a class="btn2" href="/smith/level?id='.$komp2['id'].'"><span class="but">Улучшить</span></a>';
	}
if($komp2['fleece']<1200){
	echo'  <a class="btn2" href="/smith/fleece?id='.$komp2['id'].'"><span class="but">Вставить руну</span></a>';
	}
echo' </table></font></div><hr>';
}

if($avto==0){
	echo '<div class="foot center">Нет вещей</div><div class="line"></div>';
	}
}
echo'<div class="mli"><div class="empty"></div><div class="grey center mli">Выберите вещь, которую необходимо улучшить.</div><div class="empty"></div></div>';

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