battles/inf.php

49 lines
1.4 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';
$login = urldecode($_SERVER['QUERY_STRING']) ?? '';
$user = new User($login);
$presentsModel = new PresentsModel($user->id);
$presentsList = $presentsModel->getAllPresents();
$user->watcher_id = $_SESSION['uid'] ?? null;
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
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>