<div class="main_admin">
<div class="box-body">
<?php
include_once 'includes.php';
include_once 'pagination_header.php';
$Updates_Details_Array=$MatAdmin->Updates_Details($start,$per_page);
$Updates_Count=$MatAdmin->Updates_Count();
$count = $Updates_Count;
$no_of_paginations = ceil($count / $per_page);
$updates=1;
?>
<?php 
if (is_array($Updates_Details_Array)) {
    foreach($Updates_Details_Array as $data) {
		$image = isset($data['uploads']) ? $data['uploads'] : NULL;
		$video = isset($data['video']) ? $data['video'] : NULL;
		$update_uid=$data['uid'];
		$orimessage=$data['message'];
        $message=htmlcode($orimessage);
		$user_face=$MatAdmin->User_Profile_Image($update_uid,$base_url);
?>

<div class="user_details_wrapupdate" id="updates<?php echo $data["msg_id"] ?>">
<div class="widget">
<div class="profile_image">
        <img src="<?php echo $user_face;?>">
      </div>
    <div class="username_fullname">
      <div class="fullname"><?php echo $data['name']; ?></div>
      <div class="username">#<?php echo $data['username']; ?></div>
      <div class="delete_btn updateDelete" id="<?php echo $data["msg_id"] ?>" rel="">Delete</div>

    </div>  
</div>

<?php
  if($image)
  {
	  echo '<div class="update_wrap_u">';
    $s = explode(",", trim($image, ","));
   //$r=1;
   $f=count($s);
      foreach($s as $a)
       {
        $newdata=$MatAdmin->Get_Upload_Image_Id($a);
         if($newdata)
           {
            if($newdata)
           {
            $final_image=$base_url."uploads/".$newdata['image_path'];
            echo '<div class="updates_image"><a href="'.$final_image.'" data-lightbox="lightbox'.$data['msg_id'].'"><img src="'.$final_image.'" class="imgpreview"/></a></div>';
           }
           }
    }
	echo '</div>';
 }
?>
<?php if($video){
    echo '<div class="photo">';
         $s = explode(",", $video);
         $r=1;
         $f=count($s);
          foreach($s as $a)
           {
           $newdata=$MatAdmin->Get_Upload_Video_Id($a);
            if($newdata)
               {
                $final_image=$base_url."uploads/".$newdata['video_name'];
                $vidyo_extension=$newdata['video_ext'];
                 echo "<div class='video_area'>
                 <video id='my_video_1'  class='video-js vjs-default-skin' controls preload='none' poster='".$final_image.".jpg' width='100%' height='267px' data-setup='{}'>
                   <source src='".$final_image.".".$vidyo_extension."' type='video/mp4' />
                 </video>
                 </div>";
               }
                $r=$r+1;
               }
               echo '</div>';
  } ?> 
<?php 
   if($message){
	    echo '<div class="widget">'.$message.'</div>';
	   }
?>
  
 
</div>

<?php } } ?>
<?php
 if(empty($Updates_Details_Array)) {
   echo '<div id="noResults">No Results</div>';
 }
?>
 </div><!-- /.box-body -->
<?php include 'pagination_footer.php'; ?>
</div>