21 lines
837 B
PHP
21 lines
837 B
PHP
<?php
|
||
session_start();
|
||
include_once 'config.php';
|
||
$login = urldecode($_SERVER['QUERY_STRING']) ?? '';
|
||
$userInfo = new \Battles\UserInfo($login);
|
||
$presentsModel = new \Battles\Models\PresentsModel($userInfo->id);
|
||
$presentsList = $presentsModel->getAllPresents();
|
||
$userInfo->watcher_id = $_SESSION['uid'] ?? null;
|
||
\Battles\Template::header('Информация о ' . $userInfo->login);
|
||
if (!$userInfo->id) {
|
||
echo sprintf('Ошибка: персонаж <em>%s</em> не найден...<p><a style="color: #99f;" href="javascript:window.history.go(-1);">←назад</a></p>', $login);
|
||
exit;
|
||
}
|
||
try {
|
||
$userInfo->showUserInfo();
|
||
|
||
} catch (Exception $e_showUserInfo) {
|
||
echo "<div class='debug'>Ошибка генератора showUserInfo() в User.php: {$e_showUserInfo}</div>";
|
||
}
|
||
|
||
include_once 'views/presents-list.php'; |