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

<script type="text/javascript">
	var PEOPLE_USER_ID = '<?php echo $this->user['uid']; ?>';
	
	$(document).ready(function () {
		$('#contents_nav span').click(function () {
			$('#contents_nav span').removeClass('click');
			
			$('div.tpage').hide();
			$('div.tpage._contents' + $(this).attr('class')).show();
			
			if ($('div.tpage._contents' + $(this).attr('class')).find('ul').html() == '')
			{
				switch ($(this).attr('class'))
				{
					case '_reply':
						mobile_more_load(GET_BASE_URL + '/people/ajax/user_actions/uid-' + PEOPLE_USER_ID + '__actions-201__template-mobile', $('#user_actions_reply_more'), $('#contentsuser_actions_reply'));
					break;
					
					case '_ask':
						mobile_more_load(GET_BASE_URL + '/people/ajax/user_actions/uid-' + PEOPLE_USER_ID + '__actions-101__template-mobile', $('#user_actions_question_more_101'), $('#contentsuser_actions_question_101'));	// Initiated questions	
					break;
					
					case '_activity':
						mobile_more_load(GET_BASE_URL + '/people/ajax/user_actions/distint-1__template-mobile__uid-' + PEOPLE_USER_ID, $('#user_actions_more'), $('#contentsuser_actions'));
					break;
				}
			}
			
			$(this).addClass('click');
		});
	});
</script>

<div class="main">
	<div style="text-align:center; ">
		<img class="hp" src="<?php echo get_avatar_url($this->user['uid'], 'max'); ?>"/>
		<div class="name"><?php echo $this->user['user_name']; ?></div>
		<div class="sign"><?php echo $this->user['signature']; ?></div>
        <div class="con">
        	<?php if ($this->user['id'] != $this->user_id) { ?>
        	<div class="sub<?php if ($this->user_follow_check) { ?> cur<?php } ?>" onclick="follow_people($(this), $(this), <?php echo $this->user['uid']; ?>); return false;"><?php if ($this->user_follow_check) { ?>Un<?php } ?>follow</div>
        	<?php } ?>
        	
        	<a href="mobile/new_pm/<?php echo rawurlencode($this->user['user_name']); ?>">Send private messages</a>
        <div class="c"></div>
        </div>
        
    	<div class="nav" id="contents_nav">
        <div>
        	<span class="_profile click">Information</span>
            <span class="_reply">Reply</span>
            <span class="_ask">Ask</span>
            <span class="_focus">Follow</span>
            <span class="_activity">Status</span>
        </div>
        </div>
       
        <div class="tpage _contents_profile" style="display:block;">
        	<div>
        		<ul class="pdateul">
	        		<?php if (get_setting('integral_system_enabled') == 'Y') { ?><li ><div class="int">Credit</div><div class="num">11</div></li><?php } ?>
                    <li ><div class="hon">Reputation</div><div class="num"><?php echo $this->user['reputation'];?></div></li>
                 	<li ><div class="thx">Agree</div><div class="num"><?php echo $this->user['agree_count']; ?></div></li>
                    <li  style="border:none;"><div class="fol">Thank</div><div class="num"><?php echo $this->user['thanks_count']; ?></div></li>
                </ul>
            </div>
            <div class="c"></div>
            
            <div class="ptxt">
                <p>Currently residing Location<?php if ($this->user['province']) { ?> <?php echo $this->user['province']; ?> <?php echo $this->user['city']; ?> &nbsp; <?php } ?></p>
                <?php if ($this->job_name) { ?>
                <p>Occupation:<?php echo $this->job_name; ?></p>
                <?php } ?>
                <p>Familiar feature:<?php if ($this->reputation_topics) { ?><?php foreach ($this->reputation_topics AS $key => $val) { ?><a href="topic/<?php echo $val['url_token']; ?>" class="tag"><?php echo $val['topic_title']; ?></a><?php } ?><?php } ?>
                </p>
            </div>
        </div>
        
        <div class="tpage _contents_reply">
        	<ul class="qa" id="contentsuser_actions_reply"></ul>
            
            <div class="more" id="user_actions_reply_more">More</div>
        </div>
            
        <div class="tpage _contents_ask">
	        <ul class="qa" id="contentsuser_actions_question_101"></ul>
                
             <div class="more" id="user_actions_question_more_101">More</div>
        </div>
            
        <div class="tpage _contents_focus">
        	<div class="follow">
	        	<span >Follow:<br /> <font class="num"><?php echo $this->user['friend_count'];?></font> people</span>
	        	<span >Follow:<br /><font class="num"><?php echo $this->user['topic_focus_count'];?></font> topic</span>
	        	<span style="border:none;" >Fans:<br /><font class="num"><?php echo $this->user['fans_count'];?></font> people</span>       
	        </div>
	    </div>
  			
        <div class="tpage _contents_activity">
        	<div class="deve">
        		<ul id="contentsuser_actions"></ul>
        		
        		<div class="more" id="user_actions_more">More</div>
            </div>
       </div>
</div>

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