dress inventory item ckicking on it
This commit is contained in:
parent
7ef3f4ac84
commit
15a3dae559
@ -4,15 +4,17 @@ class InventoryItem extends Item
|
|||||||
{
|
{
|
||||||
private $present;
|
private $present;
|
||||||
private $artefact;
|
private $artefact;
|
||||||
|
private $item_id;
|
||||||
|
|
||||||
public function __construct($row)
|
public function __construct($row)
|
||||||
{
|
{
|
||||||
parent::__construct($row);
|
parent::__construct($row);
|
||||||
$this->present = $row['present'];
|
$this->present = $row['present'];
|
||||||
$this->artefact = $row['artefact'];
|
$this->artefact = $row['artefact'];
|
||||||
|
$this->item_id = $row['id'];
|
||||||
|
|
||||||
if ($this->artefact) $this->name = <<<NAME
|
if ($this->artefact) $this->name = <<<NAME
|
||||||
<b style='color: darkorange;'>{$this->name}</b><img src="//{$_SERVER['SERVER_NAME']}/i/artefact1.gif">
|
<b style='color: crimson;'>{$this->name}</b> <img src="//{$_SERVER['SERVER_NAME']}/i/artefact1.gif">
|
||||||
NAME;
|
NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,7 +29,7 @@ NAME;
|
|||||||
public function printImage()
|
public function printImage()
|
||||||
{
|
{
|
||||||
if (!in_array($this->type,[12,50,200])) {
|
if (!in_array($this->type,[12,50,200])) {
|
||||||
echo "<a href=//{$_SERVER['SERVER_NAME']}/admin/admin.php>";
|
echo "<a href=//{$_SERVER['SERVER_NAME']}/main.php?edit=1&dress={$this->item_id} title='Надеть'>";
|
||||||
parent::printImage();
|
parent::printImage();
|
||||||
echo "</a>";
|
echo "</a>";
|
||||||
}
|
}
|
||||||
@ -40,9 +42,7 @@ NAME;
|
|||||||
public function printControls()
|
public function printControls()
|
||||||
{
|
{
|
||||||
echo <<<BTN
|
echo <<<BTN
|
||||||
<p><input type="button" style="background: darkgrey; border: 1px solid grey; border-radius: 2px;" value="Надеть"
|
<p><input type="button" style="background: brown; border: 1px solid grey; color: white; 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'">
|
onclick="location='/admin.php'">
|
||||||
BTN;
|
BTN;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user