<?php if ($tpl['profile_params']['description']['activated']
&& !Utility::isEmpty((string) $tpl['member']['infos']['description']['value'])) : ?>
<p id="member_page_description"><span><?php echo $tpl['format_emoji']($tpl['format_linkify']($tpl['member']['infos']['description']['value'])); ?></span></p>
<?php endif; ?>
<?php if ($tpl['user']['id'] == $_GET['user_id']) : ?>
<div id="member_page_avatar">
	<img src="<?php echo $tpl['member']['avatar']['url']; ?>">
</div>
<?php endif; ?>
<div id="member_page_infos">
<?php if ($tpl['user']['id'] != $_GET['user_id']) : ?>
	<div id="member_page_avatar">
		<img src="<?php echo $tpl['member']['avatar']['url']; ?>">
	</div>
<?php endif; ?>
	<div id="member_page_profile">
		<h3 class="icon"><span>&#xe930;</span> <?php echo __('Informations'); ?></h3>
		<ul>
<?php foreach ($tpl['member']['infos'] as $param => &$i) : ?>
<?php if ($tpl['profile_params'][$param]['activated'] && $param != 'description') : ?>
			<li>
				<span><?php echo $i['text']; ?></span>
<?php if (Utility::isEmpty((string) $i['value'])) : ?>
				/
<?php elseif ($param == 'website') : ?>
				<a href="<?php echo $i['value']; ?>"><?php echo $i['value']; ?></a>
<?php else : ?>
				<?php echo $i['value']; ?>
<?php endif; ?>
			</li>
<?php endif; ?>
<?php endforeach; ?>
		</ul>
	</div>
	<div id="member_page_stats">
		<h3 class="icon"><span>&#xe928;</span> <?php echo __('Statistiques'); ?></h3>
		<ul>
			<li id="member_page_stats_date_created">
				<span><?php echo __('Date d\'inscription'); ?></span>
				<?php echo $tpl['member']['stats']['date_created']; ?>
			</li>
			<li id="member_page_stats_last_visite">
				<span><?php echo __('Dernière visite'); ?></span>
				<?php echo $tpl['member']['stats']['date_last_visite'] ? $tpl['member']['stats']['date_last_visite'] : '/'; ?>
			</li>
<?php if (isset($tpl['member']['stats']['images'])) : ?>
			<li id="member_page_stats_images">
				<span><?php echo __('Nombre de photos'); ?></span>
				<span class="link_number">
<?php if ($tpl['member']['stats']['images']) : ?>
					<a href="<?php echo $tpl['link']('category/1/user-images/' . $tpl['member']['id']); ?>#content"><?php echo L10N::formatNumber($tpl['member']['stats']['images']); ?></a>
<?php else : ?>
					<span><?php echo L10N::formatNumber($tpl['member']['stats']['images']); ?></span>
<?php endif; ?>
				</span>
			</li>
<?php endif; ?>
<?php if (isset($tpl['member']['stats']['videos'])) : ?>
			<li id="member_page_stats_videos">
				<span><?php echo __('Nombre de vidéos'); ?></span>
				<span class="link_number">
<?php if ($tpl['member']['stats']['videos']) : ?>
					<a href="<?php echo $tpl['link']('category/1/user-videos/' . $tpl['member']['id']); ?>#content"><?php echo L10N::formatNumber($tpl['member']['stats']['videos']); ?></a>
<?php else : ?>
					<span><?php echo L10N::formatNumber($tpl['member']['stats']['videos']); ?></span>
<?php endif; ?>
				</span>
			</li>
<?php endif; ?>
<?php if ($tpl['config']('favorites')) : ?>
			<li id="member_page_stats_favorites">
				<span><?php echo __('Nombre de favoris'); ?></span>
				<span class="link_number">
<?php if ($tpl['member']['stats']['favorites']) : ?>
					<a href="<?php echo $tpl['link']('category/1/user-favorites/' . $tpl['member']['id']); ?>#content"><?php echo L10N::formatNumber($tpl['member']['stats']['favorites']); ?></a>
<?php else : ?>
					<span><?php echo L10N::formatNumber($tpl['member']['stats']['favorites']); ?></span>
<?php endif; ?>
				</span>
			</li>
<?php endif; ?>
<?php if ($tpl['config']('comments')) : ?>
			<li id="member_page_stats_comments">
				<span><?php echo __('Nombre de commentaires'); ?></span>
				<span class="link_number">
<?php if ($tpl['member']['stats']['comments']) : ?>
					<a href="<?php echo $tpl['link']('comments/user/' . $tpl['member']['id']); ?>"><?php echo L10N::formatNumber($tpl['member']['stats']['comments']); ?></a>
<?php else : ?>
					<span><?php echo L10N::formatNumber($tpl['member']['stats']['comments']); ?></span>
<?php endif; ?>
				</span>
			</li>
<?php endif; ?>
		</ul>
	</div>
</div>