battles/inf.php
2020-07-06 00:35:25 +03:00

56 lines
1.6 KiB
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';
//include_once 'models/PresentsModel.php';
$login = urldecode($_SERVER['QUERY_STRING']) ?? '';
$uid = $_SESSION['uid'] ?? null;
$user = new User($login);
$presentsModel = new PresentsModel($user->id);
$presentsList = $presentsModel->getAllPresents();
if (empty($user->id)): ?>
<!doctype html>
<html lang="ru">
<head>
<meta charset="utf-8">
<title>Ошибка</title>
</head>
<body style="color: #666; background-color: #d5d5d5; text-align: center; font-family: Consolas,monospace;">
Ошибка: персонаж <em><?= $login ?></em> не найден...
<p><a style="color: #99f" href="javascript:window.history.go(-1);">←назад</a></p>
</body>
</html>
<?php exit(); endif; ?>
<html lang="ru">
<head>
<title>Информация о <?= $user->login ?></title>
<meta charset=UTF-8"/>
<link href="css/main.css" rel="stylesheet">
</head>
<body>
<?php
$hideInfo = new EffectsModel($user->id);
if ($hideInfo->getHideUserInfoStatus()) {
exit('<h3>Персонаж обезличен!</h3>');
}
try {
$user->showUserInfo();
} catch (Exception $e_showUserInfo) {
echo "<div class='debug'>Ошибка генератора showUserInfo() в User.php: {$e_showUserInfo}</div>";
}
include_once 'views/presents-list.php';
?>
<script src="js/jquery-1.7.2.min.js"></script>
<script src="js/showthing.js"></script>
<script>
$(function () {
$(".tooltip").tipTip({maxWidth: "auto", edgeOffset: 0, fadeIn: 300, fadeOut: 500});
});
</script>
</body>
</html>