HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: /home/httpd/html/porn.tw/public_html/includes/ajax.aweblacklabel_loadmore.php
<?
include_once("../admin/db.php");

//prepare category
if($_GET['category']) { 
	$thisCategory = htmlentities($_GET['category']); 
} else { 
	$thisCategory = $blacklabel['blacklabel_category']; 
}

//prepare searchText (subcategory)
if($_GET['searchText']) { 
	$thisSearchText = htmlentities($_GET['searchText']); 
} else { 
	$thisSearchText = ""; //implode(" ",$blacklabel['blacklabel_subcategory_'.$thisCategory]); 
}

//prepare pagination
if($_GET['thisPageSize']) { 
	$thisPageSize = (int)$_GET['thisPageSize'];
} else { 
	$thisPageSize = (int)$blacklabel['blacklabel_pagesize']; 
}

//prepare translation api usage
if($blacklabel['blacklabel_use_translation_api']) { 
	$thisUserApiTranslation = 1;
} else { 
	$thisUserApiTranslation = 0;
}


if($_GET['listPageId']) { 
	
	$performers = aweBlacklabelCurlRequest('show-more',"?category=".$thisCategory."&searchText=".$thisSearchText."&pageSize=".$thisPageSize."&useApiTranslation=".$thisUserApiTranslation."&listPageId=".$_GET['listPageId']);  
	
	if(!is_array($performers['data']['performers']) || count($performers['data']['performers']) == 0 ) { 
		echo "No live performers found.";
	} else { 
		foreach($performers['data']['performers'] as $row) { 
			include("$template_path/awe_blacklabel/template.content_item_aweblacklabel.php");
		}
	}
	?>
	<?
	if($performers['data']['isLastPage'] != true) { 
		$listPageId = $performers['data']['listPageId'];
		$container = "aweLoadMore".time();
	?>
	<div id='<? echo $container; ?>' class='row'>		
		<div style='clear: both;'>
			<a id='aweLoadMoreBtn' href="#"  class="btn -default btn-default">
				<span class="btn__label">Show More</span>
			</a>
		</div>
		<script>
			$( "#aweLoadMoreBtn" ).click(function( event ) {
			  event.preventDefault();
			  console.log("More clicked...");
			  $("#<? echo $container; ?>").load("<? echo $basehttp; ?>/live-webcams/loadMore/<? echo $performers['data']['listPageId']; ?>&container=<? echo $container; ?>")
			});
			
			
		</script>
	</div>
	<?
	}
	?>
	<?
} else { 	
	exit("Invalid listPageId");
}