<?php 
error_reporting(0); 
include("../../../config/os.php");
$id=ubo(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){
$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 href="/mb/3/style.css" rel="stylesheet">
<link href="/mb/3/weui.min.css" rel="stylesheet">
<link href="/mb/3/style.min.css" rel="stylesheet">
<script src="/2019newui/js/jquery.min.js"></script>
<script src="/layui/layui.js" charset="utf-8"></script> 
<link rel="stylesheet" href="/layui/css/houtai.css" media="all" />
</head>
<style>
#ca_bd{width:95%;margin:0 auto;}
.ca_one{padding: 3px 8px;margin:2px 5px;background:#E61A42;display:block;float:left;color:#fff;border-radius:5px;}
.spiner-example {height: 200px;padding-top: 70px}
.footer2{position:fixed;bottom:0;z-index:9999;width:100%;height:65px;background:#323136;line-height:50px;text-align:center;margin:-15px;}
.footer2 a{background:url(/2019newui/images/tousu.png) no-repeat 6px; background-size:30px 20px;color:#fff;display:block;width:100px;margin:0 auto;}
.con{width: 100%;height: 35px;background-color: rgba(0,0,0,0.8);position: fixed;color: #fff;text-align: center;border-radius: 10px;line-height: 35px;z-index: 999;display: none;font-size: 16px;}
.category{margin:0 auto;text-align:center;background:#352727;}
.category span{display: inline-block;padding: 6px 12px;font-size: 14px;color:#fff;font-weight: bold;}
.choose{background: red;}
.vType{color: #fff;}
</style>
<body>
<div style="padding: 0px 15px 15px;">
<div id="gdt_area" style="margin-left:3px;">
<div style="padding-top:10px;font-size:16px;">
<div style="margin: 0 1px 12px;text-align: center;line-height: 12px;"><span style="position: relative;top: 10px;background: #fff;color: #CD0000;font-size: 17px;padding: 0 10px">更多精彩咑裳观看</span></div>
<div style=" background: #fff">
<div>
<br/>
<ul id="ca_bd">
<li class="ca_one <?php if($pdid=='0'){?>choose<?php }?>"  style="width:30px;height:55px;line-height:55px;text-align:center;" onclick="window.location.href='?id=0'" type="tid"   data-flid="0">全部</li>
<?php
$query = mysql_query("SELECT * FROM dlfl WHERE userid='$daili[userid]' and yc='1' ");
while($a = mysql_fetch_array($query)) {
?> 
<li class="ca_one <?php if($pdid==$a[id]){?>choose<?php }?>"  onclick="window.location.href='?id=<?php echo $a[id]?>'"  type="tid" data-flid="<?php echo $a[id]?>" ><?php echo $a[name]?></li>
<?php }?>
</ul>
<div style="clear:both"></div>
<section id="container2">
<div class="h_playlist_box"  id="html_box" >
</div>
</section>
<div style="clear: both"></div>
</div>
</div>
</div>
</div>
<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%">
<a  href="/ts<?php echo $dshz?>" style="color: #fff;">投诉</a>
</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 () {
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();
}
});
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) {
$('#html_box').html('<li style="text-align:center;" class="mui-table-view-cell mui-media">抱歉，没有您找的数据，换个条件试试</li>');
return;
}
$('#html_box').html("");
}
for (var i in data) {
var str = '<dl style="width: 358px;width:100%; border:#BBF1FF 1px solid;"><dt style="height: 88.3365px;">'+
'<em></em>' +
'<img src="'+data[i].pic+'" style="height: 88.3365px; display: inline;" ></dt><dd><span style="min-height: 58.3365px;color:#000000">'+data[i].name+'</em></span> <p><i>' +
'<a href="'+data[i].url+'"> 点我播放</a></i></p>'+parseInt(Math.random()*(688-30)+30)+'人正在观看</dd></dl>' +
'</dl>';
var li = $(str);
$("#html_box").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;">
<a  href="/dsyzf-<?php echo $user[mb]?>-<?php echo $fhurl?><?php echo $dshz?>" style="color: #fff;margin-left: 1px;text-align:center;font-size: 14px;">已赏</a>
</div>
</body>
</html>