query('SELECT * FROM users WHERE id = "?s" OR login = "?s"', $user, $user)->fetch_assoc(); foreach ($this as $key => $value) { if (isset($user_query[$key])) { $this->$key = $user_query[$key]; } } } protected function showItem($item = 0) { $itemSlot = $item['dressed_slot'] ?? 0; $itemName = $item['name'] ?? ''; $itemImage = $item['image'] ?? ''; if ($itemSlot) { echo << {$itemName} SLOT; } else { echo <<'; if ($this->align) { echo sprintf('Склонность', $this->align); } if ($this->block) { echo sprintf('%s', $this->login); } else { echo sprintf('%s', $this->login); } if ($this->clan) { echo sprintf('%s', $this->clan, $this->clan); } echo '
добавить здоровье
'; echo <<showItem($dressed_item[1])}
{$this->showItem($dressed_item[2])}
{$this->showItem($dressed_item[3])}
{$this->showItem($dressed_item[4])}
{$this->showItem($dressed_item[5])}
{$this->showItem($dressed_item[6])}
{$this->showItem($dressed_item[7])}
{$this->showItem($dressed_item[8])}
{$this->showItem($dressed_item[9])} {$this->showItem($dressed_item[10])} {$this->showItem($dressed_item[11])}
Имя {$this->login}
Сила {$this->strength}
Ловкость {$this->dexterity}
Интуиция {$this->intuition}
Выносливость {$this->endurance}
Интеллект {$this->intelligence}
Мудрость {$this->wisdom}
Находится в {$this->getRoomName($this->room)}
USERINFO; if (isset($dressed_item[1])) { $this->showItem($dressed_item[1]); } // if (isset($dressed_item[2])) { // $this->showItem($dressed_item[2]); // } // if (isset($dressed_item[4])) { // $this->showItem($dressed_item[4]); // } } }