<?php 
error_reporting(0); 
include("../../../config/os.php");
$fhurl=base64_decode($_GET[fhurl]);
$ip=getIP();
$sql = "WHERE 1=1";
$sql .=" and  ip='$ip'";
$result = mysql_query("select id from dingdan   ".$sql."  ");
$count = mysql_num_rows($result); 
$type="where  ip='$ip'";
$dingdan=queryall(dingdan,$type);
if($count == 0){
$code=$_SERVER["REQUEST_URI"];
$html ='<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">';
$html.='<html><head>';
$html.='<meta charset="gb2312">';
$html.='<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />';
$html.='<title>我的打赏</title>';
$html.='<style>';
$html.='.no-history{text-align:center}';
$html.='.no-history .txt{margin-top:.18667rem;font-size:14px;line-height:.58667rem;color:#666}';
$html.='.no-history-bg{width:100px;height:100px;margin:.8rem auto 0;background:url("/mb/2/no.png") no-repeat center center;background-size:cover}';
$html.='.btn {background-color: red;border-radius: 2px;border: none;color: white;padding: 15px 32px;text-align: center;text-decoration: none;display: inline-block;font-size: 16px;}';
$html.='</style>';
$html.='</head>';
$html.='<body>';
$html.='<div class="no-history">';
$html.='<div class="no-history-bg"></div>';
$html.='<p class="txt">主人还没打赏记录~</p>';
$html.='<p class="txt"><a href="'.$fhurl.'" class="btn">点此返回</a></p>';
$html.='</div>';
$html.='<div class="bm-box" style="margin-bottom:70px"></div>';
$html.='</body>';
$html.='</html>';
echo $html;
exit;
}
$type="where userid='$dingdan[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="en">
<head>
<meta charset="gb2312">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<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" type="text/css" href="/mb/7/example.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> 
<title>我的-已付费</title>
</head>
<body ontouchstart="">
<div class="page panel js_show">
<div class="page__hd" style="background-color: orangered">
<h1 class="page__title" style="color:#fff;">已付款</h1>
<p class="page__desc" style="color:#fff;">已支付的视频可以随时观看</p>
</div>
<div class="page__bd">
<div class="weui-panel weui-panel_access">
<div class="weui-panel__hd">视频列表</div>
<div class="weui-panel__bd">
<?php 
$sql = "WHERE 1=1";
$sql .=" and  ip='$ip'";
$query = mysql_query("select * from  dingdan   ".$sql." order by id desc");
while ($row=mysql_fetch_array($query)) { 
$type="where id='$row[zyid]'";
$daili=queryall(daili,$type);
$geturl='/bofang-'.base64_encode($row[ddh].'|ubo|'.'dl').'-'.$user[mb].'.html';
?>
<span onclick="location.href='<?php echo $geturl?>'" class="weui-media-box weui-media-box_appmsg">
<div class="weui-media-box__hd">
<img class="weui-media-box__thumb" src="<?php if($daili[pic]){?><?php echo $daili[pic]?><?php }else{?>/2019newui/images/nopic.jpg<?php }?>" alt="">
</div>
<div class="weui-media-box__bd">
<p class="weui-media-box__desc"><?php echo $daili[name]?></p>
</div>
</span>
<?php }  ?> 
</div>
</div>
</div>
</div>
<div style="height: 50px;"></div>
<div style="height: 30px;"></div> 
<nav class="mui-bar mui-bar-tab"> 
<a class="mui-tab-item" href="<?php echo $fhurl?>"> <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 $dingdan[userid]?>-<?php echo $_GET[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 $_GET[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>
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>