Файл: sumerki.mobi/sumerki.mobi/dress.php
Строк: 111
<?
//////////////////////////////////////////////////////////////
//////////////////////Онлайн игра "Сумерки"///////////////////
//////////////////////Основатель: Mc Laren////////////////////
///////////////////Контакты: ICQ - 597687549//////////////////
/////////////////////Пример: Sumerki.Mobi/////////////////////
///////////Если ты это читаешь, значит скрипт слили :D////////
//////////////////////////////////////////////////////////////
define('PROTECTOR', 1);
$headmod = 'dress';//фикс. места
$textl='Инвентарь';
include('files/path.php');
include('files/gzips.php');
include($path.'files/db.php');
include($path.'files/auth.php');
include($path.'files/func.php');
going();
include($path.'files/core.php');
include($path.'files/head.php');
include($path.'files/zag.php');
$req = mysql_query("SELECT * FROM `item` WHERE `usr` = '$log' and `tip`='".mysql_real_escape_string($_GET['tip'])."' and `id`='".mysql_real_escape_string($_GET['id'])."' and `image`='not'");
$mag = mysql_fetch_array($req);
$avto=mysql_num_rows($req);
if($_GET[tip]=='kolco'){
$req1 = mysql_query("SELECT * FROM `item` WHERE `usr` = '$log' and `tip`='$_GET[tip]' and `image`='yes'");
$avto1=mysql_num_rows($req1);
if($avto1>=1){
echo '<div class="fon bgray"><div class="bg1"><div class="bg2"><div class="bg3"><div class="bg4"><div class="bg5"><div class="bg6"><div class="bg7"><div class="bg8">';
echo'Сначала снимите то что на вас одето!';
echo '</div></div></div></div></div></div></div></div></div>';
include($path.'files/down.php');
include($path.'files/meny.php');
exit;
}
}else{
$req1 = mysql_query("SELECT * FROM `item` WHERE `usr` = '$log' and `tip`='$_GET[tip]' and `image`='yes'");
$avto1=mysql_num_rows($req1);
if($avto1>=1){
echo '<div class="fon bgray"><div class="bg1"><div class="bg2"><div class="bg3"><div class="bg4"><div class="bg5"><div class="bg6"><div class="bg7"><div class="bg8">';
echo'Сначала снимите то что на вас одето!';
echo '</div></div></div></div></div></div></div></div></div>';
include($path.'files/down.php');
include($path.'files/meny.php');
exit;
}
}
if($avto==0){
echo '<div class="fon bgray"><div class="bg1"><div class="bg2"><div class="bg3"><div class="bg4"><div class="bg5"><div class="bg6"><div class="bg7"><div class="bg8">';
echo'Ошибка, такой вещи нет!';
echo '</div></div></div></div></div></div></div></div></div>';
include($path.'files/down.php');
include($path.'files/meny.php');
exit;
}
$mag = mysql_fetch_array($req);
if($mag[klas]!='not' and $mag[klas]!=$udata[klas]){
echo '<div class="fon bgray"><div class="bg1"><div class="bg2"><div class="bg3"><div class="bg4"><div class="bg5"><div class="bg6"><div class="bg7"><div class="bg8">';
echo'Эта вещь не для вашего класса!';
echo '</div></div></div></div></div></div></div></div></div>';
include($path.'files/down.php');
include($path.'files/meny.php');
exit;
}
if($mag[nsila] > $udata[sila] or $mag[num] > $udata[um] or $mag[nlovk] > $udata[lovk] or $mag[nlvl] > $udata[lvl]){
echo '<div class="fon bgray"><div class="bg1"><div class="bg2"><div class="bg3"><div class="bg4"><div class="bg5"><div class="bg6"><div class="bg7"><div class="bg8">';
echo'Вещь неподходит по вашим параметрам (навыкам)!';
echo '</div></div></div></div></div></div></div></div></div>';
include($path.'files/down.php');
include($path.'files/meny.php');
exit;
}
$numin=$mag[umin]+$udata[umin];
$numax=$mag[umax]+$udata[umax];
$npgolova=$mag[pgolova]+$udata[pgolova];
$npbody=$mag[pbody]+$udata[pbody];
$npnogi=$mag[pnogi]+$udata[pnogi];
$nhp=$mag[hp]+$udata[hpall];
$nmp=$mag[mp]+$udata[mpall];
$nkrit=$mag[krit]+$udata[krit];
$nukrit=$mag[ukrit]+$udata[ukrit];
$nsila=$mag[sila]+$udata[sila];
$nlovk=$mag[lovk]+$udata[lovk];
$nprot=$mag[prot]+$udata[prot];
$num=$mag[um]+$udata[um];
$nanti=$mag[antikrit]+$udata[antikrit];
mysql_query("UPDATE `users` SET
`umin` = '$numin',
`umax` = '$numax',
`pgolova` = '$npgolova',
`pbody` = '$npbody',
`pnogi` = '$npnogi',
`hpall` = '$nhp',
`mpall` = '$nmp',
`krit` = '$nkrit',
`ukrit` = '$nukrit',
`antikrit` = '$nanti',
`sila` = '$nsila',
`lovk` = '$nlovk',
`um` = '$num',
`prot` = '$nprot'
WHERE usr = '$log'");
mysql_query("UPDATE item SET image = 'yes' WHERE `usr` = '$log' and `tip`='".mysql_real_escape_string($_GET['tip'])."' and `id`='".mysql_real_escape_string($_GET['id'])."'");
$w=explode("*",$mag[name]);
echo '<div class="fon bgray"><div class="bg1"><div class="bg2"><div class="bg3"><div class="bg4"><div class="bg5"><div class="bg6"><div class="bg7"><div class="bg8">';
echo"Вы одели $mag[name]!";
echo '</div></div></div></div></div></div></div></div></div>';
include($path.'files/down.php');
include($path.'files/meny.php');
?>