OneManager-php/theme/tfo.html

2680 lines
173 KiB
HTML
Raw Normal View History

2021-02-08 11:44:38 +00:00
<!--IconValuesStart-->
{
2023-03-11 09:22:40 +00:00
"music":"musical-notes-outline",
"video":"videocam-outline",
"img":"image-outline",
"office":"newspaper-outline",
"txt":"reader-outline",
"zip":"albums-outline",
"iso":"disc-outline",
"apk":"logo-android",
"exe":"logo-windows",
"default":"document-outline"
2021-02-08 11:44:38 +00:00
}
<!--IconValuesEnd-->
2023-03-11 09:22:40 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2021-02-08 11:44:38 +00:00
<html lang="<!--constStr@language-->">
2023-03-11 09:22:40 +00:00
2021-02-08 11:44:38 +00:00
<head>
<title><!--Title--></title>
<meta charset=utf-8>
<meta http-equiv=X-UA-Compatible content="IE=edge">
2021-07-11 11:47:54 +00:00
<meta name=viewport content="width=device-width,initial-scale=1,user-scalable=no,viewport-fit=cover">
2021-02-08 11:44:38 +00:00
<meta name="keywords" content="<!--Keywords-->">
2021-07-11 11:47:54 +00:00
<meta name="description" content="Theme by Tfo for OneManager-php" />
2021-02-08 11:44:38 +00:00
<link rel="icon" href="<!--base_path-->favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="<!--base_path-->favicon.ico" type="image/x-icon">
<style type="text/css">
2023-03-11 09:22:40 +00:00
@font-face {
font-family: "sft";
src: url(data:font/woff2;charset=utf-8;base64,d09GMgABAAAAAJIsABIAAAABqkQAAJHEAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGkobgZYqHI9eBmAAhy4IbAmCYREQCoTWOISaKQuJYAABNgIkA5M8BCAFhQUHolgMgwJbFoaRADLvb8VY8W1VbwYef5Aatk0bOndLgTsqwlkxjjmA8wBC/Z+8M9n/////uckkjt323G3/IiFSJdCThCCoQIhZM5HImmgcdMux3siJqCGMwl2a7w6nB5ZVNjrfOqgFi1ls6sl9N3ncdz5eJgfkad4RmCRTITrVqGyaxY+dvy67zI6Pp7M48Xt/kR5ZPUk4dXxqVPM7vhWJen9dQ7P5LNz6d2HGFmYoYO9Ou/jVDnIC9DMSYdIJT8Wne5w4PCI9rn05cfK0LNiIoEM6s0SHXWqZZWo4YqUn0D3o5SRvv1TQFgwYsX4eSnOZiDBpIsKcacLe+AdpXmnCkUpWj6BdadIJXawyIYQ9QE9lrXDCc6fwGoft09oHrbODLln+n+tgM8cxf9eEVky6UwfsoOH02t8Lyas9Cj9cMnqyhjJuL9DIWkeuPPny/PN2RefdP+Pu2VqQiCAHGSMrAyOhjic3+3lvF0RExL4iIRsFRFgQkeiKSNZOKApK7BVLJ5208hNzpaa0YnLJtWpyzeSa1+r3crXx/Mfe/7n2Pnfug66aYlD/o0oVGgsaR0+iRJSOMFEmLkbH5gzQ3AI5C8ERI0bKqNqawcbibnm3SG7bsYBt5MjRKumLVYiRmK+Yjf3Cv36qL+rrJ+hb9eG90z1zWBTY2CpFpcLoqZG8KIREhjL+mClrdl/nJX/m7EvSE9mW5WfgJE5it3vanR8N4G0ZzheCDzP3pV7iXmLVXVjRmR2gB+AqFEzP/5yzRu6u9P/Vkp9OOqRkSMJPYknpVzdvBkHMbbHt+kqmVLhOK97JkMQmIj9FzEJn6TAnLexImgMRLsH9Pw4hly5KF7X95/dz/76tiymQitrE7SA6uaWRR0jUskGdKveUlq+EcKWAklwAOAf8HEUOgsNlkB0TL4r9GJ6Xy+XKykglshJ5iVQilUhlpBIJ9G8XTi4ZecndyueVyhJVGi9IFQpmb8rNMkXOlAUWsrAci0QgcMmc+pei3n0nKhWQ9068Y/qUP/0X3a3Mmaw0IqPp6kJd3ZiOoQD+NVrLWTigByoBbBGEihFzWha1yXzT1U9gIaGnTCZlehpJJ2xo5eSpO2H+WyPOim93UYrnMRLov1SzIUHQwezQOWGdkfUDnXOML7sgvMpXYf5+awqKEzKAg5FbCvWKWB0sGSB+DoaCU+OLJejRYZ2938YcIWTlqBvbj35qzgBKeQOptbju7kjCZ0kn29hHHOVK9Q/8wm9qK3YOzOA2ScRGCU/h6e2hYXY3/ENEnw1T/Eq+dYIxJRyH8fX9SVflv2JVsUoqAbak7unpYQPxZg53Dbk3Ns2ZcJwSxreGyBxk5yCD/znyBdnBP9/YrzqPC54G6WQaKVIaIX6x4WE2ZxLNVqWZnU6I2zZ01dNNW9uUtlT8aGovXftSCwwjvSMuvx3pfWstp9QCsGZnV3s++ey0xmEQD6VS0ilqJ/pLeELv3AQUxhhwwltAug2K/71Nq/S3oU5alMdHMAuu8uqOg2gBk/jSq7z79Ze6//9qqYUjtYzSgGBAlgZkeUFq2Vst2RpAe9azgJ5ZJmmGPQuGA0CKMIkvCynI7tILo8uiS0L0/9/SzPS+Xyjqf5DsM/U52x5tkYNsmj2zJ4lDByH46gMfrF8FklUFUI1F9ADN3o+nzZbknpYXVn1SQwCUpilqZGrxGjpy6mzZ9yS3g8z3Tn3p6e70l/4etBtg56OGBRZBD3lK+sOxu/ZgDgssgKV9vLioEJSHh2Omi//Wf2sgr6SkXZVACh7hLftp3ySIWNG2gqEWOUFA31hfY0K5JXWyYD/tQ3ISDgkiQXonfv//0j5d2J7PrdX7WxV9USNGxBh5I0aMiLXmZk9PYn3v87MQOURkEREZQhiCbFG96v78zZqgawaZNk0txIBHCLKmdPfuD1vMI/kFdkTUJcVpGar2758065w4jc/DPIEkQM52P6Z9z1xtu/ltW0miJjYUlDIDDEVv//sowIcP96eA9/eqSgF8/FISBwgYAOvJhQVBSYKirgaOtkYoaW2H05ESKJ0phdOVKggJBKjtR0zxakVusZXTC9Ivi4d8oPox1NYDxj+aRvrAigT/D139n7Pr+COH+kAQZQ/jk7hDEeWN5aINWP6B7L60M0PFoL9hla9Yo24jVlhrswkrYDG7Qy0gxBKSEorHg8QsnESwOpGKD4G5VQfhsKs7xaX4yjhAsUb3yjx88Vgd+vyc/lN+T62pxxExyWcWixJHKp5cIqU1JuxPBa/3l0GCNd5nvKyKA/S5tydG0x18/14Sw3F9LNuH+fMp+CpYap4D4MtFQjRiw8b7mTr7eRnzmpGZV8bby8gso389ccGy6wOMGo4FTZ9zYNCTIC44k0zyeADfJj8xT3TiwW54Z4BncDpmIh35MZClP9lfIHB/kjgzTlHep4nJrjZKyufPJcqCjb389EdcUpDpj/uofe331uRzxbZJe6MYnumY8MvMLb5F9rFPME9AZZInm6icmeqw2UUFPZdFnfVguUmszHcMd/0PsuPk6e7eHka9eHnbqZx1WPup0ioRQfxskYgpsa0xEEQnMuSmQpspfb64fA+9UYh7W1I+DL1ddM/hizOIt45+5k0IBwNzEgS+bZV9cKoPfxSQtjaoqoo8ymXC7//Ig5dzfm1IDt3hiMexztAmN4WSMNacnpzGRv+Q5AEtUX2h5SAVLMYR/hyIU5KnU1kez/gDqVR6irq8wdX58odNhcMBmrjS6eiTt+u5O0CI4eTb5kywPyZEt7p7BEoJ1sTxpIC2SyiqYYK6KHowsV27UX6cLcfZVmfR6hQtF0PwKZJOUWVQHVQDKCWoY4epdbqE6uBxkpatrhdxmq4xr0mOtIDemBk2CMsIS9JM0uu60uy6/MYYPZ2ChiKm/Wr7l9zvwbmjvkcr3jebWjFUUv7riI7sHk1ZLaivfFpbQg1WnLU0hiMObPCEVLuKTPmL5XcyP9VfebwxNjXoa88FhKLI0yG2Mkj0P23CJ6MQA2Kc4TLR2EEIGiyLZbPDujhcnoJR1u0b8tL1xHCrzCvrOM1gzzVAlqDWmhXHy8EBq8BwZlEobSGXhJMeWbsIqxGFfyIueAh/5oxFoBocgJRZlDUhDEQUJ6j15prf6kaeKqE7s3FXQAZRW68KyIqRBwVl8sNfDW8LsZ5D9tf7R9hD53qVW/TzmL0rq6cfma6fyGyAoAXGqY4chEGbS7NSrdRTwoTyjWAxHXo5LEs1A/RtavfbEWOhlFBYmxJQG3FLP/hq5ZDodQJ1yaWrGF6acsv+nxjbh+TYCQwLon9991p4Ln4Kwj4uknP7Yl2as0tap9GXsPtE1vmtPM9g+Rmi8D5yD6jMoU3EYplKsM2f6TFxpG1+YLjZyD3CUROfnbOdKT/ebAF94DAS0srIkLau8mrFbI1qGjzqMHBMXChgiprXwaao74p6ocZ9XrJuT/NH9N86/wRdRvnd0XXsIZT3RG1T4P4D1zv6fnLmSdV8vhAZUwaiOS3LeOExFeic60JAkKMhQVVicjUQzYVXx7c3T3IvjyZVvZ5uRz4AkLga0R2n7qCka/aLS1eJ/B4A7Tq0318Hm28UFWD1HiN1Wvl6Of/RMN2fnzkeqbf+wYZc8aF/aOV8YHWCSyUlHay54Ql0yAVz+dbOCYGylY+IkFhFLRHRtJD9vKbC2vhWz9Np+Kmqys92XRyqABcJmSKNRBgm4A0ig3OisftS872XHrvOPUGZL6Dpl7KS4iDIkzDJxppSPlwWzlnB9E77kOewHhRsVRF1z/W1tE2DuDrWv22OzSeWoyxWdWbO5MSq8BpRtEUX2900PkTOJrjaNnsX1fdLi5U8RBvf/gQ3mgO5OtRmrnZ3QA/6/1nmI2dbccFSPmIaGL1OwwQaiZVcFE+XvCmfJ
}
body {
font-family: 'sft', '-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif', Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1em;
color: #000;
background-color: transparent;
padding-top: env(safe-area-inset-top);
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
padding-bottom: env(safe-area-inset-bottom);
}
a {
color: #24292e;
cursor: pointer;
text-decoration: none;
white-space: nowrap;
}
ion-icon {
font-size: 20px;
vertical-align: middle;
}
.changelanguage {
position: absolute;
right: 5px;
display: none;
}
.title {
text-align: center;
margin: 0 auto 1rem;
letter-spacing: 1px;
text-shadow: 0 1px 15px rgba(27, 31, 35, 1);
text-decoration: none;
transition-duration: 0.3s;
border: 1px solid rgba(27, 31, 35, 0);
height: 10px;
padding: 1rem 1rem 1.4rem 1rem;
overflow: hidden;
width: fit-content;
border-radius: 36px;
}
.title:hover {
text-shadow: 0 1px 15px rgba(27, 31, 35, 0);
background-color: rgba(200, 200, 200, .6);
box-shadow: 0 1px 15px rgba(27, 31, 35, .15);
}
.title a {
color: #FFFFFF;
text-decoration: none;
}
#title a {
font-size: xx-large
}
.list-wrapper {
width: 88%;
margin: 0 auto 10px;
position: relative;
overflow: hidden;
border-radius: 16px;
box-shadow: 0 1px 15px rgba(27, 31, 35, .15);
border: 1px solid rgba(27, 31, 35, .15);
}
.list-header-container {
overflow: hidden;
background: linear-gradient(to right, rgb(3, 102, 214, 0.9), rgba(3, 102, 214, 0.3))
}
.list-body-container,
.list-header-container,
.list-wrapper,
body {
color: #24292e
}
.table-header {
margin: 0;
border: 0 none;
padding: 16px 24px;
text-align: left;
font-weight: 400;
word-break: break-all;
word-wrap: break-word;
color: #24292e;
line-height: 1.3;
font-size: 18px
}
.list-body-container {
left: 0;
overflow-x: hidden;
overflow-y: auto;
box-sizing: border-box;
background: rgba(245, 245, 245, 0.69)
}
.more-disk {
margin: 0;
border: 0 none;
font-weight: 400;
color: #000;
padding: 12px 12px;
text-align: center;
line-height: 32px;
}
.more-disk a {
margin: 0 2px;
padding: 5px;
transition-duration: 0.3s;
border-radius: 18px;
background-color: transparent;
color: #24292e;
border: 2px solid rgba(85, 85, 85, 0.7);
border: 1px solid rgba(27, 31, 35, 0);
font-size: 16px;
}
.more-disk a:hover,
.more-disk a[now] {
background: rgba(245, 245, 245, 0.3);
color: #FFFFFF;
border: 1px solid rgba(27, 31, 35, .15);
box-shadow: 0 1px 15px rgba(27, 31, 35, .15)
}
.list-table {
width: 100%;
padding: 0 10px 10px 10px;
border-spacing: 0;
overflow: hidden;
table-layout: fixed
}
.list-table tr {
color: #24292e;
height: fit-content;
float: left;
width: 100%;
transition-duration: 0.3s;
border-radius: 16px
}
.list-table tr[data-to]:hover {
color: white !important;
background: linear-gradient(to right, rgb(3, 102, 214, 0.9), rgba(3, 102, 214, 0.3));
box-shadow: 0 1px 15px rgba(27, 31, 35, .15)
}
.list-table tr[data-to]:hover a {
color: white;
transition-duration: 0.3s
}
.list-table tr:first-child {
background: rgba(245, 245, 245, 0)
}
.list-table td,
.list-table th {
text-align: left
}
.list-table td.updated_at,
.list-table th.updated_at {
width: 15%;
}
.list-table td.file,
.list-table th.file {
width: 72%;
}
.list-table td.size,
.list-table th.size {
width: 10%;
}
.list-table td,
.list-table th {
padding: 0 8px;
text-align: left;
float: left;
line-height: 32px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis
}
.list-table td button,
.list-table th button,
.swal-button {
border-radius: 16px;
transition-duration: 0.3s;
cursor: pointer;
color: #24292e;
height: 24px;
padding: 0 8px;
background: transparent;
border: 1px solid rgba(27, 31, 35, 0);
font-weight: bold;
}
.list-table td button:hover,
.list-table th button:hover,
.swal-button:hover {
color: #FFF;
background: rgba(3, 102, 214, 0.6);
border: 1px solid rgba(27, 31, 35, .15);
box-shadow: 0 1px 15px rgba(27, 31, 35, .15);
}
.list-table .size,
.list-table .updated_at {
text-align: right
}
.mask {
position: absolute;
left: 0px;
top: 0px;
width: 100%;
background-color: #000;
filter: alpha(opacity=30);
opacity: 0.3;
z-index: 6;
}
<!--AdminStart-->.operate {
display: inline-table;
margin-right: 3px;
list-style: none
}
.operate ul {
position: absolute;
display: none;
background: #FFFFFF;
transition-duration: 0.3s;
box-shadow: 0 1px 15px rgba(27, 31, 35, .15);
border: 1px solid rgba(27, 31, 35, .15);
border-radius: 32px;
margin: -7px 0 0 0;
padding: 0 3px;
color: #205D67;
z-index: 5;
}
.operate ul li {
padding: 6px;
list-style: none;
display: block;
float: left;
font-size: 0px;
line-height: 16px;
}
.operate:hover ul {
position: absolute;
display: inline-table;
}
body .active ul {
position: absolute;
display: inline-table;
}
/*for some mobile browser */
#opflow:hover ul {
position: fixed;
display: inline-table;
}
.list-table tr[data-to]:hover .operate ul li a {
color: #24292e
}
<!--AdminEnd-->.operatediv {
position: absolute;
border: 0px #CCCCCC;
box-shadow: 0 1px 15px rgba(27, 31, 35, .15);
border: 1px solid rgba(27, 31, 35, .15);
transition-duration: 0.3s;
border-radius: 6px;
background-color: white;
color: #24292e;
z-index: 7;
}
.operatediv div {
margin: 16px
}
.operatediv_close {
position: absolute;
right: 3px;
top: 3px;
}
.markdown-body,
.customfile {
padding: 24px;
text-align: left;
font-size: 14px !important;
font-family: 'sft' !important
}
.bkgd {
<!--BackgroundStart-->background-repeat: no-repeat;
background-size: cover;
background-attachment: fixed;
background-image: url("<!--BackgroundUrl-->");
background-position: center;
width: 100%;
height: 100%;
filter: blur(1px)brightness(88%);
position: fixed;
left: 0;
top: 0;
z-index: -1;
<!--BackgroundEnd-->
}
::selection {
background-color: rgba(200, 200, 200, 0.5)
}
input {
font-family: 'sft';
cursor: pointer;
padding: 0 8px;
height: 24px;
font-weight: bold;
border: 1px solid rgba(27, 31, 35, 0);
transition-duration: 0.3s;
border-radius: 16px;
background-color: transparent;
color: #24292e
}
input:focus {
background: rgba(3, 102, 214, 0.6);
color: #FFF;
box-shadow: 0 1px 15px rgba(27, 31, 35, .15);
border: 1px solid rgba(27, 31, 35, .15);
}
textarea {
font-weight: bold;
border: 1px solid rgba(27, 31, 35, 0);
transition-duration: 0.3s;
border-radius: 6px;
background-color: transparent;
color: #24292e;
resize: none;
}
textarea:focus {
box-shadow: 0 1px 15px rgba(27, 31, 35, .15);
}
.txt-right,
.vlink {
display: none !important;
}
#password1 {
width: 90%;
}
.vheader {
border-bottom: 0px !important;
}
.vinput {
border: 1px solid rgba(27, 31, 35, 0) !important;
width: 50% !important;
}
.vinput:focus {
background: transparent !important;
border: 1px solid rgba(27, 31, 35, .15) !important;
}
.vpower {
display: none;
}
.v[data-class=v] .vheader .vheader-item:not(:last-child) {
border: 0 !important;
}
.veditor:focus {
background: transparent !important;
border: 1px solid rgba(27, 31, 35, .15) !important;
}
.veditor {
border: 1px solid rgba(27, 31, 35, 0) !important;
height: fit-content !important;
width: 98.5% !important;
}
.vwrap {
border: 0 !important;
padding: 0 !important;
}
p,
.veditor,
.v,
.vsys,
.vtime,
.vcontent,
.vinput,
.vbtn,
.vlogin-btn {
color: #24292e !important;
}
.vbtn {
border-color: #24292e !important;
}
.vicon {
fill: #24292e !important;
}
.v a {
color: rgb(3, 102, 214) !important;
}
.vat {
font-style: italic !important;
}
.vpanel {
background: transparent !important;
border: 0px !important
}
.vcard,
.vh,
.vquote {
padding: 0px !important;
border: 0px !important
}
.vlogin-btn {
width: fit-content !important;
height: fit-content !important;
border: 0 !important
}
.v[data-class=v] * {
line-height: 1.35 !important;
}
.leancloud_visitors {
float: right !important;
padding: 16px !important;
}
#vcomments {
padding: 16px !important;
}
#upload_div table tr {
border-radius: 6px !important;
}
#upload_div {
margin: 10px
}
#pdf-d canvas {
width: 100%;
}
#curpath {
font-size: 16px;
transition-duration: 0.3s;
box-shadow: 0 1px 8px rgba(27, 31, 35, 0.8);
}
#create_input {
width: 94%;
}
.login {
position: fixed;
bottom: 8px;
left: 8px;
z-index: 5
}
#opflow {
position: fixed;
bottom: 8px;
left: 8px;
z-index: 5
}
::-webkit-scrollbar {
width: 6px;
border-radius: 2px;
transition-duration: 0.3s;
}
::-webkit-scrollbar-thumb {
width: 6px;
background-color: rgba(200, 200, 200, 0.5);
border-radius: 2px;
}
::-webkit-scrollbar-track {
width: 6px;
background: transparent
}
.swal-title {
margin: 0px;
font-size: 20px;
padding: 6px 16px;
}
.swal-icon {
margin: 6px auto;
}
.swal-icon:first-child {
margin-top: 12px;
}
.swal-text {
font-size: 14px;
line-height: 1.3;
padding: 0px 6px;
}
.swal-footer {
margin-top: 0px;
padding: 0px 16px 8px;
}
.swal-modal {
margin: 6px auto;
border-radius: 6px
}
.swal-title:not(:last-child) {
margin-bottom: 0px
}
@media only screen and (max-width:1856px) {
.list-table td.file,
.list-table th.file {
width: 72%
}
.list-table td.size,
.list-table th.size {
width: 70px !important
}
.list-table td.updated_at,
.list-table th.updated_at {
width: 140px !important
}
}
@media only screen and (max-width:1448px) {
.list-table td.file,
.list-table th.file {
width: 71%
}
.list-table td.size,
.list-table th.size {
width: 70px !important
}
.list-table td.updated_at,
.list-table th.updated_at {
width: 140px !important
}
}
@media only screen and (max-width:1152px) {
.list-table td.file,
.list-table th.file {
width: calc(95% - 220px)
}
.list-table td.size,
.list-table th.size {
width: 70px !important
}
.list-table td.updated_at,
.list-table th.updated_at {
width: 140px !important
}
}
@media only screen and (max-width:925px) {
.list-table td.file,
.list-table th.file {
width: calc(94% - 220px)
}
.list-table td.size,
.list-table th.size {
width: 70px !important
}
.list-table td.updated_at,
.list-table th.updated_at {
width: 140px !important
}
}
@media only screen and (max-width:781px) {
.list-table td.file,
.list-table th.file {
width: calc(93% - 220px)
}
.list-table td.size,
.list-table th.size {
width: 70px !important
}
.list-table td.updated_at,
.list-table th.updated_at {
width: 140px !important
}
}
@media only screen and (max-width:679px) {
.list-table td.file,
.list-table th.file {
width: calc(92% - 220px)
}
.list-table td.size,
.list-table th.size {
width: 70px !important
}
.list-table td.updated_at,
.list-table th.updated_at {
width: 140px !important
}
}
@media only screen and (max-width:605px) {
.list-table td.file,
.list-table th.file {
width: calc(91% - 220px)
}
.list-table td.size,
.list-table th.size {
width: 70px !important
}
.list-table td.updated_at,
.list-table th.updated_at {
width: 140px !important
}
}
@media only screen and (max-width:542px) {
.list-table td.file,
.list-table th.file {
width: calc(90% - 220px)
}
.list-table td.size,
.list-table th.size {
width: 70px !important
}
.list-table td.updated_at,
.list-table th.updated_at {
width: 140px !important
}
}
@media only screen and (max-width:495px) {
<!--BackgroundMStart-->.bkgd {
background-repeat: no-repeat;
background-size: cover;
background-attachment: fixed;
background-image: url("<!--BackgroundMUrl-->");
}
<!--BackgroundMEnd-->#preview-div iframe {
width: 200% !important;
-ms-zoom: 0.5;
-moz-transform: scale(0.5);
-moz-transform-origin: 0 0;
-o-transform: scale(0.5);
-o-transform-origin: 0 0;
-webkit-transform: scale(0.5);
-webkit-transform-origin: 0 0;
}
.title {
margin-bottom: 24px
}
.list-wrapper {
width: 98%;
}
.list-table {
padding: 8px
}
.list-table td,
.list-table th {
white-space: nowrap;
overflow: auto;
text-overflow: unset
}
.size,
.updated_at {
display: none
}
.list-table td.file,
.list-table th.file {
width: 95%;
}
#title a {
font-size: x-large
}
2021-02-08 11:44:38 +00:00
}
</style>
<!--customCss-->
2022-10-17 15:15:57 +00:00
<script src="https://test1.jsdelivr.net/npm/sweetalert@2.1.2/dist/sweetalert.min.js"></script>
<script src="https://test1.jsdelivr.net/npm/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>
<script src="https://test1.jsdelivr.net/npm/@waline/client/dist/Waline.min.js"></script>
2021-02-08 11:44:38 +00:00
</head>
2023-03-11 09:22:40 +00:00
2021-02-08 11:44:38 +00:00
<body>
2023-03-11 09:22:40 +00:00
<script
language="javascript">window.onload = function () { var colorList = ["linear-gradient(to right,rgba(169,221,204,0.9),rgba(169,221,204,0.3))", "linear-gradient(to right,rgba(255,104,103,0.9),rgba(255,104,103,0.3))", "linear-gradient(to right,rgba(128,155,156,0.9),rgba(128,155,156,0.3))", "linear-gradient(to right,rgba(0,204,203,0.9),rgba(0,204,203,0.3))", "linear-gradient(to right,rgba(246,197,0,0.9),rgba(246,197,0,0.3))", "linear-gradient(to right,rgba(76,218,100,0.9),rgba(76,218,100,0.3))", "linear-gradient(to right,rgba(244,67,54,0.9),rgba(244,67,54,0.3))", "linear-gradient(to right,rgba(233,30,99,0.9),rgba(233,30,99,0.3))", "linear-gradient(to right,rgba(156,39,176,0.9),rgba(156,39,176,0.3))", "linear-gradient(to right,rgba(103,58,183,0.9),rgba(103,58,183,0.3))", "linear-gradient(to right,rgba(63,81,181,0.9),rgba(63,81,181,0.3))", "linear-gradient(to right,rgba(33,150,243,0.9),rgba(33,150,243,0.3))", "linear-gradient(to right,rgba(3,169,244,0.9),rgba(3,169,244,0.3))", "linear-gradient(to right,rgba(0,188,212,0.9),rgba(0,188,212,0.3))", "linear-gradient(to right,rgba(0,150,136,0.9),rgba(0,150,136,0.3))", "linear-gradient(to right,rgba(76,175,80,0.9),rgba(76,175,80,0.3))", "linear-gradient(to right,rgba(139,52,171,0.9),rgba(139,52,171,0.3))", "linear-gradient(to right,rgba(205,220,57,0.9),rgba(205,220,57,0.3))", "linear-gradient(to right,rgba(197,183,60,0.9),rgba(197,183,60,0.3))", "linear-gradient(to right,rgba(228,173,8,0.9),rgba(228,173,8,0.3))", "linear-gradient(to right,rgba(255,87,34,0.9),rgba(255,87,34,0.3))", "linear-gradient(to right,rgba(121,85,72,0.9),rgba(121,85,72,0.3))", "linear-gradient(to right,rgba(96,125,139,0.9),rgba(96,125,139,0.3))"]; var div = document.getElementsByClassName("list-header-container"); for (var i = 0; i < div.length; i++) { var bgColor = getColorByRandom(colorList); div[i].style.background = bgColor } function getColorByRandom(colorList) { var colorIndex = Math.floor(Math.random() * colorList.length); var color = colorList[colorIndex]; colorList.splice(colorIndex, 1); return color } }</script>
2021-02-08 11:44:38 +00:00
<div class="bkgd"></div>
2021-02-25 07:07:50 +00:00
<div class="ld" style="left:0;top:0;z-index:2;width:100%;height:100%;background:rgb(243,243,243);">
2023-03-11 09:22:40 +00:00
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
style="z-index:2;transform: rotate(30deg);position:fixed;left:0;bottom:0;margin: auto; display: block; shape-rendering: auto;"
width="36px" height="36px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
<path fill="none" stroke="rgb(233,30,99)" stroke-width="10"
stroke-dasharray="128.29446411132812 128.29446411132812"
d="M24.3 30C11.4 30 5 43.3 5 50s6.4 20 19.3 20c19.3 0 32.1-40 51.4-40 C88.6 30 95 43.3 95 50s-6.4 20-19.3 20C56.4 70 43.6 30 24.3 30z"
stroke-linecap="round" style="transform:scale(0.5);transform-origin:50px 50px">
<animate attributeName="stroke-dashoffset" repeatCount="indefinite" dur="2.0408163265306123s"
keyTimes="0;1" values="0;256.58892822265625"></animate>
</path>
</svg><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
style="z-index:3;transform: rotate(90deg);position:fixed;left:0;bottom:0;margin: auto; display: block; shape-rendering: auto;"
width="36px" height="36px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
<path fill="none" stroke="rgb(76,175,80)" stroke-width="10"
stroke-dasharray="128.29446411132812 128.29446411132812"
d="M24.3 30C11.4 30 5 43.3 5 50s6.4 20 19.3 20c19.3 0 32.1-40 51.4-40 C88.6 30 95 43.3 95 50s-6.4 20-19.3 20C56.4 70 43.6 30 24.3 30z"
stroke-linecap="round" style="transform:scale(0.5);transform-origin:50px 50px">
<animate attributeName="stroke-dashoffset" repeatCount="indefinite" dur="2.0408163265306123s"
keyTimes="0;1" values="0;256.58892822265625"></animate>
</path>
</svg><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
style="z-index:4;transform: rotate(150deg);position:fixed;left:0;bottom:0;margin: auto; display: block; shape-rendering: auto;"
width="36px" height="36px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
<path fill="none" stroke="rgb(3,169,244)" stroke-width="10"
stroke-dasharray="128.29446411132812 128.29446411132812"
d="M24.3 30C11.4 30 5 43.3 5 50s6.4 20 19.3 20c19.3 0 32.1-40 51.4-40 C88.6 30 95 43.3 95 50s-6.4 20-19.3 20C56.4 70 43.6 30 24.3 30z"
stroke-linecap="round" style="transform:scale(0.5);transform-origin:50px 50px">
<animate attributeName="stroke-dashoffset" repeatCount="indefinite" dur="2.0408163265306123s"
keyTimes="0;1" values="0;256.58892822265625"></animate>
</path>
</svg>
</div>
2021-02-08 11:44:38 +00:00
<div style="padding:1px" id="top-div">
2023-03-11 09:22:40 +00:00
<!--TfoButton-->
<!--LoginStart-->
<a class="login" href="<!--IsPreview?-->login=admin"><ion-icon
name="ellipse-outline"></ion-icon></a><!--onclick="login();"-->
<!--LoginEnd-->
<!--AdminStart-->
<li class="operate" id="opflow"><ion-icon name="ellipse-outline"></ion-icon>
<ul>
<!--IsFolderStart-->
<li><a onclick="showdiv(event,'create','');"><ion-icon
name="add-circle-outline"></ion-icon><!--constStr@Create--></a></li>
<li><a onclick="showdiv(event,'encrypt','');"><ion-icon
name="lock-closed-outline"></ion-icon><!--constStr@Encrypt--></a></li>
<li><a href="?RefreshCache"><ion-icon name="refresh-outline"></ion-icon><!--constStr@RefreshCache--></a>
</li>
<!--IsFolderEnd-->
<!--IsFileStart-->
<!--IstxtFileStart-->
<li id="txt-edit-li"><a
onclick="document.getElementById('txt-a').readOnly='';document.getElementById('txt-save').style.display='';document.getElementById('txt-save-li').style.display='';document.getElementById('txt-editbutton').style.display='none';document.getElementById('txt-edit-li').style.display='none';document.getElementById('txt-cancelbutton').style.display='';document.getElementById('txt-cancel-li').style.display='';"
id="txt-editbutton"><ion-icon name="create-outline"></ion-icon><!--constStr@ClicktoEdit--></a>
</li>
<li id="txt-cancel-li" style="display:none;"><a
onclick="document.getElementById('txt-a').readOnly='readonly';document.getElementById('txt-save').style.display='none';document.getElementById('txt-save-li').style.display='none';document.getElementById('txt-editbutton').style.display='';document.getElementById('txt-edit-li').style.display='';document.getElementById('txt-cancelbutton').style.display='none';document.getElementById('txt-cancel-li').style.display='none';"
id="txt-cancelbutton" style="display:none"><ion-icon
name="close-outline"></ion-icon><!--constStr@CancelEdit--></a></li>
<li id="txt-save-li" style="display:none;"><a id="txt-save" style="display:none"><ion-icon
name="save-outline"></ion-icon><!--constStr@Save--></a></li>
<!--IstxtFileEnd-->
<li><a href="<!--FileEncodeUrl-->"><ion-icon name="cloud-download-outline"
style="line-height: 16px;vertical-align: middle;"></ion-icon>&nbsp;<!--constStr@Download--></a>
</li>
<!--IsFileEnd-->
<li><a href="<!--IsPreview?-->setup"><ion-icon
name="settings-outline"></ion-icon><!--constStr@Setup--></a></li>
<li><a onclick="tminf();"><ion-icon name="heart-circle-outline"></ion-icon><!--constStr@Theme--></a>
</li>
<li><a onclick="logout();"><ion-icon name="log-out-outline"></ion-icon><!--constStr@Logout--></a></li>
</ul>
</li>
<!--AdminEnd-->
2021-02-08 11:44:38 +00:00
&nbsp;
2022-10-17 15:15:57 +00:00
<!--<select class="changelanguage" name="language" onchange="changelanguage(this.options[this.options.selectedIndex].value)">
2021-02-08 11:44:38 +00:00
<option value="">Language</option>
<!--SelectLanguageStart-->
2023-03-11 09:22:40 +00:00
<option value="<!--SelectLanguageKey-->" <!--SelectLanguageSelected-->><!--SelectLanguageValue--></option>
<!--SelectLanguageEnd-->
2022-10-17 15:15:57 +00:00
</select>-->
2021-02-08 11:44:38 +00:00
</div>
2023-03-11 09:22:40 +00:00
<!--NeedUpdateStart-->
<div style='position:absolute;top:8px'>
<font color='red'><!--constStr@NeedUpdate--></font>
</div>
<!--NeedUpdateEnd-->
<h1 class="title" id="title">
2021-02-08 11:44:38 +00:00
<a href="<!--base_path-->"><!--Sitename--></a>
</h1>
2023-03-11 09:22:40 +00:00
<!--MultiDiskAreaStart-->
2022-10-17 15:15:57 +00:00
<div class="list-wrapper">
2021-07-11 11:47:54 +00:00
<div class="list-header-container" style="box-shadow:0 1px 8px rgba(27,31,35,0.8);">
2023-03-11 09:22:40 +00:00
<div class="more-disk">
<!--MultiDisksStart-->
<a href="<!--MultiDisksUrl-->" <!--MultiDisksNow-->><!--MultiDisksName--></a>
<!--MultiDisksEnd-->
2021-02-08 11:44:38 +00:00
</div>
</div>
2023-03-11 09:22:40 +00:00
</div>
<!--MultiDiskAreaEnd-->
<!--HeadomfStart-->
2021-02-08 11:44:38 +00:00
<div class="list-wrapper" id="head-om-div">
2023-03-11 09:22:40 +00:00
<div class="list-body-container">
<div class="readme">
<div class="customfile" id="head-om">
<!--HeadomfContent-->
2021-02-08 11:44:38 +00:00
</div>
</div>
</div>
2023-03-11 09:22:40 +00:00
</div>
<!--HeadomfEnd-->
<!--HeadmdStart-->
2021-02-08 11:44:38 +00:00
<div class="list-wrapper" id="head-div">
2023-03-11 09:22:40 +00:00
<div class="list-body-container">
<div class="readme">
<div class="markdown-body" id="head">
<textarea id="head-md" style="display:none;"><!--HeadmdContent--></textarea>
2021-02-08 11:44:38 +00:00
</div>
</div>
</div>
2023-03-11 09:22:40 +00:00
</div>
<!--HeadmdEnd-->
<!--ListStart-->
2021-02-08 11:44:38 +00:00
<div class="list-wrapper" id="list-div">
2023-03-11 09:22:40 +00:00
<div class="list-header-container" id="curpath">
<h3 class="table-header"><!--DiskPathArrayStart--> / <a
href="<!--PathArrayLink-->"><!--PathArrayName--></a><!--DiskPathArrayEnd--></h3>
</div>
<div class="list-body-container">
<!--EncryptedStart-->
<div style="padding:20px">
<center>
<form action="" method="post">
<input id="password1" name="password1" type="password"
placeholder="<!--constStr@InputPassword-->">
<input type="submit" value="<!--constStr@Submit-->">
</form>
2021-02-08 11:44:38 +00:00
</center>
2023-03-11 09:22:40 +00:00
</div>
<!--EncryptedEnd-->
<!--GuestUploadStart-->
<div id="upload_div" style="margin:6px 0 16px 0">
2021-02-08 11:44:38 +00:00
<div id="upload_btns" align="center">
<select onchange="document.getElementById('upload_file').webkitdirectory=this.value;">
<option value=""><!--constStr@UploadFile--></option>
<option value="1"><!--constStr@UploadFolder--></option>
</select>
<input id="upload_file" type="file" name="upload_filename" multiple="multiple">
<input id="upload_submit" onclick="preup();" value="<!--constStr@Upload-->" type="button">
</div>
2023-03-11 09:22:40 +00:00
</div>
<!--GuestUploadEnd-->
<!--IsFileStart-->
<div style="margin: 12px 4px 4px; text-align: center">
<div style="margin: 24px">
<script type="text/javascript">
window.onload = function () {
var strFullPath = window.document.location.href;
2021-02-08 11:44:38 +00:00
var strPath = window.document.location.pathname;
var pos = strFullPath.indexOf(strPath);
var prePath = strFullPath.substring(0, pos);
2021-02-25 07:07:50 +00:00
var width = window.innerWidth;
2021-02-08 11:44:38 +00:00
// var postPath = strPath.substring(0, strPath.substr(1).indexOf('/') + 1);
2023-03-11 09:22:40 +00:00
document.getElementById("url").value = prePath + "<!--FileEncodeUrl-->";
2021-02-25 07:07:50 +00:00
// document.getElementById("url").value= prePath + postPath + "<!--FileEncodeUrl-->";
2023-03-11 09:22:40 +00:00
if (width < 495) {
if (document.getElementById("office-a")) {
document.getElementById("preview-div").style.height = "320px";
2022-10-17 15:15:57 +00:00
}
2023-03-11 09:22:40 +00:00
}
}
</script>
<input id="url" title="url" type="url" style="width: calc(100% - 60px); margin: 3px;" value=""
readonly>
<a href="<!--FileEncodeUrl-->"><ion-icon name="cloud-download-outline"
style="line-height: 16px;vertical-align: middle;"></ion-icon></a><!--&nbsp;<!--constStr@Download-->-->
</div>
<div id="preview-div" style="margin: 24px;display:block;overflow:hidden;">
<!--IsimgFileStart-->
<img src="<!--FileEncodeUrl-->" alt="<!--FileName-->"
onload="if (this.offsetWidth>document.getElementById('url').offsetWidth) this.style.width='100%';if (this.offsetHeight>document.documentElement.clientHeight) this.style.height=document.documentElement.clientHeight + 'px';" />
<!--IsimgFileEnd-->
<!--IsvideoFileStart-->
<div id="video-a0" οncοntextmenu="return false"></div>
<!--IsvideoFileEnd-->
<!--IsmusicFileStart-->
<audio src="<!--FileDownUrl-->" controls="controls" controlsList="nodownload"
οncοntextmenu="return false" style="width: 100%"><!--constStr@FileNotSupport--></audio>
<!--IsmusicFileEnd-->
<!--IspdfFileStart-->
<div id="pdf-d">Loading PDF</div>
<!--<iframe id="pdf-a" src="http://mozilla.github.io/pdf.js/web/viewer.html?file=<!--FileEncodeDownUrl-->"
style="width: 100%;height: 800px" frameborder="0"></iframe>-->
<!--IspdfFileEnd-->
<!--IsofficeFileStart-->
<iframe id="office-a"
src="https://view.officeapps.live.com/op/view.aspx?src=<!--FileEncodeDownUrl-->"
style="width: 100%;height: 800px" frameborder="0"></iframe>
<!--IsofficeFileEnd-->
<!--IstxtFileStart-->
<div id="txt">
<!--AdminStart-->
<form id="txt-form" action="" method="POST">
<!--AdminEnd-->
<textarea id="txt-a" name="editfile" readonly
style="width:calc(100% - 16px);margin-top: 2px;overflow-y:hidden"
<!--AdminStart-->onchange="document.getElementById('txt-save').onclick=function(){document.getElementById('txt-form').submit();}"<!--AdminEnd--> ><!--TxtContent--></textarea>
<!--AdminStart-->
</form>
<script>
var inputAdminStorage = document.getElementsByName("_admin");
for (i = 0; i < inputAdminStorage.length; i++) {
inputAdminStorage[i].value = localStorage.getItem("admin");
}
</script>
<!--AdminEnd-->
2021-02-08 11:44:38 +00:00
</div>
2023-03-11 09:22:40 +00:00
<!--IstxtFileEnd-->
<!--IsOtherFileStart-->
<span><!--constStr@FileNotSupport--></span>
<!--IsOtherFileEnd-->
2021-02-08 11:44:38 +00:00
</div>
2023-03-11 09:22:40 +00:00
</div>
<!--IsFileEnd-->
<!--IsFolderStart-->
<table class="list-table" id="list-table">
<tr id="tr0">
<th class="file">
<a id="file_a0" fileid="<!--FolderId-->"
onclick="sortby('a');document.getElementById('s_time').innerHTML='Time&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';document.getElementById('s_size').innerHTML='Size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';document.getElementById('file_a0').innerHTML='Name ▲';">Name
</a>
<!--ShowThumbnailsStart-->
&nbsp;&nbsp;
<label><input type="checkbox" id="originalpic"><!--constStr@OriginalPic--></label>
<a onclick="showthumbnails(this);"><ion-icon style="font-size:24px;"
name="layers-outline"></ion-icon></a>
<!--ShowThumbnailsEnd-->
&nbsp;&nbsp;
<a onclick="CopyAllDownloadUrl('.download');"><ion-icon style="font-size:24px;"
name="code-download-outline"></ion-icon></a>
</th>
<th class="updated_at"><a id="s_time"
onclick="sortby('time');document.getElementById('file_a0').innerHTML='Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';document.getElementById('s_size').innerHTML='Size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';">Time&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
</th>
<th class="size"><a id="s_size"
onclick="sortby('size');document.getElementById('file_a0').innerHTML='Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';document.getElementById('s_time').innerHTML='Time&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';">Size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
</th>
</tr>
<!-- Dirs -->
<!--FolderListStart-->
<tr data-to id="tr<!--filenum-->">
<td class="file">
<!--AdminStart-->
<li class="operate"><ion-icon name="construct-outline"></ion-icon><a></a>
2021-02-08 11:44:38 +00:00
<ul>
2023-03-11 09:22:40 +00:00
<li><a onclick="showdiv(event,'encrypt',<!--filenum-->);"><ion-icon
name="lock-closed-outline"></ion-icon><!--constStr@Encrypt--></a></li>
<li><a onclick="showdiv(event, 'rename',<!--filenum-->);"><ion-icon
name="create-outline"></ion-icon><!--constStr@Rename--></a></li>
<li><a onclick="showdiv(event, 'move',<!--filenum-->);"><ion-icon
name="move-outline"></ion-icon><!--constStr@Move--></a></li>
<li><a onclick="showdiv(event, 'copy',<!--filenum-->);"><ion-icon
name="copy-outline"></ion-icon><!--constStr@Copy--></a></li>
<li><a onclick="showdiv(event, 'delete',<!--filenum-->);"><ion-icon
name="trash-outline"></ion-icon><!--constStr@Delete--></a></li>
2021-02-08 11:44:38 +00:00
</ul>
2023-03-11 09:22:40 +00:00
</li>
<!--AdminEnd-->
<ion-icon name="folder-open-outline"></ion-icon>
<a style="margin:3px;" id="file_a<!--filenum-->" name="folderlist"
href="<!--FileEncodeReplaceUrl-->/" fileid="<!--FileId-->"><!--FileEncodeReplaceName--></a>
</td>
<td class="updated_at" id="folder_time<!--filenum-->"><!--lastModifiedDateTime--></td>
<td class="size" id="folder_size<!--filenum-->"><!--size--></td>
</tr>
<!--FolderListEnd-->
<!--FileListStart-->
<tr data-to id="tr<!--filenum-->">
<td class="file">
<!--AdminStart-->
<li class="operate"><ion-icon name="construct-outline"></ion-icon><a></a>
2021-02-08 11:44:38 +00:00
<ul>
2023-03-11 09:22:40 +00:00
<li><a onclick="showdiv(event, 'rename',<!--filenum-->);"><ion-icon
name="create-outline"></ion-icon><!--constStr@Rename--></a></li>
<li><a onclick="showdiv(event, 'move',<!--filenum-->);"><ion-icon
name="move-outline"></ion-icon><!--constStr@Move--></a></li>
<li><a onclick="showdiv(event, 'copy',<!--filenum-->);"><ion-icon
name="copy-outline"></ion-icon><!--constStr@Copy--></a></li>
<li><a onclick="showdiv(event, 'delete',<!--filenum-->);"><ion-icon
name="trash-outline"></ion-icon><!--constStr@Delete--></a></li>
2021-02-08 11:44:38 +00:00
</ul>
2023-03-11 09:22:40 +00:00
</li>
<!--AdminEnd-->
<ion-icon name="<!--IconValue-->"></ion-icon>
<a style="margin:3px;" id="file_a<!--filenum-->" name="filelist"
href="<!--FileEncodeReplaceUrl-->?preview" fileid="<!--FileId-->"
target=_blank><!--FileEncodeReplaceName--></a>
<a class="download" href="<!--FileEncodeReplaceUrl-->"><ion-icon
name="cloud-download-outline"></ion-icon></a>
</td>
<td class="updated_at" id="file_time<!--filenum-->"><!--lastModifiedDateTime--></td>
<td class="size" id="file_size<!--filenum-->"><!--size--></td>
</tr>
<!--FileListEnd-->
</table>
<!--MorePageStart-->
<form action="" method="POST" id="nextpageform">
<input type="hidden" id="pagenum" name="pagenum" value="">
<table width=100% border=0>
<tr>
<td width=60px align=center>
<!--PrePageStart-->
<a onclick="nextpage(<!--PrePageNum-->);"><!--constStr@PrePage--></a>
<!--PrePageEnd-->
</td>
<td class="updated_at">
<!--MorePageListStart-->
<a onclick="nextpage(<!--PageNum-->);"><!--PageNum--></a>
<!--MorePageListEnd-->
<!--MorePageListNowStart-->
<font></font><!--PageNum--></font>
<!--MorePageListNowEnd-->
</td>
<td width=60px align=center>
<!--NextPageStart-->
<a onclick="nextpage(<!--NextPageNum-->);"><!--constStr@NextPage--></a>
<!--NextPageEnd-->
2021-02-08 11:44:38 +00:00
</td>
</tr>
</table>
2023-03-11 09:22:40 +00:00
</form>
<!--MorePageEnd-->
<!--AdminStart-->
<div id="upload_div" style="margin:6px 0 16px 0">
2021-02-08 11:44:38 +00:00
<div id="upload_btns" align="center">
<select onchange="document.getElementById('upload_file').webkitdirectory=this.value;">
<option value=""><!--constStr@UploadFile--></option>
<option value="1"><!--constStr@UploadFolder--></option>
</select>
<input id="upload_file" type="file" name="upload_filename" multiple="multiple">
<input id="upload_submit" onclick="preup();" value="<!--constStr@Upload-->" type="button">
</div>
</div>
2023-03-11 09:22:40 +00:00
<!--AdminEnd-->
<!--IsFolderEnd-->
2021-02-08 11:44:38 +00:00
</div>
2023-03-11 09:22:40 +00:00
</div>
<!--ListEnd-->
<!--ReadmemdStart-->
2021-02-08 11:44:38 +00:00
<div class="list-wrapper" id="readme-div">
2023-03-11 09:22:40 +00:00
<div class="list-body-container">
<div class="readme">
<div class="markdown-body" id="readme">
<textarea id="readme-md" style="display:none;"><!--ReadmemdContent--></textarea>
2021-02-08 11:44:38 +00:00
</div>
</div>
</div>
2023-03-11 09:22:40 +00:00
</div>
<!--ReadmemdEnd-->
<!--FootomfStart-->
2021-02-08 11:44:38 +00:00
<div class="list-wrapper" id="foot-om-div">
2023-03-11 09:22:40 +00:00
<div class="list-body-container">
<div class="readme">
<div class="customfile" id="foot-om">
<!--FootomfContent-->
2021-02-08 11:44:38 +00:00
</div>
</div>
</div>
2023-03-11 09:22:40 +00:00
</div>
<!--FootomfEnd-->
2021-02-08 11:44:38 +00:00
<div id="mask" class="mask" style="display:none;"></div>
2023-03-11 09:22:40 +00:00
<!--AdminStart-->
<!--IsFolderStart-->
2021-02-08 11:44:38 +00:00
<div style="word-break: break-all;word-wrap: break-word;">
<div id="rename_div" class="operatediv" style="display:none">
<div>
2023-03-11 09:22:40 +00:00
<label id="rename_label"></label><br><br><a onclick="operatediv_close('rename')"
class="operatediv_close">×</a>
2021-02-08 11:44:38 +00:00
<form id="rename_form" onsubmit="return submit_operate('rename');">
2023-03-11 09:22:40 +00:00
<input id="rename_sid" name="rename_sid" type="hidden" value="">
<input id="rename_fileid" name="rename_fileid" type="hidden" value="">
<input id="rename_hidden" name="rename_oldname" type="hidden" value="">
<input id="rename_input" name="rename_newname" type="text" value="">
<input name="operate_action" type="submit" value="<!--constStr@Rename-->">
2021-02-08 11:44:38 +00:00
</form>
</div>
</div>
<div id="delete_div" class="operatediv" style="display:none">
<div>
<br><a onclick="operatediv_close('delete')" class="operatediv_close">×</a>
<label id="delete_label"></label>
<form id="delete_form" onsubmit="return submit_operate('delete');">
2023-03-11 09:22:40 +00:00
<label id="delete_input"><!--constStr@Delete-->?</label>
<input id="delete_sid" name="delete_sid" type="hidden" value="">
<input id="delete_fileid" name="delete_fileid" type="hidden" value="">
<input id="delete_hidden" name="delete_name" type="hidden" value="">
<input name="operate_action" type="submit" value="<!--constStr@Submit-->">
2021-02-08 11:44:38 +00:00
</form>
</div>
</div>
<div id="encrypt_div" class="operatediv" style="display:none">
<div>
2023-03-11 09:22:40 +00:00
<label id="encrypt_label"></label><br><br><a onclick="operatediv_close('encrypt')"
class="operatediv_close">×</a>
2021-02-08 11:44:38 +00:00
<form id="encrypt_form" onsubmit="return submit_operate('encrypt');">
2023-03-11 09:22:40 +00:00
<input id="encrypt_sid" name="encrypt_sid" type="hidden" value="">
<input id="encrypt_fileid" name="encrypt_fileid" type="hidden" value="">
<input id="encrypt_hidden" name="encrypt_folder" type="hidden" value="">
<input id="encrypt_input" name="encrypt_newpass" type="text" value=""
placeholder="<!--constStr@InputPasswordUWant-->">
<!--EncryptBtnStart--><input name="operate_action" type="submit"
value="<!--constStr@Encrypt-->"><!--EncryptBtnEnd--><!--EncryptAlertStart--><br><label><!--constStr@SetpassfileBfEncrypt--></label><!--EncryptAlertEnd-->
2021-02-08 11:44:38 +00:00
</form>
</div>
</div>
<div id="copy_div" class="operatediv" style="display:none">
<div>
2023-03-11 09:22:40 +00:00
<label id="copy_label"></label><br><br><a onclick="operatediv_close('copy')"
class="operatediv_close">×</a>
2021-02-08 11:44:38 +00:00
<form id="copy_form" onsubmit="return submit_operate('copy');">
2023-03-11 09:22:40 +00:00
<input id="copy_sid" name="copy_sid" type="hidden" value="">
<input id="copy_fileid" name="copy_fileid" type="hidden" value="">
<input id="copy_hidden" name="copy_name" type="hidden" value="">
<input id="copy_input" name="copy_input" type="hidden" value="">
<input name="operate_action" type="submit" value="<!--constStr@Copy-->">
2021-02-08 11:44:38 +00:00
</form>
</div>
</div>
<div id="move_div" class="operatediv" style="display:none">
<div>
2023-03-11 09:22:40 +00:00
<label id="move_label"></label><br><br><a onclick="operatediv_close('move')"
class="operatediv_close">×</a>
2021-02-08 11:44:38 +00:00
<form id="move_form" onsubmit="return submit_operate('move');">
2023-03-11 09:22:40 +00:00
<input id="move_sid" name="move_sid" type="hidden" value="">
<input id="move_fileid" name="move_fileid" type="hidden" value="">
<input id="move_hidden" name="move_name" type="hidden" value="">
<select id="move_input" name="move_folder">
<!--MoveRootStart-->
<option value="/../"><!--constStr@ParentDir--></option>
<!--MoveRootEnd-->
<!--MoveDirsStart-->
<option value="<!--MoveDirsValue-->"><!--MoveDirsValue--></option>
<!--MoveDirsEnd-->
</select>
<input name="operate_action" type="submit" value="<!--constStr@Move-->">
2021-02-08 11:44:38 +00:00
</form>
</div>
</div>
<div id="create_div" class="operatediv" style="display:none">
<div>
<a onclick="operatediv_close('create')" class="operatediv_close">×</a>
<form id="create_form" onsubmit="return submit_operate('create');">
<input id="create_sid" name="create_sid" type="hidden" value="">
<input id="create_fileid" name="create_fileid" type="hidden" value="">
<input id="create_hidden" type="hidden" value="">
<table>
<tr>
<td></td>
<td><label id="create_label"></label></td>
</tr>
<tr>
<td>   </td>
<td>
2023-03-11 09:22:40 +00:00
<label><input id="create_type_folder" name="create_type" type="radio" value="folder"
onclick="document.getElementById('create_text_div').style.display='none';"><!--constStr@Folder--></label>
<label><input id="create_type_file" name="create_type" type="radio" value="file"
onclick="document.getElementById('create_text_div').style.display='';"
checked><!--constStr@File--></label>
2021-02-08 11:44:38 +00:00
<td>
</tr>
<tr>
<td><!--constStr@Name--></td>
<td><input id="create_input" name="create_name" type="text" value=""></td>
</tr>
<tr id="create_text_div">
<td><!--constStr@Content--></td>
<td><textarea id="create_text" name="create_text" rows="6" cols="40"></textarea></td>
</tr>
<tr>
<td>   </td>
<td><input name="operate_action" type="submit" value="<!--constStr@Create-->"></td>
</tr>
</table>
</form>
</div>
</div>
</div>
2023-03-11 09:22:40 +00:00
<!--IsFolderEnd-->
<!--AdminEnd-->
<!--LoginStart-->
2021-02-08 11:44:38 +00:00
<div id="login_div" class="operatediv" style="display:none">
<div style="margin:50px">
<a onclick="operatediv_close('login')" class="operatediv_close">×</a>
2021-07-11 11:47:54 +00:00
<center>
2022-01-30 08:17:41 +00:00
<form action="<!--IsPreview?-->login=admin" method="post" onsubmit="return sha1loginpass(this);">
2023-03-11 09:22:40 +00:00
<input id="login_input" name="password1" type="password"
placeholder="<!--constStr@InputPassword-->">
2021-07-11 11:47:54 +00:00
<input name="timestamp" type="hidden" value="">
<input type="submit" value="<!--constStr@Login-->">
</form>
2021-02-08 11:44:38 +00:00
</center>
</div>
2023-03-11 09:22:40 +00:00
</div>
<!--LoginEnd-->
<div
style="color: rgba(247,247,249,1);text-align:center;text-shadow:0 1px 15px rgba(27,31,35,1);font-weight:bold;margin-top:20px">
Theme by<a style="color:rgb(3,102,214)" href="https://git.io/JZ4ri">Tfo</a> for <a style="color:rgb(3,102,214)"
href="https://git.io/JZ46f">OneManager-php</a></div>
<div
style="color: rgba(247,247,249,0);text-align:center;text-shadow:0 1px 15px rgba(27,31,35,0);font-weight:bold;margin-top:6px">
<!--FootStr--></div>
<div style="color: rgba(247,247,249,1);text-align:center;text-shadow:0 1px 15px rgba(27,31,35,1);font-weight:bold;margin-top:6px;display:none"
id="tminf">
Current Version: 20221017 &nbsp;<br>Update Tips: 1.Upgrade with the program. (Best Choice!) 2.Copy the
CustomTheme link and paste it in the Platform Config form of program setting page. 3.Update manually. &nbsp;<br>
Tfos CustomTheme Address: <a herf="https://git.io/JZ4XI">https://git.io/JZ4XI</a> &nbsp;<br><a
herf="https://git.io/JZ4XE">https://git.io/JZ4XE</a>&nbsp;<br>Tfo's Theme UpdateCheck Address: <a
herf="https://git.io/JZ4iU">https://git.io/JZ4iU</a> &nbsp;<br><a
herf="https://git.io/JZ4Pv">https://git.io/JZ4Pv</a> &nbsp;<br>Tfos HomePage on GitHub: <a
herf="https://git.io/JZ4ri">https://git.io/JZ4ri</a>
2021-02-08 11:44:38 +00:00
</div>
</body>
2023-03-11 09:22:40 +00:00
<!--MdRequireStart-->
<link rel="stylesheet" type="text/css"
href="https://test1.jsdelivr.net/npm/github-markdown-css@5.1.0/github-markdown.min.css">
<script type="text/javascript" src="https://test1.jsdelivr.net/npm/marked@4.1.1/marked.min.js"></script>
<!--MdRequireEnd-->
2021-02-08 11:44:38 +00:00
<!--ListStart-->
2023-03-11 09:22:40 +00:00
<!--GuestUploadStart-->
<script type="text/javascript" src="https://test1.jsdelivr.net/npm/spark-md5@3.0.2/spark-md5.min.js"></script>
<!--GuestUploadEnd-->
<!--AliyundriveUploadJsStart-->
<script src="https://test1.jsdelivr.net/npm/bignumber.js@9.1.0/bignumber.min.js"></script>
2022-10-17 15:15:57 +00:00
<script src="?jsFile=sha1.min.js"></script><!--AliyundriveUploadJsEnd-->
2023-03-11 09:22:40 +00:00
<!--IsFileStart--><!--IspdfFileStart-->
<script src="https://test1.jsdelivr.net/npm/pdfjs-dist@2.16.105/build/pdf.min.js"></script>
<!--IspdfFileEnd--><!--IsFileEnd-->
2021-02-08 11:44:38 +00:00
<!--ListEnd-->
<script type="text/javascript">
2023-03-11 09:22:40 +00:00
function changelanguage(str) {
if (str == 'Language') str = '';
2021-02-08 11:44:38 +00:00
var expd = new Date();
2023-03-11 09:22:40 +00:00
expd.setTime(expd.getTime() + (2 * 60 * 60 * 1000));
var expires = "expires=" + expd.toGMTString();
document.cookie = 'language=' + str + '; path=/; ' + expires;
2021-02-08 11:44:38 +00:00
location.href = location.href;
}
2023-03-11 09:22:40 +00:00
<!--LoginStart-->
2021-07-11 11:47:54 +00:00
function login() {
2023-03-11 09:22:40 +00:00
document.getElementById('mask').style.display = '';
//document.getElementById('mask').style.width=document.documentElement.scrollWidth+'px';
document.getElementById('mask').style.height = document.documentElement.scrollHeight < window.innerHeight ? window.innerHeight : document.documentElement.scrollHeight + 'px';
document.getElementById('login_div').style.display = '';
document.getElementById('login_div').style.left = (document.body.clientWidth - document.getElementById('login_div').offsetWidth) / 2 + 'px';
document.getElementById('login_div').style.top = (window.innerHeight - document.getElementById('login_div').offsetHeight) / 2 + document.body.scrollTop + 'px';
2021-07-11 11:47:54 +00:00
document.getElementById('login_input').focus();
}
function sha1loginpass(f) {
2023-03-11 09:22:40 +00:00
if (f.password1.value == "") return false;
2021-07-11 11:47:54 +00:00
try {
timestamp = new Date().getTime() + "";
2023-03-11 09:22:40 +00:00
timestamp = timestamp.substr(0, timestamp.length - 3);
2021-07-11 11:47:54 +00:00
f.timestamp.value = timestamp;
f.password1.value = sha1(timestamp + "" + f.password1.value);
return true;
} catch {
2022-10-17 15:15:57 +00:00
//alert("sha1.js not loaded.");
if (confirm("sha1.js not loaded.\n\nLoad from program?")) loadjs("?jsFile=sha1.min.js");
2021-07-11 11:47:54 +00:00
return false;
}
}
2023-03-11 09:22:40 +00:00
function loadjs(url) {
var xhr = new XMLHttpRequest;
xhr.open("GET", url);
xhr.onload = function (e) {
if (xhr.status == 200) {
var script = document.createElement("script");
script.type = "text/javascript";
script.text = xhr.responseText;
document.body.appendChild(script);
} else {
console.log(xhr.response);
2022-10-17 15:15:57 +00:00
}
}
2023-03-11 09:22:40 +00:00
xhr.send(null);
}
2021-07-11 11:47:54 +00:00
<!--LoginEnd-->
2023-03-11 09:22:40 +00:00
<!--WriteTimezoneStart-->
2022-10-17 15:15:57 +00:00
var nowtime = new Date();
var timezone = 0 - nowtime.getTimezoneOffset() / 60;
var expd = new Date();
expd.setTime(expd.getTime() + (2 * 60 * 60 * 1000));
var expires = "expires=" + expd.toGMTString();
document.cookie = "timezone=" + timezone + "; path=/; " + expires;
2023-03-11 09:22:40 +00:00
if (timezone !=<!--timezone-->) {
2022-10-17 15:15:57 +00:00
//alert('Your timezone is '+timezone+', reload local timezone.');
location.href = location.href;
}
2023-03-11 09:22:40 +00:00
<!--WriteTimezoneEnd-->
<!--HeadmdStart-->
2022-10-17 15:15:57 +00:00
var $head = document.getElementById('head');
if ($head) {
//document.getElementById('head-div').parentNode.insertBefore(document.getElementById('head-div'),document.getElementById('list-div'));
2023-03-11 09:22:40 +00:00
$head.innerHTML = marked.parse(document.getElementById('head-md').innerText);
2022-10-17 15:15:57 +00:00
}
2023-03-11 09:22:40 +00:00
<!--HeadmdEnd-->
<!--ReadmemdStart-->
2022-10-17 15:15:57 +00:00
var $readme = document.getElementById('readme');
if ($readme) {
2023-03-11 09:22:40 +00:00
$readme.innerHTML = marked.parse(document.getElementById('readme-md').innerText);
2022-10-17 15:15:57 +00:00
}
2023-03-11 09:22:40 +00:00
<!--ReadmemdEnd-->
2021-02-08 11:44:38 +00:00
<!--ListStart-->
<!--IsFileStart-->
2022-10-17 15:15:57 +00:00
var $url = document.getElementById('url').value;
if ($url) {
//$url.innerHTML = location.protocol + '//' + location.host + $url.innerHTML;
let url = location.href;
url = url.substr(0, url.length - 8);
$url.innerHTML = url.replace(/&amp;/g, '&amp;amp;');
$url.style.height = $url.scrollHeight + 'px';
}
2021-02-08 11:44:38 +00:00
<!--IsofficeFileStart-->
2023-03-11 09:22:40 +00:00
var $officearea = document.getElementById('office-a');
2021-02-08 11:44:38 +00:00
if ($officearea) {
$officearea.style.height = window.innerHeight + 'px';
}
<!--IsofficeFileEnd-->
<!--IstxtFileStart-->
2023-03-11 09:22:40 +00:00
var $textarea = document.getElementById('txt-a');
2021-02-08 11:44:38 +00:00
if ($textarea) {
$textarea.style.height = $textarea.scrollHeight + 'px';
}
<!--IstxtFileEnd-->
<!--IsvideoFileStart-->
2023-03-11 09:22:40 +00:00
function loadResources(type, src, callback) {
let script = document.createElement(type);
let loaded = false;
if (typeof callback === 'function') {
script.onload = script.onreadystatechange = () => {
if (!loaded && (!script.readyState || /loaded|complete/.test(script.readyState))) {
script.onload = script.onreadystatechange = null;
loaded = true;
callback();
}
2021-02-08 11:44:38 +00:00
}
}
2023-03-11 09:22:40 +00:00
if (type === 'link') {
script.href = src;
script.rel = 'stylesheet';
} else {
script.src = src;
}
document.getElementsByTagName('head')[0].appendChild(script);
2021-02-08 11:44:38 +00:00
}
function addVideos(videos) {
let host = 'https://s0.pstatp.com/cdn/expire-1-M';
let unloadedResourceCount = 4;
let callback = (() => {
return () => {
if (!--unloadedResourceCount) {
createDplayers(videos);
}
};
})(unloadedResourceCount, videos);
loadResources(
'link',
host + '/dplayer/1.25.0/DPlayer.min.css',
callback
);
loadResources(
'script',
host + '/dplayer/1.25.0/DPlayer.min.js',
callback
);
loadResources(
'script',
host + '/hls.js/0.12.4/hls.light.min.js',
callback
);
loadResources(
'script',
host + '/flv.js/1.5.0/flv.min.js',
callback
);
}
function createDplayers(videos) {
for (i = 0; i < videos.length; i++) {
console.log(videos[i]);
new DPlayer({
container: document.getElementById('video-a' + i),
2022-10-17 15:15:57 +00:00
//screenshot: true,
2021-02-25 07:07:50 +00:00
theme: '#0366D6',
volume: 0.5,
2021-02-08 11:44:38 +00:00
video: {
2021-02-25 07:07:50 +00:00
type: 'auto',
2021-02-08 11:44:38 +00:00
url: videos[i]
}
});
}
}
2022-10-17 15:15:57 +00:00
addVideos(["<!--FileEncodeUrl-->"]);
2021-02-08 11:44:38 +00:00
<!--IsvideoFileEnd-->
<!--IspdfFileStart-->
2023-03-11 09:22:40 +00:00
pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://test1.jsdelivr.net/npm/pdfjs-dist@2.16.105/lib/pdf.worker.js';
2021-02-08 11:44:38 +00:00
var loadingTask = pdfjsLib.getDocument({
url: '<!--FileDownUrl-->',
2022-10-17 15:15:57 +00:00
cMapUrl: "https://test1.jsdelivr.net/npm/pdfjs-dist@2.16.105/cmaps/",
2021-02-08 11:44:38 +00:00
cMapPacked: true,
2022-10-17 15:15:57 +00:00
disableStream: true,
disableAutoFetch: true,
2021-02-08 11:44:38 +00:00
rangeChunkSize: 65535
});
2023-03-11 09:22:40 +00:00
/*loadingTask.onProgress = (e) => {
//console.log(e);
var p = document.getElementById('p');
if (p==null) {
p = document.createElement('div');
p.id = 'p';
p.setAttribute('onclick', "this.style.display = 'none';");
p.style = 'left: 10px; top: 30%; position: fixed;';
document.body.appendChild(p);
}
p.innerHTML = 'Loaded: ' + ((e.loaded/e.total)*100).toFixed(2) + '%<br>(' + size_format(e.loaded) + ' / ' + size_format(e.total) + ')';
p.style.display = '';
if (e.loaded==e.total) p.style.display = 'none';
}*/
2022-10-17 15:15:57 +00:00
/*loadingTask.promise.then(function(pdf) {
2021-02-08 11:44:38 +00:00
var pagenum = pdf.numPages;
var pdfContainer = document.getElementById('pdf-d');
pdfContainer.innerHTML = '';
for (var i=1;i<=pagenum;i++) {
var canvasNew = document.createElement('canvas');
canvasNew.id = 'pdf-c'+i;
pdfContainer.appendChild(canvasNew);
renderpage(pdf,i);
2022-10-17 15:15:57 +00:00
} */
2023-03-11 09:22:40 +00:00
loadingTask.promise.then(function (pdf) {
var pagenum = pdf.numPages;
var pdfContainer = document.getElementById('pdf-d');
pdfContainer.innerHTML = '';
var pagepos = 1;
var pdfnextpagebutton = document.createElement('button');
pdfnextpagebutton.id = 'pdfnextpagebutton';
pdfnextpagebutton.innerText = 'Load page ' + pagepos + '-' + (pagepos + 4 < pagenum ? pagepos + 4 : pagenum) + ' (' + pagenum + ')';
pdfnextpagebutton.setAttribute('onclick', "this.style.display = 'none';");
pdfnextpagebutton.style.display = 'none';
pdfContainer.appendChild(pdfnextpagebutton);
var pdfWaitNextPage = setInterval(function () {
//console.log(document.documentElement.scrollTop + ", " + document.body.scrollHeight);
if (pdfnextpagebutton.style.display == 'none') {
for (var i = pagepos; i <= (pagepos + 4 < pagenum ? pagepos + 4 : pagenum); i++) {
var canvasNew = document.createElement('canvas');
canvasNew.id = 'pdf-c' + i;
pdfContainer.appendChild(canvasNew);
renderpage(pdf, i);
}
pagepos = i;
if (pagepos < pagenum) {
console.log("next page: " + pagepos + " / " + pagenum);
pdfnextpagebutton.innerText = 'Load page ' + pagepos + '-' + (pagepos + 4 < pagenum ? pagepos + 4 : pagenum) + ' (' + pagenum + ')';
pdfnextpagebutton.style.display = '';
pdfContainer.appendChild(pdfnextpagebutton);
} else {
console.log("end of pdf");
clearInterval(pdfWaitNextPage);
}
}
}, 1000);
2021-02-08 11:44:38 +00:00
});
2023-03-11 09:22:40 +00:00
function renderpage(pdf, i) {
pdf.getPage(i).then(function (page) {
2021-02-08 11:44:38 +00:00
var scale = 1.5;
var viewport = page.getViewport({ scale: scale, });
2023-03-11 09:22:40 +00:00
var canvas = document.getElementById('pdf-c' + i);
2021-02-08 11:44:38 +00:00
var context = canvas.getContext("2d");
canvas.height = viewport.height;
canvas.width = viewport.width;
var renderContext = {
canvasContext: context,
viewport: viewport,
};
page.render(renderContext);
});
}
2022-10-17 15:15:57 +00:00
function size_format(num) {
2023-03-11 09:22:40 +00:00
if (num > 1024) {
num = num / 1024;
2022-10-17 15:15:57 +00:00
} else {
return num.toFixed(2) + ' B';
}
2023-03-11 09:22:40 +00:00
if (num > 1024) {
num = num / 1024;
2022-10-17 15:15:57 +00:00
} else {
return num.toFixed(2) + ' KB';
}
2023-03-11 09:22:40 +00:00
if (num > 1024) {
num = num / 1024;
2022-10-17 15:15:57 +00:00
} else {
return num.toFixed(2) + ' MB';
}
return num.toFixed(2) + ' GB';
}
2021-02-08 11:44:38 +00:00
<!--IspdfFileEnd-->
<!--IsFileEnd-->
<!--IsFolderStart-->
<!--ShowThumbnailsStart-->
2023-03-11 09:22:40 +00:00
function showthumbnails(obj) {
swal("Wait", "Loading Thumbnails...", {
buttons: false,
timer: 1000,
closeOnEsc: false,
});
images = [<!--ImgExts-->];
var files = document.getElementsByName('filelist');
for ($i = 0; $i < files.length; $i++) {
str = files[$i].innerText;
if (str.substr(-1) == ' ') str = str.substr(0, str.length - 1);
if (!str) continue;
strarry = str.split('.');
ext = strarry[strarry.length - 1].toLowerCase();
if (images.indexOf(ext) > -1) {
var url = files[$i].href;
url = url.substr(0, url.length - 8);
if (document.getElementById('originalpic').checked == true) {
files[$i].parentNode.parentNode.innerHTML = '<td colspan="3"><img src="' + url + '" alt="' + str + '" onload="if (this.offsetWidth>document.getElementById(\'list-div\').offsetWidth) this.style.width=\'100%\';"></td>';
$i--;
} else {
url += '?thumbnails';
get_thumbnails_url(url, str, files[$i]);
}
2021-02-08 11:44:38 +00:00
}
}
2023-03-11 09:22:40 +00:00
obj.disabled = 'disabled';
2021-02-08 11:44:38 +00:00
}
function get_thumbnails_url(url, name, filea) {
var xhr = new XMLHttpRequest();
xhr.open("GET", url, true);
xhr.send('');
2023-03-11 09:22:40 +00:00
xhr.onload = function (e) {
if (xhr.status == 200) {
if (xhr.responseText != '') filea.innerHTML = '<img src="' + xhr.responseText + '" alt="' + name + '">';
} else console.log(xhr.status + '\n' + xhr.responseText);
2021-02-08 11:44:38 +00:00
}
}
<!--ShowThumbnailsEnd-->
<!--MorePageStart-->
2023-03-11 09:22:40 +00:00
function nextpage(num) {
document.getElementById('pagenum').value = num;
document.getElementById('nextpageform').submit();
}
<!--MorePageEnd-->
2021-02-08 11:44:38 +00:00
<!--IsNotHiddenStart-->
2023-03-11 09:22:40 +00:00
var sort = 0;
2021-02-08 11:44:38 +00:00
function sortby(string) {
2023-03-11 09:22:40 +00:00
if (string == 'a') if (sort != 0) {
for (i = 1; i <= <!--maxfilenum-->; i++) document.getElementById('tr' + i).parentNode.insertBefore(document.getElementById('tr' + i), document.getElementById('tr' + (i - 1)).nextSibling);
sort = 0;
2021-02-08 11:44:38 +00:00
return;
} else return;
2023-03-11 09:22:40 +00:00
sort1 = sort;
2021-02-08 11:44:38 +00:00
sortby('a');
2023-03-11 09:22:40 +00:00
sort = sort1;
var a = [];
2021-02-08 11:44:38 +00:00
for (i = 1; i <= <!--maxfilenum-->; i++) {
2023-03-11 09:22:40 +00:00
a[i] = i;
if (!!document.getElementById('folder_' + string + i)) {
var td1 = document.getElementById('folder_' + string + i);
2021-02-08 11:44:38 +00:00
for (j = 1; j < i; j++) {
2023-03-11 09:22:40 +00:00
if (!!document.getElementById('folder_' + string + a[j])) {
var c = false;
if (string == 'time') if (sort == -1) {
c = (td1.innerText < document.getElementById('folder_' + string + a[j]).innerText);
2021-02-08 11:44:38 +00:00
} else {
2023-03-11 09:22:40 +00:00
c = (td1.innerText > document.getElementById('folder_' + string + a[j]).innerText);
2021-02-08 11:44:38 +00:00
}
2023-03-11 09:22:40 +00:00
if (string == 'size') if (sort == 2) {
c = (size_reformat(td1.innerText) < size_reformat(document.getElementById('folder_' + string + a[j]).innerText));
2021-02-08 11:44:38 +00:00
} else {
2023-03-11 09:22:40 +00:00
c = (size_reformat(td1.innerText) > size_reformat(document.getElementById('folder_' + string + a[j]).innerText));
2021-02-08 11:44:38 +00:00
}
if (c) {
2023-03-11 09:22:40 +00:00
document.getElementById('tr' + i).parentNode.insertBefore(document.getElementById('tr' + i), document.getElementById('tr' + a[j]));
2021-02-08 11:44:38 +00:00
for (k = i; k > j; k--) {
2023-03-11 09:22:40 +00:00
a[k] = a[k - 1];
2021-02-08 11:44:38 +00:00
}
2023-03-11 09:22:40 +00:00
a[j] = i;
2021-02-08 11:44:38 +00:00
break;
}
}
}
}
2023-03-11 09:22:40 +00:00
if (!!document.getElementById('file_' + string + i)) {
var td1 = document.getElementById('file_' + string + i);
2021-02-08 11:44:38 +00:00
for (j = 1; j < i; j++) {
2023-03-11 09:22:40 +00:00
if (!!document.getElementById('file_' + string + a[j])) {
var c = false;
if (string == 'time') if (sort == -1) {
c = (td1.innerText < document.getElementById('file_' + string + a[j]).innerText);
2021-02-08 11:44:38 +00:00
} else {
2023-03-11 09:22:40 +00:00
c = (td1.innerText > document.getElementById('file_' + string + a[j]).innerText);
2021-02-08 11:44:38 +00:00
}
2023-03-11 09:22:40 +00:00
if (string == 'size') if (sort == 2) {
c = (size_reformat(td1.innerText) < size_reformat(document.getElementById('file_' + string + a[j]).innerText));
2021-02-08 11:44:38 +00:00
} else {
2023-03-11 09:22:40 +00:00
c = (size_reformat(td1.innerText) > size_reformat(document.getElementById('file_' + string + a[j]).innerText));
2021-02-08 11:44:38 +00:00
}
if (c) {
2023-03-11 09:22:40 +00:00
document.getElementById('tr' + i).parentNode.insertBefore(document.getElementById('tr' + i), document.getElementById('tr' + a[j]));
2021-02-08 11:44:38 +00:00
for (k = i; k > j; k--) {
2023-03-11 09:22:40 +00:00
a[k] = a[k - 1];
2021-02-08 11:44:38 +00:00
}
2023-03-11 09:22:40 +00:00
a[j] = i;
2021-02-08 11:44:38 +00:00
break;
}
}
}
}
}
2023-03-11 09:22:40 +00:00
if (string == 'time') if (sort == -1) {
sort = 1; document.getElementById('s_time').innerHTML = 'Time ▲';
2021-02-08 11:44:38 +00:00
} else {
2023-03-11 09:22:40 +00:00
sort = -1; document.getElementById('s_time').innerHTML = 'Time ▼';
2021-02-08 11:44:38 +00:00
}
2023-03-11 09:22:40 +00:00
if (string == 'size') if (sort == 2) {
sort = -2; document.getElementById('s_size').innerHTML = 'Size ▲';
2021-02-08 11:44:38 +00:00
} else {
2023-03-11 09:22:40 +00:00
sort = 2; document.getElementById('s_size').innerHTML = 'Size ▼';
2021-02-08 11:44:38 +00:00
}
}
function size_reformat(str) {
2023-03-11 09:22:40 +00:00
if (str.substr(-1) == ' ') str = str.substr(0, str.length - 1);
2022-10-17 15:15:57 +00:00
if (str.substr(-2) == 'TB') num = str.substr(0, str.length - 3) * 1024 * 1024 * 1024 * 1024;
2023-03-11 09:22:40 +00:00
if (str.substr(-2) == 'GB') num = str.substr(0, str.length - 3) * 1024 * 1024 * 1024;
if (str.substr(-2) == 'MB') num = str.substr(0, str.length - 3) * 1024 * 1024;
if (str.substr(-2) == 'KB') num = str.substr(0, str.length - 3) * 1024;
if (str.substr(-2) == ' B') num = str.substr(0, str.length - 2);
2021-02-08 11:44:38 +00:00
return num;
}
<!--IsNotHiddenEnd-->
<!--IsFolderEnd-->
2023-03-11 09:22:40 +00:00
function CopyAllDownloadUrl(str) {
var tmptextarea = document.createElement('textarea');
document.body.appendChild(tmptextarea);
tmptextarea.setAttribute('style', 'position:absolute;left:-100px;width:0px;height:0px;');
document.querySelectorAll(str).forEach(function (e) {
tmptextarea.innerHTML += e.href + "\r\n";
});
tmptextarea.select();
tmptextarea.setSelectionRange(0, tmptextarea.value.length);
document.execCommand("copy");
swal("<!--constStr@Success-->", tmptextarea.innerHTML, { icon: "success", timer: 3000, closeOnEsc: false, });
2021-02-08 11:44:38 +00:00
}
2023-03-11 09:22:40 +00:00
<!--UploadJsStart-->
function size_format(num) {
if (num > 1024) {
num = num / 1024;
} else {
return num.toFixed(2) + ' B';
}
if (num > 1024) {
num = num / 1024;
} else {
return num.toFixed(2) + ' KB';
}
if (num > 1024) {
num = num / 1024;
} else {
return num.toFixed(2) + ' MB';
}
return num.toFixed(2) + ' GB';
}
2021-07-11 11:47:54 +00:00
function seconds2hour(seconds) {
let h, m, s;
2023-03-11 09:22:40 +00:00
if (parseFloat(seconds) < 60) {
2021-07-11 11:47:54 +00:00
return seconds + 's';
} else {
s = (seconds % 60).toFixed(0);
m = parseInt(seconds / 60);
2023-03-11 09:22:40 +00:00
if (parseInt(m) < 60) {
2021-07-11 11:47:54 +00:00
return m + 'm' + s + 's';
} else {
h = parseInt(m / 60);
m = m % 60;
return h + 'h' + m + 'm' + s + 's';
}
}
}
2021-02-08 11:44:38 +00:00
function uploadbuttonhide() {
2023-03-11 09:22:40 +00:00
document.getElementById('upload_btns').style.display = 'none';
2021-02-08 11:44:38 +00:00
/*document.getElementById('upload_submit').disabled='disabled';
document.getElementById('upload_file').disabled='disabled';
document.getElementById('upload_submit').style.display='none';
document.getElementById('upload_file').style.display='none';*/
}
function uploadbuttonshow() {
2023-03-11 09:22:40 +00:00
document.getElementById('upload_btns').style.display = '';
2021-02-08 11:44:38 +00:00
/*document.getElementById('upload_file').disabled='';
document.getElementById('upload_submit').disabled='';
document.getElementById('upload_submit').style.display='';
document.getElementById('upload_file').style.display='';*/
}
2021-07-11 11:47:54 +00:00
var uploading = new Object();
2021-02-08 11:44:38 +00:00
<!--UploadJsEnd-->
<!--OnedriveUploadJsStart-->
2023-03-11 09:22:40 +00:00
function preup() {
uploadbuttonhide();
var files = document.getElementById('upload_file').files;
if (files.length < 1) {
2021-02-08 11:44:38 +00:00
uploadbuttonshow();
return;
2023-03-11 09:22:40 +00:00
};
var table1 = document.createElement('table');
document.getElementById('upload_div').appendChild(table1);
table1.setAttribute('class', 'list-table');
var timea = new Date().getTime();
var i = 0;
var uploadList = setInterval(function () {
if (i < files.length) {
if (Object.keys(uploading).length < 5) {
getuplink(i);
i++;
}// else console.log(Object.keys(uploading).length);
} else clearInterval(uploadList);
}, 1000);
//getuplink(i);
function getuplink(i, r = 0) {
var file = files[i];
var td1;
var td2;
if (r == 0) {
var tr1 = document.createElement('tr');
table1.appendChild(tr1);
tr1.setAttribute('data-to', 1);
td1 = document.createElement('td');
tr1.appendChild(td1);
td1.setAttribute('style', 'width:fit-content');
td1.setAttribute('id', 'upfile_td1_' + timea + '_' + i);
td1.innerHTML = (file.webkitRelativePath || file.name) + '&nbsp;' + size_format(file.size) + ' (' + (i + 1) + '/' + files.length + ')';
td2 = document.createElement('td');
tr1.appendChild(td2);
td2.setAttribute('id', 'upfile_td2_' + timea + '_' + i);
}
var tdnum = timea + '_' + i;
td1 = document.getElementById('upfile_td1_' + tdnum);
td2 = document.getElementById('upfile_td2_' + tdnum);
if (file.size > 100 * 1024 * 1024 * 1024) {
td2.innerHTML = '<font><!--constStr@UpFileTooLarge--></font>';
uploadbuttonshow();
return;
}
var upbigfilename = encodeURIComponent((file.webkitRelativePath || file.name));
uploading[upbigfilename] = i;
var filemd5 = '';
2021-02-08 11:44:38 +00:00
<!--GuestStart-->
2023-03-11 09:22:40 +00:00
function getext(str) {
strarry = str.split('.');
if (strarry.length == 1) return '';
ext = strarry[strarry.length - 1].toLowerCase();
var reg = new RegExp(".", "g");
var a = str.replace(reg, "");
if (a == ext) ext = "";
else ext = "." + ext;
return ext;
}
var ext = getext(file.webkitRelativePath || file.name);
var spark = new SparkMD5.ArrayBuffer();
var reader = new FileReader();
var chunksize = 10 * 1024 * 1024;
var asize = 0;
function readblob(start) {
var end = start + chunksize;
var blob = file.slice(start, end);
reader.readAsArrayBuffer(blob);
}
2021-02-08 11:44:38 +00:00
readblob(asize);
2023-03-11 09:22:40 +00:00
reader.onload = function (e) {
td2.innerHTML = '<!--constStr@Calculate--> md5: ' + (asize * 100 / file.size).toFixed(2) + '%';
var binary = this.result;
spark.append(binary);
asize += chunksize;
if (asize < file.size) {
readblob(asize);
} else {
filemd5 = spark.end();
td2.innerHTML = 'md5: ' + filemd5;
delete uploading[upbigfilename];
upbigfilename = filemd5 + ext;
uploading[upbigfilename] = i;
2021-02-08 11:44:38 +00:00
<!--GuestEnd-->
2023-03-11 09:22:40 +00:00
td2.innerHTML='<!--constStr@GetUploadLink--> ...';
var xhr1 = new XMLHttpRequest();
xhr1.open("POST", '?action=upbigfile');
+ //xhr1.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=utf-8");
xhr1.setRequestHeader('x-requested-with', 'XMLHttpRequest');
xhr1.onprogress = function (e) {
td2.innerHTML += '.';
}
xhr1.onload = function (e) {
//console.log(xhr1.status+xhr1.responseText);
td2.innerHTML = '<font>' + xhr1.responseText + '</font>';
if (xhr1.status == 409) {
// td2.innerHTML='nameAlreadyExists';
var html = JSON.parse(xhr1.responseText);
td2.innerHTML = html['error']['code'] + ': ' + html['error']['message'];
2021-02-08 11:44:38 +00:00
<!--GuestStart-->
2023-03-11 09:22:40 +00:00
td2.innerHTML='md5: ' + filemd5;
2021-07-11 11:47:54 +00:00
<!--GuestEnd-->
2023-03-11 09:22:40 +00:00
td1.innerHTML='<div style="color:green"><a href="<!--base_disk_path--><!--Path-->' + (file.webkitRelativePath || file.name) + '?preview" id="upfile_a_' + tdnum + '" target="_blank">' + td1.innerHTML + '</a><br><a href="<!--base_disk_path--><!--Path-->' + (file.webkitRelativePath || file.name) + '" id="upfile_a1_' + tdnum + '"></a><!--constStr@UploadComplete--><button onclick="CopyAllDownloadUrl(\'#upfile_a1_' + tdnum + '\');" id="upfile_cpbt_' + tdnum + '" <!--AdminStart--> style="display:none"<!--AdminEnd--> ><!--constStr@CopyUrl--></button></div>';
}
if (xhr1.status == 409) {
// td2.innerHTML='nameAlreadyExists';
var html = JSON.parse(xhr1.responseText);
td2.innerHTML = html['error']['code'] + ': ' + html['error']['message'];
2021-07-11 11:47:54 +00:00
<!--GuestStart-->
2023-03-11 09:22:40 +00:00
td2.innerHTML='md5: ' + filemd5;
2021-02-08 11:44:38 +00:00
<!--GuestEnd-->
2023-03-11 09:22:40 +00:00
td1.innerHTML='<div><a href="<!--base_disk_path--><!--Path-->' + (file.webkitRelativePath || file.name) + '?preview" id="upfile_a_' + tdnum + '" target="_blank">' + td1.innerHTML + '</a><br><a href="<!--base_disk_path--><!--Path-->' + (file.webkitRelativePath || file.name) + '" id="upfile_a1_' + tdnum + '"></a><!--constStr@UploadComplete--><button onclick="CopyAllDownloadUrl(\'#upfile_a1_' + tdnum + '\');" id="upfile_cpbt_' + tdnum + '" <!--AdminStart--> style="display:none"<!--AdminEnd--> ><!--constStr@CopyUrl--></button></div>';
}
if (xhr1.status == 200) {
if (xhr1.responseText == '') {
getuplink(i, 1);
return;
}
var html = JSON.parse(xhr1.responseText);
if (!html['uploadUrl']) {
td2.innerHTML = '<font>' + xhr1.responseText + '</font><br>';
} else {
td2.innerHTML = '<!--constStr@UploadStart--> ...';
binupfile(file, html['uploadUrl'], timea + '_' + i, upbigfilename);
}
} else {
if (xhr1.status == 409) {
// td2.innerHTML='nameAlreadyExists';
var html = JSON.parse(xhr1.responseText);
td2.innerHTML = html['error']['code'] + ': ' + html['error']['message'];
2021-07-11 11:47:54 +00:00
<!--GuestStart-->
2023-03-11 09:22:40 +00:00
td2.innerHTML='md5: ' + filemd5;
td1.innerHTML = '<div style="color:green"><a href="<!--base_disk_path--><!--Path-->' + upbigfilename + '?preview" id="upfile_a_' + tdnum + '" target="_blank">' + td1.innerHTML + '</a><br><a href="<!--base_disk_path--><!--Path-->' + upbigfilename + '" id="upfile_a1_' + tdnum + '"></a><!--constStr@UploadComplete--><button onclick="CopyAllDownloadUrl(\'#upfile_a1_' + tdnum + '\');" id="upfile_cpbt_' + tdnum + '"><!--constStr@CopyUrl--></button></div>';
2021-07-11 11:47:54 +00:00
<!--GuestEnd-->
<!--AdminStart-->
2023-03-11 09:22:40 +00:00
td1.innerHTML='<div style="color:green"><a href="<!--base_disk_path--><!--Path-->' + (file.webkitRelativePath || file.name) + '?preview" id="upfile_a_' + tdnum + '" target="_blank">' + td1.innerHTML + '</a><br><a href="<!--base_disk_path--><!--Path-->' + (file.webkitRelativePath || file.name) + '" id="upfile_a1_' + tdnum + '"></a><!--constStr@UploadComplete--><button onclick="CopyAllDownloadUrl(\'#upfile_a1_' + tdnum + '\');" id="upfile_cpbt_' + tdnum + '" style="display:none"><!--constStr@CopyUrl--></button></div>';
2021-07-11 11:47:54 +00:00
<!--AdminEnd-->
}
2023-03-11 09:22:40 +00:00
/*if (i<files.length-1) {
i++;
getuplink(i);
}*/
delete uploading[upbigfilename];
}
}
xhr1.send('upbigfilename=' + upbigfilename + '&filesize=' + file.size + '&filelastModified=' + file.lastModified + '&filemd5=' + filemd5 + '&_admin=' + localStorage.getItem("admin"));
2021-02-08 11:44:38 +00:00
<!--GuestStart-->
}
2023-03-11 09:22:40 +00:00
}
<!--GuestEnd-->
2021-02-08 11:44:38 +00:00
}
2023-03-11 09:22:40 +00:00
uploadbuttonshow();
2021-02-08 11:44:38 +00:00
}
2023-03-11 09:22:40 +00:00
function binupfile(file, url, tdnum, filename) {
var label = document.getElementById('upfile_td2_' + tdnum);
2021-02-08 11:44:38 +00:00
var reader = new FileReader();
2023-03-11 09:22:40 +00:00
var StartStr = '';
var MiddleStr = '';
2021-02-08 11:44:38 +00:00
var StartTime;
var EndTime;
var newstartsize = 0;
2023-03-11 09:22:40 +00:00
if (!!file) {
var asize = 0;
var chunksize = 10 * 1024 * 1024; // chunk size, max 60M. 每小块上传大小最大60M微软建议10M
var totalsize = file.size;
2021-02-08 11:44:38 +00:00
var xhr2 = new XMLHttpRequest();
xhr2.open("GET", url);
2023-03-11 09:22:40 +00:00
//xhr2.setRequestHeader('x-requested-with','XMLHttpRequest');
2021-02-08 11:44:38 +00:00
xhr2.send(null);
2023-03-11 09:22:40 +00:00
xhr2.onload = function (e) {
if (xhr2.status == 200) {
2021-02-08 11:44:38 +00:00
var html = JSON.parse(xhr2.responseText);
var a = html['nextExpectedRanges'][0];
2023-03-11 09:22:40 +00:00
newstartsize = Number(a.slice(0, a.indexOf("-")));
2021-02-08 11:44:38 +00:00
StartTime = new Date();
asize = newstartsize;
2023-03-11 09:22:40 +00:00
if (newstartsize == 0) {
StartStr = '<!--constStr@UploadStartAt-->:' + StartTime.toLocaleString() + '<br>';
2021-02-08 11:44:38 +00:00
} else {
2023-03-11 09:22:40 +00:00
StartStr = '<!--constStr@LastUpload-->' + size_format(newstartsize) + '&nbsp;<!--constStr@ThisTime--><!--constStr@UploadStartAt-->:' + StartTime.toLocaleString() + '<br>';
2021-02-08 11:44:38 +00:00
}
function readblob(start) {
2023-03-11 09:22:40 +00:00
var end = start + chunksize;
var blob = file.slice(start, end);
2021-02-08 11:44:38 +00:00
reader.readAsArrayBuffer(blob);
}
readblob(asize);
2023-03-11 09:22:40 +00:00
reader.onload = function (e) {
2021-02-08 11:44:38 +00:00
var binary = this.result;
2021-07-11 11:47:54 +00:00
var lastCurrentSpeed;
2021-02-08 11:44:38 +00:00
var xhr = new XMLHttpRequest();
xhr.open("PUT", url, true);
//xhr.setRequestHeader('x-requested-with','XMLHttpRequest');
2023-03-11 09:22:40 +00:00
bsize = asize + e.loaded - 1;
xhr.setRequestHeader('Content-Range', 'bytes ' + asize + '-' + bsize + '/' + totalsize);
xhr.upload.onprogress = function (e) {
2021-02-08 11:44:38 +00:00
if (e.lengthComputable) {
2021-07-11 11:47:54 +00:00
let tmptime = new Date();
2023-03-11 09:22:40 +00:00
let tmpspeed = e.loaded * 1000 / (tmptime.getTime() - C_starttime.getTime());
2021-07-11 11:47:54 +00:00
lastCurrentSpeed = tmpspeed;
2023-03-11 09:22:40 +00:00
let remaintime = (totalsize - asize - e.loaded) / tmpspeed;
2022-10-17 15:15:57 +00:00
let percent = ((asize + e.loaded) * 100 / totalsize).toFixed(2);
label.parentNode.style.background = "linear-gradient(to right, rgba(0,0,0,25%) " + percent + "%, rgba(0,0,0,0%) 0%)";
2023-03-11 09:22:40 +00:00
label.innerHTML = StartStr + '<!--constStr@Upload--> ' + size_format(asize + e.loaded) + ' / ' + size_format(totalsize) + ' = ' + percent + '%<br><!--constStr@AverageSpeed-->:' + size_format((asize + e.loaded - newstartsize) * 1000 / (tmptime.getTime() - StartTime.getTime())) + '/s<br><!--constStr@CurrentSpeed--> ' + size_format(tmpspeed) + '/s <!--constStr@Expect--> ' + seconds2hour(remaintime.toFixed(1));
2021-02-08 11:44:38 +00:00
}
}
var C_starttime = new Date();
2023-03-11 09:22:40 +00:00
xhr.onload = function (e) {
if (xhr.status < 500) {
var response = JSON.parse(xhr.responseText);
if (response['size'] > 0) {
// contain size, upload finish. 有size说明是最终返回上传结束
if (totalsize > 10 * 1024 * 1024) {
var xhr3 = new XMLHttpRequest();
xhr3.open("GET", '?action=del_upload_cache&filelastModified=' + file.lastModified + '&filesize=' + file.size + '&filename=' + filename);
xhr3.setRequestHeader('x-requested-with', 'XMLHttpRequest');
xhr3.send(null);
xhr3.onload = function (e) {
console.log(xhr3.responseText + ',' + xhr3.status);
}
2021-02-08 11:44:38 +00:00
}
2023-03-11 09:22:40 +00:00
EndTime = new Date();
MiddleStr = '<!--constStr@EndAt-->:' + EndTime.toLocaleString() + '<br>';
if (newstartsize == 0) {
MiddleStr += '<!--constStr@AverageSpeed-->:' + size_format(totalsize * 1000 / (EndTime.getTime() - StartTime.getTime())) + '/s<br>';
} else {
MiddleStr += '<!--constStr@ThisTime--><!--constStr@AverageSpeed-->:' + size_format((totalsize - newstartsize) * 1000 / (EndTime.getTime() - StartTime.getTime())) + '/s<br>';
}
delete uploading[filename];
while (filename.indexOf('%2F') > 0) filename = filename.replace('%2F', '/');
document.getElementById('upfile_td1_' + tdnum).innerHTML = '<div><a href="<!--base_disk_path--><!--Path-->' + filename + '?preview" id="upfile_a_' + tdnum + '" target="_blank">' + document.getElementById('upfile_td1_' + tdnum).innerHTML + '</a><br><a href="<!--base_disk_path--><!--Path-->' + filename + '" id="upfile_a1_' + tdnum + '"></a><!--constStr@UploadComplete--><button onclick="CopyAllDownloadUrl(\'#upfile_a1_' + tdnum + '\');" id="upfile_cpbt_' + tdnum + '" <!--AdminStart--> style="display:none"<!--AdminEnd--> ><!--constStr@CopyUrl--></button></div>';
label.innerHTML = StartStr + MiddleStr;
label.parentNode.style.background = 'rgba(0,80,0,25%)';
label.style.color = 'black';
2021-02-08 11:44:38 +00:00
// uploadbuttonshow();
<!--AdminStart-->
2023-03-11 09:22:40 +00:00
response.name=file.webkitRelativePath || response.name;
addelement(response);
2021-02-08 11:44:38 +00:00
<!--AdminEnd-->
} else {
2023-03-11 09:22:40 +00:00
if (!response['nextExpectedRanges']) {
label.innerHTML = '<font>' + xhr.responseText + '</font>&nbsp;';
delete uploading[filename];
} else {
var a = response['nextExpectedRanges'][0];
asize = Number(a.slice(0, a.indexOf("-")));
chunksize = 10 * 1024 * 1024;
if (lastCurrentSpeed > 5 * 1024 * 1024) chunksize = 20 * 1024 * 1024;
if (lastCurrentSpeed > 10 * 1024 * 1024) chunksize = 50 * 1024 * 1024;
readblob(asize);
}
2021-02-08 11:44:38 +00:00
}
2023-03-11 09:22:40 +00:00
} else readblob(asize);
2021-02-08 11:44:38 +00:00
}
xhr.send(binary);
}
} else {
2023-03-11 09:22:40 +00:00
if (window.location.pathname.indexOf('%23') > 0 || filename.indexOf('%23') > 0) {
label.innerHTML = '<font><!--constStr@UploadFail23--></font>';
2021-02-08 11:44:38 +00:00
} else {
2023-03-11 09:22:40 +00:00
label.innerHTML = '<font>' + xhr2.responseText + '</font>';
2021-02-08 11:44:38 +00:00
}
2021-07-11 11:47:54 +00:00
delete uploading[filename];
2021-02-08 11:44:38 +00:00
// uploadbuttonshow();
}
}
}
}
<!--OnedriveUploadJsEnd-->
<!--AliyundriveUploadJsStart-->
2023-03-11 09:22:40 +00:00
function preup() {
uploadbuttonhide();
var files = document.getElementById('upload_file').files;
if (files.length < 1) {
2021-02-08 11:44:38 +00:00
uploadbuttonshow();
return;
2023-03-11 09:22:40 +00:00
};
var table1 = document.createElement('table');
document.getElementById('upload_div').appendChild(table1);
table1.setAttribute('class', 'list-table');
var timea = new Date().getTime();
var i = 0;
var uploadList = setInterval(function () {
if (i < files.length) {
if (Object.keys(uploading).length < 5) {
getuplink(i);
i++;
}// else console.log(Object.keys(uploading).length);
} else clearInterval(uploadList);
}, 1000);
function CalcProof(file) {
return new Promise(function (resolve, reject) {
var xhr = new XMLHttpRequest();
xhr.open("POST", '?action=upbigfile');
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8");
xhr.setRequestHeader('x-requested-with', 'XMLHttpRequest');
xhr.onload = function (e) {
var html;
if (xhr.status == 200) {
//console.log(xhr.responseText);
var r = new BigNumber("0x".concat(xhr.responseText));
var i = new BigNumber(file.size);
var o = i ? r.mod(i) : 0;
var reader1 = new FileReader();
var start = o.toNumber();
var end = start + 8;
//if (file.size<end) end = file.size;
console.log(start + " ~ " + end);
//reader1.readAsBinaryString(file.slice(start,end));
reader1.readAsDataURL(file.slice(start, end));
reader1.onload = function (e) {
var proof = this.result;
proof = proof.substr(proof.indexOf('base64,') + 7);
resolve(proof);
}
} else {
//console.log(xhr.status+'calc proof code\n'+xhr.responseText);
reject(xhr.status + "\ncalc proof code\n" + xhr.responseText);
}
}
xhr.send('CalcProof=1');
});
2021-07-11 11:47:54 +00:00
}
2023-03-11 09:22:40 +00:00
function getuplink(i, r = 0) {
var file = files[i];
var td1;
var td2;
if (r == 0) {
var tr1 = document.createElement('tr');
table1.appendChild(tr1);
tr1.setAttribute('data-to', 1);
td1 = document.createElement('td');
tr1.appendChild(td1);
td1.setAttribute('style', 'width:30%;word-break:break-word;');
td1.setAttribute('id', 'upfile_td1_' + timea + '_' + i);
td1.innerHTML = (file.webkitRelativePath || file.name) + '<br>' + size_format(file.size) + ' (' + (i + 1) + '/' + files.length + ')';
td2 = document.createElement('td');
tr1.appendChild(td2);
td2.setAttribute('id', 'upfile_td2_' + timea + '_' + i);
}
var tdnum = timea + '_' + i;
td1 = document.getElementById('upfile_td1_' + tdnum);
td2 = document.getElementById('upfile_td2_' + tdnum);
var chunksize = 10 * 1024 * 1024; // 分块大小
//var chunksize=100*1024; // 测试小块
/*if (file.size>100*1024*1024*1024) {
td2.innerHTML='<font><!--constStr@UpFileTooLarge--></font>';
uploadbuttonshow();
return;
}*/
var upbigfilename = encodeURIComponent((file.webkitRelativePath || file.name));
uploading[upbigfilename] = [i];
var spark = sha1.create();
var reader = new FileReader();
var asize = 0;
var filesha1;
function readblob(start) {
var end = start + chunksize;
var blob = file.slice(start, end);
reader.readAsArrayBuffer(blob);
}
var proof_code = '';
CalcProof(file).then(a => {
proof_code = a;
console.log('proof: ' + proof_code);
2021-07-11 11:47:54 +00:00
readblob(asize);
2023-03-11 09:22:40 +00:00
}, e => {
td2.innerHTML = e;
});
reader.onload = function (e) {
td2.innerHTML = '<!--constStr@Calculate--> SHA1: ' + (asize * 100 / file.size).toFixed(2) + '%';
var binary = this.result;
spark.update(binary);
asize += chunksize;
if (asize < file.size) {
readblob(asize);
} else {
filesha1 = spark.hex();
td2.innerHTML = 'SHA1: ' + filesha1;
2021-02-25 07:07:50 +00:00
<!--GuestStart-->
2023-03-11 09:22:40 +00:00
function getext(str) {
let p = str.lastIndexOf('.');
if (p === -1) return '';
if (p === 0) return '';
return str.substr(p);
}
var ext = getext(file.webkitRelativePath || file.name);
upbigfilename = filesha1 + ext;
2021-02-25 07:07:50 +00:00
<!--GuestEnd-->
2023-03-11 09:22:40 +00:00
//while (upbigfilename.indexOf('%2F')>0) upbigfilename = upbigfilename.replace('%2F', '/');
td2.innerHTML='<!--constStr@GetUploadLink--> ...';
var html = JSON.parse(localStorage.getItem(filesha1));
//console.log(html);
if (html !== null && ('part_info_list' in html)) {
td2.innerHTML = '<!--constStr@UploadStart--> ...';
binupfile(file, html, timea + '_' + i, upbigfilename, filesha1, chunksize);
} else {
var xhr1 = new XMLHttpRequest();
xhr1.open("POST", '?action=upbigfile');
//xhr1.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=utf-8");
xhr1.setRequestHeader('x-requested-with', 'XMLHttpRequest');
xhr1.onload = function (e) {
//console.log(xhr1.status+xhr1.responseText);
td2.innerHTML = '<font>' + xhr1.responseText + '</font>';
if (xhr1.status == 201) {
if (xhr1.responseText == '') {
getuplink(i, 1);
return;
}
var html = JSON.parse(xhr1.responseText);
//console.log(html);
if (!html['part_info_list']) {
if (html.name != '') {
if (html.exist == true) td2.innerHTML = html.name + ' 文件名已有';
else if (html.rapid_upload == true) td2.innerHTML = html.name + ' 秒传';
else td2.innerHTML = '<font>' + xhr1.responseText + '</font><br>';
td1.innerHTML = '<div style="color:green"><a href="<!--base_disk_path--><!--Path-->' + upbigfilename + '?preview" id="upfile_a_' + tdnum + '" target="_blank">' + td1.innerHTML + '</a><br><a href="<!--base_disk_path--><!--Path-->' + upbigfilename + '" id="upfile_a1_' + tdnum + '"></a><!--constStr@UploadComplete--><button onclick="CopyAllDownloadUrl(\'#upfile_a1_' + tdnum + '\');" id="upfile_cpbt_' + tdnum + '" <!--AdminStart--> style="display:none"<!--AdminEnd--> ><!--constStr@CopyUrl--></button></div>';
} else {
td2.innerHTML = '<font>' + xhr1.responseText + '</font>';
}
delete uploading[upbigfilename];
2021-07-11 11:47:54 +00:00
} else {
2023-03-11 09:22:40 +00:00
td2.innerHTML = '<!--constStr@UploadStart--> ...';
//console.log(html);
localStorage.setItem(filesha1, JSON.stringify(html));
binupfile(file, html, timea + '_' + i, upbigfilename, filesha1, chunksize);
2021-07-11 11:47:54 +00:00
}
2023-03-11 09:22:40 +00:00
} else {
2021-07-11 11:47:54 +00:00
delete uploading[upbigfilename];
2023-03-11 09:22:40 +00:00
}
/*if (i<files.length-1) {
i++;
getuplink(i);
}*/
2021-02-08 11:44:38 +00:00
}
2023-03-11 09:22:40 +00:00
xhr1.send('upbigfilename=' + upbigfilename + '&filesize=' + file.size + '&filelastModified=' + file.lastModified + '&proof_code=' + proof_code + '&filesha1=' + filesha1 + '&chunksize=' + chunksize + '&_admin=' + localStorage.getItem("admin"));
2021-02-08 11:44:38 +00:00
}
}
}
}
2023-03-11 09:22:40 +00:00
uploadbuttonshow();
2021-02-08 11:44:38 +00:00
}
2021-02-25 07:07:50 +00:00
function binupfile(file, res, tdnum, filename, filesha1, chunksize) {
2021-02-08 11:44:38 +00:00
// xhr.getResponseHeader
2021-02-25 07:07:50 +00:00
if (!('ETag' in res)) res['ETag'] = new Array();
var fileid = res['file_id'];
var uploadid = res['upload_id'];
2023-03-11 09:22:40 +00:00
var label = document.getElementById('upfile_td2_' + tdnum);
2021-02-08 11:44:38 +00:00
var reader = new FileReader();
2023-03-11 09:22:40 +00:00
var StartStr = '';
var MiddleStr = '';
2021-02-08 11:44:38 +00:00
var StartTime;
var EndTime;
var newstartsize = 0;
2023-03-11 09:22:40 +00:00
if (!!file) {
2021-02-25 07:07:50 +00:00
var chunknum = 0;
var chunknumtotal = res['part_info_list'].length;
2023-03-11 09:22:40 +00:00
var asize = 0;
var totalsize = file.size;
var newstartsize = 0;
while (res['ETag'][chunknum] != null) {
2021-02-25 07:07:50 +00:00
chunknum++;
newstartsize += chunksize;
}
2021-02-08 11:44:38 +00:00
StartTime = new Date();
asize = newstartsize;
2023-03-11 09:22:40 +00:00
if (newstartsize == 0) {
StartStr = '<!--constStr@UploadStartAt-->:' + StartTime.toLocaleString() + '<br>';
2021-02-08 11:44:38 +00:00
} else {
2023-03-11 09:22:40 +00:00
StartStr = '<!--constStr@LastUpload-->' + size_format(newstartsize) + '<br><!--constStr@ThisTime--><!--constStr@UploadStartAt-->:' + StartTime.toLocaleString() + '<br>';
2021-02-08 11:44:38 +00:00
}
//var chunksize=5*1024*1024; // chunk size, max 60M. 每小块上传大小
//if (totalsize>200*1024*1024) chunksize=10*1024*1024;
function readblob(start) {
2023-03-11 09:22:40 +00:00
var end = start + chunksize;
var blob = file.slice(start, end);
2021-02-25 07:07:50 +00:00
reader.readAsArrayBuffer(blob);
//reader.readAsArrayBuffer(file);
2021-02-08 11:44:38 +00:00
}
readblob(asize);
2023-03-11 09:22:40 +00:00
reader.onload = function (e) {
if (asize > totalsize) {
2021-02-25 07:07:50 +00:00
var xhr1 = new XMLHttpRequest();
xhr1.open("POST", '?action=upbigfile');
2021-07-11 11:47:54 +00:00
//xhr1.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=utf-8");
2023-03-11 09:22:40 +00:00
xhr1.setRequestHeader('x-requested-with', 'XMLHttpRequest');
xhr1.onload = function (e) {
console.log(xhr1.responseText + ',' + xhr1.status);
if (xhr1.status == 200) {
2021-02-25 07:07:50 +00:00
localStorage.removeItem(filesha1);
2021-02-08 11:44:38 +00:00
<!--AdminStart-->
2023-03-11 09:22:40 +00:00
var html = JSON.parse(xhr1.responseText);
2021-02-08 11:44:38 +00:00
//response.name=file.webkitRelativePath||response.name;
addelement(html);
<!--AdminEnd-->
2023-03-11 09:22:40 +00:00
/*if (totalsize>10*1024*1024) {
var xhr3 = new XMLHttpRequest();
xhr3.open("GET", '?action=del_upload_cache&filelastModified='+file.lastModified+'&filesize='+file.size+'&filename='+filename);
xhr3.setRequestHeader('x-requested-with','XMLHttpRequest');
xhr3.send(null);
xhr3.onload = function(e){
console.log(xhr3.responseText+','+xhr3.status);
}
}*/
EndTime=new Date();
MiddleStr = '<!--constStr@EndAt-->:' + EndTime.toLocaleString() + '<br>';
if (newstartsize == 0) {
MiddleStr += '<!--constStr@AverageSpeed-->:' + size_format(totalsize * 1000 / (EndTime.getTime() - StartTime.getTime())) + '/s<br>';
2021-02-25 07:07:50 +00:00
} else {
2023-03-11 09:22:40 +00:00
MiddleStr += '<!--constStr@ThisTime--><!--constStr@AverageSpeed-->:' + size_format((totalsize - newstartsize) * 1000 / (EndTime.getTime() - StartTime.getTime())) + '/s<br>';
2021-02-08 11:44:38 +00:00
}
2023-03-11 09:22:40 +00:00
document.getElementById('upfile_td1_' + tdnum).innerHTML = '<div style="color:green"><a href="<!--base_disk_path--><!--Path-->' + filename + '?preview" id="upfile_a_' + tdnum + '" target="_blank">' + document.getElementById('upfile_td1_' + tdnum).innerHTML + '</a><br><a href="<!--base_disk_path--><!--Path-->' + filename + '" id="upfile_a1_' + tdnum + '"></a><!--constStr@UploadComplete--><button onclick="CopyAllDownloadUrl(\'#upfile_a1_' + tdnum + '\');" id="upfile_cpbt_' + tdnum + '" <!--AdminStart--> style="display:none"<!--AdminEnd--> ><!--constStr@CopyUrl--></button></div>';
label.innerHTML = StartStr + MiddleStr;
label.style.color = 'green';
2022-10-17 15:15:57 +00:00
label.parentNode.style.background = 'rgba(0,80,0,25%)';
2021-02-08 11:44:38 +00:00
} else {
2023-03-11 09:22:40 +00:00
label.innerHTML = '<font color="red">' + xhr1.status + ',' + xhr1.responseText + '</font>';
2021-02-25 07:07:50 +00:00
localStorage.removeItem(filesha1);
2021-02-08 11:44:38 +00:00
}
2021-07-11 11:47:54 +00:00
delete uploading[filename];
2021-02-25 07:07:50 +00:00
}
2022-10-17 15:15:57 +00:00
xhr1.send('uploadid=' + uploadid + '&fileid=' + fileid + '&etag=' + JSON.stringify(res['ETag']) + '&_admin=' + localStorage.getItem("admin"));
2021-02-25 07:07:50 +00:00
} else {
var binary = this.result;
var xhr = new XMLHttpRequest();
xhr.open("PUT", res['part_info_list'][chunknum]['upload_url'], true);
//xhr.setRequestHeader('x-requested-with','XMLHttpRequest');
2023-03-11 09:22:40 +00:00
bsize = asize + e.loaded - 1;
xhr.setRequestHeader('Content-Range', 'bytes ' + asize + '-' + bsize + '/' + totalsize);
xhr.upload.onprogress = function (e) {
2021-02-25 07:07:50 +00:00
if (e.lengthComputable) {
var tmptime = new Date();
2023-03-11 09:22:40 +00:00
var tmpspeed = e.loaded * 1000 / (tmptime.getTime() - C_starttime.getTime());
var remaintime = (totalsize - asize - e.loaded) / tmpspeed;
let percent = ((asize + e.loaded) * 100 / totalsize).toFixed(2);
2022-10-17 15:15:57 +00:00
label.parentNode.style.background = "linear-gradient(to right, rgba(0,0,0,25%) " + percent + "%, rgba(0,0,0,0%) 0%)";
2023-03-11 09:22:40 +00:00
label.innerHTML = StartStr + '<!--constStr@Upload--> ' + size_format(asize + e.loaded) + ' / ' + size_format(totalsize) + ' = ' + percent + '% <!--constStr@AverageSpeed-->:' + size_format((asize + e.loaded - newstartsize) * 1000 / (tmptime.getTime() - StartTime.getTime())) + '/s<br><!--constStr@CurrentSpeed--> ' + size_format(tmpspeed) + '/s <!--constStr@Expect--> ' + seconds2hour(remaintime.toFixed(1));
2021-02-08 11:44:38 +00:00
}
2021-02-25 07:07:50 +00:00
}
var C_starttime = new Date();
2023-03-11 09:22:40 +00:00
xhr.onload = function (e) {
if (xhr.status < 500) {
2021-02-25 07:07:50 +00:00
//console.log(xhr.responseText);
//console.log(xhr.getResponseHeader('ETag'));
2023-03-11 09:22:40 +00:00
//var response=JSON.parse(xhr.responseText);
if (xhr.responseText == '' && xhr.getResponseHeader('ETag') != '') {
// 有ETag说明本段上传成功
let etag = xhr.getResponseHeader('ETag');
//if (etag.substr(0,1)=='"') etag = etag.substr(1);还就要引号!
//if (etag.substr(-1)=='"') etag = etag.substr(0, etag.length-1);
res['ETag'][chunknum] = etag;
localStorage.setItem(filesha1, JSON.stringify(res));
chunknum++;
asize = bsize + 1;
if (chunknum == chunknumtotal) {
// 上传结束
var xhr1 = new XMLHttpRequest();
xhr1.open("POST", '?action=upbigfile');
//xhr1.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=utf-8");
xhr1.setRequestHeader('x-requested-with', 'XMLHttpRequest');
xhr1.onload = function (e) {
console.log(xhr1.responseText + ',' + xhr1.status);
if (xhr1.status == 200) {
localStorage.removeItem(filesha1);
2021-02-25 07:07:50 +00:00
<!--AdminStart-->
2023-03-11 09:22:40 +00:00
var html = JSON.parse(xhr1.responseText);
//response.name=file.webkitRelativePath||response.name;
addelement(html);
2021-02-25 07:07:50 +00:00
<!--AdminEnd-->
2023-03-11 09:22:40 +00:00
/*if (totalsize>10*1024*1024) {
var xhr3 = new XMLHttpRequest();
xhr3.open("GET", '?action=del_upload_cache&filelastModified='+file.lastModified+'&filesize='+file.size+'&filename='+filename);
xhr3.setRequestHeader('x-requested-with','XMLHttpRequest');
xhr3.send(null);
xhr3.onload = function(e){
console.log(xhr3.responseText+','+xhr3.status);
}
}*/
EndTime=new Date();
MiddleStr = '<!--constStr@EndAt-->:' + EndTime.toLocaleString() + '<br>';
if (newstartsize == 0) {
MiddleStr += '<!--constStr@AverageSpeed-->:' + size_format(totalsize * 1000 / (EndTime.getTime() - StartTime.getTime())) + '/s<br>';
} else {
MiddleStr += '<!--constStr@ThisTime--><!--constStr@AverageSpeed-->:' + size_format((totalsize - newstartsize) * 1000 / (EndTime.getTime() - StartTime.getTime())) + '/s<br>';
2021-02-25 07:07:50 +00:00
}
2023-03-11 09:22:40 +00:00
document.getElementById('upfile_td1_' + tdnum).innerHTML = '<div style="color:green"><a href="<!--base_disk_path--><!--Path-->' + filename + '?preview" id="upfile_a_' + tdnum + '" target="_blank">' + document.getElementById('upfile_td1_' + tdnum).innerHTML + '</a><br><a href="<!--base_disk_path--><!--Path-->' + filename + '" id="upfile_a1_' + tdnum + '"></a><!--constStr@UploadComplete--><button onclick="CopyAllDownloadUrl(\'#upfile_a1_' + tdnum + '\');" id="upfile_cpbt_' + tdnum + '" <!--AdminStart--> style="display:none"<!--AdminEnd--> ><!--constStr@CopyUrl--></button></div>';
label.innerHTML = StartStr + MiddleStr;
label.style.color = 'green';
label.parentNode.style.background = 'rgba(0,80,0,25%)';
2021-02-25 07:07:50 +00:00
} else {
2023-03-11 09:22:40 +00:00
label.innerHTML = '<font>' + xhr1.status + ',' + xhr1.responseText + '</font>';
localStorage.removeItem(filesha1);
2021-02-25 07:07:50 +00:00
}
2023-03-11 09:22:40 +00:00
delete uploading[filename];
2021-02-25 07:07:50 +00:00
}
2023-03-11 09:22:40 +00:00
xhr1.send('uploadid=' + uploadid + '&fileid=' + fileid + '&etag=' + JSON.stringify(res['ETag']) + '&_admin=' + localStorage.getItem("admin"));
// uploadbuttonshow();
} else {
readblob(asize);
2021-02-25 07:07:50 +00:00
}
2021-07-11 11:47:54 +00:00
} else {
2023-03-11 09:22:40 +00:00
console.log(xhr.status + xhr.responseText);//<PartEtag>
if (xhr.status == 409) {
let str = xhr.responseText;
str = str.substr(str.indexOf('<PartEtag>') + 10);
str = str.substr(0, str.indexOf('</PartEtag>'));
res['ETag'][chunknum] = str;
localStorage.setItem(filesha1, JSON.stringify(res));
chunknum++;
asize += chunksize;
readblob(asize);
} else {
delete uploading[filename];
}
2021-07-11 11:47:54 +00:00
//label.innerHTML='<font>'+xhr.responseText+'</font><br>';
2023-03-11 09:22:40 +00:00
}
} else readblob(asize);
2021-02-25 07:07:50 +00:00
}
xhr.send(binary);
2021-02-08 11:44:38 +00:00
}
}
}
}
<!--AliyundriveUploadJsEnd-->
2021-07-11 11:47:54 +00:00
<!--GoogledriveUploadJsStart-->
2023-03-11 09:22:40 +00:00
function preup() {
alert("Stop!\nCan not upload form explorer without token.");
}
<!--GoogledriveUploadJsEnd-->
2021-02-08 11:44:38 +00:00
<!--ListEnd-->
2023-03-11 09:22:40 +00:00
function operatediv_close(operate) {
document.getElementById(operate + '_div').style.display = 'none';
document.getElementById('mask').style.display = 'none';
}
<!--AdminStart-->
function logout() {
var expd = new Date();
expd.setTime(expd.getTime() + 1000);
var expires = "expires=" + expd.toGMTString();
document.cookie = "admin=; path=/; " + expires;
location.href = location.href;
}
2021-07-11 11:47:54 +00:00
/*for some mobile browser*/
2023-03-11 09:22:40 +00:00
function menu_click(e) {
var ee = document.getElementsByClassName("active");
for (var i = 0; i < ee.length; i++) {
2021-07-11 11:47:54 +00:00
ee[i].classList.remove("active");
}
2023-03-11 09:22:40 +00:00
if (e.type != "mouseout") this.classList.add("active");
2021-07-11 11:47:54 +00:00
}
2023-03-11 09:22:40 +00:00
(function () {
var e = document.getElementsByClassName("operate");
2021-07-11 11:47:54 +00:00
document.body.addEventListener("touchstart", menu_click);
2023-03-11 09:22:40 +00:00
for (var i = 0; i < e.length; i++) {
2021-07-11 11:47:54 +00:00
e[i].addEventListener("touchstart", menu_click);
e[i].addEventListener("mouseout", menu_click);
}
})();
2022-10-17 15:15:57 +00:00
//TfoInfo
2021-02-08 11:44:38 +00:00
function tminf() {
2023-03-11 09:22:40 +00:00
var tminftxt = document.getElementById("tminf").innerText;
2021-02-08 11:44:38 +00:00
swal({
2023-03-11 09:22:40 +00:00
title: "Tfo's Update Information",
text: tminftxt,
icon: "info",
buttons: {
cancel: "Close",
update: "Update with the program",
},
})
.then((value) => {
switch (value) {
case "update":
window.open("/?setup");
swal.close();
default:
swal.close();
2021-02-08 11:44:38 +00:00
}
2023-03-11 09:22:40 +00:00
});
}
<!--IsFolderStart-->
function showdiv(event, action, num) {
var $operatediv = document.getElementsByName('operatediv');
for ($i = 0; $i < $operatediv.length; $i++) {
$operatediv[$i].style.display = 'none';
}
document.getElementById('mask').style.display = '';
//document.getElementById('mask').style.width=document.documentElement.scrollWidth+'px';
document.getElementById('mask').style.height = document.documentElement.scrollHeight < window.innerHeight ? window.innerHeight : document.documentElement.scrollHeight + 'px';
var str;
if (num == '') {
str = '';
num = 0;
2021-02-08 11:44:38 +00:00
} else {
2023-03-11 09:22:40 +00:00
str = decodeURIComponent(document.getElementById('file_a' + num).href);
if (str.substr(-1) == ' ') str = str.substr(0, str.length - 1);
if (str.substr(-1) == '/') str = str.substr(0, str.length - 1);
if (str.substr(-8) == '?preview') str = str.substr(0, str.length - 8);
if (str.lastIndexOf('/') > -1) str = str.substr(str.lastIndexOf('/') + 1);
2021-02-08 11:44:38 +00:00
}
2023-03-11 09:22:40 +00:00
var fileid = document.getElementById('file_a' + num).attributes['fileid'].nodeValue;
document.getElementById(action + '_div').style.display = '';
document.getElementById(action + '_label').innerText = str;//.replace(/&/,'&amp;');
document.getElementById(action + '_sid').value = num;
document.getElementById(action + '_fileid').value = fileid;
document.getElementById(action + '_hidden').value = str;
if (action == 'rename') document.getElementById(action + '_input').value = str;
/*var $e = event || window.event;
var $scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;*/
var $scrollY = document.documentElement.scrollTop || document.body.scrollTop;
/*var $x = $e.pageX || $e.clientX + $scrollX;
var $y = $e.pageY || $e.clientY + $scrollY;
if (action=='create') {*/
document.getElementById(action + '_div').style.left = (document.body.clientWidth - document.getElementById(action + '_div').offsetWidth) / 2 + 'px';
document.getElementById(action + '_div').style.top = (window.innerHeight - document.getElementById(action + '_div').offsetHeight) / 2 + $scrollY + 'px';
/*} else {
if ($x + document.getElementById(action + '_div').offsetWidth > document.body.clientWidth) {
if (document.getElementById(action + '_div').offsetWidth > document.body.clientWidth) {
document.getElementById(action + '_div').offsetWidth=document.body.clientWidth+'px';
document.getElementById(action + '_div').style.left='0px';
} else {
document.getElementById(action + '_div').style.left=document.body.clientWidth-document.getElementById(action + '_div').offsetWidth+'px';
}
} else {
document.getElementById(action + '_div').style.left=$x+'px';
}
document.getElementById(action + '_div').style.top=$y+'px';
}*/
document.getElementById(action + '_input').focus();
}
2021-02-08 11:44:38 +00:00
function submit_operate(str) {
2023-03-11 09:22:40 +00:00
var num = document.getElementById(str + '_sid').value;
2021-02-08 11:44:38 +00:00
var xhr = new XMLHttpRequest();
xhr.open("POST", '');
2023-03-11 09:22:40 +00:00
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8");
2021-02-08 11:44:38 +00:00
xhr.setRequestHeader('x-requested-with', 'XMLHttpRequest');
2023-03-11 09:22:40 +00:00
xhr.onload = function (e) {
2021-02-08 11:44:38 +00:00
var html;
2023-03-11 09:22:40 +00:00
if (xhr.status < 300) {
console.log(xhr.status + ',' + xhr.responseText);
if (str == 'rename') {
html = JSON.parse(xhr.responseText);
var file_a = document.getElementById('file_a' + num);
file_a.innerText = html.name;
file_a.href = (file_a.href.substr(-8) == '?preview') ? (html.name.replace(/#/, '%23') + '?preview') : (html.name.replace(/#/, '%23') + '/');
2021-02-08 11:44:38 +00:00
}
2023-03-11 09:22:40 +00:00
if (str == 'move' || str == 'delete') document.getElementById('tr' + num).parentNode.removeChild(document.getElementById('tr' + num));
if (str == 'create') {
html = JSON.parse(xhr.responseText);
2021-02-08 11:44:38 +00:00
addelement(html);
}
//swal("<!--constStr@Success-->", "", {icon: "success",buttons: false,timer: 1000,closeOnEsc: false,});
2023-03-11 09:22:40 +00:00
} else swal(xhr.status, xhr.responseText, { icon: "error", timer: 3000, closeOnEsc: false, });
document.getElementById(str + '_div').style.display = 'none';
document.getElementById('mask').style.display = 'none';
2021-02-08 11:44:38 +00:00
}
2023-03-11 09:22:40 +00:00
xhr.send(serializeForm(str + '_form') + '&_admin=' + localStorage.getItem("admin"));
2021-02-08 11:44:38 +00:00
return false;
}
function addelement(html) {
2023-03-11 09:22:40 +00:00
var tr1 = document.createElement('tr');
tr1.setAttribute('data-to', 1);
var td1 = document.createElement('td');
td1.setAttribute('class', 'file');
var a1 = document.createElement('a');
a1.href = '<!--base_disk_path--><!--Path-->' + html.name.replace(/#/, '%23');
a1.innerText = html.name;
a1.target = '_blank';
var td2 = document.createElement('td');
td2.setAttribute('class', 'updated_at');
if (!!html.time) td2.innerText = html.time.replace(/T/, ' ').replace(/Z/, '');
var td3 = document.createElement('td');
td3.setAttribute('class', 'size');
if (!!html.size) td3.innerText = size_format(html.size);
else td3.innerText = '0 B';
if (html.type == 'folder') {
a1.href += '/';
document.getElementById('tr0').parentNode.insertBefore(tr1, document.getElementById('tr0').nextSibling);
}
if (html.type == 'file') {
a1.href += '?preview';
a1.name = 'filelist';
2021-02-08 11:44:38 +00:00
document.getElementById('tr0').parentNode.appendChild(tr1);
}
tr1.appendChild(td1);
td1.appendChild(a1);
tr1.appendChild(td2);
tr1.appendChild(td3);
}
function getElements(formId) {
var form = document.getElementById(formId);
var elements = new Array();
var tagElements = form.getElementsByTagName('input');
2023-03-11 09:22:40 +00:00
for (var j = 0; j < tagElements.length; j++) {
2021-02-08 11:44:38 +00:00
elements.push(tagElements[j]);
}
var tagElements = form.getElementsByTagName('select');
2023-03-11 09:22:40 +00:00
for (var j = 0; j < tagElements.length; j++) {
2021-02-08 11:44:38 +00:00
elements.push(tagElements[j]);
}
var tagElements = form.getElementsByTagName('textarea');
2023-03-11 09:22:40 +00:00
for (var j = 0; j < tagElements.length; j++) {
2021-02-08 11:44:38 +00:00
elements.push(tagElements[j]);
}
return elements;
}
function serializeElement(element) {
var method = element.tagName.toLowerCase();
var parameter;
if (method == 'select') {
parameter = [element.name, element.value];
}
switch (element.type.toLowerCase()) {
case 'submit':
case 'hidden':
case 'password':
case 'text':
case 'date':
case 'textarea':
parameter = [element.name, element.value];
break;
case 'checkbox':
case 'radio':
2023-03-11 09:22:40 +00:00
if (element.checked) {
2021-02-08 11:44:38 +00:00
parameter = [element.name, element.value];
}
break;
}
if (parameter) {
var key = encodeURIComponent(parameter[0]);
if (key.length == 0) return;
if (parameter[1].constructor != Array) parameter[1] = [parameter[1]];
var values = parameter[1];
var results = [];
for (var i = 0; i < values.length; i++) {
results.push(key + '=' + encodeURIComponent(values[i]));
}
return results.join('&');
}
}
function serializeForm(formId) {
var elements = getElements(formId);
var queryComponents = new Array();
for (var i = 0; i < elements.length; i++) {
var queryComponent = serializeElement(elements[i]);
if (queryComponent) {
queryComponents.push(queryComponent);
}
}
return queryComponents.join('&');
}
<!--IsFolderEnd-->
<!--AdminEnd-->
<!--EncryptedStart-->
2023-03-11 09:22:40 +00:00
document.getElementById('password1').focus();
2021-02-08 11:44:38 +00:00
<!--EncryptedEnd-->
</script>
2023-03-11 09:22:40 +00:00
<!--LoginStart-->
<script src="https://test1.jsdelivr.net/npm/sha1@1.1.1/sha1.min.js"></script>
</script>
<!--LoginStart-->
<script src="?jsFile=sha1.min.js"></script><!--LoginEnd-->
2021-02-08 11:44:38 +00:00
<!--customScript-->
2023-03-11 09:22:40 +00:00
2021-02-08 11:44:38 +00:00
</html>