multy disks
parent
75600649aa
commit
3a71008be6
|
@ -7,8 +7,8 @@
|
|||
<meta http-equiv=X-UA-Compatible content="IE=edge">
|
||||
<meta name=viewport content="width=device-width,initial-scale=1">
|
||||
<meta name="keywords" content="<?php echo $n_path;?>,<?php if ($p_path!='') echo $p_path.','; echo $_SERVER['sitename'];?>,OneManager,auth_by_逸笙">
|
||||
<link rel="icon" href="<?php echo $_SERVER['base_path'];?>favicon.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="<?php echo $_SERVER['base_path'];?>favicon.ico" type="image/x-icon" />
|
||||
<link rel="icon" href="<?php echo $_SERVER['base_disk_path'];?>favicon.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="<?php echo $_SERVER['base_disk_path'];?>favicon.ico" type="image/x-icon" />
|
||||
<style type="text/css">
|
||||
body{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;line-height:1em;background-color:#f7f7f9;color:#000}
|
||||
a{color:#24292e;cursor:pointer;text-decoration:none}
|
||||
|
@ -24,6 +24,8 @@
|
|||
.list-container,.list-header-container,.list-wrapper,a.back-link:hover,body{color:#24292e}
|
||||
.list-header-container .table-header{margin:0;border:0 none;padding:30px 60px;text-align:left;font-weight:400;color:#000;background-color:#f7f7f9;word-break: break-all;word-wrap: break-word;}
|
||||
.list-body-container{position:relative;left:0;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;background:#fff}
|
||||
.more-disk{margin:0;border:0 none;padding:30px 30px;text-align:left;font-weight:400;color:#000;background-color:#f7f7f9;word-break: break-all;word-wrap: break-word;}
|
||||
.more-disk a{padding:5px}
|
||||
.list-table{width:100%;padding:0 20px 20px 20px;border-spacing:0}
|
||||
.list-table tr{height:40px}
|
||||
.list-table tr[data-to]:hover{background:#f1f1f1}
|
||||
|
@ -90,6 +92,23 @@
|
|||
<h1 class="title">
|
||||
<a href="<?php echo $_SERVER['base_path']; ?>"><?php echo $_SERVER['sitename']; ?></a>
|
||||
</h1>
|
||||
<?php $disktags = explode("|",getConfig('disktag'));
|
||||
if (count($disktags)>1) { ?>
|
||||
<div class="list-wrapper">
|
||||
<div class="list-container">
|
||||
<div class="list-header-container">
|
||||
<div class="more-disk">
|
||||
<?php foreach ($disktags as $disk) {
|
||||
$diskname = getConfig('diskname', $disk);
|
||||
if ($diskname=='') $diskname = $disk;
|
||||
echo '<a href="'.path_format($_SERVER['base_path'].'/'.$disk).'">'.$diskname.'</a>  ';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }
|
||||
if ($files) { ?>
|
||||
<div class="list-wrapper" id="list-div">
|
||||
<div class="list-container">
|
||||
<div class="list-header-container">
|
||||
|
@ -130,8 +149,8 @@
|
|||
?>
|
||||
<div style="margin: 12px 4px 4px; text-align: center">
|
||||
<div style="margin: 24px">
|
||||
<textarea id="url" title="url" rows="1" style="width: 100%; margin-top: 2px;" readonly><?php echo str_replace('%2523', '%23', str_replace('%26amp%3B','&',spurlencode(path_format($_SERVER['base_path'] . '/' . $path), '/'))); ?></textarea>
|
||||
<a href="<?php echo path_format($_SERVER['base_path'] . '/' . $path);//$files['@microsoft.graph.downloadUrl'] ?>"><ion-icon name="download" style="line-height: 16px;vertical-align: middle;"></ion-icon> <?php echo getconstStr('Download'); ?></a>
|
||||
<textarea id="url" title="url" rows="1" style="width: 100%; margin-top: 2px;" readonly><?php echo str_replace('%2523', '%23', str_replace('%26amp%3B','&',spurlencode(path_format($_SERVER['base_disk_path'] . '/' . $path), '/'))); ?></textarea>
|
||||
<a href="<?php echo path_format($_SERVER['base_disk_path'] . '/' . $path);//$files['@microsoft.graph.downloadUrl'] ?>"><ion-icon name="download" style="line-height: 16px;vertical-align: middle;"></ion-icon> <?php echo getconstStr('Download'); ?></a>
|
||||
</div>
|
||||
<div style="margin: 24px">
|
||||
<?php $ext = strtolower(substr($path, strrpos($path, '.') + 1));
|
||||
|
@ -210,7 +229,7 @@
|
|||
</li>
|
||||
<?php } ?>
|
||||
<ion-icon name="folder"></ion-icon>
|
||||
<a id="file_a<?php echo $filenum;?>" href="<?php echo path_format($_SERVER['base_path'] . '/' . $path . '/' . encode_str_replace($file['name']) . '/'); ?>"><?php echo str_replace('&','&', $file['name']);?></a>
|
||||
<a id="file_a<?php echo $filenum;?>" href="<?php echo path_format($_SERVER['base_disk_path'] . '/' . $path . '/' . encode_str_replace($file['name']) . '/'); ?>"><?php echo str_replace('&','&', $file['name']);?></a>
|
||||
</td>
|
||||
<td class="updated_at" id="folder_time<?php echo $filenum;?>"><?php echo time_format($file['lastModifiedDateTime']); ?></td>
|
||||
<td class="size" id="folder_size<?php echo $filenum;?>"><?php echo size_format($file['size']); ?></td>
|
||||
|
@ -262,8 +281,8 @@
|
|||
<?php } else { ?>
|
||||
<ion-icon name="document"></ion-icon>
|
||||
<?php } ?>
|
||||
<a id="file_a<?php echo $filenum;?>" name="filelist" href="<?php echo path_format($_SERVER['base_path'] . '/' . $path . '/' . encode_str_replace($file['name'])); ?>?preview" target=_blank><?php echo str_replace('&','&', $file['name']); ?></a>
|
||||
<a href="<?php echo path_format($_SERVER['base_path'] . '/' . $path . '/' . str_replace('&','&', $file['name']));?>"><ion-icon name="download"></ion-icon></a>
|
||||
<a id="file_a<?php echo $filenum;?>" name="filelist" href="<?php echo path_format($_SERVER['base_disk_path'] . '/' . $path . '/' . encode_str_replace($file['name'])); ?>?preview" target=_blank><?php echo str_replace('&','&', $file['name']); ?></a>
|
||||
<a href="<?php echo path_format($_SERVER['base_disk_path'] . '/' . $path . '/' . str_replace('&','&', $file['name']));?>"><ion-icon name="download"></ion-icon></a>
|
||||
</td>
|
||||
<td class="updated_at" id="file_time<?php echo $filenum;?>"><?php echo time_format($file['lastModifiedDateTime']); ?></td>
|
||||
<td class="size" id="file_size<?php echo $filenum;?>"><?php echo size_format($file['size']); ?></td>
|
||||
|
@ -380,6 +399,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div id="mask" class="mask" style="display:none;"></div>
|
||||
<?php
|
||||
if ($_SERVER['admin']) {
|
||||
|
@ -492,13 +512,15 @@
|
|||
} ?>
|
||||
<font color="#f7f7f9"><?php echo date("Y-m-d H:i:s")." ".getconstStr('Week')[date("w")]." ".$_SERVER['REMOTE_ADDR'];?></font>
|
||||
</body>
|
||||
|
||||
<?php if ($files) { ?>
|
||||
<?php if ($head||$readme) { ?><link rel="stylesheet" href="//unpkg.zhimg.com/github-markdown-css@3.0.1/github-markdown.css">
|
||||
<script type="text/javascript" src="//unpkg.zhimg.com/marked@0.6.2/marked.min.js"></script><?php } ?>
|
||||
<?php if (isset($files['folder']) && $_SERVER['is_guestup_path'] && !$_SERVER['admin']) { ?><script type="text/javascript" src="//cdn.bootcss.com/spark-md5/3.0.0/spark-md5.min.js"></script><?php } ?>
|
||||
<?php if ($pdfurl!='') { ?><script src="//cdn.bootcss.com/pdf.js/2.3.200/pdf.min.js"></script><?php } ?>
|
||||
<?php } ?>
|
||||
<script type="text/javascript">
|
||||
var root = '<?php echo $_SERVER["base_path"]; ?>';
|
||||
<?php if ($files) { ?>
|
||||
var root = '<?php echo $_SERVER["base_disk_path"]; ?>';
|
||||
function path_format(path) {
|
||||
path = '/' + path + '/';
|
||||
while (path.indexOf('//') !== -1) {
|
||||
|
@ -518,6 +540,7 @@
|
|||
e.innerHTML += paths[paths.length - 1];
|
||||
e.innerHTML = e.innerHTML.replace(/\s\/\s$/, '')
|
||||
});
|
||||
|
||||
function changelanguage(str)
|
||||
{
|
||||
if (str=='Language') str = '';
|
||||
|
@ -777,12 +800,6 @@
|
|||
document.getElementById('pagenum').value=num;
|
||||
document.getElementById('nextpageform').submit();
|
||||
}
|
||||
<?php }
|
||||
if (getConfig('admin')!='') { // close div. 有登录或操作,需要关闭DIV时 ?>
|
||||
function operatediv_close(operate) {
|
||||
document.getElementById(operate+'_div').style.display='none';
|
||||
document.getElementById('mask').style.display='none';
|
||||
}
|
||||
<?php }
|
||||
if (isset($files['folder']) && ($_SERVER['is_guestup_path'] || $_SERVER['admin'])) { // is folder and is admin or guest upload path. 当前是admin登录或图床目录时 ?>
|
||||
function uploadbuttonhide() {
|
||||
|
@ -1006,6 +1023,13 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
<?php }
|
||||
}
|
||||
if (getConfig('admin')!='') { // close div. 有登录或操作,需要关闭DIV时 ?>
|
||||
function operatediv_close(operate) {
|
||||
document.getElementById(operate+'_div').style.display='none';
|
||||
document.getElementById('mask').style.display='none';
|
||||
}
|
||||
<?php }
|
||||
if ($_SERVER['admin']) { // admin login. 管理登录后 ?>
|
||||
function logout() {
|
||||
|
|
Loading…
Reference in New Issue