<?php
if (!defined('ROOT'))
	exit ;
 ?>
<html>
<head>
		<meta name="viewport" content="width=device-width, initial-scale=1,  user-scalable=no">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta name="format-detection" content="telephone=no">
	<title><?php echo $info['name']; ?>下载      — <?php echo C('DOWNLOAD_KEYWORD'); ?>  — <?php echo $userconfig['seo_title'] . C('DOWNLOAD_TITLE'); ?></title>
    <meta name="description" content="<?php echo $info['name']; ?>下载 — <?php echo C('DOWNLOAD_KEYWORD'); ?>">
    <meta name="keywords" content="<?php echo C('DOWNLOAD_KEYWORD'); ?>">
    <?php
   include 'Inc_files.php';
   ?>
		<link rel="stylesheet" href="/static/public/jyxz/css/bootstrap.min.css">
		<link rel="stylesheet" href="/static/public/jyxz/css/init.css">
		<link rel="stylesheet" href="/static/public/jyxz/css/main.css">
		<link rel="stylesheet" type="text/css" href="/static/public/jyxz/css/style.css">
    <link type="text/css" rel="stylesheet" href="/static/public/jyxz/css/jquery.mmenu.all.css" />
		<link rel="stylesheet" href="/static/public/jyxz/css/animate.css">
		
		
		<script>
		if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))){
		    new WOW().init();
		};
		</script>

	    <style type="text/css">
<!--
.STYLE1 {color: #FFFFFF}
-->
a:link {
	color: #FFFFFF;
}
        </style>
		<style>
body{ padding:0px; margin:0px;}
#bottom_ad {
	WIDTH: 100%; 
	HEIGHT: 80px;
	display:block;
	overflow:hidden;
	margin:0 auto;
	BORDER: #b5b5b5 1px solid; 
	BACKGROUND: #F5F5F5; 
	FLOAT: right; 
	RIGHT: 0px; 
	BOTTOM: 0px;
	POSITION:fixed;/*固定定位*/
	_POSITION: absolute;/*兼容IE6*/
	_TOP: expression(offsetParent.scrollTop+document.documentElement.clientHeight-this.offsetHeight);/*兼容IE6*/
}
/*固定底部的效果是上面的样式在起作用，下面的样式均属于装饰，你可以随意修改。*/
	#bottom_ad .tit,#bottom_ad .ad_body{ width:97%; height:auto; display:block; margin:0 auto; font-size:13px;}
	#bottom_ad .tit{ width:100%;}
	#bottom_ad .ad_body{ padding:6px 0px 6px 0px;}
	#bottom_ad .tit,#BOTTOM_AD .tit h2{height:24px; line-height:24px;display:block; background-color:#666666;}
	#bottom_ad .tit h2{ font-size:14px; width:80%; float:left; margin:0px; padding:0px; text-indent:1em; }
	#bottom_ad .tit .guanbi{width:5%;float:right; text-align:right; margin-right:15px; color: #FFFFFF}
	#bottom_none{ display:none;}
	.bottom_wz {color: #FFFFFF}
	#ad_left{position: fixed; left: 0; top: 90px; width: 180px;}
	#ad_right{position: fixed; right: 0; top: 90px;width: 180px;}
	#ad_right_bottom{position: fixed; right: 0; bottom: 0; width: 180px;}
	#ad_left img,#ad_right img,#ad_right_bottom img{ width: 100%;}
	#ad_left .close,#ad_right .close,#ad_right_bottom .close{ font-size: 14px; padding-right: 5px;}
	.footer{
height: 50px;
width: 100%;
background-color: #000000;
position: fixed;
bottom: 0;
}
</style>
    </head>
	<body>
<?php include_once("baidu_js_push.php") ?>
<body class="sf">
	<!--黄金网盘广告-->
	<?php if($userconfig['wangpan_id']<3){?>
	<?php if(!$info['price']>0){?>
		<span id="ad_left">
			<span class="close" title=关闭广告 >X</span>
			<?php echo $advert['P1'][rand(0,  count($advert['P1'])-1)]['content'];?></span>
		</span>
		<span id="ad_right">
			<span class="close" title=关闭广告 >X</span>
			<?php echo $advert['P2'][rand(0,  count($advert['P2'])-1)]['content'];?></span>
		</span>
		<span id="ad_right_bottom">
			<span class="close" title=关闭广告 >X</span>
			<?php echo $advert['P3'][rand(0,  count($advert['P3'])-1)]['content'];?></span>
		</span>
	<?php }?>	
	<?php }?>
	
  <div class="top-img">
  </div>
   <div class="tnav">
    <ul class="main">
        <li class="lo-go"><a href="http://www.<?php echo C('BEN_BZUSR');?>">106网盘</a></li>
        <li><a href="http://www.<?php echo C('BEN_BZUSR');?>">首页</a></li>
        <li class="right"><a href="http://member.<?php echo C('BEN_BZUSR');?>/">会员中心</a>  |  <a href="http://member.<?php echo C('BEN_BZUSR');?>/reg">立即注册</a>  |  <a href="#" class="btn_order_search">订单查询</a>  |  <a href="javascript:;" class="STYLE1" data-fancybox='{type:"iframe",href:"/Report/add/?pk=<?php echo $info['pk4']; ?>&uid=<?php echo $info['pk1']; ?>",width:660,height:600}'></span>在线举报</a></li>
    </ul>
   </div>

   <div class="body">
     <div class="main">
      <div class="neikuang">
       <h1 class="title">文件下载</h1>
       <div class="wenzi">
            <h3><?php echo $info['name']; ?></h3>
            <p><span>文件大小：<?php echo $info['size']; ?></span>     <span>更新时间：<?php echo date('Y-m-d H:i:s', $info['pk4'] / 1000); ?></span>     <span><?php if($userconfig['file_downloads_show']!=2){echo '下载次数：'.$info['donwload_num'].'次';}?></span></p>


            <p class="xiazai">
             <a href="javascript:;" class="btn_download_open">普通下载</a>
			 <a href="javascript:;" class="btn_download_open">高速下载</a>
            </p>
       </div>


      </div>
     </div>
   </div>
<footer class="footer" >
    <div class="container copy-right">
    <span class="STYLE1">
	 <p class="didi-bei "> <br>

	 <?php echo C('WEB_ZDBT_ZNXC');?>  &copy;版权归属:<?php echo C('COPYRIGHT');?> 备案号：<?php echo C('WEB_SITE_ICP');?> 电信增值业务经营许可证：<?php echo C('WEB_SITE_ZZICP');?> <a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=15078302000156" target="_blank">蒙公网安备 15078302000156号</a> <?php echo html_entity_decode(C('WEB_TJDM'));?>	</span>
    </div> 
     </span>         
     </ul>
        </div>
    </div>
</footer>





<!-- 底部文字广告 钻石以上会员可见-->
<?php if($userconfig['wangpan_id']<3){?>

<!-- 结束-->
<div id="bottom_ad">
	<div class="tit">
	<span class="bottom_wz">  <h2>下载页面文字广告位（15字）300元每月/钻石以下网盘可见</h2></span>
	  <a href="#" onClick="toggle()" class="guanbi">关闭</a></div>
<br>
<?php
foreach($advert['A2'] as $k=>$v){
?>

<?php echo $v['content'];?> | 
<?php }?>

</div>
</div>
<?php }?>
<!-- 结束-->
<script type="text/javascript">
function toggle() {
theObj = document.getElementById('bottom_ad').style;
if ( theObj.display == "none" ) theObj.display = "block"; else theObj.display = "none";
}
</script>

<?php if($userconfig['wangpan_id']<2){?>
          <?php
		  $ad_right=M('advert')->where(array('position'=>9,'stime'=>array('lt',time()),'etime'=>array('gt',time())))->order('sort')->getField('content',true);
		   ?>
     <div style='position:fixed; width:230px; top: 110px;right:10px;font-size:9pt;text-align:left;'><div style='background-color:#124F85;height:20;color:white;padding-top:2px;margin-top:20px;padding-left:5px;'><label style='float:right;'>[<a href='http://www.<?php echo C('BEN_BZUSR');?>/advert/isement#search' target="_blank"  ><font color='white'>广告位联系</font></a>]</label>106网盘推荐</div><div style='border:2px solid #124F85;color:#fff;padding-top:0px;padding-bottom:3px;padding-left:0px;word-wrap:break-word;'><ul style='margin:1px;padding:1px;background-color: #fff;list-style-type:none;'><li><li>
           <?php foreach($ad_right as $k=>$v){?>
		   <p style='text-decoration:none;'>
           <li><?php echo $v;?></li>
		   
           <?php }?>
		   </div>
     </div>
    </div>
          <?php }?>
	
	<div class="am-modal am-modal-no-btn" tabindex="-1" id="buy">
 		<div class="am-modal-dialog">
    		<div class="am-modal-hd">购买下载
      			<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
    		</div>
    		<div class="am-modal-bd">
		    	<form action="/pay/file" method="post" target="_blank"  class="am-form buy">
					<input type="hidden" name="model_id" value="58" />
					<input type="hidden" name="ctime" value="<?php echo time(); ?>" />
					<input type="hidden" name="file_id" value="<?php echo $info['id']; ?>" />
					<input type="hidden" name="uid" value="<?php echo $info['uid']; ?>" />
					<input type="hidden" name="pk1" value="<?php echo $info['pk1']; ?>" />
					<input type="hidden" name="pk2" value="<?php echo $info['pk2']; ?>" />
					<input type="hidden" name="pk3" value="<?php echo $info['pk3']; ?>" />
					<input type="hidden" name="pk4" value="<?php echo $info['pk4']; ?>" />
					<div class="am-form-group">
				    	<input type="email" required name="email" id="email" placeholder="请输入邮箱" />
				    	<div class="tl fz14"></div>
				    </div>
				    <div class="am-form-group">
				    	<input type="tel" name="mobile" placeholder="请输入手机" />
				    	<div class="tl fz14">手机：（手机接提取码会收取0.1元短信费）</div>
				    </div>
				    <div class="am-form-group">
				    	<select name="pay_way" required id="pay_way">
							<option value="">支付方式</option>
							<?php
                        	$list_pay_way=get_pay_way(1,1);
							foreach ($list_pay_way as $k => $v) {
								echo "<option value='{$v['id']}'>{$v['title1']}</option>";
							}
                        	?>
						</select>
						<div class="tl fz14"></div>
				    </div>
				    <div class="am-form-group">
				    	<button type="button" class="am-btn am-btn-secondary btn_buy">确定购买</button>
				    </div>
				</form>
    		</div>
  		</div>
	</div>
	<div class="am-modal am-modal-no-btn" tabindex="-1" id="download">
	  	<div class="am-modal-dialog">
		    <div class="am-modal-hd">提取码下载
		      <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
		    </div>
		    <div class="am-modal-bd">
		    	<form   class="am-form buy">
					<input type="hidden" name="pk1" value="<?php echo $info['pk1'];?>" />
					<input type="hidden" name="pk2" value="<?php echo $info['pk2'];?>" />
					<input type="hidden" name="pk3" value="<?php echo $info['pk3'];?>" />
					<input type="hidden" name="pk4" value="<?php echo $info['pk4'];?>" />
					<div class="am-form-group">
				    	<input type="email" required name="email" id="email" placeholder="请输入邮箱" />
				    	<div class="tl fz14"></div>
				    </div>
				    <div class="am-form-group">
				    	<input type="email" required name="code" id="code" placeholder="请输入提取码" />
				    	<div class="tl fz14"></div>
				    </div>
				    <div class="am-form-group">
				    	<button type="button" class="am-btn am-btn-secondary btn_download_tqm">确定下载</button>
				    </div>
				</form>
		    </div>
	  	</div>
	</div>
	<div class="am-modal am-modal-confirm" tabindex="-1" id="payconfirm">
	  	<div class="am-modal-dialog">
		    <div class="am-modal-hd">支付提示</div>
		    <div class="am-modal-bd">
		      支付成功后请留意邮箱或短信获取文件提取码
		    </div>
		    <div class="am-modal-footer">
		      <span class="am-modal-btn" data-am-modal-cancel>取消</span>
		      <span class="am-modal-btn" data-am-modal-confirm>确定</span>
		    </div>
	  	</div>
	</div>
	<div class="am-modal am-modal-no-btn" tabindex="-1" id="order_search">
	  	<div class="am-modal-dialog">
		    <div class="am-modal-hd">订单查询
		      <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
		    </div>
		    <div class="am-modal-bd">
		    	<form   class="am-form buy" method="post" target="_blank" action="/pay/file_alipay_pc_return">
					<div class="am-form-group">
				    	<input type="text" required name="order_no" placeholder="请输入订单号" />
				    	<div class="tl fz14"></div>
				    </div>
				    <div class="am-form-group">
				    	<button type="button" class="am-btn am-btn-secondary btn_order_search_go">确定查询</button>
				    </div>
				</form>
		    </div>
	  	</div>
	</div>
	<?php
	include 'Inc_files_boot.php';
	?>
	<script src="<?php echo S('STATIC');?>/static/public/js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
	<script src="<?php echo S('STATIC');?>/static/uhome/js/file_show.js"></script>
	<script src="/api/advert"></script>
	<script src="/static/public/js/baidutongji.js"></script>
	<script type="text/javascript">
	jQuery(document).on('click','.btn_download_open',function () {
		var the=jQuery(this);
		var downloadnum=jQuery.cookie('download_<?php echo $info['pk'];?>')?jQuery.cookie('download_<?php echo $info['pk'];?>'):0;
		if(downloadnum<5){//5次
			downloadnum++;
			var date = new Date();
			date.setTime(date.getTime()+3600*1000);
			jQuery.cookie('download_<?php echo $info['pk'];?>',downloadnum, { expires: date });
		    jQuery.ajax({
	       		url:"/file/download",
				data:{
					pk1:'<?php echo $info['pk1'];?>',
					pk2:'<?php echo $info['pk2'];?>',
					pk3:'<?php echo $info['pk3'];?>',
					pk4:'<?php echo $info['pk4'];?>',
					donwload_num:'<?php echo $info['donwload_num'];?>',
				},
				dataType: "json",
				type: "post",
				timeout: 10000,
				success: function(data) {
					if (data.status==1) {
						location.href = data.url;
					}
				},
				error: function() {
				}
	       });
		}else{
			alert('请不要恶意下载');
		}
		         
	});
	
	</script>

</body>

</html>