<?php 
error_reporting(0); 
include("../../../config/os.php");
$id=base64_decode($_GET[id]);
$type="where id='$id'";
$daili=queryall(daili,$type);
if(!$daili){
echo err();exit;
}
$type="where userid='$daili[userid]'";
$user=queryall(user,$type);
if($user[pb]==1 or $user==null){
$str ="<script>location.href='http://www.baidu.com'</script>";
echo $str;
exit;
}
$lurl='/tzzonglink-'.$_GET[id].'-'.$user[mb].$dshz;
$fhurl=base64_encode($lurl);
$pdurl='http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
if (strpos($pdurl, '?id=') !== false) {
$p = explode('?id=',$pdurl); 
$pdid=$p[1];
}else{
$pdid='0';
}
?>
<!DOCTYPE html>
<html>
<head>
<title>-</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link rel="stylesheet" type="text/css" href="/mb/7/mui.css"/>
<link rel="stylesheet" type="text/css" href="/mb/7/weui.min.css"/>
<link rel="stylesheet" href="/layui/css/houtai.css" media="all" />
<script src="/2019newui/js/jquery.min.js"></script>
<script src="/layui/layui.js" charset="utf-8"></script> 
<script src="/mb/7/jquery.js"></script>
<style>
        .mui-table-view.mui-grid-view .mui-table-view-cell .mui-media-body {
            font-size: 10px;
            margin-top: 10px;
            color: #333;
            text-align: left;
        }
        .online {
            font-size: 0.625rem;
            background-color: #ececec;
            border-radius: 0.3125rem;
            width: 40%;
            position: absolute;
            top: 14px;
            left: 20px;
        }

        .desc {
            font-size: 10px;
            text-align: left;
            color: #d66b6b;
        }

        .btn {
            font-size: 12px;
            color: #FFFFFF;
            background: #4cd964;
            border-radius: 0.3125rem;
            padding: 4px;
        }

        a {
            font-size: 16px;
        }

        /*!
laypage默认样式
*/
        .laypage_main a, .laypage_main input, .laypage_main span {
            height: 26px;
            line-height: 26px
        }

        .laypage_main button, .laypage_main input, .laypageskin_default a {
            border: 1px solid #ccc;
            background-color: #fff
        }

        .laypage_main {
            font-size: 0;
            clear: both;
            color: #666
        }

        .laypage_main * {
            display: inline-block;
            vertical-align: top;
            font-size: 12px
        }

        .laypage_main a {
            text-decoration: none;
            color: #666
        }

        .laypage_main a, .laypage_main span {
            margin: 0 3px 6px;
            padding: 0 10px
        }

        .laypage_main input {
            width: 40px;
            margin: 0 5px;
            padding: 0 5px
        }

        .laypage_main button {
            height: 28px;
            line-height: 28px;
            margin-left: 5px;
            padding: 0 10px;
            color: #666
        }

        .laypageskin_default span {
            height: 28px;
            line-height: 28px;
            color: #999
        }

        .laypageskin_default .laypage_curr {
            font-weight: 700;
            color: #666
        }

        .laypageskin_molv a, .laypageskin_molv span {
            padding: 0 12px;
            border-radius: 2px
        }

        .laypageskin_molv a {
            background-color: #f1eff0
        }

        .laypageskin_molv .laypage_curr {
            background-color: #00AA91;
            color: #fff
        }

        .laypageskin_molv input {
            height: 24px;
            line-height: 24px
        }

        .laypageskin_molv button {
            height: 26px;
            line-height: 26px
        }

        .laypageskin_yahei {
            color: #333
        }

        .laypageskin_yahei a, .laypageskin_yahei span {
            padding: 0 13px;
            border-radius: 2px;
            color: #333
        }

        .laypageskin_yahei .laypage_curr {
            background-color: #333;
            color: #fff
        }

        .laypageskin_flow {
            text-align: center
        }

        .laypageskin_flow .page_nomore {
            color: #999
        }

    </style>
</head>
<body>
<section> 
<ul id="article_list" class="mui-table-view mui-grid-view"></ul> 
</section> 
<link rel="stylesheet" type="text/css" href="/mb/7/mui.css"/>
<div style="height: 30px;"></div> 
<nav class="mui-bar mui-bar-tab"> 
<a class="mui-tab-item" href="<?php echo $pdurl?>"> <span class="mui-icon"> <img src="/mb/7/shouye.png" alt="" width="100%" /> </span> <span class="mui-tab-label">首页</span> </a> 
<span class="mui-tab-item" onclick="location.href='/fenlei-<?php echo $user[userid]?>-<?php echo $fhurl?><?php echo $dshz?>'"> <span class="mui-icon"> <img src="/mb/7/fenlei.png" alt="" width="100%" /> </span> <span class="mui-tab-label">分类</span></span> 
<span class="mui-tab-item" onclick="location.href='/dsyzf-<?php echo $user[mb]?>-<?php echo $fhurl?><?php echo $dshz?>'"> <span class="mui-icon"> <img src="/mb/7/wo.png" alt="" width="100%" /> </span> <span class="mui-tab-label">我的</span></span> 
</nav>  
<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;
$(function(){
$('.box').css('padding-top',$('.video').height());
})
$(function () {
wait = true;
getData();
});
var flid ='<?php echo $pdid?>';
var page = 1;
var pagesize = 10;
var wait = false;
var isFree = -1;
$(document).on('scroll', function () {
if (wait) return;
var wScrollY = window.scrollY; // 当前滚动条位置
var wInnerH = window.innerHeight; // 设备窗口的高度（不会变）
var bScrollH = document.body.scrollHeight; // 滚动条总高度
if (wScrollY + wInnerH >= bScrollH) {
wait = true;
getData();
}
});
// 滚动的时候隐藏搜索以及TAB
$(window).scroll(function() {
clearTimeout(timer);
$('.nav').hide();
var timer = setTimeout(function(){
$('.nav').show();
},1000)
})
$('.nav a').on('click',function(){
$(this).addClass('active').siblings().removeClass();
flid=$(this).data("flid");
page = 1;
getData();
});
function getData() {
<?php if($pdid==0){?>
flid = '0';
<?php }else{?>
flid = '<?php echo $pdid?>';
<?php }?>
if (page == 1) {
}else{
var index = layer.load(2, {
content: '',
success: function (layero) {
layero.find('.layui-layer-content').css({
'paddingTop': '40px',
 'width': '60px',
'textAlign': 'center',
'backgroundPositionX': 'center'
});
}
});
}
$.ajax({
type : "post",
url : "/sjpost/",
dataType: "json",  
async: true,
data: {flid: flid,page: page,userid: '<?php echo $daili[userid]?>'},
timeout: 10000 ,
success : function(d){
if(d.zt=='true'){  
layer.closeAll('loading');
if (d.data.length > 0) {
appendData(d.data);
page++;
wait = false;
}else{
layer.msg('<i class="layui-icon layui-icon-face-cry"></i><br>没有更多了');
}
} 
},
error:function(){
}
});
}
function appendData(data) {
if (page == 1) {
if (data.length == 0) {
$('#article_list').html('<li style="text-align:center;" class="mui-table-view-cell mui-media">抱歉，没有您找的数据，换个条件试试</li>');
return;
}
$('#article_list').html("");
}
for (var i in data) {
var hp=parseInt(Math.random()*(100-90)+90);
var fk=parseInt(Math.random()*(600-300)+300);
var hit=parseInt(Math.random()*(9000-300)+300);
var str = '<li class="mui-table-view-cell mui-media mui-col-xs-6"><a  href="'+data[i].url+'">'+
'<img  class="mui-media-object" src="'+data[i].pic+'" style="height: 101px" >'+
'<div class="mui-media-body font_10">'+data[i].name+'</div> <div class="desc">已有'+fk+'付款 ,好评度:'+hp+'%</div>'+'</a><div style="text-align: left;"><a  href="'+data[i].url+'"><span class="btn">点击播放</span></a> </div><div class="online">'+hit+'在看</div></li>';
var li = $(str);
$("#article_list").append(li);
}
}
var last1 = $(".type-panel .book-right:eq(0) .my-btn:eq(0)")[0];
$(".type-panel .book-right:eq(0) .my-btn").click(function () {
$(".type-panel .book-right:eq(0) a").removeClass("active");
$(this).addClass("active");
last1.classList.remove('type-alive');
last1 = this;
last1.classList.add('type-alive');
flid = last1.getAttribute('data-flid');
page = 1;
getData();
});
});
</script>
<script type="text/javascript">
function run () {
var index = Math.floor(Math.random()*100);
pmd(index);
};
var times = document.getElementsByClassName('fuckyou').length;
setInterval('run()',times*2000);
function pmd (id) {
var colors = new Array('#FF5151','#ffaad5','#ffa6ff','#d3a4ff','#2828FF','#00FFFF','#1AFD9C','#FF8000','#81C0C0','#B766AD');
var color = colors[id];
var tmp = document.getElementsByClassName('fuckyou');
for (var i = 0; i < tmp.length; i++) {
var id = tmp[i];
var moren = id.style.color;
setTimeout(function(id){
id.style.color = color;
},i*200,id);
setTimeout(function(id,moren){
id.style.color = moren;
},i*200+180,id,moren);
};
}
</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>