<?php
 $commentsarray=$Mat->Comments($msg_id,0);
 if($x) {
    $comment_count=count($commentsarray);
    $second_count=$comment_count-2;
	// Check the comment count
	// If the total number of comments is greater than 2
    if($comment_count>2){
		// Then show the see othe comment link
?>
<div class="comment_ui" id="view<?php echo $omsg_id; ?>">
<?php 
$link=$index_url;
$class='';
if($login){
   $link='#';
   $class='view_comments';	
 } 
?>
<a href="<?php echo $link; ?>" class="<?php echo $class ?>" id="<?php echo $omsg_id; ?>" rel="<?php echo $msg_id; ?>" vi='<?php echo $comment_count; ?>'>see other <?php echo $comment_count; ?> comment</a>
</div>
<?php
$commentsarray=$Mat->Comments($msg_id,$second_count);
}
}
if($commentsarray){
	// Pull the comments
   foreach($commentsarray as $cdata){
       include('html_comments.php');
     }
}
?>