<?php
if (!defined('ROOT'))
	exit ;
$userconfig['wpzs_textlink']=json_decode($userconfig['wpzs_textlink'],true);
$userconfig['wpzs_topflash']=json_decode($userconfig['wpzs_topflash'],true);
$userconfig['wpzs_huandeng']=json_decode($userconfig['wpzs_huandeng'],true);
unset($userconfig['member_truename'],$userconfig['member_password'],$userconfig['member_password2'],$userconfig['member_mobile'],$userconfig['member_email'],$userconfig['member_alipay']);
?>
  <!DOCTYPE html>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title><?php echo $userconfig['seo_title']; ?></title>
  <link rel="shortcut icon" href="/favicon.ico" />
  <meta name="keywords" content="<?php echo $userconfig['FREE_TITLE']; ?>" />
  <meta name="description" content="<?php echo $userconfig['seo_title']; if($userconfig['wangpan_id']<2){		    echo C('FREE_TITLE');		} ?>" />
  <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
  <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">
  <link href="/static/uhome/sypan106/css/font-awesome.min.css" rel="stylesheet">
  <link href="/static/uhome/sypan106/css/bootstrap.min.css" rel="stylesheet">
  <link href="/static/uhome/sypan106/css/bootstrap-material-design.min.css" rel="stylesheet">
  <link href="/static/uhome/sypan106/css/ripples.min.css" rel="stylesheet">  
  <link rel="stylesheet" type="text/css" href="/static/public/js/zTree/css/sy106.css"/>
  <link rel="stylesheet" type="text/css" href="/static/public/js/dialog/ay106pan.css"/>
  <script type="text/javascript">
  var url_list_file = "<?echo U('list_file'); ?>";
  var url_list_folder = "<?echo U('list_folder'); ?>";
  var static_url="<?php echo S('STATIC');?>/";
  var userconfig=<?php $userconfig['wpzs_video_img']=S('STATIC').'/'.$userconfig['wpzs_video_img'];echo json_encode($userconfig);?>
  </script>
  <script src="<?php echo S('STATIC');?>/static/public/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
  <script src="<?php echo S('STATIC');?>/static/public/js/avalon.min.js" type="text/javascript" charset="utf-8"></script>
  <script src="/app/uhome/view/mulu/js/index.js?v=20180418" type="text/javascript" charset="utf-8"></script>
  <script src="<?php echo S('STATIC');?>/static/public/js/zTree/js/jquery.ztree.core.min.js" type="text/javascript" charset="utf-8"></script>
  <script src="<?php echo S('STATIC');?>/static/public/js/md5.js" type="text/javascript" charset="utf-8"></script>
  <script src="/index/data_mulu" type="text/javascript" charset="utf-8"></script>
  <script>
  (function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
   })();
    </script>

	<style type="text/css">
	    .ztree li span.button.switch.level0,.ztree li span.button.switch.level1,.ztree li span.button.switch.level2,.ztree li span.button.switch.level3 {visibility:hidden; width:1px;}
		.ztree *{ font-size: 15px;text-decoration: none!important;}/*cu*/
		.ztree li{ padding: 10px 0 5px;} /*间距*/
		.ztree .about{ color: #006600;}
		
		.ztree .password{ display: none;}
		.ztree .cf00{ color: #f00;}
		/*密码*/
		.password{ position: fixed; top: 0;bottom: 0; width: 150px; height: 30px; margin: auto;}
	</style>
	 <?php if(!empty($userconfig['indexbg'])){?>
	<style type="text/css">
	body { background-image: url(<?php echo S('STATIC').'/'.$userconfig['indexbg'].'?imageView2/2/w/1400/interlace/1/quality/80&v='.$userconfig['indexbg_time'];?>);}
	</style>
	<?php }?>
  </head>
  	</head>
	<body scroll="no" style="height:100%;" >
	<?php include_once("baidu_js_push.php") ?>
		<button id="callout" style="display: none;"></button>
		<!--弹窗-->
		<div id="mask" class="mask"></div>
		<div class="dialog" id="dialog">
			<div class="dialog_head" id="move_part">目录密码认证</div>
			<div class="dialog_content">
				<ul><br><br><br>

					<li>密码：<input type="password" id="password" name="password" value="" placeholder="点击输入" /></li>
					<li id="password_error" style="color: #f00;"></li>
				</ul>
			</div>
			<div class="dialog_boot">
				<button type="button" class="button close_button" id="checkpassword">验证密码</button>
				<button type="button" class="button close_button" id="close">关闭</button>
			</div>
		</div>
  <body id="laru">
<html>
<head> 
  <div class="navbar navbar-default">
            <div class="container-fluid">
              <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
                  <span class="icon-bar"></span>
                  <span class="icon-bar"></span>
                  <span class="icon-bar"></span>
                </button>


		<?php if(!empty($userconfig['indexbg_head'])){?>
		<img src="<?php echo S('STATIC').'/'.$userconfig['indexbg_head'].'?imageView2/2/w/1400/interlace/1/quality/80&v='.$userconfig['indexbg_time'];?>" width="192" height="50">	

		<?php }?>
	
              </div>
              <div class="navbar-collapse collapse navbar-responsive-collapse">
                <ul class="nav navbar-nav">
                  <li ><a ><i  aria-hidden="true"></i> 空间:<?php echo $userconfig['wangpan_size'];?>M 剩余:<?php echo $userconfig['wangpan_size']-floor($userconfig['usesize']/1048576);?>M 类型：<?php echo $userconfig['wangpan_name'];?>  </a></li>
               
                
                </ul>
       
                <ul class="nav navbar-nav navbar-right">
                                      <li><a href="http://member.<?php echo C('BEN_BZUSR');?>/<?php if(I('from')){echo '?from='.I('from');}?>"  target="_blank"><i  aria-hidden="true"></i> 登录</a></li>
									   <li><a href="http://member.<?php echo C('BEN_BZUSR');?>/reg<?php if(I('from')){echo '?from='.I('from');}?>"  target="_blank"><i  aria-hidden="true"></i> 注册</a></li>
                </ul>
              </div>
            </div>
  </div>

<div class="container">
    <div class="well bs-component">
        <h1><?php echo $userconfig['seo_title']; ?></h1>
        <div class="table-responsive" >
       <table width="100%" height="100%" class="table table-striped table-hover ">
            <thead> <th align="left" valign="top">	   </table>
        <ul id="treeDemo" class="ztree">
	                                <?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);
															?>
                                  <ul id="ad_right">
                                    <?php foreach($ad_right as $k=>$v){?>
                                    <li><?php echo $v;?></li>
                                    <?php }?>
                                  
                                <?php }?>

        <div class="row">

  <ul class="pagination pagination-sm"style="float:right;">

</nav>
</div>
</div>
</div>       
	<footer class="footer">
    <div class="container">
    <p class="text-muted"> 
<!--自定义代码--> <?php echo $userconfig['index_code'];?></a>
<!--版权归属-->
	 <?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);
															?>
	 <p class="text-muted">  <?php echo html_entity_decode(C('WEB_MF_FJDM'));?>   </p></a>
     <?php }?>	  
   </div> 
   </div>
	  
		  <!--广告开始-->
	      <?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: 330px;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 }?>

	</p>

      </div>
  <script src="/static/public/js/dialog/dialog.js" type="text/javascript" charset="utf-8"></script>
  <script type="text/javascript">
			var setting = {
			  data: {
			    simpleData: {
			      enable: true
			    }
			  },
			  view: {
			    nameIsHTML: true,
			    dblClickExpand: false,
			    showTitle: false,
			    txtSelectedEnable:true
			  },
			  callback: {
			    onClick: onClick,
			    beforeExpand: beforeExpand,
			    onExpand: onExpand
			  }
			};
			var curExpandNode = null;
			function beforeExpand(treeId, treeNode) {
			  var pNode = curExpandNode ? curExpandNode.getParentNode() : null;
			  var treeNodeP = treeNode.parentTId ? treeNode.getParentNode() : null;
			  var zTree = $.fn.zTree.getZTreeObj("treeDemo");
			  for (var i = 0,
			  l = !treeNodeP ? 0 : treeNodeP.children.length; i < l; i++) {
			    if (treeNode !== treeNodeP.children[i]) {
			      zTree.expandNode(treeNodeP.children[i], false)
			    }
			  }
			  while (pNode) {
			    if (pNode === treeNode) {
			      break
			    }
			    pNode = pNode.getParentNode()
			  }
			  if (!pNode) {
			    singlePath(treeNode)
			  }
			}
			function singlePath(newNode) {
			  if (newNode === curExpandNode) return;
			  var zTree = $.fn.zTree.getZTreeObj("treeDemo"),
			  rootNodes,
			  tmpRoot,
			  tmpTId,
			  i,
			  j,
			  n;
			  if (!curExpandNode) {
			    tmpRoot = newNode;
			    while (tmpRoot) {
			      tmpTId = tmpRoot.tId;
			      tmpRoot = tmpRoot.getParentNode()
			    }
			    rootNodes = zTree.getNodes();
			    for (i = 0, j = rootNodes.length; i < j; i++) {
			      n = rootNodes[i];
			      if (n.tId != tmpTId) {
			        zTree.expandNode(n, false)
			      }
			    }
			  } else if (curExpandNode && curExpandNode.open) {
			    if (newNode.parentTId === curExpandNode.parentTId) {
			      zTree.expandNode(curExpandNode, false)
			    } else {
			      var newParents = [];
			      while (newNode) {
			        newNode = newNode.getParentNode();
			        if (newNode === curExpandNode) {
			          newParents = null;
			          break
			        } else if (newNode) {
			          newParents.push(newNode)
			        }
			      }
			      if (newParents != null) {
			        var oldNode = curExpandNode;
			        var oldParents = [];
			        while (oldNode) {
			          oldNode = oldNode.getParentNode();
			          if (oldNode) {
			            oldParents.push(oldNode)
			          }
			        }
			        if (newParents.length > 0) {
			          zTree.expandNode(oldParents[Math.abs(oldParents.length - newParents.length) - 1], false)
			        } else {
			          zTree.expandNode(oldParents[oldParents.length - 1], false)
			        }
			      }
			    }
			  }
			  curExpandNode = newNode
			}
			function onExpand(event, treeId, treeNode) {
			  curExpandNode = treeNode
			}
			function onClick(e, treeId, treeNode) {
			  node = jQuery(e.target).closest('a');
			  if (node.find('.password').length > 0) {
			  	checkpwd(treeNode,node);
			    if (node.find('input').val() == '' ||  md5(jQuery('#password').val()) != node.find('input').data('value') ) {
			    	jQuery("#callout").click();
			      	return false
			    }
			    
			    
			  } else {
			    jQuery('.password').hide()
			  }
			  var zTree = $.fn.zTree.getZTreeObj("treeDemo");
			  zTree.expandNode(treeNode, null, null, null, true)
			}
			jQuery(document).ready(function($) {
			  try {
			    $.fn.zTree.init($("#treeDemo"), setting, zNodes)
			  } catch(e) {}
			});
			function checkpwd(treeNode,node){
				node.find('input').val('111');
				jQuery(document).on('click','#checkpassword',function () {
			    	var the=jQuery(this);
			    	if ( md5(jQuery('#password').val()) != node.find('input').data('value')) {
				      jQuery('#password_error').html('密码错误');
				      setTimeout(function() {
				        jQuery('#password_error').html('')
				      },
				      1500);
				      return false
				    } else {
				    	$dialog.hide();
				    	$mask.hide();
				    	var zTree = $.fn.zTree.getZTreeObj("treeDemo");
			  			zTree.expandNode(treeNode, null, null, null, true)
				    }          
			    })
			}
			
		</script>
	</body>
</html>

