57 lines
1.6 KiB
PHP
57 lines
1.6 KiB
PHP
<?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>
|