Add files via upload

new
pull/17/head
dgjdnfj 2020-02-25 18:01:20 +08:00 committed by GitHub
parent c45c8bbb76
commit eb77b0ede2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 198 additions and 73 deletions

View File

@ -1,3 +1,4 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<?php echo $constStr['language']; ?>"> <html lang="<?php echo $constStr['language']; ?>">
<head> <head>
@ -9,54 +10,206 @@
<link rel="icon" href="<?php echo $_SERVER['base_disk_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" /> <link rel="shortcut icon" href="<?php echo $_SERVER['base_disk_path'];?>favicon.ico" type="image/x-icon" />
<style type="text/css"> <style type="text/css">
body:before{top: 0;left: 0;right: 0;bottom: 0;opacity: .3;z-index: -1;content: "";position: fixed;background: url(http://api.btstu.cn/sjbz/zsy.php) center/cover;} body:before{
a{color:#FFFFFF;cursor:pointer;text-decoration:none;} top: 0;
a:hover{color:#b3b3b3;} left: 0;
.login ion-icon{vertical-align:bottom;} right: 0;
.changelanguage{position:absolute;right:5px;} bottom: 0;
.title{text-align:center;margin-top:1rem;letter-spacing:2px;margin-bottom:2rem} z-index: -1;
.title a{color:#FFFFFF;text-decoration:none} content: "";
.list-wrapper{width:80%;margin:0 auto 30px;position:relative;box-shadow:0 0 32px 0 rgb(128,128,128);border-radius:15px;} position: fixed;
.list-container{position:relative;overflow:hidden;border-radius:15px;} background: url(http://api.btstu.cn/sjbz/zsy.php) center/cover;
.list-header-container{position:relative} }
.list-header-container a.back-link{color:#fdfdfd;display:inline-block;position:absolute;font-size:16px;margin:20px 10px;padding:10px 10px;vertical-align:middle;text-decoration:none} a {
.list-container,.list-header-container,.list-wrapper,a.back-link:hover,body{color:#FFF} color:#FFFFFF;
.table-header{margin:0;border:0 none;padding:30px 60px;text-align:left;font-weight:400;color:#FFF;background-color:rgba(245,245,245,0);word-break: break-all;word-wrap: break-word;} cursor:pointer;
.list-body-container{position:relative;left:0;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;background:rgba(245,245,245,0)} text-decoration:none;
.more-disk{margin:0;border:0 none;padding:30px 30px;text-align:left;font-weight:400;color:#FFFFFF;background-color:rgba(85,85,85,0);} }
.more-disk a{padding:5px;transition-duration: 0.4s;border-radius: 12px; background-color:rgba(144, 144, 144, 0.5); color:#ffffff; border: 2px solid rgba(85,85,85,0); } a:hover {
.more-disk a:hover{ background-color:#a0a0a0; color:#000000; } color:#24292e;
.list-table{width:100%;padding:0 20px 20px 20px;border-spacing:0} }
.list-table tr{height:40px} .login ion-icon {
.list-table tr[data-to]:hover{background:rgba(72,72,72,0.5);color:white;} vertical-align:bottom;
.list-table tr[data-to]:hover a[name~="filelist"]{color:white} }
.list-table tr:first-child{background:rgba(85,85,85,0)} .changelanguage {
.list-table td,.list-table th{padding:0 10px;text-align:left} position:absolute;
.list-table .size,.list-table .updated_at{text-align:right} right:5px;
.list-table .file ion-icon{font-size:15px;/*margin-right:5px;*/vertical-align:bottom} }
.mask{position:absolute;left:0px;top:0px;width:100%;background-color:#000;filter:alpha(opacity=50);opacity:0.5;z-index:2;} .title {
<?php if ($_SERVER['admin']) { ?> text-align:center;
.operate{display:inline-table;margin:0;list-style:none} margin-top:1rem;
.operate ion-icon{vertical-align:bottom} letter-spacing:2px;
.operate ul{position:absolute;display:none;background:rgb(105,105,105,0.8);border:0px #f7f7f7 solid;border-radius:5px;margin:-7px 0 0 0;padding:0 7px;color:#205D67;z-index:1;} margin-bottom:2rem
.operate:hover ul{position:absolute;display:inline-table;} }
.operate ul li{padding:7px;list-style:none;display:inline-table;} .title a {
.operate ul li ion-icon{vertical-align:bottom} color:#1E90FF;
<?php } ?> text-decoration:none;
.operatediv{position:absolute;border:1px rgba(85,85,85,0);background-color:rgba(85,85,85,0);z-index:2;} }
.operatediv div{margin:16px} .list-wrapper {
.operatediv_close{position:absolute;right:3px;top:3px;} width:80%;
.readme{padding:8px;background-color:rgba(85,85,85,0);} margin:0 auto 30px;
.markdown-body{padding:10px;text-align:left} position:relative;
box-shadow:0 0 32px 0 rgb(128,128,128);
border-radius:15px;
}
.list-container {
position:relative;
overflow:hidden;
border-radius:15px;
}
.list-header-container {
position:relative
}
.list-header-container a.back-link {
color:#000;
display:inline-block;
position:absolute;
font-size:16px;
margin:20px 10px;
padding:10px 10px;
vertical-align:middle;
text-decoration:none;
}
.list-container,.list-header-container,.list-wrapper,a.back-link:hover,body {
color:#FFFFFF
}
.list-header-container .table-header {
margin:0;
border:0 none;
padding:30px 60px;
text-align:left;
font-weight:400;
color:#FFFFFF;
background-color:rgba(85,85,85,0.3);
/**文件列表导航条背景颜色 */
}
.list-body-container {
position:relative;
left:0;
overflow-x:hidden;
overflow-y:auto;
box-sizing:border-box;
background:rgba(85,85,85,0.3);
/**文件列表背景颜色 */
}
.more-disk {
margin:0;
border:0 none;
padding:30px 30px;
text-align:left;
font-weight:400;
color:#000;
background-color:rgba(85,85,85,0.3);
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:rgba(85,85,85,0.3);
}
.list-table tr:first-child {
background:rgba(85,85,85,0);
}
.list-table td,.list-table th {
padding:0 10px;
text-align:left;
}
.list-table .size,.list-table .updated_at {
text-align:right;
}
.list-table .file ion-icon {
font-size:15px;
/*margin-right:5px;*/
vertical-align:bottom;
}
.mask {
position:absolute;
left:0px;
top:0px;
width:100%;
background-color:#000;
filter:alpha(opacity=50);
opacity:0.5;
z-index:2;
}
<?php if ($_SERVER['admin']) {
?>
.operate {
display:inline-table;
margin:0;
list-style:none;
}
.operate ion-icon {
vertical-align:bottom;
}
.operate ul {
position:absolute;
display:none;
background:rgba(85,85,85,0.8);
border:0px #f7f7f7 solid;
border-radius:5px;
margin:-7px 0 0 0;
padding:0 7px;
color:#205D67;
z-index:1;
}
.operate:hover ul {
position:absolute;
display:inline-table;
}
.operate ul li {
padding:7px;
list-style:none;
display:inline-table;
}
.operate ul li ion-icon {
vertical-align:bottom;
}
<?php
}
?>
.operatediv {
position:absolute;
border:1px rgba(85,85,85,0.3);
background-color:rgba(85,85,85,0.3);
z-index:2;
}
.operatediv div {
margin:16px
}
.operatediv_close {
position:absolute;
right:3px;
top:3px;
}
.readme {
padding:8px;
background-color:rgba(85,85,85,0.3);
/**设置readme和head背景色 */
}
.markdown-body {
padding:20px;
text-align:left;
}
@media only screen and (max-width:480px){ @media only screen and (max-width:480px){
.more-disk{white-space:nowrap;overflow:auto;}
.title{margin-bottom:24px} .title{margin-bottom:24px}
.list-wrapper{width:95%; margin-bottom:24px;} .list-wrapper{width:95%; margin-bottom:24px;}
.list-table {padding:8px} .list-table {padding:8px}
.list-table td, .list-table th{white-space:nowrap;overflow:auto;max-width:80px} .list-table td, .list-table th{padding:0 10px;text-align:left;white-space:nowrap;overflow:auto;max-width:80px}
} }
</style> </style>
</head> </head>
<body> <body>
<div style="padding:1px"> <div style="padding:1px">
<?php <?php
@ -231,7 +384,7 @@
</li>&nbsp;&nbsp;&nbsp; </li>&nbsp;&nbsp;&nbsp;
<?php } ?> <?php } ?>
<ion-icon name="folder"></ion-icon> <ion-icon name="folder"></ion-icon>
<a id="file_a<?php echo $filenum;?>" name="filelist" href="<?php echo path_format($_SERVER['base_disk_path'] . '/' . $path . '/' . encode_str_replace($file['name']) . '/'); ?>"><?php echo str_replace('&','&amp;', $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('&','&amp;', $file['name']);?></a>
</td> </td>
<td class="updated_at" id="folder_time<?php echo $filenum;?>"><?php echo time_format($file['lastModifiedDateTime']); ?></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> <td class="size" id="folder_size<?php echo $filenum;?>"><?php echo size_format($file['size']); ?></td>
@ -524,35 +677,8 @@
</div> </div>
<?php } <?php }
} ?> } ?>
<center> <center><div style="color:#FFFFFF;"><?php echo date("Y-m-d H:i:s")." ".getconstStr('Week')[date("w")]." ".$_SERVER['REMOTE_ADDR'];
<body> ?></div></center>
<span id="date1"></span>
<script >
function $(num1) {
return num1<10?"0"+num1:num1;
}
function setTime() {
var date = new Date();
var year = date.getFullYear();
var month = date.getMonth()+1;
var day = date.getDate();
var week = date.getDay();
console.log();
var hour = date.getHours();
var minute = date.getMinutes();
var second = date.getSeconds();
var time = year+""+$(month)+'月'+$(day)+""+$(hour)+":"+$(minute)+":"+$(second);
document.getElementById("date1").innerHTML=time;
}
setTime();
setInterval('setTime()',500);
</script>
</body>
<?php
$ip = ($_SERVER["HTTP_VIA"]) ? $_SERVER["HTTP_X_FORWARDED_FOR"] : $_SERVER["REMOTE_ADDR"];
$ip = ($ip) ? $ip : $_SERVER["REMOTE_ADDR"];
echo '当前IP地址: ' ,$ip, "\n";
?></center>
</body> </body>
<?php if ($files) { ?> <?php if ($files) { ?>
<?php if ($head||$readme) { ?><link rel="stylesheet" href="//unpkg.zhimg.com/github-markdown-css@3.0.1/github-markdown.css"> <?php if ($head||$readme) { ?><link rel="stylesheet" href="//unpkg.zhimg.com/github-markdown-css@3.0.1/github-markdown.css">
@ -599,7 +725,6 @@ echo '当前IP地址: ' ,$ip, "\n";
if ($readme) { if ($readme) {
$readme.innerHTML = marked(document.getElementById('readme-md').innerText); $readme.innerHTML = marked(document.getElementById('readme-md').innerText);
} }
<?php <?php
if ($_GET['preview']) { //is preview mode. 在预览时处理 ?> if ($_GET['preview']) { //is preview mode. 在预览时处理 ?>
var $url = document.getElementById('url'); var $url = document.getElementById('url');