Похоронил валютный магазин, который стоит заводить в самую последнюю очередь.

This commit is contained in:
lopar 2020-10-27 19:16:20 +02:00
parent f668e9c122
commit 1e58e8a99c
9 changed files with 15 additions and 247 deletions

View File

@ -240,7 +240,6 @@ Template::header('ᐰdminка');
<option value="0" selected disabled>Тип магазина</option>
<option value="1">Обычный</option>
<option value="2">Цветной</option>
<option value="3">Артефактный</option>
</select></td>
</tr>
@ -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

200
ashop.php
View File

@ -1,200 +0,0 @@
<?php
session_start();
if (empty($_SESSION['uid'])) {
header("Location: index.php");
exit;
}
require_once 'functions.php';
if ($user->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('Берёзка');
?>
<script src="js/main.js"></script>
<h1>Магазин Берёзка</h1>
<a href=# onclick=hrefToFrame('city.php?cp')> ← выйти на Центральную площадь</a>
<div><?= $status ?></div>
<table border=0 width=100% cellspacing="0" cellpadding="4">
<tr>
<td valign=top align=left>
<h3><?= $shopCategory ?></h3>
<!--Магазин-->
<table class="zebra" width=100% cellspacing="1" cellpadding="2">
<?php foreach ($iteminfo as $ii): ?>
<tr>
<td style='width: 150px; text-align: center;'>
<?php $ii->printImage();
$ii->printControls('ashop'); ?>
</td>
<td style='vertical-align: top;'>
<?php $ii->printInfo(); ?>
</td>
</tr>
<?php endforeach; ?>
</table>
</td>
<td valign=top width=280>
<b>Масса всех ваших вещей: <?= getItemsMassaInfo() ?>
<br>У вас в наличии: <span style="color: #339900;"><?= $bank['ekr'] ?></span> екр.</b>
<hr>
<div style="text-align: center; font-weight: bold;">Отделы магазина</div>
<dl>
<dt><b>Оружие:</b></dt>
<dd><a href="?otdel=1&rnd=<?= mt_rand() ?>">кинжалы</a></dd>
<dd><a href="?otdel=11&rnd=<?= mt_rand() ?>">топоры</a></dd>
<dd><a href="?otdel=12&rnd=<?= mt_rand() ?>">дубины</a></dd>
<dd><a href="?otdel=13&rnd=<?= mt_rand() ?>">мечи</a></dd>
<dt><b>Одежда:</b></dt>
<dd><a href="?otdel=24&rnd=<?= mt_rand() ?>">шлемы</a></dd>
<dd><a href="?otdel=23&rnd=<?= mt_rand() ?>">тяжелая броня</a></dd>
<dd><a href="?otdel=22&rnd=<?= mt_rand() ?>">легкая броня</a></dd>
<dd><a href="?otdel=3&rnd=<?= mt_rand() ?>">щиты</a></dd>
<dd><a href="?otdel=21&rnd=<?= mt_rand() ?>">перчатки</a></dd>
<dd><a href="?otdel=2&rnd=<?= mt_rand() ?>">сапоги</a></dd>
<dt><b>Ювелирные товары:</b></dt>
<dd><a href="?otdel=4&rnd=<?= mt_rand() ?>">серьги</a></dd>
<dd><a href="?otdel=41&rnd=<?= mt_rand() ?>">ожерелья</a></dd>
<dd><a href="?otdel=42&rnd=<?= mt_rand() ?>">кольца</a></dd>
<dt><b>Магия:</b></dt>
<dd><a href="?otdel=51&rnd=<?= mt_rand() ?>">боевые</a></dd>
<dd><a href="?otdel=5&rnd=<?= mt_rand() ?>">разные</a></dd>
<dt><b>Разное:</b></dt>
<dd><a href="?otdel=6&rnd=<?= mt_rand() ?>">амуниция</a></dd>
<dd><a href="?otdel=7&rnd=<?= mt_rand() ?>">букеты</a></dd>
</dl>
</td>
</tr>
</table>
<?php } ?>

View File

@ -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, "Торговая улица") .
'</div>';
} elseif ($id === 21) {

View File

@ -35,7 +35,6 @@ trait Rooms
47 => "Замок (строительство)",
48 => "Обитель Хаоса",
49 => "Проход к Цитадели Хаоса",
50 => "Магазин Берёзка",
51 => "Парковая улица",
52 => "Квартал Законников",
53 => "Библиотека",
@ -186,5 +185,5 @@ trait Rooms
2655 => "Арена Богов",
2601 => "Замковая Площадь",
2702 => "Центральная площадь (мираж)",
];
] ?? "Небытие";
}

View File

@ -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) . "р.";
$btnLink = "/ashop.php?buy={$this->id}&rnd=" . mt_rand();
break;
case 'sell':
$btnValue = "Продать";
$btnLink = "/shop.php?sell={$this->id}&rnd=" . mt_rand();

View File

@ -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]

View File

@ -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 .= '<img width="40" height="25" src="/i/sh/event_pandbox.gif" /> ' . $user['login'] . ' открыл' . $var['sex'] . ' Ящик Пандоры...и забрал &quot;' . $var['itm']['name'] . '&quot;';
$var['obj']['use'] = $user['id'];
} elseif ($var['obj']['type'] == 3) {

View File

@ -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();

View File

@ -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 '<font color=red>Предмет не найден. Сообщите Администрации данный код #' . $obj['iteam_id'] . '#</font>';
}