<?php 
error_reporting(0); 
include("../../../config/os.php");
$fhurl=base64_decode(ubo($_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="zh">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta content="width=device-width, initial-scale=1.0, user-scalable=0" name="viewport">
<title>我的打赏</title>
<link href="/mb/8/bootstrap.css" rel="stylesheet">
<link href="/mb/8/font-awesome.min.css" rel="stylesheet">
<link href="/mb/8/home.css?v=1029" rel="stylesheet">
<script src="/2019newui/js/jquery.min.js"></script>
<script src="/layui/layui.js" charset="utf-8"></script> 
</head>
<body>
<header id="header">
<div class="header-container">
<nav class="path_bar">
<div class="word_wrapper">
<ul class="menu_container">
<li class="menu_items"><a href="<?php echo $fhurl?>" class="type home">首页</a></li>
<li class="menu_items"><a href="/new-<?php echo $dingdan[userid]?>-<?php echo $_GET[fhurl]?><?php echo $dshz?>" class="type apen">今日更新</a></li>
<li class="menu_items"><a href="/dsyzf-<?php echo $user[mb]?>-<?php echo $_GET[fhurl]?><?php echo $dshz?>" class="type  status_show">我的打赏</a></li>
<?php
$query = mysql_query("SELECT * FROM dlfl WHERE userid='$dingdan[userid]' and yc='1' ");
while($a = mysql_fetch_array($query)) {
?> 
<li class="menu_items"><div><a href="/flshow-<?php echo $dingdan[userid]?>-<?php echo $_GET[fhurl]?>-<?php echo $a[id]?><?php echo $dshz?>" class="type home"><?php echo $a[name]?></a></div></li>
<?php }?>
</ul>
<div class="arrow_right_mobile">
</div>
</div>
</nav></header>
<div id="container">
<section class="sectionContent below_path_content">
<div class="videoGroup">
<div class="section-title grayBorder">
<div>
<h1>我的打赏</h1>
</div>
</div>
<div id="app" class="video-wrapper">
<div id="comLoader" class="loader" style="display: none;">
<div class="loader-inner ball-beat">
<div></div>
<div></div>
<div></div>
</div>
</div>
<?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';
?>
<div class="col-style d-4 m-2 lazy loaded">
<a href="<?php echo $geturl?>"  class="videoBox">
<div class="videoBox_wrap">
<div class="videoBox-cover" style="background-image: url(<?php if($daili[pic]){?><?php echo $daili[pic]?><?php }else{?>/2019newui/images/nopic.jpg<?php }?>);">
</div>
<span class="video-tag free"><?php if($daili[lx]==1){?>打赏<?php }else{?>免费<?php }?></span>
</div>
<div class="videoBox-info"><span class="title"><?php echo $daili[name]?></span></div>
<div class="videoBox-action">
<span class="views"><i class="fa fa-eye"></i><span class="number"><script>document.write(parseInt(Math.random()*(6000-3000)+3000)); </script></span></span></span>
</div>
</a>
</div>
<?php }?>
</div>
</div>
</section>
</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;
});
</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>
</body>
</html>