From 1e58e8a99cef6f7f1b4d2a5e381cc296742b55c3 Mon Sep 17 00:00:00 2001 From: lopar Date: Tue, 27 Oct 2020 19:16:20 +0200 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D1=85=D0=BE=D1=80=D0=BE=D0=BD?= =?UTF-8?q?=D0=B8=D0=BB=20=D0=B2=D0=B0=D0=BB=D1=8E=D1=82=D0=BD=D1=8B=D0=B9?= =?UTF-8?q?=20=D0=BC=D0=B0=D0=B3=D0=B0=D0=B7=D0=B8=D0=BD,=20=D0=BA=D0=BE?= =?UTF-8?q?=D1=82=D0=BE=D1=80=D1=8B=D0=B9=20=D1=81=D1=82=D0=BE=D0=B8=D1=82?= =?UTF-8?q?=20=D0=B7=D0=B0=D0=B2=D0=BE=D0=B4=D0=B8=D1=82=D1=8C=20=D0=B2=20?= =?UTF-8?q?=D1=81=D0=B0=D0=BC=D1=83=D1=8E=20=D0=BF=D0=BE=D1=81=D0=BB=D0=B5?= =?UTF-8?q?=D0=B4=D0=BD=D1=8E=D1=8E=20=D0=BE=D1=87=D0=B5=D1=80=D0=B5=D0=B4?= =?UTF-8?q?=D1=8C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/admin.php | 6 -- ashop.php | 200 ------------------------------------------- classes/City.php | 1 - classes/Rooms.php | 3 +- classes/ShopItem.php | 4 - classes/Travel.php | 6 +- labirint.php | 22 ++--- main.php | 4 - towerin.php | 16 ++-- 9 files changed, 15 insertions(+), 247 deletions(-) delete mode 100644 ashop.php diff --git a/admin/admin.php b/admin/admin.php index 1a08be2..1dd3b24 100644 --- a/admin/admin.php +++ b/admin/admin.php @@ -240,7 +240,6 @@ Template::header('ᐰdminка'); - @@ -409,11 +408,6 @@ if ($_POST['name']) { // echo "Предмет не был добавлен!" . mysql_error(); // }; // -// if ($_POST['shop'] == 3) if (mysql_query("INSERT INTO ashop(name,duration,maxdur,cost,ecost,nlevel,nsila,nlovk,ninta,nvinos,nintel,nmudra,nnoj,ntopor,ndubina,nmech,nalign,minu,maxu,goden,gsila,glovk,ginta,gintel,ghp,mfkrit,mfakrit,mfuvorot,mfauvorot,gnoj,gtopor,gdubina,gmech,img,count,bron1,bron2,bron3,bron4,magic,type,massa,needident,nfire,nwater,nair,nearth,nlight,ngray,ndark,gfire,gwater,gair,gearth,glight,ggray,gdark,encicl,artefact,letter,isrep,razdel) VALUES ('" . $_POST['name'] . "','" . $_POST['duration'] . "','" . $_POST['maxdur'] . "','" . $_POST['cost'] . "','" . $_POST['ecost'] . "','" . $_POST['nlevel'] . "','" . $_POST['nsila'] . "','" . $_POST['nlovk'] . "','" . $_POST['ninta'] . "','" . $_POST['nvinos'] . "','" . $_POST['nintel'] . "','" . $_POST['nmudra'] . "','" . $_POST['nnoj'] . "','" . $_POST['ntopor'] . "','" . $_POST['ndubina'] . "','" . $_POST['nmech'] . "','" . $_POST['nalign'] . "','" . $_POST['minu'] . "','" . $_POST['maxu'] . "','" . $goden_tmp . "','" . $_POST['gsila'] . "','" . $_POST['glovk'] . "','" . $_POST['ginta'] . "','" . $_POST['gintel'] . "','" . $_POST['ghp'] . "','" . $_POST['mfkrit'] . "','" . $_POST['mfakrit'] . "','" . $_POST['mfuvorot'] . "','" . $_POST['mfauvorot'] . "','" . $_POST['gnoj'] . "','" . $_POST['gtopor'] . "','" . $_POST['gdubina'] . "','" . $_POST['gmech'] . "','" . $_POST['img'] . "','" . $_POST['count'] . "','" . $_POST['bron1'] . "','" . $_POST['bron2'] . "','" . $_POST['bron3'] . "','" . $_POST['bron4'] . "','" . $_POST['magic'] . "','" . $_POST['type'] . "','" . $_POST['massa'] . "','" . $_POST['needident'] . "','" . $_POST['nfire'] . "','" . $_POST['nwater'] . "','" . $_POST['nair'] . "','" . $_POST['nearth'] . "','" . $_POST['nlight'] . "','" . $_POST['ngray'] . "','" . $_POST['ndark'] . "','" . $_POST['gfire'] . "','" . $_POST['gwater'] . "','" . $_POST['gair'] . "','" . $_POST['gearth'] . "','" . $_POST['glight'] . "','" . $_POST['ggray'] . "','" . $_POST['gdark'] . "','" . $_POST['encicl'] . "','1','" . $_POST['letter'] . "','" . $_POST['isrep'] . "','" . $_POST['razdel'] . "');")) { -// echo "Предмет успешно добавлен"; -// } else { -// echo "Предмет не был добавлен!" . mysql_error(); -// }; } //End item adder diff --git a/ashop.php b/ashop.php deleted file mode 100644 index c8e0704..0000000 --- a/ashop.php +++ /dev/null @@ -1,200 +0,0 @@ -room != 50) { - header("Location: main.php"); - exit; -} - -if ($user->battle) { - header('location: fbattle.php'); - exit; -} - -$bank = db::c()->query('SELECT `ekr` FROM `bank` WHERE `id`=?i', $_SESSION['uid'])->fetch_assoc(); - -$shopItems = db::c()->query('SELECT `ashop`.*, - `magic`.`name` AS `magic_name`, - `magic`.`chanse` AS `magic_chanse`, - `magic`.`time` AS `magic_time`, - `magic`.`file` AS `magic_file`, - `magic`.`targeted` AS `magic_targeted`, - `magic`.`needcharge` AS `magic_needcharge`, - `magic`.`img` AS `magic_img` - -FROM `ashop` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE `count` > 0 AND `ecost` > 0 AND `razdel` = ?i ORDER by `nlevel` ASC, `id` ASC', $_GET['otdel']); - -$iteminfo = []; -while ($row = $shopItems->fetch_assoc()) { - $iteminfo[] = new ShopItem($row); -} - -if (!empty($_GET['buy'])) { -$dress = db::c()->query('SELECT * FROM `ashop` WHERE `id`=?i', $_GET['buy'])->fetch_assoc(); -$itemWeight = db::c()->query('SELECT sum(`massa`) AS `m` FROM `inventory` WHERE `owner` = ?i AND `setsale` = 0', $user['id'])->fetch_assoc(); -if (($dress['massa'] + $itemWeight['m']) > (get_meshok())) { - $status = 'Недостаточно места в рюкзаке.'; -} elseif ($bank['ekr'] >= $dress['ecost'] && ($dress['count'] > 0 || $dress['count'] == -1)) { - $goden = ''; - if (isset($dress['goden'])) { - $goden = $dress['goden'] * 24 * 60 * 60 + time(); // Ну вот нахуя?} - db::c()->query(' - INSERT INTO `inventory` - ( - `prototype`,`owner`,`name`,`type`,`massa`,`cost`,`img`,`maxdur`,`isrep`,`gsila`,`glovk`,`ginta`,`gintel`, - `ghp`,`gnoj`,`gtopor`,`gdubina`,`gmech`,`gfire`,`gwater`,`gair`,`gearth`,`glight`,`ggray`,`gdark`, - `needident`,`nsila`,`nlovk`,`ninta`,`nintel`,`nmudra`,`nvinos`,`nnoj`,`ntopor`,`ndubina`,`nmech`, - `nfire`,`nwater`,`nair`,`nearth`,`nlight`,`ngray`,`ndark`,`mfkrit`,`mfakrit`,`mfuvorot`,`mfauvorot`, - `bron1`,`bron2`,`bron3`,`bron4`,`maxu`,`minu`,`magic`,`nlevel`,`nalign`,`dategoden`,`goden`,`otdel`, - `artefact`, `koll` - ) - VALUES (?i,?i,"?s",?i,?i,"?s","?s",?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i) - ', $dress['id'], $_SESSION['uid'], $dress['name'], $dress['type'], $dress['massa'], $dress['cost'], $dress['img'], $dress['maxdur'], $dress['isrep'], - $dress['gsila'], $dress['glovk'], $dress['ginta'], $dress['gintel'], $dress['ghp'], $dress['gnoj'], $dress['gtopor'], $dress['gdubina'], $dress['gmech'], - $dress['gfire'], $dress['gwater'], $dress['gair'], $dress['gearth'], $dress['glight'], $dress['ggray'], $dress['gdark'], $dress['needident'], - $dress['nsila'], $dress['nlovk'], $dress['ninta'], $dress['nintel'], $dress['nmudra'], $dress['nvinos'], $dress['nnoj'], $dress['ntopor'], $dress['ndubina'], $dress['nmech'], - $dress['nfire'], $dress['nwater'], $dress['nair'], $dress['nearth'], $dress['nlight'], $dress['ngray'], $dress['ndark'], $dress['mfkrit'], $dress['mfakrit'], - $dress['mfuvorot'], $dress['mfauvorot'], $dress['bron1'], $dress['bron3'], $dress['bron2'], $dress['bron4'], $dress['maxu'], $dress['minu'], $dress['magic'], - $dress['nlevel'], $dress['nalign'], $goden, $dress['goden'], $dress['razdel'], $dress['artefact'], $dress['koll']); - - $inventoryItemId = db::c()->getLastInsertId(); - if ($dress['count'] != -1) { - db::c()->query('UPDATE `ashop` SET `count` = `count`- 1 WHERE `id` = ?i', $_GET['buy']); - } - $deloText = "{$user['login']} купил товар «{$dress['name']}» id:({$inventoryItemId}) в магазине «Берёзка» за {$dress['ecost']} екр."; - addToDelo($deloText); - $status = "Вы купили «{$dress['name']}» за {$dress['ecost']} екр."; - db::c()->query('UPDATE `bank` SET `ekr` = `ekr` - ?i WHERE `id` = ?i', $dress['ecost'], $_SESSION['uid']); - // Для обновления данных о деньгах на странице - $bank['ekr'] -= $dress['ecost']; - - } else { - $status = "Недостаточно денег или нет вещей в наличии."; - } -} -$shopCategory = ''; -$shopCategoryTypeNumber = empty($_GET['otdel']) ?: $_GET['otdel']; -switch ($shopCategoryTypeNumber) { - default: - $shopCategory = "Прихожая"; - break; - case 1: - $shopCategory = "Кастеты и ножи"; - break; - case 11: - $shopCategory = "Топоры"; - break; - case 12: - $shopCategory = "Дубины и булавы"; - break; - case 13: - $shopCategory = "Мечи"; - break; - case 14: - $shopCategory = "Луки и арбалеты"; - break; - case 2: - $shopCategory = "Сапоги"; - break; - case 21: - $shopCategory = "Перчатки"; - break; - case 22: - $shopCategory = "Легкая броня"; - break; - case 23: - $shopCategory = "Тяжелая броня"; - break; - case 24: - $shopCategory = "Шлемы"; - break; - case 3: - $shopCategory = "Щиты"; - break; - case 4: - $shopCategory = "Серьги"; - break; - case 41: - $shopCategory = "Ожерелья"; - break; - case 42: - $shopCategory = "Кольца"; - break; - case 5: - $shopCategory = "Заклинания: нейтральные"; - break; - case 51: - $shopCategory = "Заклинания: боевые и защитные"; - break; - case 6: - $shopCategory = "Амуниция"; - break; - case 7: - $shopCategory = "Букеты"; - break; -} -Template::header('Берёзка'); -?> - -

Магазин Берёзка

- ← выйти на Центральную площадь -
- - - - - -
-

- - - - - - - - -
- printImage(); - $ii->printControls('ashop'); ?> - - printInfo(); ?> -
-
- Масса всех ваших вещей: -
У вас в наличии: екр.
-
- -
Отделы магазина
-
-
Оружие:
-
кинжалы
-
топоры
-
дубины
-
мечи
-
Одежда:
-
шлемы
-
тяжелая броня
-
легкая броня
-
щиты
-
перчатки
-
сапоги
-
Ювелирные товары:
-
серьги
-
ожерелья
-
кольца
-
Магия:
-
боевые
-
разные
-
Разное:
-
амуниция
-
букеты
-
-
- \ No newline at end of file diff --git a/classes/City.php b/classes/City.php index 3f14b49..b5c6d56 100644 --- a/classes/City.php +++ b/classes/City.php @@ -17,7 +17,6 @@ class City self::showBuilding(9, "winter_cap_tree2", 215, 500, "Новогодняя елка") . self::showBuilding(13, "spring_cap_statue", 222, 365, "Памятник Мэру Города") . self::showBuilding(14, "winter_cap_statue", 210, 390, "Снеговик") . - self::showBuilding(17, "spring_cap_berezka", 205, 435, "Березка") . self::showBuilding(222, "cap_arr_top", 180, 650, "Торговая улица") . ''; } elseif ($id === 21) { diff --git a/classes/Rooms.php b/classes/Rooms.php index b3f89e9..bc8b1d6 100644 --- a/classes/Rooms.php +++ b/classes/Rooms.php @@ -35,7 +35,6 @@ trait Rooms 47 => "Замок (строительство)", 48 => "Обитель Хаоса", 49 => "Проход к Цитадели Хаоса", - 50 => "Магазин Берёзка", 51 => "Парковая улица", 52 => "Квартал Законников", 53 => "Библиотека", @@ -186,5 +185,5 @@ trait Rooms 2655 => "Арена Богов", 2601 => "Замковая Площадь", 2702 => "Центральная площадь (мираж)", - ]; + ] ?? "Небытие"; } \ No newline at end of file diff --git a/classes/ShopItem.php b/classes/ShopItem.php index 8606278..51011e8 100644 --- a/classes/ShopItem.php +++ b/classes/ShopItem.php @@ -47,10 +47,6 @@ BTN; $btnValue = "Купить за " . intval($this->cost) . " кр."; $btnLink = "/shop.php?buy={$this->id}&rnd=" . mt_rand(); break; - case 'ashop': - $btnValue = "Купить за " . intval($this->ecost) . " eкр."; - $btnLink = "/ashop.php?buy={$this->id}&rnd=" . mt_rand(); - break; case 'sell': $btnValue = "Продать"; $btnLink = "/shop.php?sell={$this->id}&rnd=" . mt_rand(); diff --git a/classes/Travel.php b/classes/Travel.php index 4b50a47..8131856 100644 --- a/classes/Travel.php +++ b/classes/Travel.php @@ -20,7 +20,6 @@ class Travel 31 => 'tower.php', 34 => 'fshop.php', 37 => 'gotzamok.php', - 50 => 'ashop.php', 51 => 'city.php', 61 => 'akadem.php', 401 => 'hell.php', @@ -87,11 +86,10 @@ class Travel * 7 Room 21 [STREET] * 8 Room 26 [STREET] * 13 location: quest_room.php - * 17 Room 50 ashop.php * 222 Room 2702 [STREET] */ - $room[20] = [21, 22, 23, 25, 26, 27, 50, 2702]; - $room[22] = $room[23] = $room[25] = $room[27] = $room[50] = [20]; + $room[20] = [21, 22, 23, 25, 26, 27, 2702]; + $room[22] = $room[23] = $room[25] = $room[27] = [20]; /* * 3 Room 2111 [STREET] * 4 Room 20 [STREET] diff --git a/labirint.php b/labirint.php index 723e67d..a3c543b 100644 --- a/labirint.php +++ b/labirint.php @@ -23,14 +23,11 @@ $errkom = ''; $varsitm = [[270, 1]]; $varsitm2 = [[87, 1], [88, 1], [48, 1], [49, 1], [29, 1], [66, 1], [97, 1], [67, 1], [98, 1], [115, 1]]; -function labaItemAdd($id, $type) +function labaItemAdd($id) { global $user; - if ($type == 1) { - $dress = mysql_fetch_array(mysql_query('SELECT * FROM `shop` WHERE `id` = "' . (int)$id . '" LIMIT 1')); - } else { - $dress = mysql_fetch_array(mysql_query('SELECT * FROM `ashop` WHERE `id` = "' . (int)$id . '" LIMIT 1')); - } + $dress = mysql_fetch_array(mysql_query('SELECT * FROM `shop` WHERE `id` = "' . (int)$id . '" LIMIT 1')); + if (isset($dress['id'])) { mysql_query("INSERT INTO `inventory` (`laba`, `prototype`,`owner`,`name`,`type`,`massa`,`cost`, `img`,`maxdur`,`isrep`,`gsila`,`glovk`,`ginta`,`gintel`,`ghp`,`gnoj`,`gtopor`,`gdubina`,`gmech`,`gfire`,`gwater`,`gair`,`gearth`,`glight`,`ggray`,`gdark`,`needident`,`nsila`,`nlovk`,`ninta`,`nintel`,`nmudra`,`nvinos`,`nnoj`,`ntopor`,`ndubina`,`nmech`,`nfire`,`nwater`,`nair`,`nearth`,`nlight`,`ngray`,`ndark`,`mfkrit`,`mfakrit`,`mfuvorot`,`mfauvorot`,`bron1`,`bron2`,`bron3`,`bron4`,`maxu`,`minu`,`magic`,`nlevel`,`nalign`,`dategoden`,`goden`,`otdel`,`gmp`,`gmeshok`,`encicl`,`artefact`,`koll`) VALUES ('$type', '{$dress['id']}','{$user['id']}','{$dress['name']}','{$dress['type']}',{$dress['massa']},{$dress['cost']},'{$dress['img']}',{$dress['maxdur']},{$dress['isrep']},'{$dress['gsila']}','{$dress['glovk']}','{$dress['ginta']}','{$dress['gintel']}','{$dress['ghp']}','{$dress['gnoj']}','{$dress['gtopor']}','{$dress['gdubina']}','{$dress['gmech']}','{$dress['gfire']}','{$dress['gwater']}','{$dress['gair']}','{$dress['gearth']}','{$dress['glight']}','{$dress['ggray']}','{$dress['gdark']}','{$dress['needident']}','{$dress['nsila']}','{$dress['nlovk']}','{$dress['ninta']}','{$dress['nintel']}','{$dress['nmudra']}','{$dress['nvinos']}','{$dress['nnoj']}','{$dress['ntopor']}','{$dress['ndubina']}','{$dress['nmech']}','{$dress['nfire']}','{$dress['nwater']}','{$dress['nair']}','{$dress['nearth']}','{$dress['nlight']}','{$dress['ngray']}','{$dress['ndark']}','{$dress['mfkrit']}','{$dress['mfakrit']}','{$dress['mfuvorot']}','{$dress['mfauvorot']}','{$dress['bron1']}','{$dress['bron2']}','{$dress['bron3']}','{$dress['bron4']}','{$dress['maxu']}','{$dress['minu']}','{$dress['magic']}','{$dress['nlevel']}','{$dress['nalign']}','" . (($dress['goden']) ? ($dress['goden'] * 24 * 60 * 60 + time()) : "") . "','{$dress['goden']}','{$dress['razdel']}','{$dress['gmp']}','{$dress['gmeshok']}','{$dress['encicl']}','{$dress['artefact']}','{$dress[koll]}')"); } @@ -175,7 +172,7 @@ if ($user->room == 1052) { $bots = [ 0 => [10025, 10026, 10027, 10028, 10031, 10032, 10033, 10034], 1 => [10111, 10112, 10113, 10114, 10115, 10116], - 2 => [10111, 10112, 10113] + 2 => [10111, 10112, 10113], ]; $bot_pix2 = $bots[$lab['type']]; @@ -334,7 +331,7 @@ if ($user->room == 1052) { money_add($kr); unset($kr); } else { - labaItemAdd($var['itm']['id'], 1); + labaItemAdd($var['itm']['id']); } } else { $var['itm']['name'] = 'Предмет рассыпался на глазах...'; @@ -346,14 +343,7 @@ if ($user->room == 1052) { if ($user['sex'] == 0) { $var['sex'] = 'а'; } - $var['itm'] = $varsitm2[rand(0, count($varsitm2) - 1)]; - $var['itm'] = $var['itm'][0]; - $var['itm'] = mysql_fetch_array(mysql_query('SELECT `id`, `name` FROM `ashop` WHERE `id` = "' . $var['itm'] . '" LIMIT 1')); - if (isset($var['itm']['id'])) { - labaItemAdd($var['itm']['id'], 2); - } else { - $var['itm']['name'] = 'Предмет рассыпался на глазах...'; - } + $errors .= ' ' . $user['login'] . ' открыл' . $var['sex'] . ' Ящик Пандоры...и забрал "' . $var['itm']['name'] . '"'; $var['obj']['use'] = $user['id']; } elseif ($var['obj']['type'] == 3) { diff --git a/main.php b/main.php index 0d495ab..3a996bc 100644 --- a/main.php +++ b/main.php @@ -113,10 +113,6 @@ if ($edit === null) { header('Location: clan_castle.php'); exit(); } - if ($user->room == 50) { - header('Location: ashop.php'); - exit(); - } if ($user->room == 53) { header('Location: library.php'); exit(); diff --git a/towerin.php b/towerin.php index 369e4f1..4e70d71 100644 --- a/towerin.php +++ b/towerin.php @@ -79,25 +79,21 @@ $rhar = [ "560" => [20, 0, 0, 0, 559], ]; -mysql_query("LOCK TABLES `bots` WRITE, `deztow_stavka` WRITE, `users` WRITE, `deztow_items` WRITE, `inventory` WRITE, `battle` WRITE, `logs` WRITE, `deztow_turnir` WRITE, `effects` WRITE,`shop` WRITE, `online` WRITE, `deztow_gamers_inv` WRITE, `deztow_realchars` WRITE, `deztow_eff` WRITE, `variables` WRITE, `ashop` WRITE"); +mysql_query("LOCK TABLES `bots` WRITE, `deztow_stavka` WRITE, `users` WRITE, `deztow_items` WRITE, `inventory` WRITE, `battle` WRITE, `logs` WRITE, `deztow_turnir` WRITE, `effects` WRITE,`shop` WRITE, `online` WRITE, `deztow_gamers_inv` WRITE, `deztow_realchars` WRITE, `deztow_eff` WRITE, `variables` WRITE"); -$ls = mysql_num_rows(mysql_query("SELECT `id` FROM `users` WHERE `bot` = 1 AND `in_tower` = 1")); -$kol_pl = mysql_num_rows(mysql_query("SELECT `id` FROM `users` WHERE `bot` = 0 AND `in_tower` = 1")); +$ls = mysql_num_rows(mysql_query("SELECT `id` FROM `users` WHERE `bot` = 1 and `in_tower` = 1")); +$kol_pl = mysql_num_rows(mysql_query("SELECT `id` FROM `users` WHERE `bot` = 0 and `in_tower` = 1")); $tur_data = mysql_fetch_array(mysql_query("SELECT * FROM `deztow_turnir` WHERE `active` = TRUE")); if ($_GET['give']) { - $obj = mysql_fetch_array(mysql_query("SELECT * FROM `deztow_items` WHERE `id` = '" . mysql_real_escape_string($_GET['give']) . "' AND `room` = '" . $user->room . "' LIMIT 1")); + $obj = mysql_fetch_array(mysql_query("SELECT * FROM `deztow_items` WHERE `id` = '" . mysql_real_escape_string($_GET['give']) . "' and `room` = '" . $user->room . "' LIMIT 1")); if ($obj) { if ($_SESSION['timei'] - time() <= 0) { $_SESSION['timei'] = (time() + 3); - if ($tur_data['art'] == 0) { - $dress = mysql_fetch_array(mysql_query("SELECT * FROM `shop` WHERE `id` = '" . $obj['iteam_id'] . "' LIMIT 1")); - } else { - $dress = mysql_fetch_array(mysql_query("SELECT * FROM `ashop` WHERE `id` = '" . $obj['iteam_id'] . "' LIMIT 1")); - } + $dress = mysql_fetch_array(mysql_query("SELECT * FROM `shop` WHERE `id` = '" . $obj['iteam_id'] . "' LIMIT 1")); if (isset($dress['id'])) { mysql_query("INSERT INTO `inventory` (`bs`, `prototype`, `owner`, `name`, `type`, `massa`, `cost`, `img`, `maxdur`, `isrep`, `gsila`, `glovk`, `ginta`, `gintel`, `ghp`, `gnoj`, `gtopor`, `gdubina`, `gmech`, `gfire`, `gwater`, `gair`, `gearth`, `glight`, `ggray`, `gdark`, `needident`, `nsila`, `nlovk`, `ninta`, `nintel`, `nmudra`, `nvinos`, `nnoj`, `ntopor`, `ndubina`, `nmech`, `nfire`, `nwater`, `nair`, `nearth`, `nlight`, `ngray`, `ndark`, `mfkrit`, `mfakrit`, `mfuvorot`, `mfauvorot`, `bron1`, `bron2`, `bron3`, `bron4`, `maxu`, `minu`, `magic`, `nlevel`, `nalign`, `dategoden`, `goden`, `otdel`, `koll`) VALUES ('1', '{$dress['id']}', '{$user['id']}', '{$dress['name']}', '{$dress['type']}', '{$dress['massa']}', '{$dress['cost']}', '{$dress['img']}', '{$dress['maxdur']}', '{$dress['isrep']}', '{$dress['gsila']}', '{$dress['glovk']}', '{$dress['ginta']}', '{$dress['gintel']}', '{$dress['ghp']}', '{$dress['gnoj']}', '{$dress['gtopor']}', '{$dress['gdubina']}', '{$dress['gmech']}', '{$dress['gfire']}', '{$dress['gwater']}', '{$dress['gair']}', '{$dress['gearth']}', '{$dress['glight']}', '{$dress['ggray']}', '{$dress['gdark']}', '{$dress['needident']}', '{$dress['nsila']}', '{$dress['nlovk']}', '{$dress['ninta']}', '{$dress['nintel']}', '{$dress['nmudra']}', '{$dress['nvinos']}', '{$dress['nnoj']}', '{$dress['ntopor']}', '{$dress['ndubina']}', '{$dress['nmech']}', '{$dress['nfire']}', '{$dress['nwater']}', '{$dress['nair']}', '{$dress['nearth']}', '{$dress['nlight']}', '{$dress['ngray']}', '{$dress['ndark']}', '{$dress['mfkrit']}', '{$dress['mfakrit']}', '{$dress['mfuvorot']}', '{$dress['mfauvorot']}', '{$dress['bron1']}', '{$dress['bron3']}', '{$dress['bron2']}', '{$dress['bron4']}', '{$dress['maxu']}', '{$dress['minu']}', '{$dress['magic']}', '{$dress['nlevel']}', '{$dress['nalign']}', '" . (($dress['goden']) ? ($dress['goden'] * 24 * 60 * 60 + time()) : "") . "', '{$dress['goden']}', '{$dress['razdel']}', '{$dress['koll']}')"); - mysql_query("DELETE FROM `deztow_items` WHERE `id` = '" . mysql_real_escape_string($_GET['give']) . "' AND `room` = '" . $user->room . "' LIMIT 1"); + mysql_query("DELETE FROM `deztow_items` WHERE `id` = '" . mysql_real_escape_string($_GET['give']) . "' and `room` = '" . $user->room . "' LIMIT 1"); } else { echo 'Предмет не найден. Сообщите Администрации данный код #' . $obj['iteam_id'] . '#'; }