From 02e218d0c42ca145f2b019054744a35a38bfacac Mon Sep 17 00:00:00 2001 From: lopar Date: Mon, 14 Jan 2019 22:33:32 +0200 Subject: [PATCH] selling items final --- shop.php | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/shop.php b/shop.php index 82d4595..0e264b7 100644 --- a/shop.php +++ b/shop.php @@ -250,33 +250,18 @@ switch ($shopCategoryTypeNumber) { query('SELECT * FROM `inventory` WHERE `owner` = ?i AND `dressed` = 0 AND `setsale` = 0 AND `cost` > 0 AND `present` = "?n" AND `tradesale` = 0 AND `podzem` = 0 AND `goden` = 0 ORDER BY `update` DESC', $user['id'], null); - while ($row = $data->fetch_assoc()) { - $price = $row['cost'] * 0.1; - if ($row['koll']) { - $price *= $row['koll']; - } - if ($row['type'] == 12) { - $allcost = round($price * (1 - $row['duration'] / $row['maxdur']), 2); - } else { - $allcost = round($price - $row['duration'] * ($row['cost'] / ($row['maxdur'] * 10)), 2); - } - ?> - - - - - - "; + echo ""; } + + } else { foreach ($iteminfo as $ii) { echo "
- -
продать - за -
- -
"; + $ii->printImage(); + $ii->printControls(true); + echo ""; + $ii->printInfo(); + echo "
";