name, $this->item_type, $this->durability, $this->price, $this->need_strength, $this->need_dexterity, $this->need_intuition, $this->need_endurance, $this->need_intelligence, $this->need_wisdom, $this->add_strength, $this->add_dexterity, $this->add_intuition, $this->add_endurance, $this->add_intelligence, $this->add_wisdom, $this->add_accuracy, $this->add_evasion, $this->add_criticals, $this->add_min_physical_damage, $this->add_max_physical_damage, $this->image, $this->weight ]; $db->execute($query, $values); } } /** * Для кнопок управления под картинкой предмета в зависимости от ситуации. */ public function printControls($shopType = false) { if ($shopType === 'marketput') { echo <<
BTN; } else { switch ($shopType) { default: $btnValue = "Купить за " . intval($this->price) . " кр."; $btnLink = "/shop.php?buy={$this->item_id}&rnd=" . mt_rand(); break; case 'sell': $btnValue = "Продать"; $btnLink = "/shop.php?sell={$this->item_id}&rnd=" . mt_rand(); break; case 'marketgetback': $btnValue = "Снять с продажи"; $btnLink = "?back={$this->item_id}&rnd=" . mt_rand(); break; case 'marketbuy': $btnValue = "Купить за " . intval($this->setsale) . " кр."; $btnLink = "?otdel={$this->item_type}&set={$this->item_id}&rnd=" . mt_rand(); break; } echo << BTN; } } }