From 3c2816c40004faaae3bfb9a78ef5f37da6f0e7b2 Mon Sep 17 00:00:00 2001 From: lopar Date: Sun, 5 Jul 2020 19:12:53 +0300 Subject: [PATCH] =?UTF-8?q?UserInfo()=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D1=91=D0=BD=20=D0=BD=D0=B0=20=D0=BD=D0=BE=D0=B2=D1=83=D1=8E=20?= =?UTF-8?q?=D0=B2=D1=91=D1=80=D1=81=D1=82=D0=BA=D1=83.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/User.php | 158 ++--------------------------------------------- css/main.css | 12 ++-- inf.php | 4 +- 3 files changed, 14 insertions(+), 160 deletions(-) diff --git a/classes/User.php b/classes/User.php index e918237..60b3196 100644 --- a/classes/User.php +++ b/classes/User.php @@ -66,148 +66,6 @@ EMPTY_SLOT; } public function showUserInfo() - { - $starSign = star_sign($this->borndate); - $dressed_item = []; - $dressed_items = db::c()->query('SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot > 0', $this->id); - while ($row = $dressed_items->fetch_assoc()) { - $dressed_item[$row['dressed_slot']] = $row; - } - echo << - - -
-USERINFO; - 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 << - - - - -
-USERINFO; - if (isset($dressed_item[1])) { - $this->showItem($dressed_item[1]); - } else { - $this->showItem(1); - } - echo '
'; - if (isset($dressed_item[2])) { - $this->showItem($dressed_item[2]); - } else { - $this->showItem(2); - } - echo '
'; - if (isset($dressed_item[3])) { - $this->showItem($dressed_item[3]); - } else { - $this->showItem(3); - } - echo '
'; - if (isset($dressed_item[4])) { - $this->showItem($dressed_item[4]); - } else { - $this->showItem(4); - } - echo '
- - - - - -
-USERINFO; - if (isset($dressed_item[5])) { - $this->showItem($dressed_item[5]); - } else { - $this->showItem(5); - } - echo '
'; - if (isset($dressed_item[6])) { - $this->showItem($dressed_item[6]); - } else { - $this->showItem(6); - } - echo '
'; - if (isset($dressed_item[7])) { - $this->showItem($dressed_item[7]); - } else { - $this->showItem(7); - } - echo '
'; - if (isset($dressed_item[8])) { - $this->showItem($dressed_item[8]); - } else { - $this->showItem(8); - } - echo '
-
-
'; - if (isset($dressed_item[9])) { - $this->showItem($dressed_item[9]); - } else { - $this->showItem(9); - } - if (isset($dressed_item[10])) { - $this->showItem($dressed_item[10]); - } else { - $this->showItem(10); - } - if (isset($dressed_item[11])) { - $this->showItem($dressed_item[11]); - } else { - $this->showItem(11); - } - echo << -
-Уровень {$this->level}
-Сила {$this->strength}
-Ловкость {$this->dexterity}
-Интуиция {$this->intuition}
-Выносливость {$this->endurance}
-Интеллект {$this->intelligence}
-Мудрость {$this->wisdom}
-Находится в {$this->getRoomName($this->room)}
-
- Родовой знак -
-USERINFO; - if ($this->married) { - echo sprintf('В браке с %s', $this->married, $this->married, $this->married); - } - - ///////////////////////// - } - - public function showUserInfo2() { $dressed_items = db::c()->query('SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot > 0', $this->id); while ($row = $dressed_items->fetch_assoc()) { @@ -300,20 +158,12 @@ USERINFO; echo 'Уровень
Сила
Ловкость
Интуиция
Выносливость
Интеллект
Мудрость
Находится в:'; echo '
'; echo '
'; - echo $this->level.'
'.$this->strength.'
'.$this->dexterity.'
'.$this->intuition.'
'.$this->endurance.'
'.$this->intelligence.'
'.$this->wisdom.'
'.$this->getRoomName($this->room); + echo $this->level . '
' . $this->strength . '
' . $this->dexterity . '
' . $this->intuition . '
' . $this->endurance . '
' . $this->intelligence . '
' . $this->wisdom . '
' . $this->getRoomName($this->room); echo '
'; echo ''; - echo << -Уровень {$this->level}
-Сила {$this->strength}
-Ловкость {$this->dexterity}
-Интуиция {$this->intuition}
-Выносливость {$this->endurance}
-Интеллект {$this->intelligence}
-Мудрость {$this->wisdom}
-Находится в {$this->getRoomName($this->room)} -USERINFO; + if ($this->married) { + echo sprintf('В браке с %s', $this->married, $this->married, $this->married); + } echo ''; echo ''; } diff --git a/css/main.css b/css/main.css index 5e84bae..b43ae7f 100644 --- a/css/main.css +++ b/css/main.css @@ -261,11 +261,10 @@ hr { } img.item-wrap-normal { - width: 48px; - height: 48px; + width: 98px; + height: 98px; border-radius: 5px; border: 1px solid rgba(0, 0, 0, 0.25); - padding: 7px; display: inline-block; background-repeat: no-repeat; background-color: #AAA; @@ -385,8 +384,13 @@ div.user-info-container > div.user-info > div.stats-container { } div.user-info-container > div.user-info > div.stats-container > div.column { - flex: 50%; padding: 10px; + font-size: larger; + text-align: right; +} + +div.user-info-container > div.user-info > div.stats-container > div.column + div.column { + text-align: left; } div.user-info-container > div.user-signs { diff --git a/inf.php b/inf.php index 51825c8..4f1e43f 100644 --- a/inf.php +++ b/inf.php @@ -50,9 +50,9 @@ if (empty($user->id)): ?> die(file_get_contents('customuserdata/' . $user['id'])); } try { - $user->showUserInfo2(); + $user->showUserInfo(); } catch (Exception $e) { - echo "
Ошибка классового генератора персонажа showUserInfo(): {$e}
"; + echo "
Ошибка генератора showUserInfo() в User.php: {$e}
"; } ?>