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

<div class="tny-basic tny-main tny-clear">
	<div class="u_mainElm b_restrain">
		<h3 class="trends-H3 qAll rel content-H3 ">
			<p class="navC abs">
			<?php if (get_setting('integral_system_enabled') == 'Y') { ?>
				<a<?php if ($_GET['sort_key'] == 'integral') { ?> class="cur"<?php } ?> href="people/list/sort_key-integral">Credit</a>
				<a<?php if (!$_GET['sort_key'] OR $_GET['sort_key'] == 'reputation') { ?> class="cur"<?php } ?>  href="people/list/">Reputation</a>
			<?php } ?>
			</p>
			
			User reputation
		</h3>
    	   
		<!--Cycle-->
		<?php foreach($this->users_list as $key => $val) { ?>
		<div class="rankingList rel u_integral">
			<p class="u_user tny-txtHide"><a href="people/<?php echo $val['url_token']; ?>" class="umsg" data-message="&uid=<?php echo $val['uid']; ?>&card=user"><?php echo $val['user_name']; ?></a> <?php if ($val['verified']) { ?><em title="Certified" class="v tny-small"></em> <?php } ?><?php if ($val['signature']) { echo $val['signature']; } ?></p>
			<p class="urx tny-txtHide"><span class="w">Reputation: <em class="u_linkColor tny-bold"><?php echo $val['reputation']; ?></em></span><?php if (get_setting('integral_system_enabled') == 'Y') { ?><span class="j">Credits:<em class="u_linkCly tny-bold"><?php echo $val['integral']; ?></em></span><?php } ?><span class="z">Agree: <em><?php echo $val['agree_count']; ?></em></span><span class="g">Thanks: <em><?php echo $val['thanks_count']; ?></em></span></p>
			
			<?php if ($val['reputation_topics']) { ?>	
			<p class="tny-txtHide">Familiar feature:
			<?php foreach($val['reputation_topics'] as $t_key => $t_val) { ?>
				<a href="topic/<?php echo $t_val['url_token']; ?>" class="glotopic umsg" data-message="&uid=<?php echo $t_val['topic_id']; ?>&card=topic" title="<?php echo $t_val['topic_title']; ?>"><?php echo $t_val['topic_title']; ?></a>
			<?php } ?>
			</p>
			<?php } ?>
			
			<a class="imgUser abs" href="people/<?php echo $val['url_token']; ?>" class="umsg" data-message="&uid=<?php echo $val['uid']; ?>&card=user"><img src="<?php echo get_avatar_url($val['uid'], 'mid'); ?>" alt="<?php echo $val['user_name']; ?>" /></a>
			<?php if (!$_GET['page']) { $_GET['page'] = 1; } ?>
			<span class="urk abs<?php if (($key + 1 + ((intval($_GET['page']) - 1) * get_setting('contents_per_page'))) <= 3) { ?> u_linkCly u_Ear<?php } ?>"><?php if (($key + 1 + ((intval($_GET['page']) - 1) * get_setting('contents_per_page'))) < 99) { echo ($key + 1 + ((intval($_GET['page']) - 1) * get_setting('contents_per_page'))); } else { echo '*'; }; ?></span>
			<?php if ($this->user_id AND $this->user_id != $val['uid']) { ?><a href="javascript:;" onclick="follow_people($(this), $(this), <?php echo $val['uid']; ?>);" class="tny-but btn-blue2 abs<?php if ($val['focus']){?> cur<?php }?>"><?php if ($val['focus']) { ?>Un<?php } ?>follow</a><?php } ?>
		</div>
		<?php } ?>
		
		<?php echo $this->pagination; ?>
	</div>
</div>

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