<?php
include("public.php");
if(!isset($lastrmid) || $lastrmid == '') {
	$lastrmid=0;
	// Show next sent official image
 }
 $Updates_Details_Array=$Mat->UserUploadsPhotos($profile_uid,$lastrmid);
 $total=$Mat->TotalUserUploadsPhotos($profile_uid);
 if($Updates_Details_Array) {
	 //If updates valid database columns
	 foreach($Updates_Details_Array as $data) {
	   include("html_photos.php");
	 }
	if($total>$perpage) {
	 //If total image post greater then perpage then show the nextphotos button
?>
 <!-- More Button here $msg_id values is a last message id value. -->
<?php 
$link=$index_url;
$class='';
if($login){
    $link='#';
	// nextphotos button
    $class='nextphotos';	
 } 
?> 
<div id="more<?php echo $msg_id; ?>" class="gorr">
<div class="post_loader">
  <div class="bubble1"></div>
  <div class="bubble2"></div>
  <div class="bubble3"></div>
</div>
<a href="<?php echo $link; ?>" class="<?php echo $class; ?> ee" id="<?php echo $msg_id; ?>" rel='<?php echo $profile_uid ?>'>LOAD MORE</a>
</div>
<?php
} 
} else {
    echo '<div class="no-more-picture">No more pictures to be shown</div>';
}

?>