<!doctype html>
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET ?>">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<meta content="telephone=no" name="format-detection" />	
	<title>µãÔÞÁÐ±í</title>
	<script src="assets/js/jquery-1.8.3.min.js"></script>
	<link rel="stylesheet" type="text/css" href="assets/css/reward.css">
</head>
<body>
	<div class="zan_box">
		<ul>
			<?php include dirname(__FILE__).'/rewards_comment.php';?>
		</ul>
	</div>
	<script type="text/javascript">
	 $(document).ready(function() {
	 	var page = 2;
	 	var empty = false;
	 	var loading = false;
	 	$(window).bind('scroll',function(event){
	 		if(loading){
	 			return false;
	 		}
	 		if($(document).height() - $(window).height()-$(window).scrollTop()<=0){
	 			loading = true;
	            if(empty){
	                return false;
	            }	
	            $.ajax({
	 				url: "<?php echo $_G['site_url'].'index.php?mod=rewardlist&tid='.$tid?>",
	 				dataType: 'html',
	 				cache:false,
	 				data: {page: page},
	                success:function (data)
	                {   
	                    if(data == 'finish')
	                    {
	                        empty = true;
	                        return false;
	                    }
	                   $("ul").append(data);
	                   page = page + 1;
	                   loading = false;
	                   return false;
	               }
	 			}) 				 				 				 			
	 		}
	 	});
	 });
	</script>
	
	
</body>
</html>