Файл: playtox.tk/weapon_new.php
Строк: 90
<?
define('PROTECTOR', 1);
$head = 'shop';//фикс. места
$textl='Магазин';
@include('files/db.php');
@include('files/auth.php');
@include('files/func.php');
going();
ryd();
@include('files/core.php');
@include('files/head.php');
@include('files/zag.php');
switch($_GET[mod]){
default:
echo" <table>
<tr><td style='border: 2px solid #FFC200;'>
<center>
<a href='weapon_new.php?mod=shop&type=weapon'>
<img src='pic/magaz/weapon.png'></br>Меч</a>
</td><td style='border: 2px solid #FFC200;'>
<center>
<a href='weapon_new.php?mod=shop&type=body'>
<img src='pic/magaz/body.png'></br>Доспехи</a>
</td><td style='border: 2px solid #FFC200;'>
<center>
<a href='weapon_new.php?mod=shop&type=golova'>
<img src='pic/magaz/golova.png'></br>Шлем</a>
</td></tr>
<tr><td style='border: 2px solid #FFC200;'>
<center>
<a href='weapon_new.php?mod=shop&type=nogi'>
<img src='pic/magaz/nogi.png'></br>Чоботы</a>
</td><td style='border: 2px solid #FFC200;'>
<center>
<a href='weapon_new.php?mod=shop&type=shit'>
<img src='pic/magaz/shit.png'></br>Щит</a>
</td><td style='border: 2px solid #FFC200;'>
<center>
<a href='weapon_new.php?mod=shop&type=poyas'>
<img src='pic/magaz/poyas.png'></br>Пояс</a>
</td></tr>
<tr><td style='border: 2px solid #FFC200;'>
<center>
<a href='weapon_new.php?mod=shop&type=plash'>
<img src='pic/magaz/plash.png'></br>Плащ</a>
</td><td style='border: 2px solid #FFC200;'>
<center>
<a href='weapon_new.php?mod=shop&type=amulet'>
<img src='pic/magaz/amulet.png'></br>Амулет</a>
</td><td style='border: 2px solid #FFC200;'>
<center>
<a href='weapon_new.php?mod=shop&type=kolco'>
<img src='pic/magaz/kolco.png'></br>Кольцо</a>
</td></tr>
<tr><td style='border: 2px solid #FFC200;'>
<center>
<a href='weapon_new.php?mod=shop&type=ruki'>
<img src='pic/magaz/ruki.png'></br>Перчатки</a>
</td></tr>
</table>";
break;
case 'shop';
$type=$_GET[type];
$wea=mysql_query("SELECT * FROM `shops` WHERE `tip`='$type' ORDER BY `nlvl` ASC ");
while($weap=mysql_fetch_array($wea)){
if($udata[lvl]>$weap[nlvl]){$font="#AAAAAA";$pic="downlvl.png";}
if($udata[lvl]>=$weap[nlvl] and $udata[lvl]<=$weap[nlvl]+5){$font="#71cc71";$pic="lvl.png";}
if($udata[lvl]<$weap[nlvl]){$font="chocolate";$pic="uplvl.png";}
$wep = mysql_query("SELECT * FROM `weapon` WHERE `image`= 'yes' and `usr`='$log' and `tip`='$weap[tip]'") or die (mysql_error());
$wep = mysql_fetch_array($wep);
$stat = $wep[hp]+$wep[mp]+$wep[krit]+$wep[ukrit]+$wep[sila]+$wep[lovk]+$wep[prot];
$statmag = $weap[hp]+$weap[mp]+$weap[krit]+$weap[ukrit]+$weap[sila]+$weap[lovk]+$weap[prot];
if($stat==$statmag){$tex=" Надето!";}
if($statmag-$stat>0){$sta=$statmag-$stat; $tex="<font color='#71cc71'> Лучше +$sta</font>";}
if($statmag-$stat<0){$sta=$statmag-$stat; $tex="<font color='#FF6633'> Хуже $sta</font>";}
$am=$am+$weap[cena];
echo"<img class="float-left" src="pic/pers/weapon/$weap[tip]$weap[kompl].jpg"/><a href="weapon.php?mod=info&id=$weap[id]"><font color='$font'>$weap[name]</font></a></br>";
echo"<img src='pic/up.png' alt='*'/>$weap[nlvl] ур <img src='pic/pers/weapon/$pic' alt='*'/>$tex <img src='pic/bazar.gif' alt='*'/>$weap[cena]
[<a href="weapon.php?mod=prosm&kom=$weap[kompl]&shmot&act=ask&id=$weap[id]">купить</a>]";
if($udata[prava]>=4){echo"[<a href="adm_panel.php?mod=14&id=$weap[id]">ред</a>]";}
echo"$div";
}
break;
}
@include('files/down.php');
?>