Вход Регистрация
Файл: dress.php
Строк: 46
<?
define
('PROTECTOR'1);

$headmod 'dress';//фикс. места

$textl='Инвентарь';
include(
'files/path.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`='$_GET[tip]' and `id`='$_GET[id]' and `image`='not'");

$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>=2){
echo
'Сначала снимите то что на вас!';
include(
$path.'files/down.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
'Сначала снимите то что на вас!';
include(
$path.'files/down.php');
exit;
}
}
if(
$avto==0){
echo
'Ошибка, такой вещи нет!';
include(
$path.'files/down.php');
exit;
}
$mag mysql_fetch_array($req);

if(
$mag[nlvl] > $udata[lvl]){
echo
'<p>Оружие не подходит по уровню! Иди в окрестности и поднеми свой level.</p>';
include(
$path.'files/down.php');
exit;
}

$npatt=$mag[patt]+$udata[patt];
$nmatt=$mag[matt]+$udata[matt];

$npdef=$mag[pdef]+$udata[pdef];
$nmdef=$mag[mdef]+$udata[mdef];


mysql_query("UPDATE `users` SET
         `pdef` = '
$npdef',
         `mdef` = '
$nmdef',
         `patt` = '
$npatt',
         `matt` = '
$nmatt'
          WHERE usr = '
$log'");

mysql_query("UPDATE item SET image = 'yes' WHERE `usr` = '$log' and `tip`='$_GET[tip]' and `id`='$_GET[id]'");

echo
"Вы одели $mag[name]!<br/>";
echo
"<a href="inventar.php?">Назад</a>";

include(
$path.'files/down.php');
?>
Онлайн: 2
Реклама