<?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>
<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">我的打赏</div>
</div>
<div class="box" style="padding-top: 39px;">
<ul class="list" id="list">
<?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><a href="<?php echo $geturl?>"><div class="list_img"><img src="<?php if($daili[pic]){?><?php echo $daili[pic]?><?php }else{?>/2019newui/images/nopic.jpg<?php }?>"></div><div class="list_info"><h3><?php echo $daili[name]?></h3><div class="list_about"><span><script>document.write(parseInt(Math.random()*(6000-3000)+3000)); </script>人付款</span><i>评分:<script>document.write(parseInt(Math.random()*(100-90)+90)); </script></i></div><b>立即观看</b></div></a></li>
<?php }  ?> 
</ul>
</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>
<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="<?php echo $fhurl?>" style="color: #fff;margin-left: 10px;text-align:center;font-size: 14px;text-decoration:none">返回</a>
</div>
</body>
</html>