From 9419924bfaf5a2516921ab62ad080375c067f6e5 Mon Sep 17 00:00:00 2001 From: lopar Date: Sun, 5 Jul 2020 02:25:14 +0300 Subject: [PATCH] zomg --- classes/User.php | 131 ++++++++++++++++++++++++++++------------------- 1 file changed, 77 insertions(+), 54 deletions(-) diff --git a/classes/User.php b/classes/User.php index ac89d47..2a0d90f 100644 --- a/classes/User.php +++ b/classes/User.php @@ -32,6 +32,10 @@ class User public $stats; public $shadow; + const EMPTY_SLOT = <<'; if ($this->align) { echo sprintf('Склонность', $this->align); @@ -94,28 +94,31 @@ EMPTY_SLOT; '; echo <<showItem($dressed_item[1])} - - - - - - - - - - -
'; - + 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 '
- {$this->showItem($dressed_item[2])} -
- {$this->showItem($dressed_item[3])} -
- {$this->showItem($dressed_item[4])} -
@@ -125,32 +128,52 @@ EMPTY_SLOT; - - - - - - - - - - +USERINFO; + if (isset($dressed_item[5])) { + $this->showItem($dressed_item[5]); + } else { + $this->showItem(5); + } + echo '
- {$this->showItem($dressed_item[5])} -
- {$this->showItem($dressed_item[6])} -
- {$this->showItem($dressed_item[7])} -
- {$this->showItem($dressed_item[8])} -
'; + 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 '
-
- {$this->showItem($dressed_item[9])} - {$this->showItem($dressed_item[10])} - {$this->showItem($dressed_item[11])} +
'; + 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->login}
@@ -163,9 +186,9 @@ EMPTY_SLOT; Находится в {$this->getRoomName($this->room)}
USERINFO; - if (isset($dressed_item[1])) { - $this->showItem($dressed_item[1]); - } +// if (isset($dressed_item[1])) { +// $this->showItem($dressed_item[1]); +// } // if (isset($dressed_item[2])) { // $this->showItem($dressed_item[2]); // }