{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} {/ifset} {ifset $birthdate} {/ifset}
Откуда: {$city}
День рождения: {$birthdate}
{foreach ['aboutlangs' => 'Владение языками', 'abouttelegram' => 'Telegram', 'aboutvk' => 'ВКонтакте', 'abouttwitter' => 'Twitter/X', 'aboutyoutube' => 'YouTube', 'aboutemail' => 'Почта', 'aboutinstagram' => 'Instagram', 'abouttransphoto' => 'TransPhoto', 'aboutwebsite' => 'Личный сайт'] as $key => $label} {ifset $content[$key]['value']} {/ifset} {/foreach}
{$label}: {if $key === 'aboutemail'} {$content[$key]['value']} {else} {$content[$key]['value']} {/if}
{foreach ['aboutfavs_trains' => 'Любимые модели поездов', 'aboutfavs_countries' => 'Любимые страны', 'aboutfavs_cities' => 'Любимые города'] as $key => $label} {ifset $content[$key]['value']} {/ifset} {/foreach}
{$label}: {$content[$key]['value']}
Дата регистрации: {$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}
 
{else}
Пользователей, подписанных на мои фотографии: {=\App\Services\DB::query('SELECT COUNT(*) FROM followers WHERE user_id=:uid', array(':uid' => $userprofile->i(id)))[0]['COUNT(*)']}
{/if} {/block}