{layout '..\@layout.latte'}
{block content}
{var $usercttc = False}
{var $city = htmlspecialchars(json_decode($userprofile->i(content), true)[aboutlive][value])}
{var $photourl = $userprofile->i(photourl)}
{var $regdate = \App\Services\Date::zmdate($userprofile->content(regdate))}
{var $about = json_decode($userprofile->i(content), true)[aboutmemo][value]}
{var $birthdate = json_decode($userprofile->i(content), true)[aboutbirthday][value]}
{$userprofile->i(username)}{if $userprofile->i(admin) === 1} {/if}
{if $usercttc === True}Профиль на transphoto.org Пользователь не зарегистрирован на сервере {$ngallery[root][title]}. Информация может быть неполной.
Открыть на transphoto.org
{/if}
{if $userprofile->i(admin) === 1}Администратор сервера
{else}
{if $userprofile->i(admin) === 2}Фотомодератор
{/if}
{/if}
{if $userprofile->i(id) === $user_id}
Редактировать мой профиль
{/if}
{if $userprofile->content(badge) !== null}
{nl2br($userprofile->content(badge))}
{/if}
{var $content = json_decode($userprofile->i(content), true)}
{ifset $city}
Откуда:
{$city}
{/ifset}
{ifset $birthdate}
День рождения:
{$birthdate}
{/ifset}
{foreach ['aboutlangs' => 'Владение языками', 'abouttelegram' => 'Telegram', 'aboutvk' => 'ВКонтакте',
'abouttwitter' => 'Twitter/X', 'aboutyoutube' => 'YouTube', 'aboutemail' => 'Почта',
'aboutinstagram' => 'Instagram', 'abouttransphoto' => 'TransPhoto', 'aboutwebsite' => 'Личный сайт'] as $key => $label}
{ifset $content[$key]['value']}
{$label}:
{if $key === 'aboutemail'}
{$content[$key]['value']}
{else}
{$content[$key]['value']}
{/if}
{/ifset}
{/foreach}
{foreach ['aboutfavs_trains' => 'Любимые модели поездов', 'aboutfavs_countries' => 'Любимые страны', 'aboutfavs_cities' => 'Любимые города'] as $key => $label}
{ifset $content[$key]['value']}
{$label}:
{$content[$key]['value']}
{/ifset}
{/foreach}
Дата регистрации:
{$regdate}
Был на сайте:
{=\App\Services\Date::zmdate($userprofile->i(online))}
{if time() - 300 <= $userprofile->i(online)}(online ){/if}
{if $about != null && $usercttc === False}
О себе
{$about}
{else}
{if $usercttc === True}{$about}{/if}
{/if}
{if $userprofile->i(id) != $user_id}
{if \App\Services\DB::query('SELECT follower_id FROM followers WHERE user_id=:userid AND follower_id=:followerid', array(':userid' => $userprofile->i(id), ':followerid' => $user_id))}
{var $class = on}
{/if}
Подписка на новые фотографии этого автора (подписаны: {=\App\Services\DB::query('SELECT COUNT(*) FROM followers WHERE user_id=:uid', array(':uid' => $userprofile->i(id)))[0]['COUNT(*)']} )
{else}
Пользователей, подписанных на мои фотографии: {=\App\Services\DB::query('SELECT COUNT(*) FROM followers WHERE user_id=:uid', array(':uid' => $userprofile->i(id)))[0]['COUNT(*)']}
{/if}
{/block}