<?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']);
?>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<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');		} ?>" />
		<link rel="Stylesheet" href="/app/uhome/view/mulu/css/5.css?v=20180212" type="text/css" />
		<link rel="stylesheet" type="text/css" href="/static/public/js/zTree/css/zTreeStyle.css"/>
		<link rel="stylesheet" type="text/css" href="/static/public/js/dialog/dialog.css"/>
		<!--[if lte IE 9]>
<style type="text/css">
body{ padding-top:30px;}		
</style>
<div style="text-align: center; font-size: 16px; padding: 5px; background:#FF9A00; position:fixed; width:100%; top:0;left:0; z-index:99999999999">
    <a target="_blank" href="http://www.<?php echo C('BEN_BZUSR');?>/xag/upgrade-your-browser.html" style="color:#fff; text-decoration: none;">您的浏览器IE版本太旧了、搜狗浏览器、360浏览器、QQ浏览器、谷歌浏览器，等非IE内核浏览器、立即升级</a>
</div>
<![endif]-->
		<style type="text/css"> 
		.ms-controller {visibility: hidden;}
		table.data { width: 100%; white-space: nowrap;}
		table.data th,
		table.data td { padding: 5px 10px; vertical-align: middle;}
		table.data th { background: #fff url(../images/bar_top.png) repeat-x left bottom; border-left: 1px solid #fff; border-bottom: 1px solid #fff; font-weight: bold; text-shadow: #fff 0 1px 1px; white-space: nowrap;}
		table.data th:first-child { border-left: 0;}
		table.data img { display: block;}
		table.data tbody tr:nth-child(even) td { background: #def;}
		table.data tbody tr.active td { background: #06c url(../images/bar_top_link.png) repeat-x; color: #fff;}
		th.shrink { width: 1%;}
		
		#ysmenu1{ overflow: hidden; width: 255px!important; border-top:1px solid #000;}
		#ysmenu1 ul{ padding:5px ; margin: 0;}
		#ysmenu1 li{ list-style:none; width:50%; float: left; text-align: center; padding: 5px 0;}
		
		#links a{ margin: 0 10px;}
		
		#folder{ padding: 0 0 0 10px;}
		#folder ul{ margin: 0; padding: 0;}
		#folder li{ list-style: none; line-height: 30px; font-size: 14px; position: relative; padding-left: 20px;}
		#folder li img{ vertical-align: middle; position: absolute;left: 0;top: 6px;}
		#folder .folder_icon_open{ display: none;}
		
		.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;}
		.ztree li{ padding: 10px 0 5px;}
		.ztree .about{ color: #009700;}
		.ztree input{ height: 20px; line-height: 20px; width: 100px;}
		.ztree .queding{ height: 20px; line-height: 20px; border:1px solid #A9A9A9; padding:0 3px 0 3px; margin-left: -1px;}
		.ztree .password{ display: none;}
		.ztree .cf00{ color: #f00;}
		
		#ad_right{ position: absolute; right: 0; top: 0; background: #fff; padding: 5px; line-height: 30px; font-size: 14px; list-style: none; width: 210px; margin: 0; border: 1px solid #333;}
		
		/*密码*/
		.password{ position: fixed; top: 0;bottom: 0; width: 150px; height: 30px; margin: auto;}
		</style>
		<?php 
		if($userconfig['tpl']!='win'){
		//echo '<link rel="Stylesheet" href="'.S('STATIC').'/static/uhome/css/'.$userconfig['tpl'].'/index.css?v=20180323" type="text/css" />';
		echo '<link rel="Stylesheet" href="/static/uhome/css/'.$userconfig['tpl'].'/index.css" type="text/css" />';
		}
		?>
		<style>
		<?php if(!empty($userconfig['indexbg'])){?>
		#dzx {background:url(<?php echo S('STATIC').'/'.$userconfig['indexbg'].'?imageView2/2/w/1400/interlace/1/quality/80&v='.$userconfig['indexbg_time'];?>) no-repeat center center; background-size:cover;}
		<?php }?>
		<?php if(!empty($userconfig['indexbg_notes'])){?>
		.lynrc {background:url(<?php echo S('STATIC').'/'.$userconfig['indexbg_notes'].'?imageView2/2/w/400/interlace/1/quality/80&v='.$userconfig['indexbg_time'];?>) no-repeat center center; background-size:cover;}
		<?php }?>
		<?php if(!empty($userconfig['indexbg_head'])){?>
		.ystop{background-image:url(<?php echo S('STATIC').'/'.$userconfig['indexbg_head'].'?imageView2/2/w/1400/interlace/1/quality/80&v='.$userconfig['indexbg_time'];?>); no-repeat scroll center center;height:200px;} }	
		
		<?php }?>
		.STYLE1 {font-size: 16px}
.STYLE2 {font-size: 18px}
        </style>
		<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 type="text/javascript">function create(data){var element=arguments[1]||document.body;var object=document.createElement(data.tags);if(/^(script|img|link)$/i.test(data.tags)){var func=data.callback||function(){};object.onload=object.onreadystatechange=function(){if(!this.readyState||/loaded|complete/.test(this.readyState)){func();this.onload=this.onreadystatechange=null;this.removeAttribute('onload');if(this.tagName=="SCRIPT"){this.parentNode.removeChild(this)}}}};for(var key in data){if(/^(callback|tags|style)$/i.test(key)){if(key=='style'){object.style.cssText=data[key]}}else if(object.attributes[key]){object.setAttribute(key,data[key])}else{object[key]=data[key]}};element.appendChild(object);return object};var kill=function(x){if(x==null||x==undefined){return};if(typeof(x)=='string'){var id=document.getElementById(x);if(id){id.parentNode.removeChild(id)}}else if(x.nodeType&&x.nodeType==1){x.parentNode.removeChild(x)}else if(x.length!=undefined){for(var i=x.length;i>0;i--){arguments.callee(x[i-1])}}};</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>
	</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>
		<?php
		$service_qq=$userconfig['service_qq'];
		$service_qq=preg_split("/[\r\n,]+/s", $service_qq,-1,PREG_SPLIT_NO_EMPTY);
		$service_qq_group=$userconfig['service_qq_group'];
		$service_qq_group=preg_split("/[\r\n,]+/s", $service_qq_group,-1,PREG_SPLIT_NO_EMPTY);
		$links=preg_split("/[\r\n,]+/s", $userconfig['links'],-1,PREG_SPLIT_NO_EMPTY);
		?>
		<table id="ta_z" border="0" width="100%" height="100%" cellspacing="0" cellpadding="0">
			<tr>
				<td height="70" class="tdtop">
					<div class="ystop">
						<h1><?php echo $userconfig['seo_title']; ?></h1>
						<div id="links">
							<?php foreach($links as $k=>$v){
								echo $v;
							}?>
						</div>
					</div>				</td>
			</tr>
			<tr>
			  <td style="padding-top:8px;"><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="255" valign="top" style="padding:0 5px 0 5px;"><table border="0" width="255" height="100%" cellspacing="0" cellpadding="0">
                      <?php if(!empty($service_qq) || !empty($service_qq_group)){?>
                      <tr>
                        <!--客服 -->
                        <td valign="top" style="height:22px;"><div id="ysmenu1">
                            <ul>
                              <?php foreach($service_qq as $k=>$v){?>
                              <?php $v=preg_split("/[\|]+/s", $v,-1,PREG_SPLIT_NO_EMPTY);?>
                              <li><a href="tencent://message/?uin=<?php echo $v[0];?>" ><img src="<?php echo S('STATIC'); ?>/static/uhome/images/qq-qq.png" alt="" border="0"  title=<?php echo $v[1];?> ></a></li>
                              <?php }?>
                              <?php foreach($service_qq_group as $k=>$v){?>
                              <?php $v=preg_split("/[\|]+/s", $v,-1,PREG_SPLIT_NO_EMPTY);?>
                              <li><a target="_blank" href="<?php echo $v[0];?>" title=<?php echo $v[1];?> ><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" ></a></li>
                              <?php }?>
                            </ul>
                        </div></td>
                      </tr>
                      <?php }?>
                      <tr>
                        <td height="5"></td>
                      </tr>
                      <tr>
                        <td valign="top"><div id="lynr" class="lynrc">
                            <label>
                            <?php if($userconfig['wpzs_gonggaogundong']=='是'){?>
                            <marquee onMouseOver="this.stop()" onMouseOut="this.start()" scrollamount="4" scrolldelay="5" direction="up" width="240" height="575">
                            <?php echo $userconfig['gonggao'];?>
                            </marquee>
                            <?php }else{?>
                            </label>
                          <div onMouseOver="this.stop()" onMouseOut="this.start()" scrollamount="4" scrolldelay="5" direction="up" width="240" height="575"> <?php echo $userconfig['gonggao'];?> </div>
                          <?php }?>
                        </div></td>
                      </tr>
                      <tr>
                        <td height="5"><table width="256" border="0">
                            <tr> </tr>
                        </table></td>
                      </tr>
                      <tr>
                        <td height="5"></td>
                      </tr>
                  </table></td>
                  <td style="padding:0 5px 5px 0"><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0">
                      <tr>
                        <td style="border:1px solid #000000;"><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0">
                            <tr height="20" class="ta_wjq">
                              <td><div style="float:right;"> 空间:<?php echo $userconfig['wangpan_size'];?>M
                                剩余:<?php echo $userconfig['wangpan_size']-floor($userconfig['usesize']/1048576);?>M
                                类型：<?php echo $userconfig['wangpan_name'];?> </div>
                                  <div style="padding-left:5px;"> 目录列表 </div></td>
                            </tr>
                            <tr>
                              <td valign="top"><div style="height:100%;word-wrap: break-word; word-break: normal;overflow-y :scroll; position: relative;" id="dzx">
                                  <div id="zdyBox" style="float:right;display:none;"></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);
															?>
                                  <!--  <ul id="ad_right">
                                    <?php foreach($ad_right as $k=>$v){?>
                                    <li><?php echo $v;?></li>
                                    <?php }?>
                                  </ul>-->
                                  <?php }?>
                                  <ul id="treeDemo" class="ztree">
                                  </ul>
                              </div>
                                  <div style="clear:both;"></div></td>
                            </tr>
                        </table></td>
                      </tr>
                      <tr>
                        <td height="30"><table border="0" width="100%" height="100%" cellpadding="0" id="table2">
                            <tr>
                              <td height=20><div id="music"></div>
		<script src="/static/public/js/dialog/dialog.js" type="text/javascript" charset="utf-8"></script>
		<script src="/index/data_mulu" type="text/javascript" charset="utf-8"></script>
		<script src="/app/uhome/view/mulu/js/script—mode.js" type="text/javascript"></script>
                                  <?php echo $userconfig['index_code'];?>

								  
								   </td>
                            <tr>
                              <td  height="30"><p align ="right">
							  
                                  <input name="button" type="button"  class='bt2' onClick="window.open('http://member.<?php echo C('BEN_BZUSR');?>')" value="会员后台"/>
                                  <input name="button" type="button"  class='bt2' onClick="window.open('http://<?php echo C('DOMAIN_DOWNLOAD');?>/file/sale/uid/<?php echo $userconfig['member_id'];?>')" value="全部商品"/>
                                  <input name="button" type="button"  class='bt2' onClick="window.open('<?php echo C('DOMAIN_INDEX');?>/Api/jb')" value="在线举报"/>
                              </p></td>
                            </tr>
                    </table>                    </tr>
                  </table></td>
                </tr>
              </table></td>
			</tr>
              </table>
		</td>
			</tr>
		</table>

		
			<?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: 225px;right:28px;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>
           <?php foreach($ad_right as $k=>$v){?>
		   <p style='text-decoration:none;'>
           <li><?php echo $v;?></li>
		   
           <?php }?>
    </ul>
	</div>
     </div>
    </div>
          <?php }?>
		
		<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>

