diff --git a/classes/User.php b/classes/User.php
index 60b3196..81cfa1e 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -79,56 +79,56 @@ EMPTY_SLOT;
} else {
$this->showItem(1);
}
- echo '';
+ echo '';
echo '
';
if (isset($dressed_item[2])) {
$this->showItem($dressed_item[2]);
} else {
$this->showItem(2);
}
- echo '
';
+ echo '';
echo '';
if (isset($dressed_item[3])) {
$this->showItem($dressed_item[3]);
} else {
$this->showItem(3);
}
- echo '
';
+ echo '';
echo '';
if (isset($dressed_item[4])) {
$this->showItem($dressed_item[4]);
} else {
$this->showItem(4);
}
- echo '
';
+ echo '';
echo '';
if (isset($dressed_item[5])) {
$this->showItem($dressed_item[5]);
} else {
$this->showItem(5);
}
- echo '
';
+ echo '';
echo '';
if (isset($dressed_item[6])) {
$this->showItem($dressed_item[6]);
} else {
$this->showItem(6);
}
- echo '
';
+ echo '';
echo '';
if (isset($dressed_item[7])) {
$this->showItem($dressed_item[7]);
} else {
$this->showItem(7);
}
- echo '
';
+ echo '';
echo '';
if (isset($dressed_item[8])) {
$this->showItem($dressed_item[8]);
} else {
$this->showItem(8);
}
- echo '
';
+ echo '';
echo '';
if (isset($dressed_item[9])) {
$this->showItem($dressed_item[9]);
@@ -145,27 +145,37 @@ EMPTY_SLOT;
} else {
$this->showItem(11);
}
- echo '
';
+ echo '';
echo '';
echo sprintf('
', $this->shadow, $this->login);
- echo '
';
+ echo '';
echo '';
echo sprintf('
', star_sign($this->borndate));
- echo '
';
+ echo '';
echo '';
echo '
';
echo '
';
echo 'Уровень
Сила
Ловкость
Интуиция
Выносливость
Интеллект
Мудрость
Находится в:';
- echo '
';
+ echo '
';
echo '
';
echo $this->level . '
' . $this->strength . '
' . $this->dexterity . '
' . $this->intuition . '
' . $this->endurance . '
' . $this->intelligence . '
' . $this->wisdom . '
' . $this->getRoomName($this->room);
- echo '
';
- echo '
';
+ echo '';
+ echo '';
if ($this->married) {
echo sprintf('', $this->married, $this->married, $this->married);
}
- echo '';
- echo '';
+ echo '';
+ echo '';
+ echo '
';
+ echo '';
+ echo '
Об игроке
';
+ if ($this->realname) {
+ echo sprintf('Имя: %s
', $this->realname);
+ }
+ if ($this->info) {
+ echo nl2br($this->info);
+ }
+ echo '';
}
}
\ No newline at end of file
diff --git a/css/main.css b/css/main.css
index b43ae7f..5b1211f 100644
--- a/css/main.css
+++ b/css/main.css
@@ -396,4 +396,11 @@ div.user-info-container > div.user-info > div.stats-container > div.column + div
div.user-info-container > div.user-signs {
grid-column: 5;
grid-row: 1 / 6;
+}
+/*-----------------------------*/
+div.debug {
+ background:#fef;
+ border:1px dashed #faf;
+ border-radius:5px;
+ padding:5px;
}
\ No newline at end of file
diff --git a/inf.php b/inf.php
index 4f1e43f..3538707 100644
--- a/inf.php
+++ b/inf.php
@@ -2,15 +2,13 @@
session_start();
include_once 'functions.php';
include_once 'models/PresentsModel.php';
-//$login = urldecode(filter_input(INPUT_SERVER, 'QUERY_STRING'));
+
$login = urldecode($_SERVER['QUERY_STRING']) ?? '';
$uid = $_SESSION['uid'] ?? null;
-//$user = db::c()->query('SELECT `id`,`login`,`married`,`win`,borndate,`align`,`admin`,`realname`,`info`,`prof1`,`prof2`,`email`,`ip`,`exp`,`stats`,`money`,`room`,`doblest`
-// FROM `users`
-// WHERE `login` = "?s" OR `id` = "?s"', $login, $login)->fetch_assoc();
$user = new User($login);
const MODERATOR_ACCESS = 1;
const ADMINISTRATOR_ACCESS = 2;
+
function private_access($uid)
{
$own = db::c()->query('SELECT `align`,`admin` FROM `users` WHERE `id` = "?s"', $uid)->fetch_assoc();
@@ -50,30 +48,21 @@ if (empty($user->id)): ?>
die(file_get_contents('customuserdata/' . $user['id']));
}
try {
- $user->showUserInfo();
-} catch (Exception $e) {
- echo "Ошибка генератора showUserInfo() в User.php: {$e}
";
-} ?>
-
-
-
-query('SELECT `time` FROM `effects` WHERE `owner` = ?i AND `type` = ?i ', $user->id, 5)->fetch_assoc();
+ $effect = db::c()->query('SELECT `time` FROM `effects` WHERE `owner` = ?i AND `type` = ?i ', $this->id, 5)->fetch_assoc();
if ($effect['time'] && !private_access($uid)) {
die('Персонаж обезличен!
');
}
} catch (Exception $e) {
- echo "Ошибка обезличивателя: {$e}
";
+ echo "Ошибка обезличивателя: {$e}
";
}
-if (!empty($user->realname)) {
- echo "Имя: " . $user->realname . "
";
+try {
+ $user->showUserInfo();
+} catch (Exception $e) {
+ echo "Ошибка генератора showUserInfo() в User.php: {$e}
";
}
-?>
-= nl2br($user->info) ?>
-
-
-admin) || private_access($uid) === ADMINISTRATOR_ACCESS) {