From 9a75e9d949833e2cf9adaeae7679347ba0bbb1e2 Mon Sep 17 00:00:00 2001 From: lopar Date: Wed, 10 Mar 2021 23:47:33 +0200 Subject: [PATCH] Code clean. --- classes/Battles/UserInfo.php | 12 +++------ main.php | 50 ++++++++++++++++++++++++++++-------- user_anketa.php | 10 +++----- 3 files changed, 48 insertions(+), 24 deletions(-) diff --git a/classes/Battles/UserInfo.php b/classes/Battles/UserInfo.php index ab9681f..8a0d999 100644 --- a/classes/Battles/UserInfo.php +++ b/classes/Battles/UserInfo.php @@ -40,8 +40,8 @@ class UserInfo extends UserStats } echo '
'; if ($isBattle) { - $sh = '%s%sУровень: %s
Сила: %s
Ловкость: %s
Интуиция: %s
Выносливость: %s
Интеллект: %s
Мудрость: %s
'; - 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('%s%sУровень: %s
Сила: %s
Ловкость: %s
Интуиция: %s
Выносливость: %s
Интеллект: %s
Мудрость: %s
', + $this->shadow, $this->login, $this->login, $this->level, $this->strength, $this->dexterity, $this->intuition, $this->endurance, $this->intelligence, $this->wisdom); unset($sh); } else { echo '' . $this->login . ''; @@ -156,12 +156,8 @@ INFO; echo '
'; echo ''; echo $this->showPrivateData(); } diff --git a/main.php b/main.php index 9878606..c70ff9f 100644 --- a/main.php +++ b/main.php @@ -303,9 +303,40 @@ Template::header('Игра'); if (errk === 1) { errkom = 'Нельзя использовать символы: /\:*?"<>|+%
'; } - document.getElementById("hint3").innerHTML = '
' + title + 'x
' + - '
' + - errkom + 'введите название предмета
'; + document.getElementById("hint3").innerHTML = ` + + + + + + + + +
+ ${title} + + x +
+
+ + + + + + + + + +
+ ${errkom} введите название предмета +
+ + + +
+
+
+ `; document.getElementById("hint3").style.visibility = "visible"; document.getElementById("hint3").style.left = '100'; document.getElementById("hint3").style.top = '100'; @@ -314,13 +345,12 @@ Template::header('Игра'); }
-
- +
-
showUserDoll(0, 1); ?> -
+
Снять все
getId()) ?> @@ -377,7 +407,7 @@ Template::header('Игра');
+
getShadow() == '0.gif' || $user->getAdmin() == 1): ?> @@ -396,16 +426,16 @@ Template::header('Игра');
- +
Рюкзак (масса: getStrength() * 4 ?>)
"; + echo "
"; $ii->printImage(); $ii->printControls(); - echo ""; + echo ""; $ii->printInfo(); } if (!$data) { diff --git a/user_anketa.php b/user_anketa.php index a6b48af..9c946cf 100644 --- a/user_anketa.php +++ b/user_anketa.php @@ -39,12 +39,10 @@ Template::header('Анкета'); ← на главную

Анкета персонажа getLogin() ?>

-
-
+