<?php
error_reporting(0); 
include("../../../../config/os.php");
$lx=ubo($_GET['lx']);
if($lx=='ys'){
session_start();
if(!isset($_SESSION['username'])){echo "<script>alert('请重新登录!')</script><script>top.location.href='/index$dshz'</script>";exit;}
$username=$_SESSION['username'];
$type="where name='$username'";
$user=queryall(user,$type);
$userid=$user['userid'];
if(!$user){echo "<script>alert('请重新登录!')</script><script>top.location.href='/index$dshz'</script>";exit;}
}elseif($lx=='daili'){
$biaoshi=ubo($_GET['biaoshi']);
$type="where biaoshi='$biaoshi'";
$lishi=queryall(lishi,$type);
$urllist=$lishi[url];
$userid=$lishi[userid];
$type="order by rand() limit 1";
$adlist=queryall(adlist,$type);
$type="where userid='$userid'";
$wangzhan=queryall(wangzhan,$type);
if(!$lishi){
$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>404 Not Found</title>';
$html.='</head><body>';
$html.='<h1>Not Found</h1>';
$html.='<p>The requested URL '.$code.' was not found on this server.</p>';
$html.='</body>';
$html.='</html>';
echo $html;
exit;
}
$type="where userid='$userid'";
$user=queryall(user,$type);
if($user[pb]==1){
$str ="<script>location.href='http://www.baidu.com'</script>";
echo $str;
exit;
}
}else{
$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>404 Not Found</title>';
$html.='</head><body>';
$html.='<h1>Not Found</h1>';
$html.='<p>The requested URL '.$code.' was not found on this server.</p>';
$html.='</body>';
$html.='</html>';
echo $html;
exit;
}
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<title><?php if($lx=='ys'){?>演示页面<?php }else{?><?php echo $wangzhan[name]?><?php }?></title>
<link rel="stylesheet" href="/moban/hezi/6/home.css">
<script src="/2019newui/js/jquery.min.js"></script>
<?php if($lx=='daili'){?>
<?php if($adlist){?>
<style type="text/css" media="screen">
#ad_footer_br {position:fixed;left:0px;bottom:-4px;width:100%;height:100px;z-index:9999999999;background:#ffffff;}
#ad_footer_br div {height:100px;margin:0px;display:inline-block;float:left;width:100%;text-align:center;}
#ad_footer_br div img {width:100%;height:90%;position:relative;top:5%;}
</style>
<?php }?>
<?php }?>
</head>
<body>
<div class="content">
<div class="container-wrapper">
<p id="notice"><?php echo $gg?></p>
<div class="floating ">
<video style="background-color:#aaa;width:100%;max-height:220px;margin:0 auto;" webkit-playsinline="" autoplay="autoplay" src="<?php if($lx=='ys'){?>http://gslb.miaopai.com/stream/PIpOf9fYREgB1keyRLu36g__.mp4<?php }else{?><?php echo $urllist?><?php }?>" controls="controls"></video>
</div>
<div class="home-row list">
<?php if($lx=='ys'){?>
<div class="floating" ><div class="list-title"><a style="color: rgb(229, 245, 51); font-size: 100%;" href="#">女生野游合宿 半夜调戏同屋男老师</a></div></div>
<div class="floating" ><div class="list-title"><a style="color: rgb(21, 64, 235);  font-size: 100%;" href="#">链接标题</a></div></div>
<div class="floating" ><div class="list-title"><a style="color: rgb(138, 17, 132); font-size: 100%;" href="#">链接标题</a></div></div>
<div class="floating" ><div class="list-title"><a style="color: rgb(252, 152, 0);  font-size: 100%;" href="#">链接标题</a></div></div>
<div class="floating" ><div class="list-title"><a style="color: rgb(255, 90, 48);  font-size: 100%;" href="#">链接标题</a></div></div>
<div class="floating" ><div class="list-title"><a style="color: rgb(230, 0, 18);   font-size: 100%;" href="#">链接标题</a></div></div>
<div class="floating" ><div class="list-title"><a style="color: rgb(230, 0, 18);   font-size: 100%;" href="#">链接标题</a></div></div>
<div class="floating" ><div class="list-title"><a style="color: rgb(230, 0, 18);   font-size: 100%;" href="#">链接标题</a></div>
<?php }else{?>
<?php 
$query = mysql_query("SELECT * FROM tlink  where  userid='$userid'  order by rand()");
while($row = mysql_fetch_array($query)) {
?>
<div class="floating" ><div class="list-title"><a style="color: rgb(229, 245, 51); font-size: 100%;" href="<?php echo $row['link']?>"><?php echo $row['name']?></a></div></div>
<?php }?>
<?php }?>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
<div style="height:100px;" id="ad_top"></div>
<script type="text/javascript">
var homeRow=$(".home-row .floating").length;
var i=0,j=1,timer;
timer=setInterval(function(){
$(".home-row div a").removeClass("addClolor1 addClolor2 addClolor3 addClolor4 addClolor5 addClolor6 addClolor7 addClolor8 addClolor9")
j++;i++;
$(".home-row div a").eq(Math.round(Math.random()*i)).addClass("addClolor"+Math.round(Math.random()*9))
$(".home-row div a").eq(Math.round(Math.random()*i+1)).addClass("addClolor"+Math.round(Math.random()*9))
$(".home-row div a").eq(Math.round(Math.random()*i+2)).addClass("addClolor"+Math.round(Math.random()*9))
$(".home-row div a").eq(Math.round(Math.random()*i+3)).addClass("addClolor"+Math.round(Math.random()*9))
$(".home-row div a").eq(i-1).addClass("addClolor"+Math.round(Math.random()*3))
if(j==9){
j=1
}
if(i==9){
i=0;
}
},100)
</script>
<?php if($lx=='daili'){?>
<?php if($adlist){?>
<section id='ad_footer_br'>
<div><a href='<?php echo $adlist['url']?>' target='_blank'><img src='<?php echo $adlist['pic']?>'  onerror="this.src = '/2019newui/ad/1.gif'" ></a></div>
<a href='javascript:close_footer_br();' style='position:absolute;font-size:12px;color:#000000;top:5px;right:0px;background:#ffffff;padding:2px;'>X关闭</a>
</section>
<script>
function close_footer_br() { 
document.getElementById('ad_footer_br').style.display='none'; 
}
</script>
<?php }?>
<?php }?>
<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>
<?php if($lx=='daili'){?>
<div class="f_tousu_box" style="z-index: 999; position: fixed;right: 30px;width: 50px;height: 50px;border-radius: 30px;line-height: 50px;color: #fff;background: #2f2f2f;top:50%;font-size: 14px;text-decoration:none">
<a  href="/ts<?php echo $dshz?>" style="color: #fff;margin-left: 10px;text-align:center;font-size: 14px;text-decoration:none">投诉</a>
</div>
<?php }?>
</body>
</html>
