<?php
include("public.php");
include("lang.php");
if(!isset($lasthid) || $lasthid == '') {
	$lasthid=0;
	// Show next sent official image
 }
if(isset($_REQUEST['tag'])) {
  $hashtag = $_REQUEST['tag'];
}
else {
	$hashtag = "";
}
$Updates_Details_Array=$Mat->Get_Hashtags($lasthid,$profile_uid,$hashtag);
$total=$Mat->Total_Get_Hashtags($lasthid,$hashtag);
 if($Updates_Details_Array) {
	//If updates valid database columns
	 foreach($Updates_Details_Array as $data) {
		 $msg_id=$data['msg_id'];
		 $hashtagid=$data['uid'];
         include("html_posts.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='nexthashtag';	
 } 
?> 

<?php 
echo '<div id="more'.$msg_id.'" class="gorr">
      <div class="post_loader">
      <div class="bubble1"></div>
      <div class="bubble2"></div>
      <div class="bubble3"></div>
      </div>
      <a href="'.$link.'" class="'.$class.' ee" id="'.$msg_id.'" rel="'.$profile_uid.'" title="'.$hashtag.'">LOAD MORE</a>
      </div>';
}
?>
<?php
} else {
    echo '<div class="no-more-picture">No more post</div>';
}
?>
