2018-01-28 16:40:49 +00:00
< ? php
2021-08-20 17:40:06 +00:00
use Battles\Models\PresentsModel ;
use Battles\Template ;
use Battles\UserInfo ;
2020-07-05 17:15:45 +00:00
include_once 'config.php' ;
2021-08-20 17:40:06 +00:00
$userInfo = new UserInfo ( urldecode ( $_SERVER [ 'QUERY_STRING' ]));
$presentsModel = new PresentsModel ( $userInfo -> getId ());
2020-07-05 21:16:22 +00:00
$presentsList = $presentsModel -> getAllPresents ();
2021-08-20 17:40:06 +00:00
$userInfo -> setWatcher ( $_SESSION [ 'uid' ]);
Template :: header ( 'Информация о ' . $userInfo -> getLogin ());
2021-03-10 21:38:14 +00:00
if ( ! $userInfo -> getId ()) {
echo sprintf ( 'Ошибка: персонаж <em>%s</em> не найден...<p><a style="color: #99f;" href="javascript:window.history.go(-1);">←назад</a></p>' , urldecode ( $_SERVER [ 'QUERY_STRING' ]));
2020-09-30 11:49:17 +00:00
exit ;
}
2021-03-10 21:38:14 +00:00
$userInfo -> showUserInfo ();
2020-09-30 10:03:05 +00:00
include_once 'views/presents-list.php' ;