2018-01-28 16:40:49 +00:00
|
|
|
|
<?php
|
|
|
|
|
session_start();
|
2020-07-05 17:15:45 +00:00
|
|
|
|
include_once 'config.php';
|
2020-07-05 16:43:15 +00:00
|
|
|
|
|
2020-07-03 16:19:18 +00:00
|
|
|
|
$login = urldecode($_SERVER['QUERY_STRING']) ?? '';
|
2020-08-30 10:44:57 +00:00
|
|
|
|
$userInfo = new UserInfo($login);
|
|
|
|
|
$presentsModel = new PresentsModel($userInfo->id);
|
2020-07-05 21:16:22 +00:00
|
|
|
|
$presentsList = $presentsModel->getAllPresents();
|
2020-08-30 10:44:57 +00:00
|
|
|
|
$userInfo->watcher_id = $userInfo->id ?? null;
|
2020-08-30 15:39:27 +00:00
|
|
|
|
if (empty($userInfo->id)): ?>
|
2020-06-23 05:11:07 +00:00
|
|
|
|
<!doctype html>
|
|
|
|
|
<html lang="ru">
|
2019-01-16 01:22:09 +00:00
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8">
|
2019-01-28 17:56:21 +00:00
|
|
|
|
<title>Ошибка</title>
|
|
|
|
|
</head>
|
2018-01-29 16:18:56 +00:00
|
|
|
|
<body style="color: #666; background-color: #d5d5d5; text-align: center; font-family: Consolas,monospace;">
|
2020-07-05 07:12:48 +00:00
|
|
|
|
Ошибка: персонаж <em><?= $login ?></em> не найден...
|
2018-01-29 16:18:56 +00:00
|
|
|
|
<p><a style="color: #99f" href="javascript:window.history.go(-1);">←назад</a></p>
|
2018-01-28 16:40:49 +00:00
|
|
|
|
</body>
|
|
|
|
|
</html>
|
2020-06-23 05:11:07 +00:00
|
|
|
|
<?php exit(); endif; ?>
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2020-06-23 05:11:07 +00:00
|
|
|
|
<html lang="ru">
|
2018-01-28 16:40:49 +00:00
|
|
|
|
<head>
|
2020-08-30 15:39:27 +00:00
|
|
|
|
<title>Информация о <?= $userInfo->login ?></title>
|
2018-01-29 16:18:56 +00:00
|
|
|
|
<meta charset=UTF-8"/>
|
|
|
|
|
<link href="css/main.css" rel="stylesheet">
|
2018-01-28 16:40:49 +00:00
|
|
|
|
</head>
|
2020-07-03 13:52:19 +00:00
|
|
|
|
<body>
|
2020-07-05 16:44:41 +00:00
|
|
|
|
<?php
|
2020-07-05 21:16:22 +00:00
|
|
|
|
|
2020-07-05 16:43:15 +00:00
|
|
|
|
try {
|
2020-08-30 10:44:57 +00:00
|
|
|
|
$userInfo->showUserInfo();
|
|
|
|
|
|
2020-07-05 16:54:57 +00:00
|
|
|
|
} catch (Exception $e_showUserInfo) {
|
|
|
|
|
echo "<div class='debug'>Ошибка генератора showUserInfo() в User.php: {$e_showUserInfo}</div>";
|
2020-07-03 14:14:08 +00:00
|
|
|
|
}
|
2020-07-05 16:43:15 +00:00
|
|
|
|
|
|
|
|
|
include_once 'views/presents-list.php';
|
2018-01-28 16:40:49 +00:00
|
|
|
|
?>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|