<?php include('users_menu.tpl.php'); ?>

<div id="page_users">
	<div>
		<div id="page_subsection">
			<div id="content_subsection">
				<div id="browse" class="browse js_box">
					<span id="browse_link" class="icon icon_browse js_box_link"><a class="js" href="javascript:;"><?php echo __('Parcourir'); ?></a></span>
					<div id="browse_content" class="js_box_inner">
						<div id="browse_inner">
							<p id="browse_search" class="field"><input name="search" type="text"></p>
							<div>
								<ul tabindex="-1">
<?php foreach ($tpl['users'] as &$i) : ?>
									<li id="v<?php if ($i['id'] == $tpl['user']['id']) : ?>c<?php endif; ?>{<?php echo $i['id']; ?>}"><a href="javascript:;"><b><?php echo $i['nickname']; ?></b></a></li>
<?php endforeach; ?>
								</ul>
							</div>
						</div>
					</div>
				</div>
				<nav id="section_nav">
					<p id="breadcrumb">
						<a href="<?php echo $tpl['links']['group']; ?>"><?php echo $tpl['user']['group_name']; ?></a>
<?php if ($tpl['user']['superadmin']) : ?>
						<img title="<?php echo __('Super-administrateur'); ?>" width="16" height="16" src="<?php echo $tpl['admin']['style']['path']; ?>/icons/16x16/crown.png">
<?php elseif ($tpl['user']['admin']) : ?>
						<img title="<?php echo __('Administrateur'); ?>" width="16" height="16" src="<?php echo $tpl['admin']['style']['path']; ?>/icons/16x16/medal.png">
<?php endif; ?>
						/
						<a class="current" href="<?php echo $tpl['link']('user/' . $tpl['user']['id']); ?>"><?php echo $tpl['user']['nickname']; ?></a>
<?php if ($tpl['user']['activated']) : ?>
						<a title="<?php echo __('Voir dans la galerie'); ?>" class="obj_gallery_link" href="<?php echo $tpl['user']['gallery_link']; ?>"></a>
<?php endif; ?>
					</p>
				</nav>
<?php include($tpl['template']['content']); ?>
			</div>
			<div id="menu_subsection">
				<div id="obj_thumb" class="<?php if ($tpl['user']['activated']) : ?>activate<?php elseif ($tpl['user']['pending']) : ?>pending<?php else : ?>deactivate<?php endif; ?>">
<?php if ($tpl['user']['avatar']) : ?>
						<a href="<?php echo $tpl['user']['avatar_src']; ?>" class="viewer">
<?php endif; ?>
							<img alt="<?php echo __('Avatar'); ?>" src="<?php echo $tpl['user']['avatar_src']; ?>">
<?php if ($tpl['user']['avatar']) : ?>
						</a>
<?php endif; ?>
				</div>
				<div id="menu_subsection_inner">
					<div id="menu_subsection_infos">
						<div id="box_stats" class="obj_box js_box">
							<p class="obj_box_link js_box_link">
								<a title="<?php echo __('Statistiques'); ?>" href="javascript:;">
									<img width="20" height="20" alt="<?php echo __('Statistiques'); ?>" src="<?php echo $tpl['admin']['style']['path']; ?>/icons/20x20/stats.png">
								</a>
							</p>
							<div class="obj_box_inner js_box_inner">
								<h3 class="obj_box_title js_box_title"><span><?php echo __('Statistiques'); ?></span></h3>
								<div>
<?php $i = $tpl['user']; include('user_stats.tpl.php'); ?>
								</div>
							</div>
						</div>
					</div>
					<ul>
						<li<?php if ($_GET['section'] == 'user') : ?> class="current"<?php endif; ?>><a href="<?php echo $tpl['links']['user']; ?>"><?php echo __('Éditer le profil'); ?></a></li>
						<li<?php if ($_GET['section'] == 'user-avatar') : ?> class="current"<?php endif; ?>><a href="<?php echo $tpl['links']['user_avatar']; ?>"><?php echo __('Modifier l\'avatar'); ?></a></li>
						<li<?php if (!$tpl['user_sendmail']) : ?> class="disabled"<?php endif; ?>>
<?php if ($tpl['user_sendmail']) : ?>
							<a href="<?php echo $tpl['links']['user_sendmail']; ?>">
<?php endif; ?>
								<?php echo __('Envoyer un courriel'); ?>
<?php if ($tpl['user_sendmail']) : ?>
							</a>
<?php endif; ?>
						</li>
						<li<?php if (!$tpl['user_delete']) : ?> class="disabled"<?php elseif ($_GET['section'] == 'user-delete') : ?> class="current"<?php endif; ?>>
<?php if ($tpl['user_delete']) : ?>
							<a href="<?php echo $tpl['links']['user_delete']; ?>">
<?php endif; ?>
								<?php echo __('Supprimer l\'utilisateur'); ?>
<?php if ($tpl['user_delete']) : ?>
							</a>
<?php endif; ?>
						</li>
					</ul>
				</div>
			</div>
		</div>
	</div>
</div>