<?php 
error_reporting(0); 
include("../../../config/os.php");
$fhurl=base64_decode(ubo($_GET[fhurl]));
$userid=ubo($_GET[userid]);
$type="where userid='$userid'";
$user=queryall(user,$type);
if($user[pb]==1 or $user==null){
$str ="<script>location.href='http://www.baidu.com'</script>";
echo $str;
exit;
}
?>
<!doctype html>
<html lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta content="width=device-width, initial-scale=1.0, user-scalable=0" name="viewport">
<title>最新更新</title>
<link href="/mb/8/bootstrap.css" rel="stylesheet">
<link href="/mb/8/font-awesome.min.css" rel="stylesheet">
<link href="/mb/8/home.css?v=1029" rel="stylesheet">
<script src="/2019newui/js/jquery.min.js"></script>
<script src="/layui/layui.js" charset="utf-8"></script> 
</head>
<body>
<header id="header">
<div class="header-container">
<nav class="path_bar">
<div class="word_wrapper">
<ul class="menu_container">
<li class="menu_items"><a href="<?php echo $fhurl?>" class="type home">首页</a></li>
<li class="menu_items"><a href="/new-<?php echo $userid?>-<?php echo $_GET[fhurl]?><?php echo $dshz?>" class="type apen">今日更新</a></li>
<li class="menu_items"><a href="/dsyzf-<?php echo $user[mb]?>-<?php echo $_GET[fhurl]?><?php echo $dshz?>" class="type">我的打赏</a></li>
<?php
$query = mysql_query("SELECT * FROM dlfl WHERE userid='$userid' and yc='1' ");
while($a = mysql_fetch_array($query)) {
?> 
<li class="menu_items"><div><a href="/flshow-<?php echo $userid?>-<?php echo $_GET[fhurl]?>-<?php echo $a[id]?><?php echo $dshz?>" class="type home"><?php echo $a[name]?></a></div></li>
<?php }?>
</ul>
<div class="arrow_right_mobile">
</div>
</div>
</nav></header>
<div id="container">
<section class="sectionContent below_path_content">
<div class="videoGroup">
<div class="section-title grayBorder">
<div>
<h1>最近更新</h1>
</div>
<div class="cat_select_wrap"><a href="javascript:void(0)"  onClick="duo()" class="cat_option clicked"><span class="selecttext">换一批</span></a></div>
</div>
<div id="app" class="video-wrapper">
<div id="comLoader" class="loader" style="display: none;">
<div class="loader-inner ball-beat">
<div></div>
<div></div>
<div></div>
</div>
</div>
<?php
$query = mysql_query("SELECT * FROM daili where userid='$userid'   and shijian  like '%".$day."%'  order by id asc  limit 10");
while($a = mysql_fetch_array($query)) {
?> 
<div class="col-style d-4 m-2 lazy loaded">
<a href="<?php echo $a[link]?>"  class="videoBox">
<div class="videoBox_wrap">
<div class="videoBox-cover" style="background-image: url(<?php if($a[pic]){?><?php echo $a[pic]?><?php }else{?>/2019newui/images/nopic.jpg<?php }?>);">
</div>
<span class="video-tag free"><?php if($a[lx]==1){?>打赏<?php }else{?>免费<?php }?></span>
</div>
<div class="videoBox-info"><span class="title"><?php echo $a[name]?></span></div>
<div class="videoBox-action">
<span class="views"><i class="fa fa-eye"></i><span class="number"><script>document.write(parseInt(Math.random()*(6000-3000)+3000)); </script></span></span></span>
</div>
</a>
</div>
<?php }?>
</div>
</div>
</section>
</div>
<script>
function duo(){
$("#comLoader").show();
$.ajax({
type : "post",
url : "/mbpost/",
dataType: "json",  
async: true,
data: {userid: '<?php echo $userid?>',lx: 'new'},		
timeout: 10000 ,
success: function(data){

if(data.zt=='true'){  
$("#comLoader").hide();
if (data.data.length > 0) {
appendData(data.data);
}else{
$("#comLoader").hide();
}
}
}
	
});
}
function appendData(data) {
$("#app").html('<div id="comLoader" class="loader" style="display: none;"><div class="loader-inner ball-beat"><div></div><div></div><div></div></div></div>');
for (var i in data) {
var hit=parseInt(Math.random()*(9000-300)+300);
var str = '<div class="col-style d-4 m-2 lazy loaded"><a  href="'+data[i].url+'"  class="videoBox">'+
'<div class="videoBox_wrap"><div class="videoBox-cover" style="background-image: url('+data[i].pic+');"></div>'+
'<span class="video-tag free">'+data[i].lx+'</span><!--<span class="videoBox-time">r</span>--></div><div class="videoBox-info"><span class="title">'+data[i].name+'</span></div><div class="videoBox-action"><span class="views"><i class="fa fa-eye"></i><span class="number">'+data[i].cs+'</span></span><!--<span class="likes"><i class="fa fa- heart"></i><span class="number"></span>--></span></div>'+'</a></div>';
var li = $(str);
$("#app").append(li);
}
}
</script>
<script>
layui.use(['form', 'layedit', 'laydate', 'element', 'jquery', 'upload', 'layer'], function(){
var form = layui.form
,layer   = layui.layer
,layedit = layui.layedit
,element = layui.element
,upload  = layui.upload
,$       = layui.jquery
,laydate = layui.laydate;
});
</script>
<script>
function onBridgeReady(){
WeixinJSBridge.call('hideOptionMenu');
}
if (typeof WeixinJSBridge == "undefined"){
if( document.addEventListener ){
document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
}else if (document.attachEvent){
document.attachEvent('WeixinJSBridgeReady', onBridgeReady); 
document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
}
}else{
onBridgeReady();
}
document.oncontextmenu = function(){
    event.returnValue = false;
}
</script>
</body>
</html>