Code clean.

This commit is contained in:
lopar
2021-03-10 23:47:33 +02:00
parent 1de0d465eb
commit 9a75e9d949
3 changed files with 48 additions and 24 deletions
+4 -8
View File
@@ -40,8 +40,8 @@ class UserInfo extends UserStats
}
echo '<div class="slot-image">';
if ($isBattle) {
$sh = '<img src="/i/shadow/%s" alt="%s" class="tip"><span class="tiptext"><b>%s</b>Уровень: %s<br>Сила: %s<br>Ловкость: %s<br>Интуиция: %s<br>Выносливость: %s<br>Интеллект: %s<br>Мудрость: %s</span>';
echo sprintf($sh, $this->shadow, $this->login, $this->login, $this->level, $this->strength, $this->dexterity, $this->intuition, $this->endurance, $this->intelligence, $this->wisdom);
echo sprintf('<img src="/i/shadow/%s" alt="%s" class="tip"><span class="tiptext"><b>%s</b>Уровень: %s<br>Сила: %s<br>Ловкость: %s<br>Интуиция: %s<br>Выносливость: %s<br>Интеллект: %s<br>Мудрость: %s</span>',
$this->shadow, $this->login, $this->login, $this->level, $this->strength, $this->dexterity, $this->intuition, $this->endurance, $this->intelligence, $this->wisdom);
unset($sh);
} else {
echo '<img src="/i/shadow/' . $this->shadow . '" alt="' . $this->login . '">';
@@ -156,12 +156,8 @@ INFO;
echo '<hr><!-- Нижняя часть -->';
echo '<div class="user-info-container-lower">';
echo '<h2>Об игроке</h2>';
if ($this->realname) {
echo sprintf('Имя: %s<br>', $this->realname);
}
if ($this->info) {
echo nl2br($this->info);
}
echo $this->realname ? "Имя: $this->realname" : "";
echo $this->info ? "<br>" . nl2br($this->info) : "";
echo '</div><!-- user-info-container-lower -->';
echo $this->showPrivateData();
}