categoryType = Shop::CATEGORY_SALE_ITEMS; } elseif ($_GET['otdel'] === 'market') { Shop::id(Shop::GENERAL_SHOP)->categoryType = Shop::BARTER_SHOP; } else { Shop::id(Shop::GENERAL_SHOP)->categoryType = $_GET['otdel']; } } if (!empty($_POST['sellshop'])) { ShopItem::sellItem($_POST['itemId'], User::getInstance(), 1); } if (!empty($_POST['buyshop'])) { ShopItem::buyItem($_POST['itemId'], User::getInstance()); } if (!empty($_POST['buymarket'])) { ShopItem::$status = 'попытка купить с рук предмет id: ' . $_POST['itemId']; } Template::header('Магазин'); ?>