<?php 
error_reporting(0); 
include("../../../config/os.php");
$fhurl=ubo(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>
<head>
<meta charset="gb2312">
<meta name="viewport" content="width=device-width,initical-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
<title>已打赏列表</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<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>
<body style="background-color:#f2f2f2;margin:0;padding:0;" >
<style>
.clearfix {display: block;}
ul, li {list-style: none;}
* {margin: 0;padding: 0;}
div, ul, li, dl, dt, dd, table, td, input {font-size: 12px;}
.goods-wrap {background: #f2f2f2 none repeat scroll 0 0;width: 100%;float: left;margin-bottom: 20px;}
.demopage {width:100%;margin: 0 auto;}
.demopage h2 {font-size: 14px;margin: 0;padding: 0;}
.scrollDiv {height: 25px;/* 必要元素 */line-height: 25px;border: #ccc 1px solid;overflow: hidden;/* 必要元素 */}
.scrollDiv li {height: 25px;padding-left: 10px;}
#s2, #s3 {height: 100px;}
.goods-list {width: 100%;}
.goods-list li {margin-top: 10px;border-radius: 10px;overflow: hidden;padding: 1px;float: left;box-sizing: border-box;width: 45.5%;margin-left:3%;border-right: 1px solid #dedede;
border-bottom: 1px solid #dedede;position: relative;overflow: hidden;background: #fff;height: 231px;}
.goods-list li:nth-of-type(even) {border-right: none;}
.goods-list .g-pic img {display: block;width: 100%;margin: 0 auto;}
.goods-list .g-name {display: block;width: 95%;margin: auto;max-height: 45px;line-height: 22px;font-size: 12px;text-align: left;color: #666;overflow: hidden;text-overflow: ellipsis;word-break: break-all;}
.goods-list ins {text-decoration: none;line-height: 16px;}
.goods-wrap .btn-wrap {position: relative;width: 100px;margin: 8px auto 8px;}
.goods-wrap .buy-btn {text-decoration: none;margin-top: 5px;display: block;width: 94px;height: 28px;line-height: 28px;text-align: center;border: 1px solid #ccc;color: #333;border-radius: 16px;}
.goods-list .pTitle {width: 70px;height: 16px;line-height: 16px;-webkit-transform: rotate(-45deg);text-align: center;position: absolute;left: -24px;top: 3px;color: #fff;font-size: 10px;}
.hezi-menu{ width: 100%;}
.hezi-menu li{ width: 20%; float: left; text-align: center; line-height: 40px; }
.hezi-menu li span{ width: 80%; display: block; margin: auto; height: 30px; margin-top: 5px;line-height: 30px;}
.vType{background: #4f6892; color: #fff;}
.choose{background: red;}
.loaddiv{position: fixed;display:none;width:100%; height:100%; z-index: 10000;background: rgba(0,0,0,0.6); top:0;}
.box-div{width: 100%; height: 130px; overflow: hidden;}
</style>
<center style=" background: #4f6892; line-height: 46px;  color: #fff;margin-bottom: 2px;"><b><font size="3" color="#fff" id="title">我的打赏</font></b></center>
<div id="txt" style="text-decoration:none;text-align:center;" class="goods-wrap marginB">
<ul class="goods-list clearfix" >
<?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';
?>
<li><div class="box-div"><a href="<?php echo $geturl?>" class="g-pic"><img src="<?php if($daili[pic]){?><?php echo $daili[pic]?><?php }else{?>/2019newui/images/nopic.jpg<?php }?>" width="136" height="136"></a></div><p class="g-name" style="color: rgb(129, 192, 192);"><?php echo $daili[name]?></p><div class="btn-wrap"><ins class="gray9" style="color:black"></ins><a href="<?php echo $geturl?>" class="u-home addHome buy-btn">立即播放</a></div></li>
<?php }  ?> 
</ul>
</div>
</div>
</div>
<div style="height:40px;"></div>
<script type="text/javascript">
document.oncontextmenu = function(){
 event.returnValue = false;
}
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();
}
</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="<?php echo $fhurl?>" style="color: #fff;margin-left: 10px;text-align:center;font-size: 14px;">返回</a>
</div>
</body>
</html>
