21 lines
795 B
PHP
21 lines
795 B
PHP
<?php
|
||
session_start();
|
||
include_once 'config.php';
|
||
$login = urldecode($_SERVER['QUERY_STRING']) ?? '';
|
||
$userInfo = new UserInfo($login);
|
||
$presentsModel = new PresentsModel($userInfo->id);
|
||
$presentsList = $presentsModel->getAllPresents();
|
||
$userInfo->watcher_id = $userInfo->id ?? null;
|
||
Template::header('Информация о ' . $userInfo->login);
|
||
if (!$userInfo->id) {
|
||
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'; |