34 lines
1.1 KiB
PHP
34 lines
1.1 KiB
PHP
<?php
|
|
|
|
class InventoryItem extends Item
|
|
{
|
|
public function printInfo()
|
|
{
|
|
parent::printBaseInfo();
|
|
parent::printRequirements();
|
|
parent::printBonuses();
|
|
}
|
|
|
|
public function printImage()
|
|
{
|
|
if (!in_array($this->type,[12,50,200])) {
|
|
echo "<a href=//{$_SERVER['SERVER_NAME']}/admin/admin.php>";
|
|
parent::printImage();
|
|
echo "</a>";
|
|
}
|
|
else parent::printImage();
|
|
}
|
|
|
|
/**
|
|
* Для кнопок управления под картинкой прелмета в зависимости от ситуации.
|
|
*/
|
|
public function printControls()
|
|
{
|
|
echo <<<BTN
|
|
<p><input type="button" style="background: darkgrey; border: 1px solid grey; border-radius: 2px;" value="Надеть"
|
|
onclick="location='/admin.php'">
|
|
<input type="button" style="background: brown; border: 1px solid grey; color: white border-radius: 2px;" value="Выбросить"
|
|
onclick="location='/admin.php'">
|
|
BTN;
|
|
}
|
|
} |