<div class="all-current-messages">
<?php
 $reply=htmlcode($data['reply']);
 $username=$data['username'];
 $email=$data['email'];
 $cuser_id=$data['uid'];
 $upload=$data['upload'];
 $cr_id=$data['cr_id'];
 $fk=$uid;
 $utime=$data['time'];
 $mtime=date("c", $utime);
 //user profile image
 $cface=$Mat->User_Profilepic($cuser_id,$base_url);
 //If user conversation status is other user
 $conversation_status_style_you="conversation-reply-you";
 //If user conversation status is me
 $conversation_status_style_me="conversation-reply-me";
?>
<div class="replyed reply_smbody" id="<?php echo $cr_id ?>">
     <div class="<?php echo ($uid != $fk ? $conversation_status_style_you : $conversation_status_style_me); ?>">
     <div class="conversation-reply-image-area">
<?php
if($upload) {
   echo '<div class="photo">';
   $s = explode(",", $upload);// Explode the images string value
   $r=1;
   $f=count($s);
   foreach($s as $a) {// for each user uploads
	  $newdata=$Mat->Get_Conversation_Upload_Image_Id($a);
      if($newdata) {
		 //Show the images
         $final_image=$base_url."conversation_images/".$newdata['image_path'];
         echo '<div class="photo-item"><a href="'.$final_image.'" data-lightbox="lightbox'.$cr_id.'"><img src="'.$final_image.'" class="imgpreview" id="'.$cr_id.'" rel="'.$cr_id.'"/></a></div>';
      }
	  $r=$r+1;
      }
      echo '</div>';
  }
?>
</div>
<div class="conversation-reply-text" id="<?php echo $cr_id;?>"><?php echo $reply;?></div>
   <span class="reply-message-time timeago" title="<?php echo $mtime;?>"></span>
  </div> 
</div>
</div>