<?php 
error_reporting(0); 
include("../../../config/os.php");
$id=ubo($_GET[id]);
$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;
}
$fhurl=base64_decode(ubo($_GET[fhurl]));
?>
<html>
<head>
<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"/>
<title>使用4G体验效果更佳</title>
<link href="/mb/9/vendor.css" rel="stylesheet">
<link href="/mb/9/style.css" rel="stylesheet"> 
<script src="/2019newui/js/jquery.min.js"></script>
<script src="/layui/layui.js" charset="utf-8"></script> 
<link href="/mb/9/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="/mb/9/bootstrap-theme.min.css" rel="stylesheet" media="screen">
<link href="/mb/9/bootstrap-admin-theme.css" rel="stylesheet" media="screen">
<style>
body{background-color:rgba(245, 245, 245, 0.5); padding-top:1px;}
#order_loading{width:94%;padding:10px;color:#666;text-align:center;margin:0 auto;margin-top:-20px;}
#recodesLeft{padding-bottom:20px;}
.case-list li{padding:10px 0; overflow:hidden; border-bottom:1px solid #eee; width:98%; display:inline-block; height:280px;}
.case-pic-link{display:block; width:100%;}
.case-list li .case-content{padding-left:0px;}
.case-pic-link img{display:block; width:100%; height:243px;}
.h_playlist_box{width:100%;}
.xin{text-decoration:none; background:#900; color:#FFF; height:42px; line-height:38px; width:25%; text-align:center;border-radius:8px; font-size:1.6rem; display:inline-block; float:left; border:#FFF 3px solid;}
.h_playlist_box .list{width:100%; text-align:center;}
.h_playlist_box .list a{color:#000;}
.h_playlist_box .list ul{width:48%; margin:1%; float:left; background:#EFEFEF; padding-bottom:5px;border-radius:0 0 5px 5px}
.h_playlist_box .list ul .listimg img{height:120px; width:100%;}
.h_playlist_box .list ul .listname{height:42px; width:100%; padding:2px; overflow:hidden; text-align:left;font-size:1.5rem;}
.h_playlist_box .list ul .listdsnum{font-size:1.2rem;color:#f00; margin-top:3px;}
.cate-title span{color:#F00;}
.choose{background: red;}
.vType{color: #fff;}
</style>
</head>
<body>
<div class="top-bar-holder">
<div id="top-bar" style="background:#000;">
<h1 class="cate-title" style="font-size: 1.5rem;color: #999;">本平台共有影片 <span>11920</span> 部，今日更新 <span>50</span> 部</h1></div>
</div>
<div class="rootBar" style="text-align:center;">
<a href="<?php echo $fhurl?>"  class="xin">首页</a>
<?php
$query = mysql_query("SELECT * FROM dlfl WHERE userid='$userid' and yc='1' ");
while($a = mysql_fetch_array($query)) {
?> 
<a href="/fenleilist-<?php echo $a[id]?>-<?php echo $_GET[fhurl]?>-<?php echo $userid?><?php echo $dshz?>"  class="xin <?php if($id==$a[id]){?> choose<?php }?>" ><?php echo $a[name]?></a>
<?php }?>
</div>
<div style="height:100px;"></div>
<div id="goods_list">
<div class="h_playlist_box">
<?php 
$page_size=10; 
$sql = "WHERE 1=1";
$sql .=" and  userid='$userid'";
$sql .=" and  flid='$id'";
$resultyttrt = mysql_query("select id from daili    ".$sql."  ");
$count = mysql_num_rows($resultyttrt); 
if($count == 0){echo '<tr> <td  colspan=18  style="text-align:center;"><center>没有记录</center></td></tr>';}
$page_count = ceil($count/$page_size); 
$init=1; 
$page_len=5; 
$max_p=$page_count; 
$pages=$page_count; 
//判断当前页码 
if(empty($_GET['page'])||$_GET['page']<0){ 
$page=1; 
}else { 
$page=$_GET['page']; 
} 
$offset=$page_size*($page-1); 
if($user[fs]==1){
$query = mysql_query("select * from  daili   ".$sql." order by rand()   limit $offset, $page_size");
}elseif($user[fs]==2){
$query = mysql_query("select * from  daili   ".$sql." order by id asc    limit $offset, $page_size");
}elseif($user[fs]==3){
$query = mysql_query("select * from  daili   ".$sql." order by id desc   limit $offset, $page_size");
}elseif($user[fs]==4){
$query = mysql_query("select * from  daili   ".$sql." order by cs desc   limit $offset, $page_size");
}elseif($user[fs]==5){
$query = mysql_query("select * from  daili   ".$sql." order by shijian desc   limit $offset, $page_size");
}else{
$query = mysql_query("select * from  daili   ".$sql." order by rand()   limit $offset, $page_size");
}
while ($row=mysql_fetch_array($query)) { 
?>
<div class="list">
<a href="<?php echo $row[link]?>">
<ul>
<li class="listimg"><img src="<?php if($row[pic]){?><?php echo $row[pic]?><?php }else{?>/2019newui/images/nopic.jpg<?php }?>"></li>
<li class="listname"><?php echo $row[name]?></li>
<li class="listdsnum">已有<script>document.write(parseInt(Math.random()*(6000-3000)+3000)); </script>人付费观看</li>
</ul>
</a>
</div>   
<?php 
} 
$page_len = ($page_len%2)?$page_len:$pagelen+1;//页码个数 
$pageoffset = ($page_len-1)/2;//页码个数左右偏移量 
if($page!=1){ 
$keyt.="<li class='disabled'><a   href=\""."/fenleilistpage-".($page-1)."-".$id.'-'.$userid.'-'.$_GET[fhurl].".html\">上一页</a></li>"; //上一页 
}else { 
$keyt.="<li class='disabled'><a href='#' >上一页</a></li>"; //上一页  
} 
if($pages>$page_len){ 
//如果当前页小于等于左偏移 
if($page<=$pageoffset){ 
$init=1; 
$max_p = $page_len; 
}else{//如果当前页大于左偏移 
//如果当前页码右偏移超出最大分页数 
if($page+$pageoffset>=$pages+1){ 
$init = $pages-$page_len+1; 
}else{ 
//左右偏移都存在时的计算 
$init = $page-$pageoffset; 
$max_p = $page+$pageoffset; 
} 
} 
} 
for($i=$init;$i<=$max_p;$i++){ 
if($i==$page){ 
$keyt.='<li class="active"><span>'.$i.'</span></li>'; 
} else { 
$keyt.="<li><a href=\""."/fenleilistpage-".$i."-".$id.'-'.$userid.'-'.$_GET[fhurl].".html\">".$i."</a></li>"; 
} 
} 
if($page!=$pages){ 
$keyt.="<li><a   href=\""."/fenleilistpage-".($page+1)."-".$id.'-'.$userid.'-'.$_GET[fhurl].".html\">下一页</a></li>";//下一页 
}else { 
$keyt.="<li><a href='#' >下一页</a></li>";//下一页 
} 
?>  
</div>
<div class="bootstrap-table">
<div class="fixed-table-pagination">
<div class="pull-center pagination" style="text-align:center;width:100%;">
<div class="dataTables_paginate paging_simple_numbers">
<ul class="pagination">
<?php if($count =="0"){?><?php }else{?><?php echo $keyt?><?php }?>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<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>