<?php foreach ($this->search_result AS $key => $val) { ?>
<li class="<?php if ($val['type'] == 1) { ?>qs<?php } ?><?php if ($val['detail']['best_answer'] > 0 AND $val['type'] == 1) { ?> winner<?php } ?>"<?php if ($val['focus']) { ?> focus="true"<?php } ?>>
<?php if ($val['type'] == 1) { ?>
	<p class="u_user tny-txtHide keyword"><a href="<?php echo $val['url']; ?>" target="_blank"><?php echo $val['name']; ?></a></p>
	<p class="tny-txtHide"><a href="<?php echo $val['url']; ?>" class="gray_bg tny-cl_02 tny-radiu3">Question</a> &nbsp; <?php echo $val['detail']['answer_count']; ?> Replies &nbsp; • &nbsp; <?php echo $val['detail']['focus_count']; ?> participants</p>
	<?php if($this->user_id){ ?>
		<a href="javascript:;" onclick="focus_question($(this), $(this), <?php echo $val['sno']; ?>);" class="tny-but btn-blue2 abs<?php if ($val['focus']) { ?> cur<?php } ?>"><?php if ($val['focus']) { ?>Un<?php } ?>follow</a>
	<?php } ?>
<?php } else if ($val['type'] == 2) { ?>
	<p class="u_user tny-txtHide keyword"><a href="<?php echo $val['url']; ?>" target="_blank"><?php echo $val['name']; ?></a></p>
	<p class="tny-txtHide"><a href="<?php echo $val['url']; ?>" class="gray_bg tny-cl_02 tny-radiu3">Topic</a> &nbsp; <?php echo $val['detail']['discuss_count']; ?> question &nbsp; • &nbsp; <?php echo $val['detail']['focus_count']; ?> participants</p>
	<a class="imgUser abs" href="<?php echo $val['url']; ?>"><img src="<?php echo $val['detail']['topic_pic']; ?>" alt="<?php echo $val['name']; ?>"></a>
	<?php if($this->user_id){ ?>
		<a href="javascript:;" class="tny-but btn-blue2 abs<?php if ($val['focus']) { ?> cur<?php } ?>" onclick="focus_topic($(this), $(this), <?php echo $val['sno']; ?>);"><?php if ($val['focus']) { ?>Un<?php } ?>follow</a>
	<?php } ?>
<?php } else if ($val['type'] == 3) { ?>
	<p class="u_user tny-txtHide keyword"><a href="<?php echo $val['url']; ?>" target="_blank"><?php echo $val['name']; ?></a></p>
	<p class="tny-txtHide"><a href="<?php echo $val['url']; ?>" class="gray_bg tny-cl_02 tny-radiu3">User</a> &nbsp; <?php echo $val['detail']['reputation']; ?> of reputation &nbsp; • &nbsp; <?php echo $val['detail']['agree_count']; ?> Agree &nbsp; • &nbsp; <?php echo $val['detail']['thanks_count']; ?> Thanks &nbsp; • &nbsp; <?php echo $val['detail']['focus_count']; ?> participants</p>
	<a class="imgUser abs" href="<?php echo $val['url']; ?>"><img src="<?php echo get_avatar_url($val['sno'], 'mid'); ?>" alt="<?php echo $val['name']; ?>"></a>
	<?php if($this->user_id){ ?>
		<a href="javascript:;" class="tny-but btn-blue2 abs<?php if ($val['focus']) { ?> cur<?php } ?>" onclick="follow_people($(this), $(this), <?php echo $val['sno']; ?>);"><?php if ($val['focus']) { ?>Un<?php } ?>follow</a>
	<?php } ?>
<?php } ?>
</li>
<?php } ?>