26 lines
858 B
PHP
26 lines
858 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;
|
||
|
||
if (empty($userInfo->id)): ?>
|
||
Template::header('Ошибка');
|
||
Ошибка: персонаж <em><?= $login ?></em> не найден...
|
||
<p><a style="color: #99f" href="javascript:window.history.go(-1);">←назад</a></p>
|
||
<?php exit(); endif; ?>
|
||
|
||
<?php
|
||
Template::header('Информация о'.$userInfo->login);
|
||
try {
|
||
$userInfo->showUserInfo();
|
||
|
||
} catch (Exception $e_showUserInfo) {
|
||
echo "<div class='debug'>Ошибка генератора showUserInfo() в User.php: {$e_showUserInfo}</div>";
|
||
}
|
||
|
||
include_once 'views/presents-list.php';
|