<?php
include'indexdown.php';





?>

<html lang="en">
	
<?php
echo "<head>
	<meta charset='UTF-8'>
	<title>$title</title>
	<meta http-equiv='X-UA-Compatible' content='IE=edge'/>
	<meta name='renderer' content='webkit'/>
	<meta name='viewport' content='width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no'>
	<meta http-equiv='Cache-Control' content='no-siteapp'/>
	<script src='/static/js/mdui.js'></script>
	<link href='/static/css/mdui.css' rel='stylesheet'>
	<script src='//cdn.bootcss.com/jquery/3.4.1/jquery.min.js'></script>
	<!-- MD语法解析JS -->
	<script src='/static/js/showdown.min.js'></script>
	<script src='//cdn.bootcss.com/layer/2.3/layer.js'></script>
	<style>
	
		.footer-copyright{
			position: absolute;
			height: 50px;
			text-align: center;
			line-height: 50px;
			width: 80%;
			font-size: 14px;
		}
		a{text-decoration:none;}
		.list{word-break: break-all;color:$txtcolor}		
		.demo{



                background-color: #fff;

                background: url('$bodyimg');

                background-repeat: no-repeat;

                background-size: cover;

                -webkit-background-size: cover;

                -o-background-size: cover;

                background-position: center 0;

            }

        </style>

</head>";

?>
<body class="mdui-drawer-body-center mdui-appbar-with-toolbar mdui-theme-primary-indigo mdui-theme-accent-pink  ">
	<header class="mdui-appbar mdui-appbar-fixed">
		<div class="mdui-toolbar <?php echo $headcolor ?>">
			<a href="/" class="mdui-typo-headline mdui-hidden-xs"><?php echo $title; ?></a>
			
			
			<div class="mdui-toolbar-spacer"></div>
			<form action="search.php" method="get" id="nameform">
				<div class="mdui-textfield-not-empty" id="search_input" >
					
					<input  style="width:300px;height:35px;" class=" <?php echo $searchcolor ?>"  type="text"  name="name" placeholder="关键词搜索" />
					<input  type="hidden"  name="user" value="<?php echo $user;?>" />				
					<input  type="hidden"  name="shouye" value="<?php echo $shouye;?>" />					
				</div>

			</form>
<button  class='mdui-btn mdui-ripple <?php echo $searchcolor2 ?>'  type="submit" form="nameform" value="Submit"><i class="mdui-icon material-icons">search</i></button>

						</div>
	</header>
	





	<!-- 主体 -->
<ul class="mdui-list">

	<div class='mdui-container <?php echo "$bodycolor"?>'>
		<div style='height: 30px;'>&nbsp;</div>
<div class='mdui-typo-display-1'>
	<i class='mdui-icon material-icons'>&#xe88a;</i>&nbsp;
<select name="" onchange="javascript:location.href=this.value;" class="mdui-select <?php echo "$bodycolor"?>" >
<option style=" font-size:24px" value="/" selected="selected" ><?php echo "当前网盘:$panname[$rand]"?></option>

<?php
for($i = 0; $i < $count; $i++) {
echo "<option value='/?user=$i' >切换到网盘:$panname[$i]$l</option>";
}



?>
</div>
</select>

<hr>





				
				
				
			</div>
		</li>

<div class="demo">
<?php

$indexpass=$indexpass[$rand];
if ($indexpass != '' and $indexpass != $shouye) {
include'indexmima.php';
exit;
}




for($i = 0; $i < count($a[data]); $i++) {
$shuzu=$a[data][$i][downloadUrl];
$url=(strCutByStr($shuzu, 'fileStr=', '&downloadType'));
$fileIdshuzu=$a[data][$i][fileId];
$fileType=$a[data][$i][fileType];
$fileSize=$a[data][$i][fileSize]/1024/1024;

$fileSize=round($fileSize,2);
if ($fileIdshuzu >= 12){
$filename=$a[data][$i][fileName];
}
if ($url == ""){
if ($fileIdshuzu >= 12){

echo "
<ul class='mdui-list'>
<div>
	<ul class='mdui-list' >
				<li class='mdui-list-item mdui-ripple'>
			<div class='mdui-list-item-content list'>
								<i class='mdui-icon material-icons'>&#xe2c7;</i>
								<a href='$file?fileId=$fileIdshuzu&user=$rand&shouye=$shouye&muluname=$filename'>$filename</a>
							</div>
						<button class='mdui-btn mdui-btn-raised mdui-ripple <?php echo $buttoncolor ?>' >
							<a href='$file?fileId=$fileIdshuzu&user=$rand&shouye=$shouye&muluname=$filename'><span class='am-icon-trash-o'></span>打开目录</a>
			</button>
					</li>
					
				</div>
				</ul>";
}
}
else{
	
$host="http://".$_SERVER['HTTP_HOST'];

if($downoff=="0" and $url != ""){
	$name=urlencode($filename);
	$downurl="$host/download.php?fileid=-11&user=$rand&filename=$name";

}else{
	$name=urlencode($filename);
	$downurl="$host/down.php?fileStr=$url&user=$rand&filename=$name";	

}
	
$download=$download."\n".$downurl;
	
	
	
	if($fileType == "mp4"){
echo "<li class='mdui-list-item mdui-ripple'>
			<div class='mdui-list-item-content list'>
								<i class='mdui-icon material-icons'>&#xe873;</i>
							<a href=$video?fileStr=$url&user=$rand&filename=$filename&fileid=-11>$filename</a>
							</div>
			<button class='mdui-btn mdui-btn-raised mdui-ripple <?php echo $buttoncolor ?>'><a href=$video?fileStr=$url&user=$rand&filename=$filename&fileid=-11>在线播放</button>&nbsp;&nbsp;&nbsp;
			<button class='mdui-btn mdui-btn-raised mdui-ripple <?php echo $buttoncolor ?>'><a href=$down?fileStr=$url&user=$rand&filename=$filename target='_blank'>下载</a></button>
					</li>";		
		
	}
	
	elseif($fileType == "mp3"){
echo "<li class='mdui-list-item mdui-ripple'>
			<div class='mdui-list-item-content list'>
								<i class='mdui-icon material-icons'>&#xe873;</i>
							<a href=$music?fileStr=$url&user=$rand&filename=$filename&fileid=-11>$filename</a>
							</div>
			<button class='mdui-btn mdui-btn-raised mdui-ripple <?php echo $buttoncolor ?>'><a href=$music?fileStr=$url&user=$rand&filename=$filename&fileid=-11>在线播放</button>&nbsp;&nbsp;&nbsp;
			<button class='mdui-btn mdui-btn-raised mdui-ripple <?php echo $buttoncolor ?>'><a href=$down?fileStr=$url&user=$rand&filename=$filename target='_blank'>下载</a></button>
					</li>";	
	}
	elseif($fileType == "mkv"){
echo "<li class='mdui-list-item mdui-ripple'>
			<div class='mdui-list-item-content list'>
								<i class='mdui-icon material-icons'>&#xe873;</i>
							<a href=$video?fileStr=$url&user=$rand&filename=$filename&fileid=-11>$filename</a>
							</div>
			<button class='mdui-btn mdui-btn-raised mdui-ripple <?php echo $buttoncolor ?>'><a href=$video?fileStr=$url&user=$rand&filename=$filename&fileid=-11>在线播放</button>&nbsp;&nbsp;&nbsp;
			<button class='mdui-btn mdui-btn-raised mdui-ripple <?php echo $buttoncolor ?>'><a href=$down?fileStr=$url&user=$rand&filename=$filename target='_blank'>下载</a></button>
					</li>";	
	}

		elseif($fileType == "gif"){
echo "<li class='mdui-list-item mdui-ripple'>
			<div class='mdui-list-item-content list'>
								<i class='mdui-icon material-icons'>&#xe873;</i>
							<a href=$img?fileStr=$url&user=$rand&filename=$filename&fileid=-11>$filename</a>
							</div>
			<button class='mdui-btn mdui-btn-raised mdui-ripple <?php echo $buttoncolor ?>'><a href=$img?fileStr=$url&user=$rand&filename=$filename&fileid=-11>在线预览</button>&nbsp;&nbsp;&nbsp;
			<button class='mdui-btn mdui-btn-raised mdui-ripple <?php echo $buttoncolor ?>'><a href=$down?fileStr=$url&user=$rand&filename=$filename target='_blank'>下载</a></button>
					</li>";	
	}

			elseif($fileType == "jpg"){
echo "<li class='mdui-list-item mdui-ripple'>
			<div class='mdui-list-item-content list'>
								<i class='mdui-icon material-icons'>&#xe873;</i>
							<a href=$img?fileStr=$url&user=$rand&filename=$filename&fileid=-11>$filename</a>
							</div>
			<button class='mdui-btn mdui-btn-raised mdui-ripple <?php echo $buttoncolor ?>'><a href=$img?fileStr=$url&user=$rand&filename=$filename&fileid=-11>在线预览</button>&nbsp;&nbsp;&nbsp;
			<button class='mdui-btn mdui-btn-raised mdui-ripple <?php echo $buttoncolor ?>'><a href=$down?fileStr=$url&user=$rand&filename=$filename target='_blank'>下载</a></button>
					</li>";	
	}
			elseif($fileType == "png"){
echo "<li class='mdui-list-item mdui-ripple'>
			<div class='mdui-list-item-content list'>
								<i class='mdui-icon material-icons'>&#xe873;</i>
							<a href=$img?fileStr=$url&user=$rand&filename=$filename&fileid=-11>$filename</a>
							</div>
			<button class='mdui-btn mdui-btn-raised mdui-ripple <?php echo $buttoncolor ?>'><a href=$img?fileStr=$url&user=$rand&filename=$filename&fileid=-11>在线预览</button>&nbsp;&nbsp;&nbsp;
			<button class='mdui-btn mdui-btn-raised mdui-ripple <?php echo $buttoncolor ?>'><a href=$down?fileStr=$url&user=$rand&filename=$filename target='_blank'>下载</a></button>
					</li>";	
	}
	
	elseif($fileType == "docx"){
echo "<li class='mdui-list-item mdui-ripple'>
			<div class='mdui-list-item-content list'>
								<i class='mdui-icon material-icons'>&#xe873;</i>
							<a href=$wps?fileStr=$url&user=$user>$filename</a>
							</div>
			<button class='mdui-btn mdui-btn-raised mdui-ripple $buttoncolor'><a href=$wps?fileStr=$url&user=$user>在线预览</button>&nbsp;&nbsp;&nbsp;
			<button class='mdui-btn mdui-btn-raised mdui-ripple $buttoncolor'><a href=$down?fileStr=$url&user=$user target='_blank'>下载</a></button>
					</li>";	
	}
			elseif($fileType == "xlsx"){
echo "<li class='mdui-list-item mdui-ripple'>
			<div class='mdui-list-item-content list'>
								<i class='mdui-icon material-icons'>&#xe873;</i>
							<a href=$wps?fileStr=$url&user=$user>$filename</a>
							</div>
			<button class='mdui-btn mdui-btn-raised mdui-ripple $buttoncolor'><a href=$wps?fileStr=$url&user=$user>在线预览</button>&nbsp;&nbsp;&nbsp;
			<button class='mdui-btn mdui-btn-raised mdui-ripple $buttoncolor'><a href=$down?fileStr=$url&user=$user target='_blank'>下载</a></button>
					</li>";	
	}
			elseif($fileType == "txt"){
echo "<li class='mdui-list-item mdui-ripple'>
			<div class='mdui-list-item-content list'>
								<i class='mdui-icon material-icons'>&#xe873;</i>
							<a href=$wps?fileStr=$url&user=$user>$filename</a>
							</div>
			<button class='mdui-btn mdui-btn-raised mdui-ripple $buttoncolor'><a href=$wps?fileStr=$url&user=$user>在线预览</button>&nbsp;&nbsp;&nbsp;
			<button class='mdui-btn mdui-btn-raised mdui-ripple $buttoncolor'><a href=$down?fileStr=$url&user=$user target='_blank'>下载</a></button>
					</li>";	
	}
			elseif($fileType == "sh"){
echo "<li class='mdui-list-item mdui-ripple'>
			<div class='mdui-list-item-content list'>
								<i class='mdui-icon material-icons'>&#xe873;</i>
							<a href=$wps?fileStr=$url&user=$user>$filename</a>
							</div>
			<button class='mdui-btn mdui-btn-raised mdui-ripple $buttoncolor'><a href=$wps?fileStr=$url&user=$user>在线预览</button>&nbsp;&nbsp;&nbsp;
			<button class='mdui-btn mdui-btn-raised mdui-ripple $buttoncolor'><a href=$down?fileStr=$url&user=$user target='_blank'>下载</a></button>
					</li>";	
	}
			elseif($fileType == "pdf"){
echo "<li class='mdui-list-item mdui-ripple'>
			<div class='mdui-list-item-content list'>
								<i class='mdui-icon material-icons'>&#xe873;</i>
							<a href=$wps?fileStr=$url&user=$user>$filename</a>
							</div>
			<button class='mdui-btn mdui-btn-raised mdui-ripple $buttoncolor'><a href=$wps?fileStr=$url&user=$user>在线预览</button>&nbsp;&nbsp;&nbsp;
			<button class='mdui-btn mdui-btn-raised mdui-ripple $buttoncolor'><a href=$down?fileStr=$url&user=$user target='_blank'>下载</a></button>
					</li>";	
	}
			elseif($fileType == "ini"){
echo "<li class='mdui-list-item mdui-ripple'>
			<div class='mdui-list-item-content list'>
								<i class='mdui-icon material-icons'>&#xe873;</i>
							<a href=$wps?fileStr=$url&user=$user>$filename</a>
							</div>
			<button class='mdui-btn mdui-btn-raised mdui-ripple $buttoncolor'><a href=$wps?fileStr=$url&user=$user>在线预览</button>&nbsp;&nbsp;&nbsp;
			<button class='mdui-btn mdui-btn-raised mdui-ripple $buttoncolor'><a href=$down?fileStr=$url&user=$user target='_blank'>下载</a></button>
					</li>";	
	}
	

	
	else{
echo "<li class='mdui-list-item mdui-ripple'>
			<div class='mdui-list-item-content list'>
								<i class='mdui-icon material-icons'>&#xe873;</i>
								<a href=$down?fileStr=$url&user=$rand&filename=$filename target='_blank'>$filename</a>
							</div>
			<button class='mdui-btn mdui-btn-raised mdui-ripple $buttoncolor'><a href=$down?fileStr=$url&user=$rand&filename=$filename target='_blank'>下载</a></button>
					</li>";
}


}


}

?>
    <br>
    <br>
        <br>
            <br>



<body>
    <!-- 1. Define some markup -->
    <div style='text-align:center'>
    <button class="btn mdui-btn mdui-btn-raised mdui-ripple <?php echo $buttoncolor ?>" data-clipboard-text="<?php echo $download ?>">批量复制下载链接</button>
</div>
    <!-- 2. Include library -->
    <script src="./static/js/clipboard.min.js"></script>

    <!-- 3. Instantiate clipboard by passing a string selector -->
    <script>
    var clipboard = new ClipboardJS('.btn');

    clipboard.on('success', function(e) {
        console.log(e);
    });

    clipboard.on('error', function(e) {
        console.log(e);
    });
    </script>
</body>
</html>



		<div class="mdui-panel" mdui-panel>
			<div class="mdui-panel-item mdui-panel-item-open">
				<div class="mdui-panel-item-header"><i class="mdui-icon material-icons">&#xe866;</i>&nbsp;&nbsp;&nbsp; README</div>
				<div class="mdui-panel-item-body">
					<div id="md-str" style="display: none;" >
 <?php echo $body; ?> <br>
 1.禁止将本源码用于非法用途，发现将取消授权 <br> 
 2.授权8.88一个域名 <br>
 3.本源码支持自定义配色背景、多盘、直连、视频、音乐等功能
</div>
					<div id="md"></div>
				</div>
			</div>
		</div>
		
	</div>

	
	<!-- 页脚 -->
	<div style='text-align:center'>
		Copyright © 2019 - 2020 | <a href="https://pan.yaohuo.tech"><?php echo $title ?></a> 
	</div>
</body>
<script type="text/javascript">
	$(document).ready(function() {
            var content = $('#md-str').html(); //获取md文本内容
            var converter = new showdown.Converter(); //初始化转换器
            var htmlcontent = converter.makeHtml(content); //将MarkDown转为html格式的内容
            $("#md").html(htmlcontent);
        }); //添加到 div 中 显示出来
    </script>
    

    
    
    
    </html>
    
    
