<?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 lang="zh-cn">
<head>
<meta charset="gb2312">
<title>-</title>
<meta name="viewport" content="width=device-width, initial-scale=1,minimum-scale=1, maximum-scale=1, user-scalable=no">
<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> 
<style>
* {margin: 0;padding: 0;-webkit-box-sizing:border-box; -moz-box-sizing:border-box; box-sizing:border-box;}
html,
body {width: 100%;height: 100%;}
body {background-color: #ededed;}
a {text-decoration: none;color: #333;-webkit-tap-highlight-color: transparent;}
ul,li,ol {list-style: none;}
.nav {overflow: hidden;background-color: #fff;}
.nav a{float: left;width: 16.66%;padding: 10px;text-align: center;}
.nav a.active {color: #2196f3;}
.list {padding: 10px;overflow: hidden;}
.list li {float: left;width: 48%;padding: 5px;margin-bottom: 10px;background-color: #fff;}
.list li:nth-child(even){float: right;}
.list_img {overflow: hidden;background-color: #eee;height: 100px;}
.list img {width: 100%;height: 100%;}
.list_info h3 {font-size: 14px;height: 21px;margin-top: 5px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;font-weight: 700;}
.video {position: fixed;top: 0;left: 0;right: 0;background-color: #eee;}
.video img {width: 100%;display: block;}
.layui-flow-more {display: block;clear: both;}
.list_about {padding: 3px 0;overflow: hidden;font-size: 12px;}
.list_about i {font-style: normal;float: right;color: red;}
.list_about span {color: #999;}
.list b {background-color: #347ab6;color: #fff;display: block;border-radius: 4px;text-align: center;padding: 5px 0;margin-top: 5px;}
.search {overflow: hidden;padding: 10px 16px;border-top: 1px solid #f2f2f2;background-color: #fff;}
.search div {float: left;height: 30px;background-color: #ededed;border-radius: 6px;width: 76%;position: relative;padding: 0 30px;}
.search input  {width: 100%;border: none;outline: none;background-color: transparent;height: 30px;font-size: 14px;}
.search >a {float: right;width: 20%;text-align: center;background-color: #347ab6;color: #fff;border-radius: 4px;padding: 5px 0;}
.search img{position: absolute;width: 20px;top: 5px;}
.icon_s {left: 5px;}
.icon_c {right: 5px;}
</style>
</head>
<body>
<div class="video">		
<div class="nav">
<a href="javascript:;" data-flid="0" class="<?php if($pdid=='0'){?>active<?php }?>" onclick="window.location.href='?id=0'" type="tid" >全部</a>
<?php
$query = mysql_query("SELECT * FROM dlfl WHERE userid='$daili[userid]' and yc='1' ");
while($a = mysql_fetch_array($query)) {
?> 
<a href="javascript:;"   onclick="window.location.href='?id=<?php echo $a[id]?>'"  type="tid" data-flid="<?php echo $a[id]?>"   class="<?php if($pdid==$a[id]){?>active<?php }?>" ><?php echo $a[name]?></a>
<?php }?>
</div>
</div>
<div class="box">
<ul class="list"   id="list"></ul>
</div>
<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) {
$('#list').html('<li style="text-align:center;" class="mui-table-view-cell mui-media">抱歉，没有您找的数据，换个条件试试</li>');
return;
}
$('#list').html("");
}
for (var i in data) {
var hp=parseInt(Math.random()*(100-90)+90);
var fk=parseInt(Math.random()*(6000-3000)+3000);
var str = '<li><a  href="'+data[i].url+'">'+
'<div class="list_img"><img src="'+data[i].pic+'"></div>'+
'<div class="list_info"><h3>'+data[i].name+'</h3><div class="list_about"><span>'+fk+'人付款</span><i>评分:'+hp+'</i>'+'</div><b>立即观看</b></div></a></div></li>';
var li = $(str);
$("#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>
<div class="f_tousu_box" style="z-index: 999; position: fixed;right: 10px;width: 50px;height: 50px;border-radius: 30px;line-height: 50px;color: #fff;background: #2f2f2f;top:50%;font-size: 14px;text-decoration:none">
<a  href="/dsyzf-<?php echo $user[mb]?>-<?php echo $fhurl?><?php echo $dshz?>" style="color: #fff;margin-left: 10px;text-align:center;font-size: 14px;text-decoration:none">已赏</a>
</div>
</body>
</html>