<?php foreach ($this->search_result AS $key => $val) { ?>
	<?php if ($val['type'] == 3) { ?>
		<li><a href="mobile/<?php echo $val['url']; ?>" target="_blank"><img style="float:left;" src="<?php echo get_avatar_url($val['detail']['uid'], 'mid'); ?>" width="50" height="50" /></a>
            <div style="padding-left:62px; height:50px;">
            	<p class="t_cal"><a href="mobile/<?php echo $val['url']; ?>" class="search_title" target="_blank"><?php echo $val['name']; ?></a></p>
            	<div class="time" style="margin-top:5px;"><span class="explain">User</span><?php echo $val['detail']['signature']; ?></div>
            </div>
		</li> 
	<?php }else if ($val['type'] == 2) { ?>
		<li><a href="mobile/<?php echo $val['url']; ?>" target="_blank"><img style="float:left;" src="<?php echo get_avatar_url($val['detail']['uid'], 'mid'); ?>" width="50" height="50" /></a>
            <div style="padding-left:62px; height:50px;">
            	<p class="t_cal"><a href="mobile/<?php echo $val['url']; ?>" class="search_title" target="_blank"> <?php echo $val['name']; ?></a></p>
            	<div class="time" style="margin-top:5px;"><span class="explain">Topic</span><?php echo $val['detail']['discuss_count']; ?>question&nbsp;&nbsp;<?php echo $val['detail']['focus_count']; ?>participants</div>
            </div>
		</li> 
	<?php }else if ($val['type'] == 1) { ?>
<li>
            <p class="t_cal"><a href="mobile/<?php echo $val['url']; ?>" class="search_title" target="_blank"><?php if($val['detail']['best_answer']){ ?><div class="best_a"></div><?php } ?><?php echo $val['name']; ?></a></p>
            <div class="time" style="margin-top:6px;"><span class="explain">Question</span><?php echo $val['detail']['answer_count']; ?>Replies&nbsp;&nbsp;<?php echo $val['detail']['focus_count']; ?>participants</div>
            </li> 
	<?php } ?>

<script>
$('#search_list li p.t_cal a').highText(search_query, 'span', 's');
</script>
<?php } ?>