battles/inf.php

26 lines
858 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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';