<?php TPL::output('admin/global/header.tpl.htm'); ?>

<!--left-->
<?php TPL::output('admin/global/left.tpl.htm'); ?>
<!--left-->

<!-- main -->
<div id="main-content">
	<div class="clear"></div>
	<div class="content-box">
		<div class="content-box-header">
			<h3><?php echo $this->crumb['last']['name']; ?></h3>
			<div class="clear"></div>
		</div>
		<div class="content-box-content">
			<div class="tab-content default-tab" id="tab1">
				
				<?php if ($this->list) { ?>
				
				<table class="list">
					<thead>
						<tr>
							<th>ID</th>
							<th>Avatar</th>
							<th><a href="<?php echo $this->search_url; ?>__sort_key-user_name__order-<?php if ($_GET['sort_key'] == 'user_name' && $_GET['order'] == 'DESC') { ?>ASC<?php }else{ ?>DESC<?php } ?>">Username<?php if ($_GET['sort_key'] == 'user_name') { ?><?php if ($_GET['order'] == 'ASC') { ?><em class="listup">&uarr;</em><?php }else{ ?><em class="listdown">&darr;</em><?php } ?><?php } ?></a></th>
							<th><a href="<?php echo $this->search_url; ?>__sort_key-email__order-<?php if ($_GET['sort_key'] == 'email' && $_GET['order'] == 'DESC') { ?>ASC<?php }else{ ?>DESC<?php } ?>">Email<?php if ($_GET['sort_key'] == 'email') { ?><?php if ($_GET['order'] == 'ASC') { ?><em class="listup">&uarr;</em><?php }else{ ?><em class="listdown">&darr;</em><?php } ?><?php } ?></a></th>
							<th>Explanation</th>
							<?php if (get_setting('integral_system_enabled') == 'Y') { ?>
								<th><a href="<?php echo $this->search_url; ?>__sort_key-integral__order-<?php if ($_GET['sort_key'] == 'integral' && $_GET['order'] == 'DESC') { ?>ASC<?php }else{ ?>DESC<?php } ?>">Credit<?php if ($_GET['sort_key'] == 'integral') { ?><?php if ($_GET['order'] == 'ASC') { ?><em class="listup">&uarr;</em><?php }else{ ?><em class="listdown">&darr;</em><?php } ?><?php } ?></a></th>
							<?php } ?>
							<th>Operation</th>
						</tr>
					</thead>
					<tbody style="border-bottom: 1px solid #ddd;">
						<?php foreach ($this->list AS $key => $val) { ?>
						<tr>
							<td><?php echo $val['uid']; ?></td>
							<td align="center"><div align="center"><img style="vertical-align: middle;" src="<?php echo get_avatar_url($val['uid'], 'min'); ?>"/></div></td>
							<td><a href="people/<?php echo $val['url_token']; ?>" target="_blank" title="title"><?php echo $val['user_name']; ?></a></td>
							<td><?php echo $val['email']; ?></td>
							<td><?php if ($val['forbidden_log']) { ?><?php echo $val['forbidden_log']['admin_info']['user_name']; ?> at <?php echo date('Y-m-d H:i', $val['forbidden_log']['add_time']); ?> Prohibit operation performed<?php } ?></td>
							<?php if (get_setting('integral_system_enabled') == 'Y') { ?>
								<td><?php echo $val['integral']; ?></td>
							<?php } ?>
							<td><a href="admin/user_manage/edit/uid-<?php echo $val['uid']; ?>" title="Modification"><img src="<?php echo GET_STATIC_URL;?>/admin/images/icons/pencil.png"/></a><?php if ($val['uid'] != $this->user_id) { ?> &nbsp; <a href="javascript:;" onClick="ajax_request(GET_BASE_URL + '/admin/user_manage/forbidden_status_ajax/user_id-<?php echo $val['uid']; ?>__status-<?php echo intval($val['forbidden']) ? 0 : 1; ?>');" title="<?php if ($val['forbidden']) { ?>Unban<?php }else{ ?>Prohibit users<?php } ?>"><img src="<?php echo GET_STATIC_URL;?>/admin/images/icons/<?php if ($val['forbidden']) { ?>lock<?php }else{ ?>unlock<?php } ?>.png"/></a><?php } ?></td>
						</tr>
						<?php } ?>
					</tbody>
					<tfoot>
						<tr>
							<td colspan="<?php if (get_setting('integral_system_enabled') == 'Y') { ?>11<?php }else{ ?>10<?php } ?>"><div class="pagination"> <?php echo $this->pagination; ?> </div>
								<div class="clear"></div></td>
						</tr>
					</tfoot>
				</table>
				<?php } ?>
			</div>
			
		</div>
		<div class="clear"></div>
		<div id="notf_tip" style="display:none;" class="notification png_bg"> <a href="javascript:;" class="close"><img src="<?php echo GET_STATIC_URL;?>/admin/images/icons/cross_grey_small.png" alt="Close" /></a>
			<div id="notf_cont"></div>
		</div>
	</div>

<!-- footer -->
<?php TPL::output('admin/global/footer.tpl.htm'); ?>
<!-- footer -->

</div>
<!-- main -->

</div>

</body>
</html>