Выдача информации с учётом статусов.

This commit is contained in:
lopar
2020-07-06 08:56:25 +03:00
parent 2a0f454343
commit b9ed3a039e
2 changed files with 53 additions and 50 deletions

View File

@@ -1,14 +1,12 @@
<?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();
$user->watcher_id = $_SESSION['uid'] ?? null;
if (empty($user->id)): ?>
<!doctype html>
<html lang="ru">
@@ -32,11 +30,6 @@ if (empty($user->id)): ?>
<body>
<?php
$hideInfo = new EffectsModel($user->id);
if ($hideInfo->getHideUserInfoStatus()) {
exit('<h3>Персонаж обезличен!</h3>');
}
try {
$user->showUserInfo();
} catch (Exception $e_showUserInfo) {