<?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 http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />
<title>已打赏视频列表</title>
<link href="/mb/9/styless.css" rel="stylesheet" type="text/css" />
</head>
<body>
<link href="/mb/9/bootstrap.css" rel="stylesheet" type="text/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> 
<style>
.zzguankan{color:#ffffff; left:0px; z-index:99; position:absolute; font-weight:100; padding:3px 5px; background-color:#ff7878d4; border-radius:5px; font-size:12px; margin:5px;}
.yikanguo{text-overflow:-o-ellipsis-lastline; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; line-clamp:2; -webkit-box-orient:vertical;height:40px;}
.ljguankan{color:#fff; background-color:#ed4948; border-color:#ed4948; padding:5px 15px; font-size:13px; line-height:1.5; border-radius:7px;}
.h_playlist_box{margin:0; padding:0; width:100%;}
</style>
<section id="container">
<ul class="h_playlist_box" id="playlistbox">
<?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].$dshz;
?>
<li style="width:48%; float:left; margin:1%; background:#EFEFEF;border-radius:0 0 5px 5px;">
<dt>
<a href="<?php echo $geturl?>" style="position:relative;"><img src="<?php if($daili[pic]){?><?php echo $daili[pic]?><?php }else{?>/2019newui/images/nopic.jpg<?php }?>" style="width:100%;height:115px;"/><span class="zzguankan"><script>document.write(parseInt(Math.random()*(6000-3000)+3000)); </script>人正在观看</span></a>
</dt>
<dd style="padding:1px 2px;">
<span class="yikanguo"><a style="color:#333;font-size:1.5rem;" href="<?php echo $geturl?>"><?php echo $daili[name]?></a><img originalsrc="<?php if($daili[pic]){?><?php echo $daili[pic]?><?php }else{?>/2019newui/images/nopic.jpg<?php }?>" /></span>
<p style="margin-top:5px; padding:0 2px;font-size:10px;"><span style="color:#e25454;">已有<script>document.write(parseInt(Math.random()*(6000-3000)+3000)); </script>人看过</span><span style="color:#e25454;float:right;">好看度90%</span></p>
</dd>
</li>
<?php }?>
</ul>
<div class="f_padheght" style="margin-top:15px;"></div>
</section>
<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>
