diff --git a/classes/ItemClass.php b/classes/ItemClass.php deleted file mode 100644 index bf1e970..0000000 --- a/classes/ItemClass.php +++ /dev/null @@ -1,25 +0,0 @@ -Цена" . $this->wrap($this->cost); - parent::printRequirements(); - parent::printBonuses(); - } - - public function EkrShopInfo() - { - parent::printBaseInfo(); - echo "
Цена" . $this->wrap($this->ecost); - parent::printRequirements(); - parent::printBonuses(); - } - - public function PresentInfo() - { - parent::printBaseInfo(); - } -} \ No newline at end of file diff --git a/classes/ShopItem.php b/classes/ShopItem.php new file mode 100644 index 0000000..3afd91c --- /dev/null +++ b/classes/ShopItem.php @@ -0,0 +1,25 @@ +Цена" . $this->wrap($this->cost) . " пымпочек"; + parent::printRequirements(); + parent::printBonuses(); + } + + /** + * Для кнопок управления под картинкой прелмета в зависимости от ситуации. + */ + public function printControls() + { + echo << +
+BTN; + } +} \ No newline at end of file diff --git a/test.php b/test.php index 6990025..6f791d8 100644 --- a/test.php +++ b/test.php @@ -17,13 +17,14 @@ require_once 'config.php'; $result = db::c()->query('SELECT * FROM `shop` WHERE count > 0'); while ($row = $result->fetch_assoc()) { - $iteminfo[] = new ItemClass($row); + $iteminfo[] = new ShopItem($row); } echo ""; foreach ($iteminfo as $ii) { echo ""; echo "
Товары магазина
"; $ii->printImage(); + $ii->printControls(); echo ""; $ii->ShopInfo();