<?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_arrow"></div>
						<div id="browse_inner">
							<p id="browse_search" class="field"><input name="search" type="text"></p>
							<div>
								<ul tabindex="-1">
<?php foreach ($tpl['groups'] as &$i) : ?>
									<li id="v<?php if ($_GET['group_id'] == $i['id']) : ?>c<?php endif; ?>{<?php echo $i['id']; ?>}"><a href="javascript:;"><b><?php echo $i['name']; ?></b></a></li>
<?php endforeach; ?>
								</ul>
							</div>
						</div>
					</div>
				</div>
				<nav id="section_nav">
					<p id="breadcrumb">
						<a class="current" href="<?php echo $tpl['link']('group/' . $_GET['group_id']); ?>"><?php echo $tpl['group']['name']; ?></a>
					</p>
				</nav>
<?php include($tpl['template']['content']); ?>
			</div>
			<div id="menu_subsection">
				<div id="menu_subsection_inner">
					<div id="menu_subsection_infos">
						<div id="box_stats" class="obj_box js_box">
							<p class="obj_box_link">
								<a class="js_box_link" 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 if ($tpl['group']['id'] != 2) : ?>
									<p>
										<?php echo __('Nombre de membres :'); ?>
<?php if ($tpl['group']['nb_users'] > 0) : ?>
										<a href="<?php echo $tpl['link']('users/group/' . $tpl['group']['id']); ?>"><?php echo $tpl['group']['nb_users']; ?></a>
<?php else : ?>
										<?php echo $tpl['group']['nb_users']; ?>
<?php endif; ?>
									</p>
<?php endif; ?>
									<p><?php echo __('Date de création :'); ?> <?php echo $tpl['group']['crtdt']; ?></p>
								</div>
							</div>
						</div>
					</div>
					<ul>
						<li<?php if ($_GET['section'] == 'group') : ?> class="current"<?php endif; ?>>
							<a href="<?php echo $tpl['link']('group/' . $tpl['group']['id']); ?>">
								<?php echo __('Informations'); ?>
							</a>
						</li>
						<li<?php if (!$tpl['edit_perms']) : ?> class="disabled"<?php elseif ($_GET['section'] == 'group-features') : ?> class="current"<?php endif; ?>>
							<span>
<?php if ($tpl['edit_perms']) : ?>
							<a href="<?php echo $tpl['link']('group-features/' . $tpl['group']['id']); ?>">
<?php endif; ?>
								<?php echo __('Fonctionnalités'); ?>
<?php if ($tpl['edit_perms']) : ?>
							</a>
<?php endif; ?>
						</li>
						<li<?php if (!$tpl['edit_perms'] || $tpl['perms']['admin']) : ?> class="disabled"<?php elseif ($_GET['section'] == 'group-categories') : ?> class="current"<?php endif; ?>>
<?php if ($tpl['edit_perms'] && !$tpl['perms']['admin']) : ?>
							<a href="<?php echo $tpl['link']('group-categories/' . $tpl['group']['id']); ?>">
<?php endif; ?>
								<?php echo __('Catégories'); ?>
<?php if ($tpl['edit_perms'] && !$tpl['perms']['admin']) : ?>
							</a>
<?php endif; ?>
						</li>
						<li<?php if (!$tpl['delete_group']) : ?> class="disabled"<?php elseif ($_GET['section'] == 'group-delete') : ?> class="current"<?php endif; ?>>
<?php if ($tpl['delete_group']) : ?>
							<a href="<?php echo $tpl['link']('group-delete/' . $tpl['group']['id']); ?>">
<?php endif; ?>
								<?php echo __('Supprimer le groupe'); ?>
<?php if ($tpl['delete_group']) : ?>
							</a>
<?php endif; ?>
						</li>
					</ul>
				</div>
			</div>
		</div>
	</div>
</div>