Фикс функции продажи товара.
This commit is contained in:
26
shop.php
26
shop.php
@@ -59,6 +59,32 @@ if (isset($_GET['set']) OR isset($_POST['set'])) {
|
||||
} else $count_ok = 1;
|
||||
|
||||
$dress = db::c()->query('SELECT * FROM `shop` WHERE `id`=?i', $set)->fetch_assoc();
|
||||
|
||||
// db::c()->query('
|
||||
// INSERT INTO `inventory` (
|
||||
// name, maxdur, cost, img, goden, dategoden, massa, prototype, owner,
|
||||
// nlevel, nsila, nlovk, ninta, nvinos, nintel, nmudra,
|
||||
// nnoj, ntopor, ndubina, nmech, nalign, nfire, nwater, nair, nearth, nlight, ngray, ndark,
|
||||
// minu, maxu,
|
||||
// gsila, glovk, ginta, gintel, ghp, gfire, gwater, gair, gearth, glight, ggray, gdark,
|
||||
// mfkrit, mfakrit, mfuvorot, mfauvorot,
|
||||
// gnoj, gtopor, gdubina, gmech,
|
||||
// bron1, bron2, bron3, bron4, magic, needident,
|
||||
// gmp, gmeshok, artefact, encicl, koll)
|
||||
// SELECT
|
||||
// name, maxdur, cost, img, goden, dategoden, massa, id, ?i,
|
||||
// nlevel, nsila, nlovk, ninta, nvinos, nintel, nmudra,
|
||||
// nnoj, ntopor, ndubina, nmech, nalign, nfire, nwater, nair, nearth, nlight, ngray, ndark,
|
||||
// minu, maxu,
|
||||
// gsila, glovk, ginta, gintel, ghp, gfire, gwater, gair, gearth, glight, ggray, gdark,
|
||||
// mfkrit, mfakrit, mfuvorot, mfauvorot,
|
||||
// gnoj, gtopor, gdubina, gmech,
|
||||
// bron1, bron2, bron3, bron4, magic, needident,
|
||||
// gmp, gmeshok, artefact, encicl, koll
|
||||
// FROM shop WHERE id = inventory.prototype;
|
||||
//
|
||||
// ', $user['id']);
|
||||
|
||||
if ($count_ok == 0) {
|
||||
err('Неправильно введено количество.');
|
||||
} elseif (($dress['massa'] * $count + $itemWeight['m']) > (get_meshok())) {
|
||||
|
||||
Reference in New Issue
Block a user