62 Commits
Author SHA1 Message Date
qkqpttgfandGitHub 432fdc5f46 fix: upload file to any folder 2020-12-15 14:45:19 +08:00
root 7c09b0f33c fix: glitch xhr can post 2020-12-15 13:06:15 +08:00
root b0f10e1434 now, heroku xhr can post 2020-12-15 12:52:03 +08:00
qkqpttgfandGitHub 7a4398a55b Merge pull request #171 from 186526/patch-11
renexmoe update
2020-12-15 12:41:56 +08:00
186526andGitHub 9ed1b58c8d renexmoe update 2020-12-13 16:58:18 +08:00
qkqpttgfandGitHub 4add1167db try fix: suddenly can not save config in glitch 2020-12-08 14:53:25 +08:00
qkqpttgfandGitHub 07cd427066 Merge pull request #165 from david082321/patch-1
add language zh-tw
2020-12-05 21:00:08 +08:00
david082321andGitHub e50e48014e add language zh-tw 2020-12-05 00:37:39 +08:00
qkqpttgfandGitHub 75702b9a77 fix: #162 2020-12-01 12:56:35 +08:00
qkqpttgfandGitHub 498a4ce5a8 Merge pull request #161 from 186526/patch-10
Fix Download Error for renexmoe
2020-11-30 09:09:42 +08:00
186526andGitHub 90d4cf7aef Fix Download Error for renexmoe 2020-11-29 18:33:02 +08:00
186526andGitHub ef5e410472 Add Background Pic Support for renexmoe (#159) 2020-11-29 14:41:15 +08:00
186526andGitHub 4279d1931d Fix renexmoe menu & pjax bug (#158)
* Update renexmoe.html

* Update renexmoe.html
2020-11-29 11:06:58 +08:00
qkqpttgfandGitHub c1bc939a64 Merge pull request #156 from 186526/patch-7
More modern fonts & fix pjax errors
2020-11-28 21:29:57 +08:00
qkqpttgfandGitHub 9422cbc4b8 fix: folder name has multy space 2020-11-28 21:23:15 +08:00
186526andGitHub ff7d92a9e9 More modern fonts & fix pjax errors 2020-11-28 21:20:15 +08:00
qkqpttgfandGitHub 2efc62257b fix link 2020-11-28 18:25:17 +08:00
qkqpttgfandGitHub c4df31d045 Merge pull request #152 from 186526/patch-6
Add Pjax Support & Add URL view for renexmoe.html
2020-11-28 18:13:43 +08:00
186526andGitHub 21ab0a6e1a Add Pjax Support & Add URL view for renexmoe.html 2020-11-28 14:55:17 +08:00
qkqpttgfandGitHub e40223eb72 fix: multy space or & in file name 2020-11-27 13:37:58 +08:00
qkqpttgfandGitHub 1d7d667220 try fix some platform disable visit file start with . 2020-11-26 15:51:17 +08:00
qkqpttgfandGitHub 7e952b39be 21Vianet client replace viptg to another 2020-11-24 09:21:44 +08:00
qkqpttgfandGitHub f9858affa5 Update update.sh 2020-11-17 23:22:56 +08:00
qkqpttgfandGitHub 826b3f7f1a fix: index.html in non-english folder 2020-11-17 16:15:00 +08:00
qkqpttgfandGitHub 22a4cc70c9 fix: move to parentfolder 2020-11-09 18:05:02 +08:00
qkqpttgfandGitHub c7a835d457 Update update.sh 2020-11-07 17:05:07 +08:00
qkqpttgfandGitHub bd98c88f84 Update readme.md 2020-11-06 19:28:23 +08:00
qkqpttgfandGitHub 74f0d173b9 Create purecool.html 2020-11-06 18:37:51 +08:00
qkqpttgfandGitHub 862b89d5e6 fix bug 2020-11-06 18:32:11 +08:00
qkqpttgfandGitHub a54d907ea3 Update readme.md 2020-11-06 18:10:34 +08:00
qkqpttgfandGitHub da87d45edc Update version 2020-11-06 18:03:52 +08:00
root bd629d954c Add platform Glitch 2020-11-06 18:02:03 +08:00
qkqpttgfandGitHub 580cd87af0 Merge pull request #139 from 186526/patch-5
Add menu for renexmoe
2020-10-31 22:43:50 +08:00
186526andGitHub 0db7040d01 Add menu 2020-10-31 22:33:02 +08:00
qkqpttgfandGitHub 1824feabc7 fix: sharepoint site name non-english 2020-10-30 16:47:38 +08:00
qkqpttgfandGitHub 375fa49035 fix bug: passfile use non-english 2020-10-27 19:45:28 +08:00
qkqpttgfandGitHub 1b4be18301 fix bug: guest upload folder with no ext file 2020-10-19 14:19:31 +08:00
qkqpttgfandGitHub 146ce057f2 Merge pull request #133 from 186526/patch-4
Rewrite Theme Renexmoe
2020-10-18 18:53:31 +08:00
186526andGitHub e17398d336 Rewrite Theme Renexmoe
186526/onemanager-theme-renexmoe
2020-10-18 16:21:50 +08:00
qkqpttgfandGitHub c502a1b6ab fix bug 2020-10-03 11:28:56 +08:00
qkqpttgfandGitHub 32479a9dcf fix bug 2020-10-03 09:47:18 +08:00
qkqpttgfandGitHub ab54a7af37 guest can upload multy files now 2020-10-01 12:16:47 +08:00
qkqpttgfandGitHub f6f7c6bbac can proxy FC/SCF/CFC/FG 2020-09-30 18:51:46 +08:00
qkqpttgfandGitHub c4c2c20bce Update CFWorkers.js 2020-09-28 22:45:28 +08:00
qkqpttgfandGitHub 11e75eec03 Update readme.md 2020-09-28 18:08:06 +08:00
qkqpttgfandGitHub 4e526f4c58 add Caddy2 rule 2020-09-27 16:08:50 +08:00
qkqpttgfandGitHub 061da4fd7c Update .htaccess 2020-09-27 15:43:48 +08:00
qkqpttgfandGitHub a908ec285e fix: fix: fix: fix: FC base_path 2020-09-23 15:04:30 +08:00
qkqpttgfandGitHub c25df135ad fix: fix: fix: FC base_path 2020-09-22 20:47:29 +08:00
qkqpttgfandGitHub ded802f448 fix: fix: FC base_path 2020-09-22 20:06:14 +08:00
qkqpttgfandGitHub 936764d7b6 fix: FC base_path 2020-09-22 19:42:55 +08:00
qkqpttgfandGitHub b8095a38b0 fix: FC base_path 2020-09-22 19:41:50 +08:00
qkqpttgfandGitHub 0d408f208e focus password input 2020-09-18 13:44:59 +08:00
qkqpttgfandGitHub 4b3c3a9407 fix: & in path cause readme bug, admin now not need folder passwd 2020-09-18 11:10:49 +08:00
qkqpttgfandGitHub ab1ceefdeb fix: + in path cause readme bug 2020-09-18 10:17:01 +08:00
qkqpttgfandGitHub e08ee5ab99 Create CFWorkers.js 2020-09-15 15:21:53 +08:00
qkqpttgfandGitHub acaeb5d3a0 Create nginx.html 2020-09-15 15:09:54 +08:00
qkqpttgfandGitHub 00f486b0c7 Create apache.html 2020-09-15 15:08:37 +08:00
qkqpttgfandGitHub 87f3ce7b4e Create iis.html 2020-09-15 15:08:07 +08:00
qkqpttgfandGitHub 6162f2e3c9 cache in comm or disk 2020-09-15 15:00:19 +08:00
qkqpttgfandGitHub efc2d0d0f5 slash in using theme 2020-09-13 13:21:02 +08:00
qkqpttgfandGitHub 91d118d567 slash in needupdate() 2020-09-13 13:04:58 +08:00
21 changed files with 2144 additions and 759 deletions
View File
+10
View File
@@ -13,4 +13,14 @@ RewriteRule ^(.*) index.php?/$1 [L]
# rewrite { # rewrite {
# to index.php?/$1 # to index.php?/$1
# } # }
#
### caddy2 Caddyfile
# @try_files {
# not path /.well-known/*
# file {
# try_files index.php
# }
# }
# rewrite @try_files {http.matchers.file.relative}
#
###----------------------------------- ###-----------------------------------
+90
View File
@@ -0,0 +1,90 @@
// odd, 单日
const SingleDay = 'https://aaa1.herokuapp.com'
// even, 双日
const DoubleDay = 'https://bbb2.herokuapp.com'
//const SingleDay = 'https://153xxxxx0.cn-hongkong.fc.aliyuncs.com/2016-08-15/proxy/onedrive/xxx/'
//const DoubleDay = 'https://153xxxxx0.cn-hongkong.fc.aliyuncs.com/2016-08-15/proxy/onedrive/xxx/'
// CF proxy all, 一切给CF代理,true/false
const CFproxy = true
// Used in cloudflare workers, odd or even days point to 2 heroku account.
// 由于heroku不绑卡不能自定义域名,就算绑卡后https也不方便
// 另外免费套餐每月550小时,有些人不够用
// 于是在CF Workers使用此代码,分单双日拉取不同heroku帐号下的相同网页
// 只改上面,下面不用动
addEventListener('fetch', event => {
let url=new URL(event.request.url);
if (url.protocol == 'http:') {
url.protocol = 'https:'
event.respondWith( Response.redirect(url.href) )
} else {
let response = null;
let nd = new Date();
if (nd.getDate()%2) {
host = SingleDay
} else {
host = DoubleDay
}
if (host.substr(0, 7)!='http://'&&host.substr(0, 8)!='https://') host = 'http://' + host;
response = fetchAndApply(host, event.request);
event.respondWith( response );
}
})
async function fetchAndApply(host, request) {
let f_url = new URL(request.url);
let a_url = new URL(host);
let replace_path = a_url.pathname;
if (replace_path.substr(replace_path.length-1)!='/') replace_path += '/';
let replaced_path = '/';
let query = f_url.search;
let path = f_url.pathname;
if (host.substr(host.length-1)=='/') path = path.substr(1);
f_url.href = host + path + query;
let response = null;
if (!CFproxy) {
response = await fetch(f_url, request);
} else {
let method = request.method;
let body = request.body;
let request_headers = request.headers;
let new_request_headers = new Headers(request_headers);
new_request_headers.set('Host', f_url.host);
new_request_headers.set('Referer', request.url);
response = await fetch(f_url.href, {
method: method,
body: body,
headers: new_request_headers
});
}
let out_headers = new Headers(response.headers);
if (out_headers.get('Content-Disposition')=='attachment') out_headers.delete('Content-Disposition');
let out_body = null;
let contentType = out_headers.get('Content-Type');
if (contentType.includes("application/text")) {
out_body = await response.text();
while (out_body.includes(replace_path)) out_body = out_body.replace(replace_path, replaced_path);
} else if (contentType.includes("text/html")) {
out_body = await response.text();
while (replace_path!='/'&&out_body.includes(replace_path)) out_body = out_body.replace(replace_path, replaced_path);
} else {
out_body = await response.body;
}
let out_response = new Response(out_body, {
status: response.status,
headers: out_headers
})
return out_response;
}
+129 -98
View File
@@ -303,7 +303,7 @@ function main($path)
if (!$refresh_token) { if (!$refresh_token) {
return render_list(); return render_list();
} else { } else {
if (!($_SERVER['access_token'] = getcache('access_token'))) { if (!($_SERVER['access_token'] = getcache('access_token', $_SERVER['disktag']))) {
$response = get_access_token($refresh_token); $response = get_access_token($refresh_token);
if (isset($response['stat'])) return message($response['body'], 'Error', $response['stat']); if (isset($response['stat'])) return message($response['body'], 'Error', $response['stat']);
} }
@@ -322,7 +322,7 @@ function main($path)
$tmp = MSAPI('DELETE', $filename, '', $_SERVER['access_token']); $tmp = MSAPI('DELETE', $filename, '', $_SERVER['access_token']);
$path1 = path_format($_SERVER['list_path'] . path_format($path)); $path1 = path_format($_SERVER['list_path'] . path_format($path));
if ($path1!='/'&&substr($path1,-1)=='/') $path1=substr($path1,0,-1); if ($path1!='/'&&substr($path1,-1)=='/') $path1=substr($path1,0,-1);
savecache('path_' . $path1, json_decode('{}',true), 1); savecache('path_' . $path1, json_decode('{}',true), $_SERVER['disktag'], 1);
return output($tmp['body'],$tmp['stat']); return output($tmp['body'],$tmp['stat']);
} }
if ($_GET['action']=='uploaded_rename') { if ($_GET['action']=='uploaded_rename') {
@@ -344,7 +344,7 @@ function main($path)
} }
$path1 = path_format($_SERVER['list_path'] . path_format($path)); $path1 = path_format($_SERVER['list_path'] . path_format($path));
if ($path1!='/'&&substr($path1,-1)=='/') $path1=substr($path1,0,-1); if ($path1!='/'&&substr($path1,-1)=='/') $path1=substr($path1,0,-1);
savecache('path_' . $path1, json_decode('{}',true), 1); savecache('path_' . $path1, json_decode('{}',true), $_SERVER['disktag'], 1);
return output($tmp['body'],$tmp['stat']); return output($tmp['body'],$tmp['stat']);
} }
if ($_GET['action']=='upbigfile') return bigfileupload($path); if ($_GET['action']=='upbigfile') return bigfileupload($path);
@@ -354,7 +354,7 @@ function main($path)
if ($tmp['statusCode'] > 0) { if ($tmp['statusCode'] > 0) {
$path1 = path_format($_SERVER['list_path'] . path_format($path)); $path1 = path_format($_SERVER['list_path'] . path_format($path));
if ($path1!='/'&&substr($path1,-1)=='/') $path1=substr($path1,0,-1); if ($path1!='/'&&substr($path1,-1)=='/') $path1=substr($path1,0,-1);
savecache('path_' . $path1, json_decode('{}',true), 1); savecache('path_' . $path1, json_decode('{}',true), $_SERVER['disktag'], 1);
return $tmp; return $tmp;
} }
} else { } else {
@@ -504,7 +504,7 @@ function get_access_token($refresh_token)
$tmp = $ret; $tmp = $ret;
$tmp['access_token'] = '******'; $tmp['access_token'] = '******';
error_log('['.$_SERVER['disktag'].'] Get access token:'.json_encode($tmp, JSON_PRETTY_PRINT)); error_log('['.$_SERVER['disktag'].'] Get access token:'.json_encode($tmp, JSON_PRETTY_PRINT));
savecache('access_token', $_SERVER['access_token']); savecache('access_token', $_SERVER['access_token'], $_SERVER['disktag']);
$tmp1 = []; $tmp1 = [];
$tmp1['shareapiurl'] = $_SERVER['api_url']; $tmp1['shareapiurl'] = $_SERVER['api_url'];
if (getConfig('shareapiurl')=='') setConfig($tmp1); if (getConfig('shareapiurl')=='') setConfig($tmp1);
@@ -527,7 +527,7 @@ function get_access_token($refresh_token)
$tmp['refresh_token'] = '******'; $tmp['refresh_token'] = '******';
error_log('['.$_SERVER['disktag'].'] Get access token:'.json_encode($tmp, JSON_PRETTY_PRINT)); error_log('['.$_SERVER['disktag'].'] Get access token:'.json_encode($tmp, JSON_PRETTY_PRINT));
$_SERVER['access_token'] = $ret['access_token']; $_SERVER['access_token'] = $ret['access_token'];
savecache('access_token', $_SERVER['access_token'], $ret['expires_in'] - 300); savecache('access_token', $_SERVER['access_token'], $_SERVER['disktag'], $ret['expires_in'] - 300);
if (time()>getConfig('token_expires')) setConfig([ 'refresh_token' => $ret['refresh_token'], 'token_expires' => time()+7*24*60*60 ]); if (time()>getConfig('token_expires')) setConfig([ 'refresh_token' => $ret['refresh_token'], 'token_expires' => time()+7*24*60*60 ]);
} }
return 0; return 0;
@@ -564,19 +564,19 @@ function isHideFile($name)
return false; return false;
} }
function getcache($str) function getcache($str, $disktag = '')
{ {
$cache = filecache(); $cache = filecache($disktag);
return $cache->fetch($str); return $cache->fetch($str);
} }
function savecache($key, $value, $exp = 1800) function savecache($key, $value, $disktag = '', $exp = 1800)
{ {
$cache = filecache(); $cache = filecache($disktag);
return $cache->save($key, $value, $exp); return $cache->save($key, $value, $exp);
} }
function filecache() function filecache($disktag)
{ {
$dir = sys_get_temp_dir(); $dir = sys_get_temp_dir();
if (!is_writable($dir)) { if (!is_writable($dir)) {
@@ -585,11 +585,11 @@ function filecache()
if ( is_writable($tmp) ) $dir = $tmp; if ( is_writable($tmp) ) $dir = $tmp;
} elseif ( mkdir($tmp) ) $dir = $tmp; } elseif ( mkdir($tmp) ) $dir = $tmp;
} }
$tag = __DIR__ . '/OneManager/' . $_SERVER['disktag']; $tag = __DIR__ . '/OneManager/' . $disktag;
while (strpos($tag, '/')>-1) $tag = str_replace('/', '_', $tag); while (strpos($tag, '/')>-1) $tag = str_replace('/', '_', $tag);
if (strpos($tag, ':')>-1) { if (strpos($tag, ':')>-1) {
while (strpos($tag, ':')>-1) $tag = str_replace(':', '_', $tag); $tag = str_replace(':', '_', $tag);
while (strpos($tag, '\\')>-1) $tag = str_replace('\\', '_', $tag); $tag = str_replace('\\', '_', $tag);
} }
// error_log('DIR:' . $dir . ' TAG: ' . $tag); // error_log('DIR:' . $dir . ' TAG: ' . $tag);
$cache = new \Doctrine\Common\Cache\FilesystemCache($dir, $tag); $cache = new \Doctrine\Common\Cache\FilesystemCache($dir, $tag);
@@ -627,10 +627,8 @@ function config_oauth()
if (getConfig('Drive_ver')=='CN') { if (getConfig('Drive_ver')=='CN') {
// CN 21Vianet // CN 21Vianet
// https://portal.azure.cn // https://portal.azure.cn
//$_SERVER['client_id'] = '04c3ca0b-8d07-4773-85ad-98b037d25631'; $_SERVER['client_id'] = '31f3bed5-b9d9-4173-86a4-72c73d278617';
//$_SERVER['client_secret'] = 'h8@B7kFVOmj0+8HKBWeNTgl@pU/z4yLB'; // expire 20200902 $_SERVER['client_secret'] = 'P5-ZNtFK-tT90J.We_-DcsuB8uV7AfjL8Y';
$_SERVER['client_id'] = 'b15f63f5-8b72-48b5-af69-8cab7579bff7';
$_SERVER['client_secret'] = '0IIuZ1Kcq_YI3NrkZFwsniEo~BoP~8_M22';
$_SERVER['oauth_url'] = 'https://login.partner.microsoftonline.cn/common/oauth2/v2.0/'; $_SERVER['oauth_url'] = 'https://login.partner.microsoftonline.cn/common/oauth2/v2.0/';
$_SERVER['api_url'] = 'https://microsoftgraph.chinacloudapi.cn/v1.0/me/drive/root'; $_SERVER['api_url'] = 'https://microsoftgraph.chinacloudapi.cn/v1.0/me/drive/root';
$_SERVER['scope'] = 'https://microsoftgraph.chinacloudapi.cn/Files.ReadWrite.All offline_access'; $_SERVER['scope'] = 'https://microsoftgraph.chinacloudapi.cn/Files.ReadWrite.All offline_access';
@@ -652,7 +650,7 @@ function get_siteid($access_token)
$sharepointSiteAddress = getConfig('sharepointSiteAddress'); $sharepointSiteAddress = getConfig('sharepointSiteAddress');
while (substr($sharepointSiteAddress, -1)=='/') $sharepointSiteAddress = substr($sharepointSiteAddress, 0, -1); while (substr($sharepointSiteAddress, -1)=='/') $sharepointSiteAddress = substr($sharepointSiteAddress, 0, -1);
$tmp = splitlast($sharepointSiteAddress, '/'); $tmp = splitlast($sharepointSiteAddress, '/');
$sharepointname = $tmp[1]; $sharepointname = urlencode($tmp[1]);
$tmp = splitlast($tmp[0], '/'); $tmp = splitlast($tmp[0], '/');
$sharepointname = $tmp[1] . '/' . $sharepointname; $sharepointname = $tmp[1] . '/' . $sharepointname;
if (getConfig('Drive_ver')=='MS') $url = 'https://graph.microsoft.com/v1.0/sites/root:/'.$sharepointname; if (getConfig('Drive_ver')=='MS') $url = 'https://graph.microsoft.com/v1.0/sites/root:/'.$sharepointname;
@@ -718,6 +716,7 @@ function spurlencode($str, $split='')
$tmp = urlencode($str); $tmp = urlencode($str);
} }
$tmp = str_replace('%2520', '%20',$tmp); $tmp = str_replace('%2520', '%20',$tmp);
$tmp = str_replace('%26amp%3B', '&',$tmp);
return $tmp; return $tmp;
} }
@@ -872,7 +871,7 @@ function gethiddenpass($path,$passfile)
{ {
$path1 = path_format($_SERVER['list_path'] . path_format($path)); $path1 = path_format($_SERVER['list_path'] . path_format($path));
if ($path1!='/'&&substr($path1,-1)=='/') $path1=substr($path1,0,-1); if ($path1!='/'&&substr($path1,-1)=='/') $path1=substr($path1,0,-1);
$password=getcache('path_' . $path1 . '/?password'); $password=getcache('path_' . $path1 . '/?password', $_SERVER['disktag']);
if ($password=='') { if ($password=='') {
$ispassfile = fetch_files(path_format($path . '/' . urlencode($passfile))); $ispassfile = fetch_files(path_format($path . '/' . urlencode($passfile)));
//echo $path . '<pre>' . json_encode($ispassfile, JSON_PRETTY_PRINT) . '</pre>'; //echo $path . '<pre>' . json_encode($ispassfile, JSON_PRETTY_PRINT) . '</pre>';
@@ -882,14 +881,14 @@ function gethiddenpass($path,$passfile)
$passwordf=explode("\n",$arr['body']); $passwordf=explode("\n",$arr['body']);
$password=$passwordf[0]; $password=$passwordf[0];
if ($password!='') $password=md5($password); if ($password!='') $password=md5($password);
savecache('path_' . $path1 . '/?password', $password); savecache('path_' . $path1 . '/?password', $password, $_SERVER['disktag']);
return $password; return $password;
} else { } else {
//return md5('DefaultP@sswordWhenNetworkError'); //return md5('DefaultP@sswordWhenNetworkError');
return md5( md5(time()).rand(1000,9999) ); return md5( md5(time()).rand(1000,9999) );
} }
} else { } else {
savecache('path_' . $path1 . '/?password', 'null'); savecache('path_' . $path1 . '/?password', 'null', $_SERVER['disktag']);
if ($path !== '' ) { if ($path !== '' ) {
$path = substr($path,0,strrpos($path,'/')); $path = substr($path,0,strrpos($path,'/'));
return gethiddenpass($path,$passfile); return gethiddenpass($path,$passfile);
@@ -925,7 +924,9 @@ function message($message, $title = 'Message', $statusCode = 200)
<body> <body>
<h1>' . $title . '</h1> <h1>' . $title . '</h1>
<p> <p>
' . $message . ' ' . $message . '
</p> </p>
</body> </body>
</html> </html>
@@ -934,7 +935,9 @@ function message($message, $title = 'Message', $statusCode = 200)
function needUpdate() function needUpdate()
{ {
$current_version = file_get_contents(__DIR__ . '/version'); $slash = '/';
if (strpos(__DIR__, ':')) $slash = '\\';
$current_version = file_get_contents(__DIR__ . $slash . 'version');
$current_ver = substr($current_version, strpos($current_version, '.')+1); $current_ver = substr($current_version, strpos($current_version, '.')+1);
$current_ver = explode(urldecode('%0A'),$current_ver)[0]; $current_ver = explode(urldecode('%0A'),$current_ver)[0];
$current_ver = explode(urldecode('%0D'),$current_ver)[0]; $current_ver = explode(urldecode('%0D'),$current_ver)[0];
@@ -967,6 +970,7 @@ function output($body, $statusCode = 200, $headers = ['Content-Type' => 'text/ht
function passhidden($path) function passhidden($path)
{ {
if ($_SERVER['admin']) return 0;
$path = str_replace('+','%2B',$path); $path = str_replace('+','%2B',$path);
$path = str_replace('&amp;','&', path_format(urldecode($path))); $path = str_replace('&amp;','&', path_format(urldecode($path)));
if (getConfig('passfile') != '') { if (getConfig('passfile') != '') {
@@ -1010,7 +1014,7 @@ function get_thumbnails_url($path = '/', $location = 0)
$path1 = path_format($path); $path1 = path_format($path);
$path = path_format($_SERVER['list_path'] . path_format($path)); $path = path_format($_SERVER['list_path'] . path_format($path));
if ($path!='/'&&substr($path,-1)=='/') $path=substr($path,0,-1); if ($path!='/'&&substr($path,-1)=='/') $path=substr($path,0,-1);
$thumb_url = getcache('thumb_'.$path); $thumb_url = getcache('thumb_'.$path, $_SERVER['disktag']);
if ($thumb_url=='') { if ($thumb_url=='') {
$url = $_SERVER['api_url']; $url = $_SERVER['api_url'];
if ($path !== '/') { if ($path !== '/') {
@@ -1020,7 +1024,7 @@ function get_thumbnails_url($path = '/', $location = 0)
$url .= ':/thumbnails/0/medium'; $url .= ':/thumbnails/0/medium';
$files = json_decode(curl_request($url, false, ['Authorization' => 'Bearer ' . $_SERVER['access_token']])['body'], true); $files = json_decode(curl_request($url, false, ['Authorization' => 'Bearer ' . $_SERVER['access_token']])['body'], true);
if (isset($files['url'])) { if (isset($files['url'])) {
savecache('thumb_'.$path, $files['url']); savecache('thumb_'.$path, $files['url'], $_SERVER['disktag']);
$thumb_url = $files['url']; $thumb_url = $files['url'];
} }
} }
@@ -1040,6 +1044,10 @@ function get_thumbnails_url($path = '/', $location = 0)
function bigfileupload($path) function bigfileupload($path)
{ {
if (!$_SERVER['admin']) {
if (!is_guestup_path($path)) return output('Not_Guest_Upload_Folder', 400);
if (strpos($_GET['upbigfilename'], '../')!==false) return output('Not_Allow_Cross_Path', 400);
}
$path1 = path_format($_SERVER['list_path'] . path_format($path)); $path1 = path_format($_SERVER['list_path'] . path_format($path));
if (substr($path1,-1)=='/') $path1=substr($path1,0,-1); if (substr($path1,-1)=='/') $path1=substr($path1,0,-1);
if ($_GET['upbigfilename']!=''&&$_GET['filesize']>0) { if ($_GET['upbigfilename']!=''&&$_GET['filesize']>0) {
@@ -1084,7 +1092,7 @@ function adminform($name = '', $pass = '', $path = '')
$statusCode = 201; $statusCode = 201;
date_default_timezone_set('UTC'); date_default_timezone_set('UTC');
$header = [ $header = [
'Set-Cookie' => $name . '=' . $pass . '; path=/; expires=' . date(DATE_COOKIE, strtotime('+1hour')), 'Set-Cookie' => $name . '=' . $pass . '; path=/; expires=' . date(DATE_COOKIE, strtotime('+7day')),
//'Location' => $path, //'Location' => $path,
'Content-Type' => 'text/html' 'Content-Type' => 'text/html'
]; ];
@@ -1112,65 +1120,81 @@ function adminoperate($path)
{ {
$path1 = path_format($_SERVER['list_path'] . path_format($path)); $path1 = path_format($_SERVER['list_path'] . path_format($path));
if (substr($path1,-1)=='/') $path1=substr($path1,0,-1); if (substr($path1,-1)=='/') $path1=substr($path1,0,-1);
$tmpget = $_GET;
$tmppost = $_POST;
$tmparr['statusCode'] = 0; $tmparr['statusCode'] = 0;
if (isset($_GET['rename_newname'])&&$_GET['rename_newname']!=$_GET['rename_oldname'] && $_GET['rename_newname']!='') { if ( (isset($tmpget['rename_newname'])&&$tmpget['rename_newname']!=$tmpget['rename_oldname'] && $tmpget['rename_newname']!='') || (isset($tmppost['rename_newname'])&&$tmppost['rename_newname']!=$tmppost['rename_oldname'] && $tmppost['rename_newname']!='') ) {
if (isset($tmppost['rename_newname'])) $VAR = 'tmppost';
else $VAR = 'tmpget';
// rename 重命名 // rename 重命名
$oldname = spurlencode($_GET['rename_oldname']); $oldname = spurlencode(${$VAR}['rename_oldname']);
$oldname = path_format($path1 . '/' . $oldname); $oldname = path_format($path1 . '/' . $oldname);
$data = '{"name":"' . $_GET['rename_newname'] . '"}'; $data = '{"name":"' . ${$VAR}['rename_newname'] . '"}';
//echo $oldname; //echo $oldname;
$result = MSAPI('PATCH',$oldname,$data,$_SERVER['access_token']); $result = MSAPI('PATCH',$oldname,$data,$_SERVER['access_token']);
//savecache('path_' . $path1, json_decode('{}',true), 1); //savecache('path_' . $path1, json_decode('{}',true), $_SERVER['disktag'], 1);
return output($result['body'], $result['stat']); return output($result['body'], $result['stat']);
} }
if (isset($_GET['delete_name'])) { if (isset($tmpget['delete_name']) || isset($tmppost['delete_name'])) {
if (isset($tmppost['delete_name'])) $VAR = 'tmppost';
else $VAR = 'tmpget';
// delete 删除 // delete 删除
$filename = spurlencode($_GET['delete_name']); $filename = spurlencode(${$VAR}['delete_name']);
$filename = path_format($path1 . '/' . $filename); $filename = path_format($path1 . '/' . $filename);
//echo $filename; //echo $filename;
$result = MSAPI('DELETE', $filename, '', $_SERVER['access_token']); $result = MSAPI('DELETE', $filename, '', $_SERVER['access_token']);
//savecache('path_' . $path1, json_decode('{}',true), 1); //savecache('path_' . $path1, json_decode('{}',true), $_SERVER['disktag'], 1);
return output($result['body'], $result['stat']); return output($result['body'], $result['stat']);
} }
if (isset($_GET['operate_action'])&&$_GET['operate_action']==getconstStr('Encrypt')) { if ( (isset($tmpget['operate_action'])&&$tmpget['operate_action']==getconstStr('Encrypt')) || (isset($tmppost['operate_action'])&&$tmppost['operate_action']==getconstStr('Encrypt')) ) {
if (isset($tmppost['operate_action'])) $VAR = 'tmppost';
else $VAR = 'tmpget';
// encrypt 加密 // encrypt 加密
if (getConfig('passfile')=='') return message(getconstStr('SetpassfileBfEncrypt'),'',403); if (getConfig('passfile')=='') return message(getconstStr('SetpassfileBfEncrypt'),'',403);
if ($_GET['encrypt_folder']=='/') $_GET['encrypt_folder']==''; if (${$VAR}['encrypt_folder']=='/') ${$VAR}['encrypt_folder']=='';
$foldername = spurlencode($_GET['encrypt_folder']); $foldername = spurlencode(${$VAR}['encrypt_folder']);
$filename = path_format($path1 . '/' . $foldername . '/' . getConfig('passfile')); $filename = path_format($path1 . '/' . $foldername . '/' . urlencode(getConfig('passfile')));
//echo $foldername; //echo $foldername;
$result = MSAPI('PUT', $filename, $_GET['encrypt_newpass'], $_SERVER['access_token']); $result = MSAPI('PUT', $filename, ${$VAR}['encrypt_newpass'], $_SERVER['access_token']);
$path1 = path_format($path1 . '/' . $foldername ); $path1 = path_format($path1 . '/' . $foldername );
if ($path1!='/'&&substr($path1,-1)=='/') $path1=substr($path1,0,-1); if ($path1!='/'&&substr($path1,-1)=='/') $path1=substr($path1,0,-1);
savecache('path_' . $path1 . '/?password', '', 1); savecache('path_' . $path1 . '/?password', '', $_SERVER['disktag'], 1);
return output($result['body'], $result['stat']); return output($result['body'], $result['stat']);
} }
if (isset($_GET['move_folder'])) { if (isset($tmpget['move_folder']) || isset($tmppost['move_folder'])) {
if (isset($tmppost['move_folder'])) $VAR = 'tmppost';
else $VAR = 'tmpget';
// move 移动 // move 移动
$moveable = 1; $moveable = 1;
if ($path == '/' && $_GET['move_folder'] == '/../') $moveable=0; if ($path == '/' && ${$VAR}['move_folder'] == '/../') $moveable=0;
if ($_GET['move_folder'] == $_GET['move_name']) $moveable=0; if (${$VAR}['move_folder'] == ${$VAR}['move_name']) $moveable=0;
if ($moveable) { if ($moveable) {
$filename = spurlencode($_GET['move_name']); $filename = spurlencode(${$VAR}['move_name']);
$filename = path_format($path1 . '/' . $filename); $filename = path_format($path1 . '/' . $filename);
$foldername = path_format('/'.urldecode($path1).'/'.$_GET['move_folder']); if (${$VAR}['move_folder'] == '/../') {
$foldername = path_format('/' . urldecode($path1) . '/');
$foldername = substr($foldername, 0, -1);
$foldername = splitlast($foldername, '/')[0];
} else $foldername = path_format('/' . urldecode($path1) . '/' . ${$VAR}['move_folder']);
$data = '{"parentReference":{"path": "/drive/root:'.$foldername.'"}}'; $data = '{"parentReference":{"path": "/drive/root:'.$foldername.'"}}';
$result = MSAPI('PATCH', $filename, $data, $_SERVER['access_token']); $result = MSAPI('PATCH', $filename, $data, $_SERVER['access_token']);
//savecache('path_' . $path1, json_decode('{}',true), 1); //savecache('path_' . $path1, json_decode('{}',true), $_SERVER['disktag'], 1);
if ($_GET['move_folder'] == '/../') $path2 = path_format( substr($path1, 0, strrpos($path1, '/')) . '/' ); if (${$VAR}['move_folder'] == '/../') $path2 = path_format( substr($path1, 0, strrpos($path1, '/')) . '/' );
else $path2 = path_format( $path1 . '/' . $_GET['move_folder'] . '/' ); else $path2 = path_format( $path1 . '/' . ${$VAR}['move_folder'] . '/' );
if ($path2!='/'&&substr($path2,-1)=='/') $path2=substr($path2,0,-1); if ($path2!='/'&&substr($path2,-1)=='/') $path2=substr($path2,0,-1);
savecache('path_' . $path2, json_decode('{}',true), 1); savecache('path_' . $path2, json_decode('{}',true), $_SERVER['disktag'], 1);
return output($result['body'], $result['stat']); return output($result['body'], $result['stat']);
} else { } else {
return output('{"error":"'.getconstStr('CannotMove').'"}', 403); return output('{"error":"'.getconstStr('CannotMove').'"}', 403);
} }
} }
if (isset($_GET['copy_name'])) { if (isset($tmpget['copy_name']) || isset($tmppost['copy_name'])) {
if (isset($tmppost['copy_name'])) $VAR = 'tmppost';
else $VAR = 'tmpget';
// copy 复制 // copy 复制
$filename = spurlencode($_GET['copy_name']); $filename = spurlencode(${$VAR}['copy_name']);
$filename = path_format($path1 . '/' . $filename); $filename = path_format($path1 . '/' . $filename);
$namearr = splitlast($_GET['copy_name'], '.'); $namearr = splitlast(${$VAR}['copy_name'], '.');
if ($namearr[0]!='') { if ($namearr[0]!='') {
$newname = $namearr[0] . ' (' . getconstStr('Copy') . ')'; $newname = $namearr[0] . ' (' . getconstStr('Copy') . ')';
if ($namearr[1]!='') $newname .= '.' . $namearr[1]; if ($namearr[1]!='') $newname .= '.' . $namearr[1];
@@ -1196,15 +1220,15 @@ function adminoperate($path)
$result = MSAPI('copy', $filename, $data, $_SERVER['access_token']); $result = MSAPI('copy', $filename, $data, $_SERVER['access_token']);
} }
//echo $result['stat'].$result['body']; //echo $result['stat'].$result['body'];
//savecache('path_' . $path1, json_decode('{}',true), 1); //savecache('path_' . $path1, json_decode('{}',true), $_SERVER['disktag'], 1);
//if ($_GET['move_folder'] == '/../') $path2 = path_format( substr($path1, 0, strrpos($path1, '/')) . '/' ); //if ($tmpget['move_folder'] == '/../') $path2 = path_format( substr($path1, 0, strrpos($path1, '/')) . '/' );
//else $path2 = path_format( $path1 . '/' . $_GET['move_folder'] . '/' ); //else $path2 = path_format( $path1 . '/' . $tmpget['move_folder'] . '/' );
//savecache('path_' . $path2, json_decode('{}',true), 1); //savecache('path_' . $path2, json_decode('{}',true), $_SERVER['disktag'], 1);
return output($result['body'], $result['stat']); return output($result['body'], $result['stat']);
} }
if (isset($_POST['editfile'])) { if (isset($tmppost['editfile'])) {
// edit 编辑 // edit 编辑
$data = $_POST['editfile']; $data = $tmppost['editfile'];
/*TXT一般不会超过4M,不用二段上传 /*TXT一般不会超过4M,不用二段上传
$filename = $path1 . ':/createUploadSession'; $filename = $path1 . ':/createUploadSession';
$response=MSAPI('POST',$filename,'{"item": { "@microsoft.graph.conflictBehavior": "replace" }}',$_SERVER['access_token']); $response=MSAPI('POST',$filename,'{"item": { "@microsoft.graph.conflictBehavior": "replace" }}',$_SERVER['access_token']);
@@ -1215,25 +1239,27 @@ function adminoperate($path)
$resultarry = json_decode($result,true); $resultarry = json_decode($result,true);
if (isset($resultarry['error'])) return message($resultarry['error']['message']. '<hr><a href="javascript:history.back(-1)">'.getconstStr('Back').'</a>','Error',403); if (isset($resultarry['error'])) return message($resultarry['error']['message']. '<hr><a href="javascript:history.back(-1)">'.getconstStr('Back').'</a>','Error',403);
} }
if (isset($_GET['create_name'])) { if (isset($tmpget['create_name']) || isset($tmppost['create_name'])) {
if (isset($tmppost['create_name'])) $VAR = 'tmppost';
else $VAR = 'tmpget';
// create 新建 // create 新建
if ($_GET['create_type']=='file') { if (${$VAR}['create_type']=='file') {
$filename = spurlencode($_GET['create_name']); $filename = spurlencode(${$VAR}['create_name']);
$filename = path_format($path1 . '/' . $filename); $filename = path_format($path1 . '/' . $filename);
$result = MSAPI('PUT', $filename, $_GET['create_text'], $_SERVER['access_token']); $result = MSAPI('PUT', $filename, ${$VAR}['create_text'], $_SERVER['access_token']);
} }
if ($_GET['create_type']=='folder') { if (${$VAR}['create_type']=='folder') {
$data = '{ "name": "' . $_GET['create_name'] . '", "folder": { }, "@microsoft.graph.conflictBehavior": "rename" }'; $data = '{ "name": "' . ${$VAR}['create_name'] . '", "folder": { }, "@microsoft.graph.conflictBehavior": "rename" }';
$result = MSAPI('children', $path1, $data, $_SERVER['access_token']); $result = MSAPI('children', $path1, $data, $_SERVER['access_token']);
} }
//savecache('path_' . $path1, json_decode('{}',true), 1); //savecache('path_' . $path1, json_decode('{}',true), $_SERVER['disktag'], 1);
return output($result['body'], $result['stat']); return output($result['body'], $result['stat']);
} }
if (isset($_GET['RefreshCache'])) { if (isset($tmpget['RefreshCache'])) {
$path1 = path_format($_SERVER['list_path'] . path_format($path)); $path1 = path_format($_SERVER['list_path'] . path_format($path));
if ($path1!='/'&&substr($path1,-1)=='/') $path1=substr($path1,0,-1); if ($path1!='/'&&substr($path1,-1)=='/') $path1=substr($path1,0,-1);
savecache('path_' . $path1 . '/?password', '', 1); savecache('path_' . $path1 . '/?password', '', $_SERVER['disktag'], 1);
savecache('customTheme', '', 1); savecache('customTheme', '', '', 1);
return message('<meta http-equiv="refresh" content="2;URL=./">', getconstStr('RefreshCache'), 302); return message('<meta http-equiv="refresh" content="2;URL=./">', getconstStr('RefreshCache'), 302);
} }
return $tmparr; return $tmparr;
@@ -1347,7 +1373,7 @@ function fetch_files($path = '/')
$path1 = path_format($path); $path1 = path_format($path);
$path = path_format($_SERVER['list_path'] . path_format($path)); $path = path_format($_SERVER['list_path'] . path_format($path));
if ($path!='/'&&substr($path,-1)=='/') $path=substr($path,0,-1); if ($path!='/'&&substr($path,-1)=='/') $path=substr($path,0,-1);
if (!($files = getcache('path_' . $path))) { if (!($files = getcache('path_' . $path, $_SERVER['disktag']))) {
// https://docs.microsoft.com/en-us/graph/api/driveitem-get?view=graph-rest-1.0 // https://docs.microsoft.com/en-us/graph/api/driveitem-get?view=graph-rest-1.0
// https://docs.microsoft.com/zh-cn/graph/api/driveitem-put-content?view=graph-rest-1.0&tabs=http // https://docs.microsoft.com/zh-cn/graph/api/driveitem-put-content?view=graph-rest-1.0&tabs=http
// https://developer.microsoft.com/zh-cn/graph/graph-explorer // https://developer.microsoft.com/zh-cn/graph/graph-explorer
@@ -1355,13 +1381,13 @@ function fetch_files($path = '/')
$parentpath = $pos[0]; $parentpath = $pos[0];
if ($parentpath=='') $parentpath = '/'; if ($parentpath=='') $parentpath = '/';
$filename = $pos[1]; $filename = $pos[1];
if ($parentfiles = getcache('path_' . $parentpath)) { if ($parentfiles = getcache('path_' . $parentpath, $_SERVER['disktag'])) {
if (isset($parentfiles['children'][$filename][$_SERVER['DownurlStrName']])) { if (isset($parentfiles['children'][$filename][$_SERVER['DownurlStrName']])) {
if (in_array(splitlast($filename,'.')[1], $exts['txt'])) { if (in_array(splitlast($filename,'.')[1], $exts['txt'])) {
if (!(isset($parentfiles['children'][$filename]['content'])&&$parentfiles['children'][$filename]['content']['stat']==200)) { if (!(isset($parentfiles['children'][$filename]['content'])&&$parentfiles['children'][$filename]['content']['stat']==200)) {
$content1 = curl_request($parentfiles['children'][$filename][$_SERVER['DownurlStrName']]); $content1 = curl_request($parentfiles['children'][$filename][$_SERVER['DownurlStrName']]);
$parentfiles['children'][$filename]['content'] = $content1; $parentfiles['children'][$filename]['content'] = $content1;
savecache('path_' . $parentpath, $parentfiles); savecache('path_' . $parentpath, $parentfiles, $_SERVER['disktag']);
} }
} }
return $parentfiles['children'][$filename]; return $parentfiles['children'][$filename];
@@ -1404,7 +1430,7 @@ function fetch_files($path = '/')
//if (isset($files['children'])) { //if (isset($files['children'])) {
$files['children'] = children_name($files['children']); $files['children'] = children_name($files['children']);
//} //}
savecache('path_' . $path, $files); savecache('path_' . $path, $files, $_SERVER['disktag']);
} }
} }
if (isset($files['file'])) { if (isset($files['file'])) {
@@ -1412,7 +1438,7 @@ function fetch_files($path = '/')
if (!(isset($files['content'])&&$files['content']['stat']==200)) { if (!(isset($files['content'])&&$files['content']['stat']==200)) {
$content1 = curl_request($files[$_SERVER['DownurlStrName']]); $content1 = curl_request($files[$_SERVER['DownurlStrName']]);
$files['content'] = $content1; $files['content'] = $content1;
savecache('path_' . $path, $files); savecache('path_' . $path, $files, $_SERVER['disktag']);
} }
} }
} }
@@ -1453,21 +1479,21 @@ function fetch_files_children($files, $path, $page)
if ($path!='/'&&substr($path,-1)=='/') $path=substr($path,0,-1); if ($path!='/'&&substr($path,-1)=='/') $path=substr($path,0,-1);
$cachefilename = '.SCFcache_'.$_SERVER['function_name']; $cachefilename = '.SCFcache_'.$_SERVER['function_name'];
$maxpage = ceil($files['folder']['childCount']/200); $maxpage = ceil($files['folder']['childCount']/200);
if (!($files['children'] = getcache('files_' . $path . '_page_' . $page))) { if (!($files['children'] = getcache('files_' . $path . '_page_' . $page, $_SERVER['disktag']))) {
// down cache file get jump info. 下载cache文件获取跳页链接 // down cache file get jump info. 下载cache文件获取跳页链接
$cachefile = fetch_files(path_format($path1 . '/' .$cachefilename)); $cachefile = fetch_files(path_format($path1 . '/' .$cachefilename));
if ($cachefile['size']>0) { if ($cachefile['size']>0) {
$pageinfo = curl_request($cachefile[$_SERVER['DownurlStrName']])['body']; $pageinfo = curl_request($cachefile[$_SERVER['DownurlStrName']])['body'];
$pageinfo = json_decode($pageinfo,true); $pageinfo = json_decode($pageinfo,true);
for ($page4=1;$page4<$maxpage;$page4++) { for ($page4=1;$page4<$maxpage;$page4++) {
savecache('nextlink_' . $path . '_page_' . $page4, $pageinfo['nextlink_' . $path . '_page_' . $page4]); savecache('nextlink_' . $path . '_page_' . $page4, $pageinfo['nextlink_' . $path . '_page_' . $page4], $_SERVER['disktag']);
$pageinfocache['nextlink_' . $path . '_page_' . $page4] = $pageinfo['nextlink_' . $path . '_page_' . $page4]; $pageinfocache['nextlink_' . $path . '_page_' . $page4] = $pageinfo['nextlink_' . $path . '_page_' . $page4];
} }
} }
$pageinfochange=0; $pageinfochange=0;
for ($page1=$page;$page1>=1;$page1--) { for ($page1=$page;$page1>=1;$page1--) {
$page3=$page1-1; $page3=$page1-1;
$url = getcache('nextlink_' . $path . '_page_' . $page3); $url = getcache('nextlink_' . $path . '_page_' . $page3, $_SERVER['disktag']);
if ($url == '') { if ($url == '') {
if ($page1==1) { if ($page1==1) {
$url = $_SERVER['api_url']; $url = $_SERVER['api_url'];
@@ -1480,10 +1506,10 @@ function fetch_files_children($files, $path, $page)
} }
$children = json_decode(curl_request($url, false, ['Authorization' => 'Bearer ' . $_SERVER['access_token']])['body'], true); $children = json_decode(curl_request($url, false, ['Authorization' => 'Bearer ' . $_SERVER['access_token']])['body'], true);
// echo $url . '<br><pre>' . json_encode($children, JSON_PRETTY_PRINT) . '</pre>'; // echo $url . '<br><pre>' . json_encode($children, JSON_PRETTY_PRINT) . '</pre>';
savecache('files_' . $path . '_page_' . $page1, $children['value']); savecache('files_' . $path . '_page_' . $page1, $children['value'], $_SERVER['disktag']);
$nextlink=getcache('nextlink_' . $path . '_page_' . $page1); $nextlink=getcache('nextlink_' . $path . '_page_' . $page1, $_SERVER['disktag']);
if ($nextlink!=$children['@odata.nextLink']) { if ($nextlink!=$children['@odata.nextLink']) {
savecache('nextlink_' . $path . '_page_' . $page1, $children['@odata.nextLink']); savecache('nextlink_' . $path . '_page_' . $page1, $children['@odata.nextLink'], $_SERVER['disktag']);
$pageinfocache['nextlink_' . $path . '_page_' . $page1] = $children['@odata.nextLink']; $pageinfocache['nextlink_' . $path . '_page_' . $page1] = $children['@odata.nextLink'];
$pageinfocache = clearbehindvalue($path,$page1,$maxpage,$pageinfocache); $pageinfocache = clearbehindvalue($path,$page1,$maxpage,$pageinfocache);
$pageinfochange = 1; $pageinfochange = 1;
@@ -1492,10 +1518,10 @@ function fetch_files_children($files, $path, $page)
for ($page2=$page1+1;$page2<=$page;$page2++) { for ($page2=$page1+1;$page2<=$page;$page2++) {
sleep(1); sleep(1);
$children = json_decode(curl_request($url, false, ['Authorization' => 'Bearer ' . $_SERVER['access_token']])['body'], true); $children = json_decode(curl_request($url, false, ['Authorization' => 'Bearer ' . $_SERVER['access_token']])['body'], true);
savecache('files_' . $path . '_page_' . $page2, $children['value']); savecache('files_' . $path . '_page_' . $page2, $children['value'], $_SERVER['disktag']);
$nextlink=getcache('nextlink_' . $path . '_page_' . $page2); $nextlink=getcache('nextlink_' . $path . '_page_' . $page2, $_SERVER['disktag']);
if ($nextlink!=$children['@odata.nextLink']) { if ($nextlink!=$children['@odata.nextLink']) {
savecache('nextlink_' . $path . '_page_' . $page2, $children['@odata.nextLink']); savecache('nextlink_' . $path . '_page_' . $page2, $children['@odata.nextLink'], $_SERVER['disktag']);
$pageinfocache['nextlink_' . $path . '_page_' . $page2] = $children['@odata.nextLink']; $pageinfocache['nextlink_' . $path . '_page_' . $page2] = $children['@odata.nextLink'];
$pageinfocache = clearbehindvalue($path,$page2,$maxpage,$pageinfocache); $pageinfocache = clearbehindvalue($path,$page2,$maxpage,$pageinfocache);
$pageinfochange = 1; $pageinfochange = 1;
@@ -1516,10 +1542,10 @@ function fetch_files_children($files, $path, $page)
for ($page2=$page3+1;$page2<=$page;$page2++) { for ($page2=$page3+1;$page2<=$page;$page2++) {
sleep(1); sleep(1);
$children = json_decode(curl_request($url, false, ['Authorization' => 'Bearer ' . $_SERVER['access_token']])['body'], true); $children = json_decode(curl_request($url, false, ['Authorization' => 'Bearer ' . $_SERVER['access_token']])['body'], true);
savecache('files_' . $path . '_page_' . $page2, $children['value'], 3300); savecache('files_' . $path . '_page_' . $page2, $children['value'], $_SERVER['disktag'], 3300);
$nextlink=getcache('nextlink_' . $path . '_page_' . $page2); $nextlink=getcache('nextlink_' . $path . '_page_' . $page2, $_SERVER['disktag']);
if ($nextlink!=$children['@odata.nextLink']) { if ($nextlink!=$children['@odata.nextLink']) {
savecache('nextlink_' . $path . '_page_' . $page2, $children['@odata.nextLink'], 3300); savecache('nextlink_' . $path . '_page_' . $page2, $children['@odata.nextLink'], $_SERVER['disktag'], 3300);
$pageinfocache['nextlink_' . $path . '_page_' . $page2] = $children['@odata.nextLink']; $pageinfocache['nextlink_' . $path . '_page_' . $page2] = $children['@odata.nextLink'];
$pageinfocache = clearbehindvalue($path,$page2,$maxpage,$pageinfocache); $pageinfocache = clearbehindvalue($path,$page2,$maxpage,$pageinfocache);
$pageinfochange = 1; $pageinfochange = 1;
@@ -1540,8 +1566,8 @@ function fetch_files_children($files, $path, $page)
} else { } else {
$files['folder']['page']=$page; $files['folder']['page']=$page;
for ($page4=1;$page4<=$maxpage;$page4++) { for ($page4=1;$page4<=$maxpage;$page4++) {
if (!($url = getcache('nextlink_' . $path . '_page_' . $page4))) { if (!($url = getcache('nextlink_' . $path . '_page_' . $page4, $_SERVER['disktag']))) {
if ($files['folder'][$path.'_'.$page4]!='') savecache('nextlink_' . $path . '_page_' . $page4, $files['folder'][$path.'_'.$page4]); if ($files['folder'][$path.'_'.$page4]!='') savecache('nextlink_' . $path . '_page_' . $page4, $files['folder'][$path.'_'.$page4], $_SERVER['disktag']);
} else { } else {
$files['folder'][$path.'_'.$page4] = $url; $files['folder'][$path.'_'.$page4] = $url;
} }
@@ -1591,7 +1617,7 @@ function get_refresh_token()
$title = 'Error'; $title = 'Error';
return message($html, $title, 201); return message($html, $title, 201);
} else { } else {
savecache('access_token', $ret['access_token'], $ret['expires_in'] - 60); savecache('access_token', $ret['access_token'], $_SERVER['disktag'], $ret['expires_in'] - 60);
$str .= ' $str .= '
<meta http-equiv="refresh" content="5;URL=' . $url . '">'; <meta http-equiv="refresh" content="5;URL=' . $url . '">';
return message($str, getconstStr('WaitJumpIndex')); return message($str, getconstStr('WaitJumpIndex'));
@@ -1830,7 +1856,9 @@ function EnvOpt($needUpdate = 0)
</td> </td>
</tr>'; </tr>';
} elseif ($key=='theme') { } elseif ($key=='theme') {
$theme_arr = scandir(__DIR__.'/theme'); $slash = '/';
if (strpos(__DIR__, ':')) $slash = '\\';
$theme_arr = scandir(__DIR__ . $slash . 'theme');
$html .= ' $html .= '
<tr> <tr>
<td><label>' . $key . '</label></td> <td><label>' . $key . '</label></td>
@@ -1985,6 +2013,9 @@ function render_list($path = '', $files = '')
global $exts; global $exts;
global $constStr; global $constStr;
$slash = '/';
if (strpos(__DIR__, ':')) $slash = '\\';
if (isset($files['children']['index.html']) && !$_SERVER['admin']) { if (isset($files['children']['index.html']) && !$_SERVER['admin']) {
$htmlcontent = fetch_files(spurlencode(path_format(urldecode($path) . '/index.html'),'/'))['content']; $htmlcontent = fetch_files(spurlencode(path_format(urldecode($path) . '/index.html'),'/'))['content'];
return output($htmlcontent['body'], $htmlcontent['stat']); return output($htmlcontent['body'], $htmlcontent['stat']);
@@ -2037,22 +2068,22 @@ function render_list($path = '', $files = '')
//$authinfo = $path . '<br><pre>' . json_encode($files, JSON_PRETTY_PRINT) . '</pre>'; //$authinfo = $path . '<br><pre>' . json_encode($files, JSON_PRETTY_PRINT) . '</pre>';
if (isset($_COOKIE['theme'])&&$_COOKIE['theme']!='') $theme = $_COOKIE['theme']; if (isset($_COOKIE['theme'])&&$_COOKIE['theme']!='') $theme = $_COOKIE['theme'];
if ( !file_exists(__DIR__.'/theme/'.$theme) ) $theme = ''; if ( !file_exists(__DIR__ . $slash .'theme' . $slash . $theme) ) $theme = '';
if ( $theme=='' ) { if ( $theme=='' ) {
$tmp = getConfig('customTheme'); $tmp = getConfig('customTheme');
if ( $tmp!='' ) $theme = $tmp; if ( $tmp!='' ) $theme = $tmp;
} }
if ( $theme=='' ) { if ( $theme=='' ) {
$theme = getConfig('theme'); $theme = getConfig('theme');
if ( $theme=='' || !file_exists(__DIR__.'/theme/'.$theme) ) $theme = 'classic.html'; if ( $theme=='' || !file_exists(__DIR__ . $slash .'theme' . $slash . $theme) ) $theme = 'classic.html';
} }
if (substr($theme,-4)=='.php') { if (substr($theme,-4)=='.php') {
@ob_start(); @ob_start();
include 'theme/'.$theme; include 'theme/'.$theme;
$html = ob_get_clean(); $html = ob_get_clean();
} else { } else {
if (file_exists(__DIR__.'/theme/'.$theme)) { if (file_exists(__DIR__ . $slash .'theme' . $slash . $theme)) {
$file_path = __DIR__.'/theme/'.$theme; $file_path = __DIR__ . $slash .'theme' . $slash . $theme;
$html = file_get_contents($file_path); $html = file_get_contents($file_path);
} else { } else {
if (!($html = getcache('customTheme'))) { if (!($html = getcache('customTheme'))) {
@@ -2063,7 +2094,7 @@ function render_list($path = '', $files = '')
$tmp = curl_request($tmp["returnhead"]["Location"]); $tmp = curl_request($tmp["returnhead"]["Location"]);
} }
if (!!$tmp['body']) $html = $tmp['body']; if (!!$tmp['body']) $html = $tmp['body'];
savecache('customTheme', $html, 9999); savecache('customTheme', $html, '', 9999);
} }
} }
@@ -2703,7 +2734,7 @@ function render_list($path = '', $files = '')
$html = $tmp[0]; $html = $tmp[0];
$tmp = splitfirst($tmp[1], '<!--HeadomfEnd-->'); $tmp = splitfirst($tmp[1], '<!--HeadomfEnd-->');
if (isset($files['children']['head.omf'])) { if (isset($files['children']['head.omf'])) {
$headomf = str_replace('<!--HeadomfContent-->', fetch_files(spurlencode(path_format(urldecode($path) . '/head.omf'),'/'))['content']['body'], $tmp[0]); $headomf = str_replace('<!--HeadomfContent-->', fetch_files(spurlencode(path_format($path . '/head.omf'),'/'))['content']['body'], $tmp[0]);
} }
$html .= $headomf . $tmp[1]; $html .= $headomf . $tmp[1];
@@ -2711,7 +2742,7 @@ function render_list($path = '', $files = '')
$html = $tmp[0]; $html = $tmp[0];
$tmp = splitfirst($tmp[1], '<!--HeadmdEnd-->'); $tmp = splitfirst($tmp[1], '<!--HeadmdEnd-->');
if (isset($files['children']['head.md'])) { if (isset($files['children']['head.md'])) {
$headmd = str_replace('<!--HeadmdContent-->', fetch_files(spurlencode(path_format(urldecode($path) . '/head.md'),'/'))['content']['body'], $tmp[0]); $headmd = str_replace('<!--HeadmdContent-->', fetch_files(spurlencode(path_format($path . '/head.md'),'/'))['content']['body'], $tmp[0]);
$html .= $headmd . $tmp[1]; $html .= $headmd . $tmp[1];
while (strpos($html, '<!--HeadmdStart-->')) { while (strpos($html, '<!--HeadmdStart-->')) {
$html = str_replace('<!--HeadmdStart-->', '', $html); $html = str_replace('<!--HeadmdStart-->', '', $html);
@@ -2744,7 +2775,7 @@ function render_list($path = '', $files = '')
$html = $tmp[0]; $html = $tmp[0];
$tmp = splitfirst($tmp[1], '<!--ReadmemdEnd-->'); $tmp = splitfirst($tmp[1], '<!--ReadmemdEnd-->');
if (isset($files['children']['readme.md'])) { if (isset($files['children']['readme.md'])) {
$Readmemd = str_replace('<!--ReadmemdContent-->', fetch_files(spurlencode(path_format(urldecode($path) . '/readme.md'),'/'))['content']['body'], $tmp[0]); $Readmemd = str_replace('<!--ReadmemdContent-->', fetch_files(spurlencode(path_format($path . '/readme.md'),'/'))['content']['body'], $tmp[0]);
$html .= $Readmemd . $tmp[1]; $html .= $Readmemd . $tmp[1];
while (strpos($html, '<!--ReadmemdStart-->')) { while (strpos($html, '<!--ReadmemdStart-->')) {
$html = str_replace('<!--ReadmemdStart-->', '', $html); $html = str_replace('<!--ReadmemdStart-->', '', $html);
@@ -2766,7 +2797,7 @@ function render_list($path = '', $files = '')
$html = $tmp[0]; $html = $tmp[0];
$tmp = splitfirst($tmp[1], '<!--FootomfEnd-->'); $tmp = splitfirst($tmp[1], '<!--FootomfEnd-->');
if (isset($files['children']['foot.omf'])) { if (isset($files['children']['foot.omf'])) {
$Footomf = str_replace('<!--FootomfContent-->', fetch_files(spurlencode(path_format(urldecode($path) . '/foot.omf'),'/'))['content']['body'], $tmp[0]); $Footomf = str_replace('<!--FootomfContent-->', fetch_files(spurlencode(path_format($path . '/foot.omf'),'/'))['content']['body'], $tmp[0]);
} }
$html .= $Footomf . $tmp[1]; $html .= $Footomf . $tmp[1];
@@ -2856,7 +2887,7 @@ function render_list($path = '', $files = '')
} }
if ($_SERVER['admin']||!getConfig('disableChangeTheme')) { if ($_SERVER['admin']||!getConfig('disableChangeTheme')) {
$theme_arr = scandir(__DIR__.'/theme'); $theme_arr = scandir(__DIR__ . $slash . 'theme');
$html .= ' $html .= '
<div style="position: fixed;right: 10px;bottom: 10px;/*color: rgba(247,247,249,0);*/"> <div style="position: fixed;right: 10px;bottom: 10px;/*color: rgba(247,247,249,0);*/">
<select name="theme" onchange="changetheme(this.options[this.options.selectedIndex].value)"> <select name="theme" onchange="changetheme(this.options[this.options.selectedIndex].value)">
+135
View File
@@ -14,6 +14,7 @@ $constStr = [
'languages' => [ 'languages' => [
'en-us' => 'English', 'en-us' => 'English',
'zh-cn' => '简体中文', 'zh-cn' => '简体中文',
'zh-tw' => '繁體中文',
'ja' => '日本語', 'ja' => '日本語',
'ko-kr' => '한국어', 'ko-kr' => '한국어',
'fa' => 'فارسی', 'fa' => 'فارسی',
@@ -37,6 +38,15 @@ $constStr = [
5 => '星期五', 5 => '星期五',
6 => '星期六', 6 => '星期六',
], ],
'zh-tw' => [
0 => '星期日',
1 => '星期一',
2 => '星期二',
3 => '星期三',
4 => '星期四',
5 => '星期五',
6 => '星期六',
],
'ja' => [ 'ja' => [
0 => '日曜日', 0 => '日曜日',
1 => '月曜日', 1 => '月曜日',
@@ -116,6 +126,31 @@ $constStr = [
'sitename' => '网站的名称', 'sitename' => '网站的名称',
'Onedrive_ver' => 'Onedrive版本', 'Onedrive_ver' => 'Onedrive版本',
], ],
'zh-tw' => [
'admin' => '管理密碼,不添加時不顯示登入頁面且無法登入。',
'adminloginpage' => '如果設定,登入按鈕及頁面隱藏。管理登入的頁面不再是\'?admin\',而是\'?此設置的值\'。',
'autoJumpFirstDisk' => '用於多盤,如果設1,將會自動跳到第一個盤。',
'customScript' => '<script>,在所有頁都會存在,例如放一個http跳轉https',
'customCss' => '<style>,在<head>最後面',
'customTheme' => 'html格式的主題的url',
'domain_path' => '使用多個自訂域名時,指定每個域名看到的目錄。格式為a1.com:/dirto/path1|b1.com:/path2,比private_path優先。',
'diskname' => '這個盤你想顯示什麼名稱。',
'disktag' => '一個標籤,用於儲存配置,多盤時會顯示在url中。',
'disableShowThumb' => '如果填 1, ‘顯示縮略’按鈕將被隱藏。',
'disableChangeTheme' => '如果填 1, 主題選擇切換將被隱藏',
'downloadencrypt' => '0 或 1。如果 1, 那加密目錄內的文件可以不需要密碼就能下載。',
'background' => '設定一個url作為背景。',
'backgroundm' => '設定一個url作為手機用的背景。',
'theme' => '選擇一個主題。',
'timezone' => '設定預設時區。',
'guestup_path' => '設定遊客上傳路徑(圖床路徑),不設定這個值時該目錄內容會正常列文件出來,設定後只有上傳介面,不顯示其中文件(登入後顯示)。',
'hideFunctionalityFile' => '0 或 1。如果 1, 某些文件不列表給遊客看,但它的功能正常,比如readme.md',
'passfile' => '自訂密碼文件的名字,可以是\'pppppp\',也可以是\'aaaa.txt\'等等;列目錄時不會顯示,只有知道密碼才能查看或下載此文件。密碼是這個文件的內容,可以空格、可以中文;',
'domainforproxy' => '會將https://xxxxx-my.sharepoint.com取代成這個值,在目標需要自己設定反代。會加上&Origindomain=原域名',
'public_path' => '使用API長連結訪問時,顯示網路硬碟檔案的路徑,不設定時預設為根目錄;不能是private_path的上級(public看到的不能比private多,要麼看到的就不一樣)。',
'sitename' => '網站的名稱',
'Onedrive_ver' => 'Onedrive版本',
],
'ja' => [ 'ja' => [
'admin' => 'パスワードを管理する、追加しない場合、ログインページは表示されず、ログインできません。', 'admin' => 'パスワードを管理する、追加しない場合、ログインページは表示されず、ログインできません。',
'adminloginpage' => '設定すると、ログインボタンとページが非表示になります。ログインを管理するためのページは\'?admin \'ではなく、\'?この設定の値\'。', 'adminloginpage' => '設定すると、ログインボタンとページが非表示になります。ログインを管理するためのページは\'?admin \'ではなく、\'?この設定の値\'。',
@@ -162,6 +197,7 @@ $constStr = [
'SetSecretsFirst' => [ 'SetSecretsFirst' => [
'en-us' => 'Set API in Config first! or reinstall.', 'en-us' => 'Set API in Config first! or reinstall.',
'zh-cn' => '先在环境变量设置API!或重装。', 'zh-cn' => '先在环境变量设置API!或重装。',
'zh-tw' => '先在環境變數設定API!或重裝。',
'ja' => '最初に環境変数にAPIを設定してください!', 'ja' => '最初に環境変数にAPIを設定してください!',
'ko-kr' => '먼저 환경 변수에서 API를 설정하십시오! 또는 다시 설치하십시오.', 'ko-kr' => '먼저 환경 변수에서 API를 설정하십시오! 또는 다시 설치하십시오.',
'fa' => 'ابتدا API را در پیکربندی تنظیم کنید! یا دوباره نصب کنید.', 'fa' => 'ابتدا API را در پیکربندی تنظیم کنید! یا دوباره نصب کنید.',
@@ -169,6 +205,7 @@ $constStr = [
'RefreshtoLogin' => [ 'RefreshtoLogin' => [
'en-us' => '<font color="red">Refresh</font> and login.', 'en-us' => '<font color="red">Refresh</font> and login.',
'zh-cn' => '请<font color="red">刷新</font>页面后重新登录', 'zh-cn' => '请<font color="red">刷新</font>页面后重新登录',
'zh-tw' => '請<font color="red">重新整理</font>頁面後重新登入',
'ja' => 'ページを<font color = "red">更新</font>して、再度ログインしてください', 'ja' => 'ページを<font color = "red">更新</font>して、再度ログインしてください',
'ko-kr' => '페이지를 <font color = "red"> 새로 고침 </ font> 하시고 다시 로그인하십시오', 'ko-kr' => '페이지를 <font color = "red"> 새로 고침 </ font> 하시고 다시 로그인하십시오',
'fa' => '<font color="red">رفرش</font> و لاگین.', 'fa' => '<font color="red">رفرش</font> و لاگین.',
@@ -176,6 +213,7 @@ $constStr = [
'AdminLogin' => [ 'AdminLogin' => [
'en-us' => 'Admin Login', 'en-us' => 'Admin Login',
'zh-cn' => '管理登录', 'zh-cn' => '管理登录',
'zh-tw' => '管理登入',
'ja' => 'ログインを管理する', 'ja' => 'ログインを管理する',
'ko-kr' => '로그인 관리', 'ko-kr' => '로그인 관리',
'fa' => 'ورود ادمین', 'fa' => 'ورود ادمین',
@@ -183,6 +221,7 @@ $constStr = [
'LoginSuccess' => [ 'LoginSuccess' => [
'en-us' => 'Login Success!', 'en-us' => 'Login Success!',
'zh-cn' => '登录成功,正在跳转', 'zh-cn' => '登录成功,正在跳转',
'zh-tw' => '登入成功,正在跳轉',
'ja' => 'ログイン成功、ジャンプ', 'ja' => 'ログイン成功、ジャンプ',
'ko-kr' => '로그인 성공, 점프', 'ko-kr' => '로그인 성공, 점프',
'fa' => 'ورود با موفقیت انجام شد!', 'fa' => 'ورود با موفقیت انجام شد!',
@@ -190,6 +229,7 @@ $constStr = [
'InputPassword' => [ 'InputPassword' => [
'en-us' => 'Input Password', 'en-us' => 'Input Password',
'zh-cn' => '输入密码', 'zh-cn' => '输入密码',
'zh-tw' => '輸入密碼',
'ja' => 'パスワードを入力してください', 'ja' => 'パスワードを入力してください',
'ko-kr' => '비밀번호 입력', 'ko-kr' => '비밀번호 입력',
'fa' => 'رمز عبور را وارد کنید', 'fa' => 'رمز عبور را وارد کنید',
@@ -197,6 +237,7 @@ $constStr = [
'Login' => [ 'Login' => [
'en-us' => 'Login', 'en-us' => 'Login',
'zh-cn' => '登录', 'zh-cn' => '登录',
'zh-tw' => '登入',
'ja' => 'サインイン', 'ja' => 'サインイン',
'ko-kr' => '로그인', 'ko-kr' => '로그인',
'fa' => 'ورود', 'fa' => 'ورود',
@@ -204,6 +245,7 @@ $constStr = [
'Encrypt' => [ 'Encrypt' => [
'en-us' => 'Encrypt', 'en-us' => 'Encrypt',
'zh-cn' => '加密', 'zh-cn' => '加密',
'zh-tw' => '加密',
'ja' => '暗号化', 'ja' => '暗号化',
'ko-kr' => '암호화', 'ko-kr' => '암호화',
'fa' => 'رمزگذاری', 'fa' => 'رمزگذاری',
@@ -211,6 +253,7 @@ $constStr = [
'SetpassfileBfEncrypt' => [ 'SetpassfileBfEncrypt' => [
'en-us' => 'Set \'passfile\' in Environments before encrypt', 'en-us' => 'Set \'passfile\' in Environments before encrypt',
'zh-cn' => '先在环境变量设置passfile才能加密', 'zh-cn' => '先在环境变量设置passfile才能加密',
'zh-tw' => '先在環境變數設定passfile才能加密',
'ja' => '最初に暗号化する環境変数にパスファイルを設定します', 'ja' => '最初に暗号化する環境変数にパスファイルを設定します',
'ko-kr' => '암호화하기 전에 환경 변수에 패스 파일을 설정하십시오', 'ko-kr' => '암호화하기 전에 환경 변수에 패스 파일을 설정하십시오',
'fa' => 'قبل از رمزگذاری \"pass file \" را در محیط تنظیم کنید', 'fa' => 'قبل از رمزگذاری \"pass file \" را در محیط تنظیم کنید',
@@ -218,6 +261,7 @@ $constStr = [
'updateProgram' => [ 'updateProgram' => [
'en-us' => 'Update Program', 'en-us' => 'Update Program',
'zh-cn' => '一键更新', 'zh-cn' => '一键更新',
'zh-tw' => '一鍵更新',
'ja' => 'ワンクリック更新', 'ja' => 'ワンクリック更新',
'ko-kr' => '원 클릭 업데이트', 'ko-kr' => '원 클릭 업데이트',
'fa' => 'برنامه را به روز کنید', 'fa' => 'برنامه را به روز کنید',
@@ -225,6 +269,7 @@ $constStr = [
'UpdateSuccess' => [ 'UpdateSuccess' => [
'en-us' => 'Program update Success!', 'en-us' => 'Program update Success!',
'zh-cn' => '程序升级成功!', 'zh-cn' => '程序升级成功!',
'zh-tw' => '程式升級成功!',
'ja' => 'プログラムのアップグレードに成功しました!', 'ja' => 'プログラムのアップグレードに成功しました!',
'ko-kr' => '프로그램 업그레이드 성공!', 'ko-kr' => '프로그램 업그레이드 성공!',
'fa' => 'موفقیت به روز رسانی برنامه!', 'fa' => 'موفقیت به روز رسانی برنامه!',
@@ -232,6 +277,7 @@ $constStr = [
'Setup' => [ 'Setup' => [
'en-us' => 'Setup', 'en-us' => 'Setup',
'zh-cn' => '设置', 'zh-cn' => '设置',
'zh-tw' => '設定',
'ja' => '設定する', 'ja' => '設定する',
'ko-kr' => '설정', 'ko-kr' => '설정',
'fa' => 'نصب', 'fa' => 'نصب',
@@ -239,6 +285,7 @@ $constStr = [
'Back' => [ 'Back' => [
'en-us' => 'Back', 'en-us' => 'Back',
'zh-cn' => '返回', 'zh-cn' => '返回',
'zh-tw' => '返回',
'ja' => 'back', 'ja' => 'back',
'ko-kr' => '돌아 가기', 'ko-kr' => '돌아 가기',
'fa' => 'بازگشت', 'fa' => 'بازگشت',
@@ -246,10 +293,12 @@ $constStr = [
'Theme' => [ 'Theme' => [
'en-us' => 'Theme', 'en-us' => 'Theme',
'zh-cn' => '主题', 'zh-cn' => '主题',
'zh-tw' => '主題',
], ],
'NotNeedUpdate' => [ 'NotNeedUpdate' => [
'en-us' => 'Not Need Update', 'en-us' => 'Not Need Update',
'zh-cn' => '不需要更新', 'zh-cn' => '不需要更新',
'zh-tw' => '不需要更新',
'ja' => '更新不要', 'ja' => '更新不要',
'ko-kr' => '업데이트가 필요하지 않습니다', 'ko-kr' => '업데이트가 필요하지 않습니다',
'fa' => 'آپدیت لازم نیست', 'fa' => 'آپدیت لازم نیست',
@@ -257,6 +306,7 @@ $constStr = [
'PlatformConfig' => [ 'PlatformConfig' => [
'en-us' => 'Platform Config', 'en-us' => 'Platform Config',
'zh-cn' => '平台变量', 'zh-cn' => '平台变量',
'zh-tw' => '平台變數',
'ja' => 'プラットフォーム変数', 'ja' => 'プラットフォーム変数',
'ko-kr' => '플랫폼 변수', 'ko-kr' => '플랫폼 변수',
'fa' => 'پیکربندی پلتفرم', 'fa' => 'پیکربندی پلتفرم',
@@ -264,6 +314,7 @@ $constStr = [
'DelDisk' => [ 'DelDisk' => [
'en-us' => 'Del This Disk', 'en-us' => 'Del This Disk',
'zh-cn' => '删除此盘', 'zh-cn' => '删除此盘',
'zh-tw' => '刪除此盤',
'ja' => 'このディスクを削除', 'ja' => 'このディスクを削除',
'ko-kr' => '이 디스크를 삭제', 'ko-kr' => '이 디스크를 삭제',
'fa' => 'پاک کردن این دیسک', 'fa' => 'پاک کردن این دیسک',
@@ -271,6 +322,7 @@ $constStr = [
'AddDisk' => [ 'AddDisk' => [
'en-us' => 'Add Onedrive Disk', 'en-us' => 'Add Onedrive Disk',
'zh-cn' => '添加Onedrive盘', 'zh-cn' => '添加Onedrive盘',
'zh-tw' => '添加Onedrive盤',
'ja' => 'Onedriveを追加', 'ja' => 'Onedriveを追加',
'ko-kr' => 'Onedrive 추가', 'ko-kr' => 'Onedrive 추가',
'fa' => 'اضافه کردن دیسک Onedrive', 'fa' => 'اضافه کردن دیسک Onedrive',
@@ -278,6 +330,7 @@ $constStr = [
'Home' => [ 'Home' => [
'en-us' => 'Home', 'en-us' => 'Home',
'zh-cn' => '首页', 'zh-cn' => '首页',
'zh-tw' => '首頁',
'ja' => 'ホーム', 'ja' => 'ホーム',
'ko-kr' => '홈', 'ko-kr' => '홈',
'fa' => 'خانه', 'fa' => 'خانه',
@@ -285,14 +338,17 @@ $constStr = [
'Preview' => [ 'Preview' => [
'en-us' => 'Preview', 'en-us' => 'Preview',
'zh-cn' => '预览', 'zh-cn' => '预览',
'zh-tw' => '預覽',
], ],
'List' => [ 'List' => [
'en-us' => 'List', 'en-us' => 'List',
'zh-cn' => '列表', 'zh-cn' => '列表',
'zh-tw' => '列表',
], ],
'NeedUpdate' => [ 'NeedUpdate' => [
'en-us' => 'Program can update<br>Click setup in Operate at top.', 'en-us' => 'Program can update<br>Click setup in Operate at top.',
'zh-cn' => '可以升级程序<br>在上方管理菜单中<br>进入设置页面升级', 'zh-cn' => '可以升级程序<br>在上方管理菜单中<br>进入设置页面升级',
'zh-tw' => '可以升級程式<br>在上方管理選單中<br>進入設定頁面升級',
'ja' => 'プログラムをアップグレードできます<br>上記の管理メニューで<br>アップグレードする設定ページに入ります', 'ja' => 'プログラムをアップグレードできます<br>上記の管理メニューで<br>アップグレードする設定ページに入ります',
'ko-kr' => '프로그램을 업그레이드 할 수 있습니다. <br> 위의 관리 메뉴에서 <br> 업그레이드 할 설정 페이지를 입력하십시오.', 'ko-kr' => '프로그램을 업그레이드 할 수 있습니다. <br> 위의 관리 메뉴에서 <br> 업그레이드 할 설정 페이지를 입력하십시오.',
'fa' => 'برنامه می تواند آپدیت شود<br>روی گزینه نصب در بالای صفحه کلیک کنید.', 'fa' => 'برنامه می تواند آپدیت شود<br>روی گزینه نصب در بالای صفحه کلیک کنید.',
@@ -300,6 +356,7 @@ $constStr = [
'Operate' => [ 'Operate' => [
'en-us' => 'Operate', 'en-us' => 'Operate',
'zh-cn' => '管理', 'zh-cn' => '管理',
'zh-tw' => '管理',
'ja' => '管理', 'ja' => '管理',
'ko-kr' => '관리', 'ko-kr' => '관리',
'fa' => 'مدیریت', 'fa' => 'مدیریت',
@@ -307,6 +364,7 @@ $constStr = [
'Logout' => [ 'Logout' => [
'en-us' => 'Logout', 'en-us' => 'Logout',
'zh-cn' => '登出', 'zh-cn' => '登出',
'zh-tw' => '登出',
'ja' => 'ログアウトする', 'ja' => 'ログアウトする',
'ko-kr' => '로그 아웃', 'ko-kr' => '로그 아웃',
'fa' => 'خروج', 'fa' => 'خروج',
@@ -314,6 +372,7 @@ $constStr = [
'Create' => [ 'Create' => [
'en-us' => 'Create', 'en-us' => 'Create',
'zh-cn' => '新建', 'zh-cn' => '新建',
'zh-tw' => '建立',
'ja' => '新しい', 'ja' => '新しい',
'ko-kr' => '새로운', 'ko-kr' => '새로운',
'fa' => 'ایجاد کردن', 'fa' => 'ایجاد کردن',
@@ -321,6 +380,7 @@ $constStr = [
'Download' => [ 'Download' => [
'en-us' => 'download', 'en-us' => 'download',
'zh-cn' => '下载', 'zh-cn' => '下载',
'zh-tw' => '下載',
'ja' => 'ダウンロードする', 'ja' => 'ダウンロードする',
'ko-kr' => '다운로드', 'ko-kr' => '다운로드',
'fa' => 'دانلود', 'fa' => 'دانلود',
@@ -328,6 +388,7 @@ $constStr = [
'ClicktoEdit' => [ 'ClicktoEdit' => [
'en-us' => 'Click to edit', 'en-us' => 'Click to edit',
'zh-cn' => '点击后编辑', 'zh-cn' => '点击后编辑',
'zh-tw' => '點擊後編輯',
'ja' => 'クリック後に編集', 'ja' => 'クリック後に編集',
'ko-kr' => '클릭 후 편집', 'ko-kr' => '클릭 후 편집',
'fa' => 'برای ویرایش کلیک کنید', 'fa' => 'برای ویرایش کلیک کنید',
@@ -335,6 +396,7 @@ $constStr = [
'Save' => [ 'Save' => [
'en-us' => 'Save', 'en-us' => 'Save',
'zh-cn' => '保存', 'zh-cn' => '保存',
'zh-tw' => '儲存',
'ja' => '保存する', 'ja' => '保存する',
'ko-kr' => '저장', 'ko-kr' => '저장',
'fa' => 'ذخیره', 'fa' => 'ذخیره',
@@ -342,6 +404,7 @@ $constStr = [
'FileNotSupport' => [ 'FileNotSupport' => [
'en-us' => 'File not support preview.', 'en-us' => 'File not support preview.',
'zh-cn' => '文件格式不支持预览', 'zh-cn' => '文件格式不支持预览',
'zh-tw' => '檔案格式不支援預覽',
'ja' => 'ファイル形式はプレビューをサポートしていません', 'ja' => 'ファイル形式はプレビューをサポートしていません',
'ko-kr' => '파일 형식은 미리보기를 지원하지 않습니다', 'ko-kr' => '파일 형식은 미리보기를 지원하지 않습니다',
'fa' => 'پیش نمایش برای این فایل پشتیبانی نمی شود.', 'fa' => 'پیش نمایش برای این فایل پشتیبانی نمی شود.',
@@ -349,6 +412,7 @@ $constStr = [
'File' => [ 'File' => [
'en-us' => 'File', 'en-us' => 'File',
'zh-cn' => '文件', 'zh-cn' => '文件',
'zh-tw' => '文件',
'ja' => 'ファイル', 'ja' => 'ファイル',
'ko-kr' => '파일', 'ko-kr' => '파일',
'fa' => 'فایل', 'fa' => 'فایل',
@@ -356,6 +420,7 @@ $constStr = [
'ShowThumbnails' => [ 'ShowThumbnails' => [
'en-us' => 'Thumbnails', 'en-us' => 'Thumbnails',
'zh-cn' => '图片缩略', 'zh-cn' => '图片缩略',
'zh-tw' => '圖片縮略',
'ja' => '画像のサムネイル', 'ja' => '画像のサムネイル',
'ko-kr' => '사진 섬네일', 'ko-kr' => '사진 섬네일',
'fa' => 'تصویر بندانگشتی', 'fa' => 'تصویر بندانگشتی',
@@ -363,10 +428,12 @@ $constStr = [
'OriginalPic' => [ 'OriginalPic' => [
'en-us' => 'OriginalPic', 'en-us' => 'OriginalPic',
'zh-cn' => '原图', 'zh-cn' => '原图',
'zh-tw' => '原圖',
], ],
'CopyAllDownloadUrl' => [ 'CopyAllDownloadUrl' => [
'en-us' => 'CopyAllDownloadUrl', 'en-us' => 'CopyAllDownloadUrl',
'zh-cn' => '复制所有下载链接', 'zh-cn' => '复制所有下载链接',
'zh-tw' => '複製所有下載連結',
'ja' => 'すべてのダウンロードリンクをコピー', 'ja' => 'すべてのダウンロードリンクをコピー',
'ko-kr' => '모든 다운로드 링크 복사', 'ko-kr' => '모든 다운로드 링크 복사',
'fa' => 'کپی از تمام لینک ها', 'fa' => 'کپی از تمام لینک ها',
@@ -374,10 +441,12 @@ $constStr = [
'Search' => [ 'Search' => [
'en-us' => 'Search', 'en-us' => 'Search',
'zh-cn' => '搜索', 'zh-cn' => '搜索',
'zh-tw' => '搜尋',
], ],
'EditTime' => [ 'EditTime' => [
'en-us' => 'EditTime', 'en-us' => 'EditTime',
'zh-cn' => '修改时间', 'zh-cn' => '修改时间',
'zh-tw' => '修改時間',
'ja' => '変更時間', 'ja' => '変更時間',
'ko-kr' => '수정 시간', 'ko-kr' => '수정 시간',
'fa' => 'زمان ویرایش', 'fa' => 'زمان ویرایش',
@@ -385,6 +454,7 @@ $constStr = [
'Size' => [ 'Size' => [
'en-us' => 'Size', 'en-us' => 'Size',
'zh-cn' => '大小', 'zh-cn' => '大小',
'zh-tw' => '大小',
'ja' => 'サイズ ', 'ja' => 'サイズ ',
'ko-kr' => '사이즈', 'ko-kr' => '사이즈',
'fa' => 'سایز', 'fa' => 'سایز',
@@ -392,6 +462,7 @@ $constStr = [
'Rename' => [ 'Rename' => [
'en-us' => 'Rename', 'en-us' => 'Rename',
'zh-cn' => '重命名', 'zh-cn' => '重命名',
'zh-tw' => '重新命名',
'ja' => '名前を変更', 'ja' => '名前を変更',
'ko-kr' => '이름 바꾸기', 'ko-kr' => '이름 바꾸기',
'fa' => 'تغییر نام', 'fa' => 'تغییر نام',
@@ -399,6 +470,7 @@ $constStr = [
'Move' => [ 'Move' => [
'en-us' => 'Move', 'en-us' => 'Move',
'zh-cn' => '移动', 'zh-cn' => '移动',
'zh-tw' => '移動',
'ja' => '移動する', 'ja' => '移動する',
'ko-kr' => '이동', 'ko-kr' => '이동',
'fa' => 'انتقال', 'fa' => 'انتقال',
@@ -406,6 +478,7 @@ $constStr = [
'Copy' => [ 'Copy' => [
'en-us' => 'Copy', 'en-us' => 'Copy',
'zh-cn' => '复制', 'zh-cn' => '复制',
'zh-tw' => '複製',
'ja' => 'コピー', 'ja' => 'コピー',
'ko-kr' => '복사', 'ko-kr' => '복사',
'fa' => 'کپی', 'fa' => 'کپی',
@@ -413,6 +486,7 @@ $constStr = [
'CannotMove' => [ 'CannotMove' => [
'en-us' => 'Can not Move!', 'en-us' => 'Can not Move!',
'zh-cn' => '不能移动!', 'zh-cn' => '不能移动!',
'zh-tw' => '不能移動!',
'ja' => '動かない!', 'ja' => '動かない!',
'ko-kr' => '움직일 수 없어!', 'ko-kr' => '움직일 수 없어!',
'fa' => 'نمی‌تواند منتقل شود!', 'fa' => 'نمی‌تواند منتقل شود!',
@@ -420,6 +494,7 @@ $constStr = [
'Delete' => [ 'Delete' => [
'en-us' => 'Delete', 'en-us' => 'Delete',
'zh-cn' => '删除', 'zh-cn' => '删除',
'zh-tw' => '刪除',
'ja' => '削除する', 'ja' => '削除する',
'ko-kr' => '삭제', 'ko-kr' => '삭제',
'fa' => 'حذف کردن', 'fa' => 'حذف کردن',
@@ -427,6 +502,7 @@ $constStr = [
'PrePage' => [ 'PrePage' => [
'en-us' => 'PrePage', 'en-us' => 'PrePage',
'zh-cn' => '上一页', 'zh-cn' => '上一页',
'zh-tw' => '上一頁',
'ja' => '前へ', 'ja' => '前へ',
'ko-kr' => '이전', 'ko-kr' => '이전',
'fa' => 'صفحه قبل', 'fa' => 'صفحه قبل',
@@ -434,6 +510,7 @@ $constStr = [
'NextPage' => [ 'NextPage' => [
'en-us' => 'NextPage', 'en-us' => 'NextPage',
'zh-cn' => '下一页', 'zh-cn' => '下一页',
'zh-tw' => '下一頁',
'ja' => '次のページ', 'ja' => '次のページ',
'ko-kr' => '다음 페이지', 'ko-kr' => '다음 페이지',
'fa' => 'صفحه بعد', 'fa' => 'صفحه بعد',
@@ -441,6 +518,7 @@ $constStr = [
'Upload' => [ 'Upload' => [
'en-us' => 'Upload', 'en-us' => 'Upload',
'zh-cn' => '上传', 'zh-cn' => '上传',
'zh-tw' => '上傳',
'ja' => 'アップロードする', 'ja' => 'アップロードする',
'ko-kr' => '업로드', 'ko-kr' => '업로드',
'fa' => 'آپلود', 'fa' => 'آپلود',
@@ -448,14 +526,17 @@ $constStr = [
'UploadFile' => [ 'UploadFile' => [
'en-us' => 'Upload File(s)', 'en-us' => 'Upload File(s)',
'zh-cn' => '上传文件', 'zh-cn' => '上传文件',
'zh-tw' => '上傳文件',
], ],
'UploadFolder' => [ 'UploadFolder' => [
'en-us' => 'Upload Folder', 'en-us' => 'Upload Folder',
'zh-cn' => '上传文件夹', 'zh-cn' => '上传文件夹',
'zh-tw' => '上傳資料夾',
], ],
'FileSelected' => [ 'FileSelected' => [
'en-us' => 'Select File', 'en-us' => 'Select File',
'zh-cn' => '选择文件', 'zh-cn' => '选择文件',
'zh-tw' => '選擇文件',
'ja' => 'ファイルを選択', 'ja' => 'ファイルを選択',
'ko-kr' => '파일 선택', 'ko-kr' => '파일 선택',
'fa' => 'انتخاب فایل', 'fa' => 'انتخاب فایل',
@@ -463,6 +544,7 @@ $constStr = [
'NoFileSelected' => [ 'NoFileSelected' => [
'en-us' => 'Not Select File', 'en-us' => 'Not Select File',
'zh-cn' => '没有选择文件', 'zh-cn' => '没有选择文件',
'zh-tw' => '沒有選擇文件',
'ja' => 'ファイルが選択されていません', 'ja' => 'ファイルが選択されていません',
'ko-kr' => '선택된 파일이 없습니다', 'ko-kr' => '선택된 파일이 없습니다',
'fa' => 'فایل را انتخاب نکنید', 'fa' => 'فایل را انتخاب نکنید',
@@ -470,6 +552,7 @@ $constStr = [
'Submit' => [ 'Submit' => [
'en-us' => 'Submit', 'en-us' => 'Submit',
'zh-cn' => '确认', 'zh-cn' => '确认',
'zh-tw' => '確認',
'ja' => '確認する', 'ja' => '確認する',
'ko-kr' => '확인', 'ko-kr' => '확인',
'fa' => 'ارسال', 'fa' => 'ارسال',
@@ -477,6 +560,7 @@ $constStr = [
'Close' => [ 'Close' => [
'en-us' => 'Close', 'en-us' => 'Close',
'zh-cn' => '关闭', 'zh-cn' => '关闭',
'zh-tw' => '關閉',
'ja' => '閉じる', 'ja' => '閉じる',
'ko-kr' => '닫기', 'ko-kr' => '닫기',
'fa' => 'بستن', 'fa' => 'بستن',
@@ -484,6 +568,7 @@ $constStr = [
'InputPasswordUWant' => [ 'InputPasswordUWant' => [
'en-us' => 'Input Password you Want', 'en-us' => 'Input Password you Want',
'zh-cn' => '输入想要设置的密码', 'zh-cn' => '输入想要设置的密码',
'zh-tw' => '輸入想要設置的密碼',
'ja' => '設定するパスワードを入力してください', 'ja' => '設定するパスワードを入力してください',
'ko-kr' => '설정하려는 비밀번호를 입력하십시오', 'ko-kr' => '설정하려는 비밀번호를 입력하십시오',
'fa' => 'پسورد خود را وارد کنید', 'fa' => 'پسورد خود را وارد کنید',
@@ -491,6 +576,7 @@ $constStr = [
'ParentDir' => [ 'ParentDir' => [
'en-us' => 'Parent Dir', 'en-us' => 'Parent Dir',
'zh-cn' => '上一级目录', 'zh-cn' => '上一级目录',
'zh-tw' => '上一級目錄',
'ja' => '親ディレクトリ', 'ja' => '親ディレクトリ',
'ko-kr' => '부모 디렉토리', 'ko-kr' => '부모 디렉토리',
'fa' => 'مسیر', 'fa' => 'مسیر',
@@ -498,6 +584,7 @@ $constStr = [
'Folder' => [ 'Folder' => [
'en-us' => 'Folder', 'en-us' => 'Folder',
'zh-cn' => '文件夹', 'zh-cn' => '文件夹',
'zh-tw' => '資料夾',
'ja' => 'フォルダー', 'ja' => 'フォルダー',
'ko-kr' => '폴더', 'ko-kr' => '폴더',
'fa' => 'پوشه', 'fa' => 'پوشه',
@@ -505,6 +592,7 @@ $constStr = [
'Name' => [ 'Name' => [
'en-us' => 'Name', 'en-us' => 'Name',
'zh-cn' => '名称', 'zh-cn' => '名称',
'zh-tw' => '名稱',
'ja' => '名前', 'ja' => '名前',
'ko-kr' => '이름', 'ko-kr' => '이름',
'fa' => 'نام', 'fa' => 'نام',
@@ -512,6 +600,7 @@ $constStr = [
'Content' => [ 'Content' => [
'en-us' => 'Content', 'en-us' => 'Content',
'zh-cn' => '内容', 'zh-cn' => '内容',
'zh-tw' => '內容',
'ja' => '内容', 'ja' => '内容',
'ko-kr' => '내용', 'ko-kr' => '내용',
'fa' => 'محتوا', 'fa' => 'محتوا',
@@ -519,6 +608,7 @@ $constStr = [
'CancelEdit' => [ 'CancelEdit' => [
'en-us' => 'Cancel Edit', 'en-us' => 'Cancel Edit',
'zh-cn' => '取消编辑', 'zh-cn' => '取消编辑',
'zh-tw' => '取消編輯',
'ja' => '編集をキャンセル', 'ja' => '編集をキャンセル',
'ko-kr' => '편집 취소', 'ko-kr' => '편집 취소',
'fa' => 'لغو ویرایش', 'fa' => 'لغو ویرایش',
@@ -526,6 +616,7 @@ $constStr = [
'GetFileNameFail' => [ 'GetFileNameFail' => [
'en-us' => 'Fail to Get File Name!', 'en-us' => 'Fail to Get File Name!',
'zh-cn' => '获取文件名失败!', 'zh-cn' => '获取文件名失败!',
'zh-tw' => '獲取檔案名失敗!',
'ja' => 'ファイル名を取得できませんでした!', 'ja' => 'ファイル名を取得できませんでした!',
'ko-kr' => '파일 이름을 가져 오지 못했습니다!', 'ko-kr' => '파일 이름을 가져 오지 못했습니다!',
'fa' => 'نام فایل به دست نیامد!', 'fa' => 'نام فایل به دست نیامد!',
@@ -533,6 +624,7 @@ $constStr = [
'GetUploadLink' => [ 'GetUploadLink' => [
'en-us' => 'Get Upload Link', 'en-us' => 'Get Upload Link',
'zh-cn' => '获取上传链接', 'zh-cn' => '获取上传链接',
'zh-tw' => '獲取上傳連結',
'ja' => 'アップロードリンクを取得', 'ja' => 'アップロードリンクを取得',
'ko-kr' => '업로드 링크 받기', 'ko-kr' => '업로드 링크 받기',
'fa' => 'دریافت لینک آپلود', 'fa' => 'دریافت لینک آپلود',
@@ -540,10 +632,12 @@ $constStr = [
'Calculate' => [ 'Calculate' => [
'en-us' => 'Calculate', 'en-us' => 'Calculate',
'zh-cn' => '计算', 'zh-cn' => '计算',
'zh-tw' => '計算',
], ],
'UpFileTooLarge' => [ 'UpFileTooLarge' => [
'en-us' => 'The File is too Large!', 'en-us' => 'The File is too Large!',
'zh-cn' => '文件过大,终止上传。', 'zh-cn' => '文件过大,终止上传。',
'zh-tw' => '文件過大,終止上傳。',
'ja' => '超えると、アップロードは終了します。', 'ja' => '超えると、アップロードは終了します。',
'ko-kr' => '파일이 너무 커서 업로드가 종료되었습니다.', 'ko-kr' => '파일이 너무 커서 업로드가 종료되었습니다.',
'fa' => 'فایل خیلی بزرگ است!', 'fa' => 'فایل خیلی بزرگ است!',
@@ -551,6 +645,7 @@ $constStr = [
'UploadStart' => [ 'UploadStart' => [
'en-us' => 'Upload Start', 'en-us' => 'Upload Start',
'zh-cn' => '开始上传', 'zh-cn' => '开始上传',
'zh-tw' => '開始上傳',
'ja' => 'アップロードを開始', 'ja' => 'アップロードを開始',
'ko-kr' => '업로드 시작', 'ko-kr' => '업로드 시작',
'fa' => 'شروع آپلود', 'fa' => 'شروع آپلود',
@@ -558,6 +653,7 @@ $constStr = [
'UploadStartAt' => [ 'UploadStartAt' => [
'en-us' => 'Start At', 'en-us' => 'Start At',
'zh-cn' => '开始于', 'zh-cn' => '开始于',
'zh-tw' => '開始於',
'ja' => 'で開始', 'ja' => 'で開始',
'ko-kr' => '에서 시작', 'ko-kr' => '에서 시작',
'fa' => 'شروع از', 'fa' => 'شروع از',
@@ -565,6 +661,7 @@ $constStr = [
'ThisTime' => [ 'ThisTime' => [
'en-us' => 'This Time', 'en-us' => 'This Time',
'zh-cn' => '本次', 'zh-cn' => '本次',
'zh-tw' => '本次',
'ja' => '今回は', 'ja' => '今回は',
'ko-kr' => '이번에는', 'ko-kr' => '이번에는',
'fa' => 'این زمان', 'fa' => 'این زمان',
@@ -572,6 +669,7 @@ $constStr = [
'LastUpload' => [ 'LastUpload' => [
'en-us' => 'Last time Upload', 'en-us' => 'Last time Upload',
'zh-cn' => '上次上传', 'zh-cn' => '上次上传',
'zh-tw' => '上次上傳',
'ja' => '上回は', 'ja' => '上回は',
'ko-kr' => '마지막 업로드', 'ko-kr' => '마지막 업로드',
'fa' => 'آخرین زمان آپلود', 'fa' => 'آخرین زمان آپلود',
@@ -579,6 +677,7 @@ $constStr = [
'AverageSpeed' => [ 'AverageSpeed' => [
'en-us' => 'AverageSpeed', 'en-us' => 'AverageSpeed',
'zh-cn' => '平均速度', 'zh-cn' => '平均速度',
'zh-tw' => '平均速度',
'ja' => '平均速度', 'ja' => '平均速度',
'ko-kr' => '평균 속도', 'ko-kr' => '평균 속도',
'fa' => 'میانگین سرعت', 'fa' => 'میانگین سرعت',
@@ -586,6 +685,7 @@ $constStr = [
'CurrentSpeed' => [ 'CurrentSpeed' => [
'en-us' => 'CurrentSpeed', 'en-us' => 'CurrentSpeed',
'zh-cn' => '即时速度', 'zh-cn' => '即时速度',
'zh-tw' => '即時速度',
'ja' => 'インスタントスピード', 'ja' => 'インスタントスピード',
'ko-kr' => '즉각적인 속도', 'ko-kr' => '즉각적인 속도',
'fa' => 'سرعت فعلی', 'fa' => 'سرعت فعلی',
@@ -593,6 +693,7 @@ $constStr = [
'Expect' => [ 'Expect' => [
'en-us' => 'Expect', 'en-us' => 'Expect',
'zh-cn' => '预计还要', 'zh-cn' => '预计还要',
'zh-tw' => '預計還要',
'ja' => '期待される', 'ja' => '期待される',
'ko-kr' => '예상', 'ko-kr' => '예상',
'fa' => 'انتظار', 'fa' => 'انتظار',
@@ -600,6 +701,7 @@ $constStr = [
'EndAt' => [ 'EndAt' => [
'en-us' => 'End At', 'en-us' => 'End At',
'zh-cn' => '结束于', 'zh-cn' => '结束于',
'zh-tw' => '結束於',
'ja' => 'で終了', 'ja' => 'で終了',
'ko-kr' => '에 끝남', 'ko-kr' => '에 끝남',
'fa' => 'پایان از', 'fa' => 'پایان از',
@@ -607,6 +709,7 @@ $constStr = [
'UploadErrorUpAgain' => [ 'UploadErrorUpAgain' => [
'en-us' => 'Maybe error, do upload again.', 'en-us' => 'Maybe error, do upload again.',
'zh-cn' => '可能出错,重新上传。', 'zh-cn' => '可能出错,重新上传。',
'zh-tw' => '可能出錯,重新上傳。',
'ja' => '間違っている可能性があります。もう一度アップロードしてください。', 'ja' => '間違っている可能性があります。もう一度アップロードしてください。',
'ko-kr' => '잘못되었을 수 있습니다. 다시 업로드하십시오.', 'ko-kr' => '잘못되었을 수 있습니다. 다시 업로드하십시오.',
'fa' => 'خطا، دوباره آپلود کنید', 'fa' => 'خطا، دوباره آپلود کنید',
@@ -614,6 +717,7 @@ $constStr = [
'UploadComplete' => [ 'UploadComplete' => [
'en-us' => 'Upload Complete', 'en-us' => 'Upload Complete',
'zh-cn' => '上传完成', 'zh-cn' => '上传完成',
'zh-tw' => '上傳完成',
'ja' => 'アップロード完了', 'ja' => 'アップロード完了',
'ko-kr' => '업로드 완료', 'ko-kr' => '업로드 완료',
'fa' => 'آپلود با موفقیت انجام شد', 'fa' => 'آپلود با موفقیت انجام شد',
@@ -621,6 +725,7 @@ $constStr = [
'UploadFail23' => [ 'UploadFail23' => [
'en-us' => 'Upload Fail, contain #.', 'en-us' => 'Upload Fail, contain #.',
'zh-cn' => '目录或文件名含有#,上传失败。', 'zh-cn' => '目录或文件名含有#,上传失败。',
'zh-tw' => '目錄或檔案名含有#,上傳失敗。',
'ja' => 'ディレクトリまたはファイル名に#が含まれています。アップロードに失敗しました。', 'ja' => 'ディレクトリまたはファイル名に#が含まれています。アップロードに失敗しました。',
'ko-kr' => '디렉토리 또는 파일 이름에 #이 포함되어 있습니다. 업로드하지 못했습니다.', 'ko-kr' => '디렉토리 또는 파일 이름에 #이 포함되어 있습니다. 업로드하지 못했습니다.',
'fa' => 'بارگذاری ناموفق، حاوی #.', 'fa' => 'بارگذاری ناموفق، حاوی #.',
@@ -631,6 +736,7 @@ $constStr = [
'SavingToken' => [ 'SavingToken' => [
'en-us' => 'Saving refresh_token!', 'en-us' => 'Saving refresh_token!',
'zh-cn' => '正在保存 refresh_token', 'zh-cn' => '正在保存 refresh_token',
'zh-tw' => '正在儲存 refresh_token',
'ja' => 'refresh_tokenを保存しています!', 'ja' => 'refresh_tokenを保存しています!',
'ko-kr' => 'refresh_token 저장 중!', 'ko-kr' => 'refresh_token 저장 중!',
'fa' => 'در حال ذخیره refresh_token!', 'fa' => 'در حال ذخیره refresh_token!',
@@ -638,6 +744,7 @@ $constStr = [
'MayinEnv' => [ 'MayinEnv' => [
'en-us' => 'The \'Drive_ver\' may in Config', 'en-us' => 'The \'Drive_ver\' may in Config',
'zh-cn' => 'Drive_ver应该已经写入', 'zh-cn' => 'Drive_ver应该已经写入',
'zh-tw' => 'Drive_ver應該已經寫入',
'ja' => 'Drive_verは環境変数に書き込まれている必要があります', 'ja' => 'Drive_verは環境変数に書き込まれている必要があります',
'ko-kr' => 'Drive_verが書き込まれている必要があります', 'ko-kr' => 'Drive_verが書き込まれている必要があります',
'fa' => 'The \'Drive_ver\' may in Config', 'fa' => 'The \'Drive_ver\' may in Config',
@@ -645,6 +752,7 @@ $constStr = [
'Wait' => [ 'Wait' => [
'en-us' => 'Wait', 'en-us' => 'Wait',
'zh-cn' => '稍等', 'zh-cn' => '稍等',
'zh-tw' => '稍等',
'ja' => 'ちょっと待って', 'ja' => 'ちょっと待って',
'ko-kr' => '잠깐만', 'ko-kr' => '잠깐만',
'fa' => 'منتظر بمانید', 'fa' => 'منتظر بمانید',
@@ -652,6 +760,7 @@ $constStr = [
'WaitJumpIndex' => [ 'WaitJumpIndex' => [
'en-us' => 'Wait 5s jump to Home page', 'en-us' => 'Wait 5s jump to Home page',
'zh-cn' => '等5s跳到首页', 'zh-cn' => '等5s跳到首页',
'zh-tw' => '等5秒跳到首頁',
'ja' => '5秒待ってホームページにジャンプします', 'ja' => '5秒待ってホームページにジャンプします',
'ko-kr' => '5 초 동안 홈페이지로 이동', 'ko-kr' => '5 초 동안 홈페이지로 이동',
'fa' => '۵ دقیقه صبر کنید تا به صفحه نخست برگردید', 'fa' => '۵ دقیقه صبر کنید تا به صفحه نخست برگردید',
@@ -659,6 +768,7 @@ $constStr = [
'JumptoOffice' => [ 'JumptoOffice' => [
'en-us' => 'Login Office and Get a refresh_token', 'en-us' => 'Login Office and Get a refresh_token',
'zh-cn' => '跳转到Office,登录获取refresh_token', 'zh-cn' => '跳转到Office,登录获取refresh_token',
'zh-tw' => '跳轉到Office,登入獲取refresh_token',
'ja' => 'Officeにジャンプしてログインし、refresh_tokenを取得します', 'ja' => 'Officeにジャンプしてログインし、refresh_tokenを取得します',
'ko-kr' => '사무실로 이동하여 로그인하여 refresh_token을 받으십시오.', 'ko-kr' => '사무실로 이동하여 로그인하여 refresh_token을 받으십시오.',
'fa' => 'وارد Office شوید و یک refresh_token دریافت کنید', 'fa' => 'وارد Office شوید و یک refresh_token دریافت کنید',
@@ -666,6 +776,7 @@ $constStr = [
'OnedriveDiskTag' => [ 'OnedriveDiskTag' => [
'en-us' => 'Onedrive Disk Tag', 'en-us' => 'Onedrive Disk Tag',
'zh-cn' => 'Onedrive 标签', 'zh-cn' => 'Onedrive 标签',
'zh-tw' => 'Onedrive 標籤',
'ja' => 'Onedriveタグ', 'ja' => 'Onedriveタグ',
'ko-kr' => 'Onedrive 태그', 'ko-kr' => 'Onedrive 태그',
'fa' => 'برچسب دیسک Onedrive', 'fa' => 'برچسب دیسک Onedrive',
@@ -673,6 +784,7 @@ $constStr = [
'OnedriveDiskName' => [ 'OnedriveDiskName' => [
'en-us' => 'Onedrive Showed Name', 'en-us' => 'Onedrive Showed Name',
'zh-cn' => 'Onedrive 显示名称', 'zh-cn' => 'Onedrive 显示名称',
'zh-tw' => 'Onedrive 顯示名稱',
'ja' => 'Onedrive表示名', 'ja' => 'Onedrive表示名',
'ko-kr' => 'Onedrive 표시 이름', 'ko-kr' => 'Onedrive 표시 이름',
'fa' => 'نام نشان داده شده Onedrive', 'fa' => 'نام نشان داده شده Onedrive',
@@ -680,10 +792,12 @@ $constStr = [
'DriveVerMS' => [ 'DriveVerMS' => [
'en-us' => 'Onedrive, Onedrive for business', 'en-us' => 'Onedrive, Onedrive for business',
'zh-cn' => '国际版(商业版与个人版)', 'zh-cn' => '国际版(商业版与个人版)',
'zh-tw' => '國際版(商業版與個人版)',
], ],
'DriveVerCN' => [ 'DriveVerCN' => [
'en-us' => 'Onedrive in China', 'en-us' => 'Onedrive in China',
'zh-cn' => '世纪互联版', 'zh-cn' => '世纪互联版',
'zh-tw' => '世紀互聯版(中國版Onedrive',
'ja' => '中国のOnedrive', 'ja' => '中国のOnedrive',
'ko-kr' => '중국 Onedrive', 'ko-kr' => '중국 Onedrive',
'fa' => 'Onedrive در چین', 'fa' => 'Onedrive در چین',
@@ -691,14 +805,17 @@ $constStr = [
'DriveVerShareurl' => [ 'DriveVerShareurl' => [
'en-us' => 'A share link of a folder', 'en-us' => 'A share link of a folder',
'zh-cn' => '共享链接', 'zh-cn' => '共享链接',
'zh-tw' => '共享連結',
], ],
'UseShareLink' => [ 'UseShareLink' => [
'en-us' => 'Share a folder in Onedrive (enable EDIT for everyone), input the link url below.', 'en-us' => 'Share a folder in Onedrive (enable EDIT for everyone), input the link url below.',
'zh-cn' => '对一个Onedrive文件夹共享,允许所有人编辑,然后将共享链接填在下方', 'zh-cn' => '对一个Onedrive文件夹共享,允许所有人编辑,然后将共享链接填在下方',
'zh-tw' => '對一個Onedrive資料夾共享,允許所有人編輯,然後將共享連結填在下方',
], ],
'CustomIdSecret' => [ 'CustomIdSecret' => [
'en-us' => 'Use custom client id & secret instead of OneManager default', 'en-us' => 'Use custom client id & secret instead of OneManager default',
'zh-cn' => '自己申请应用ID与机密,不用OneManager默认的', 'zh-cn' => '自己申请应用ID与机密,不用OneManager默认的',
'zh-tw' => '自己申請應用ID與機密,不用OneManager預設的',
'ja' => 'アプリケーションIDとシークレットを自分で申請する', 'ja' => 'アプリケーションIDとシークレットを自分で申請する',
'ko-kr' => '응용 프로그램 ID 및 비밀 신청', 'ko-kr' => '응용 프로그램 ID 및 비밀 신청',
'fa' => 'به طور پیش فرض اما از شناسه برنامه و سکرت استفاده کنید', 'fa' => 'به طور پیش فرض اما از شناسه برنامه و سکرت استفاده کنید',
@@ -706,16 +823,19 @@ $constStr = [
'GetSecretIDandKEY' => [ 'GetSecretIDandKEY' => [
'en-us' => 'Get custom client id & secret', 'en-us' => 'Get custom client id & secret',
'zh-cn' => '申请应用ID与机密', 'zh-cn' => '申请应用ID与机密',
'zh-tw' => '申請應用ID與機密',
'ja' => 'アプリケーションIDとシークレット', 'ja' => 'アプリケーションIDとシークレット',
'fa' => 'دریافت شناسه برنامه و سکرت', 'fa' => 'دریافت شناسه برنامه و سکرت',
], ],
'UseSharepointInstead' => [ 'UseSharepointInstead' => [
'en-us' => 'Use space in Sharepoint website instead of Onedrive', 'en-us' => 'Use space in Sharepoint website instead of Onedrive',
'zh-cn' => '使用Sharepoint网站的空间,不使用Onedrive', 'zh-cn' => '使用Sharepoint网站的空间,不使用Onedrive',
'zh-tw' => '使用Sharepoint網站的空間,不使用Onedrive',
], ],
'GetSharepointSiteAddress' => [ 'GetSharepointSiteAddress' => [
'en-us' => 'Login office.com and click the SharePoint, create a website or find an exist website, input the Site address below', 'en-us' => 'Login office.com and click the SharePoint, create a website or find an exist website, input the Site address below',
'zh-cn' => '登录office.com,点击Sharepoint,创建一个网站(或使用原有网站),然后将它的站点地址填在下方', 'zh-cn' => '登录office.com,点击Sharepoint,创建一个网站(或使用原有网站),然后将它的站点地址填在下方',
'zh-tw' => '登入office.com,點擊Sharepoint,建立一個網站(或使用原有網站),然後將它的站點地址填在下方',
], ],
'InputSharepointSiteAddress' => [ 'InputSharepointSiteAddress' => [
'en-us' => 'https://xxxxx.sharepoint.com/sites(teams)/{name}', 'en-us' => 'https://xxxxx.sharepoint.com/sites(teams)/{name}',
@@ -723,6 +843,7 @@ $constStr = [
'TagFormatAlert' => [ 'TagFormatAlert' => [
'en-us' => 'Tag must start with a letter, end with a letter or digit and can only contain lowercase letters, digits, and dashes at least 2 letters!', 'en-us' => 'Tag must start with a letter, end with a letter or digit and can only contain lowercase letters, digits, and dashes at least 2 letters!',
'zh-cn' => '标签只能以字母开头,以字母或数字结尾,至少2位', 'zh-cn' => '标签只能以字母开头,以字母或数字结尾,至少2位',
'zh-tw' => '標籤只能以字母開頭,以字母或數字結尾,至少2位',
'ja' => 'タグは、文字で始まり、文字または数字で終わる必要があります。少なくとも2つ', 'ja' => 'タグは、文字で始まり、文字または数字で終わる必要があります。少なくとも2つ',
'ko-kr' => '태그는 문자로 시작하고 문자 또는 숫자로 끝나야합니다 (2 이상).', 'ko-kr' => '태그는 문자로 시작하고 문자 또는 숫자로 끝나야합니다 (2 이상).',
'fa' => 'برچسب باید با یک حرف شروع شود، با یک حرف یا رقم پایان یابد و تنها می‌تواند حاوی حروف کوچک، ارقام و خط فاصله، حداقل ۲ حرف باشد!', 'fa' => 'برچسب باید با یک حرف شروع شود، با یک حرف یا رقم پایان یابد و تنها می‌تواند حاوی حروف کوچک، ارقام و خط فاصله، حداقل ۲ حرف باشد!',
@@ -730,6 +851,7 @@ $constStr = [
'ClickInstall' => [ 'ClickInstall' => [
'en-us' => 'Click to install the project', 'en-us' => 'Click to install the project',
'zh-cn' => '点击开始安装程序', 'zh-cn' => '点击开始安装程序',
'zh-tw' => '點擊開始安裝程式',
'ja' => 'クリックしてインストールプロセスを開始します', 'ja' => 'クリックしてインストールプロセスを開始します',
'ko-kr' => '설치 과정을 시작하려면 클릭', 'ko-kr' => '설치 과정을 시작하려면 클릭',
'fa' => 'برای نصب پروژه کلیک کنید', 'fa' => 'برای نصب پروژه کلیک کنید',
@@ -737,6 +859,7 @@ $constStr = [
'LogintoBind' => [ 'LogintoBind' => [
'en-us' => 'then login and bind your onedrive in setup', 'en-us' => 'then login and bind your onedrive in setup',
'zh-cn' => '然后登录后在设置中绑定你的onedrive。', 'zh-cn' => '然后登录后在设置中绑定你的onedrive。',
'zh-tw' => '然後登入後在設定中綁定你的onedrive。',
'ja' => '次に、ログインして、設定でonedriveをバインドします。', 'ja' => '次に、ログインして、設定でonedriveをバインドします。',
'ko-kr' => '그런 다음 로그인하여 onedrive를 설정에 바인딩하십시오.', 'ko-kr' => '그런 다음 로그인하여 onedrive를 설정에 바인딩하십시오.',
'fa' => 'پس از آن وارد سیستم شوید و تنظیمات خود را در onedrive متصل کنید', 'fa' => 'پس از آن وارد سیستم شوید و تنظیمات خود را در onedrive متصل کنید',
@@ -744,6 +867,7 @@ $constStr = [
'MakesuerWriteable' => [ 'MakesuerWriteable' => [
'en-us' => 'Plase make sure the config.php is writeable. run writeable.sh.', 'en-us' => 'Plase make sure the config.php is writeable. run writeable.sh.',
'zh-cn' => '确认config.php可写。', 'zh-cn' => '确认config.php可写。',
'zh-tw' => '確認config.php可寫。',
'ja' => 'config.phpが書き込み可能であることを確認してください。', 'ja' => 'config.phpが書き込み可能であることを確認してください。',
'ko-kr' => 'config.php가 쓰기 가능한지 확인하십시오.', 'ko-kr' => 'config.php가 쓰기 가능한지 확인하십시오.',
'fa' => 'اطمینان حاصل کنید که config.php قابل نوشتن است. writeable.sh را اجرا کنید.', 'fa' => 'اطمینان حاصل کنید که config.php قابل نوشتن است. writeable.sh را اجرا کنید.',
@@ -751,6 +875,7 @@ $constStr = [
'MakesuerRewriteOn' => [ 'MakesuerRewriteOn' => [
'en-us' => 'Plase make sure the RewriteEngine is On.', 'en-us' => 'Plase make sure the RewriteEngine is On.',
'zh-cn' => '确认重写(伪静态)功能启用。', 'zh-cn' => '确认重写(伪静态)功能启用。',
'zh-tw' => '確認重寫(偽靜態)功能啟用。',
'ja' => '書き換え(擬似静的)機能が有効になっていることを確認します。', 'ja' => '書き換え(擬似静的)機能が有効になっていることを確認します。',
'ko-kr' => '다시 쓰기 (의사 정적) 기능이 활성화되어 있는지 확인하십시오.', 'ko-kr' => '다시 쓰기 (의사 정적) 기능이 활성화되어 있는지 확인하십시오.',
'fa' => 'لطفاً مطمئن شوید که RewriteEngine روشن است.', 'fa' => 'لطفاً مطمئن شوید که RewriteEngine روشن است.',
@@ -758,18 +883,22 @@ $constStr = [
'CopyUrl' => [ 'CopyUrl' => [
'en-us' => 'Copy URL', 'en-us' => 'Copy URL',
'zh-cn' => '复制链接', 'zh-cn' => '复制链接',
'zh-tw' => '複製連結',
], ],
'Success' => [ 'Success' => [
'en-us' => 'Success', 'en-us' => 'Success',
'zh-cn' => '成功', 'zh-cn' => '成功',
'zh-tw' => '成功',
], ],
'SetAdminPassword' => [ 'SetAdminPassword' => [
'en-us' => 'Set Admin Password', 'en-us' => 'Set Admin Password',
'zh-cn' => '设置管理密码', 'zh-cn' => '设置管理密码',
'zh-tw' => '設定管理密碼',
], ],
'Refresh' => [ 'Refresh' => [
'en-us' => 'Refresh', 'en-us' => 'Refresh',
'zh-cn' => '刷新', 'zh-cn' => '刷新',
'zh-tw' => '重新整理',
'ja' => 'リフレッシュ', 'ja' => 'リフレッシュ',
'ko-kr' => '새로 고침', 'ko-kr' => '새로 고침',
'fa' => 'رفرش', 'fa' => 'رفرش',
@@ -777,6 +906,7 @@ $constStr = [
'SelectLanguage' => [ 'SelectLanguage' => [
'en-us' => 'Select Language', 'en-us' => 'Select Language',
'zh-cn' => '选择语言', 'zh-cn' => '选择语言',
'zh-tw' => '選擇語言',
'ja' => '言語を選択してください', 'ja' => '言語を選択してください',
'ko-kr' => '언어를 선택하십시오', 'ko-kr' => '언어를 선택하십시오',
'fa' => 'زبان را انتخاب کنید', 'fa' => 'زبان را انتخاب کنید',
@@ -784,6 +914,7 @@ $constStr = [
'RefreshCache' => [ 'RefreshCache' => [
'en-us' => 'RefreshCache', 'en-us' => 'RefreshCache',
'zh-cn' => '刷新缓存', 'zh-cn' => '刷新缓存',
'zh-tw' => '重新整理快取',
'ja' => 'キャッシュを再構築', 'ja' => 'キャッシュを再構築',
'ko-kr' => '캐시 플러시', 'ko-kr' => '캐시 플러시',
'fa' => 'رفرش cache', 'fa' => 'رفرش cache',
@@ -791,17 +922,21 @@ $constStr = [
'CannotOneKeyUpate' => [ 'CannotOneKeyUpate' => [
'en-us' => 'Can not update by a click! run update.sh', 'en-us' => 'Can not update by a click! run update.sh',
'zh-cn' => '不能一键更新,可以运行update.sh', 'zh-cn' => '不能一键更新,可以运行update.sh',
'zh-tw' => '不能一鍵更新,可以執行update.sh',
], ],
'QueryBranchs' => [ 'QueryBranchs' => [
'en-us' => 'Query Branchs', 'en-us' => 'Query Branchs',
'zh-cn' => '查询分支', 'zh-cn' => '查询分支',
'zh-tw' => '查詢分支',
], ],
'ONEMANAGER_CONFIG_SAVE_ENV' => [ 'ONEMANAGER_CONFIG_SAVE_ENV' => [
'en-us' => 'Config save in Environments', 'en-us' => 'Config save in Environments',
'zh-cn' => '配置保存在环境变量', 'zh-cn' => '配置保存在环境变量',
'zh-tw' => '配置儲存在環境變數',
], ],
'ONEMANAGER_CONFIG_SAVE_FILE' => [ 'ONEMANAGER_CONFIG_SAVE_FILE' => [
'en-us' => 'Config save in code file, may cause fee', 'en-us' => 'Config save in code file, may cause fee',
'zh-cn' => '配置保存在代码文件中,可能产生费用', 'zh-cn' => '配置保存在代码文件中,可能产生费用',
'zh-tw' => '配置儲存在程式碼文件中,可能產生費用',
], ],
]; ];
+3
View File
@@ -0,0 +1,3 @@
{
"start": "php -S 0.0.0.0:8080 index.php"
}
+1 -1
View File
@@ -73,7 +73,7 @@ function handler($event, $context)
$tmp = array( $tmp = array(
'method' => $event->getMethod(), 'method' => $event->getMethod(),
'clientIP' => $event->getAttribute("clientIP"), 'clientIP' => $event->getAttribute("clientIP"),
'eventURI' => $event->getAttribute("eventURI"), 'requestURI' => $event->getAttribute("requestURI"),
'path' => spurlencode($event->getAttribute("path"), '/'), 'path' => spurlencode($event->getAttribute("path"), '/'),
'queryString' => $event->getQueryParams(), 'queryString' => $event->getQueryParams(),
'headers' => $event->getHeaders(), 'headers' => $event->getHeaders(),
+7 -3
View File
@@ -38,10 +38,14 @@ function GetPathSetting($event, $context)
$_SERVER['region'] = $context['region']; $_SERVER['region'] = $context['region'];
$_SERVER['service_name'] = $context['service']['name']; $_SERVER['service_name'] = $context['service']['name'];
$_SERVER['function_name'] = $context['function']['name']; $_SERVER['function_name'] = $context['function']['name'];
$_SERVER['base_path'] = '/';
$path = $event['path']; $path = $event['path'];
//$path = spurlencode($path, '/'); $tmp = $event['requestURI'];
if (strpos($tmp, '?')) $tmp = substr($tmp, 0, strpos($tmp, '?'));
if ($path=='/'||$path=='') {
$_SERVER['base_path'] = $tmp;
} else {
$_SERVER['base_path'] = substr($tmp, 0, -strlen($path)+1);
}
if (substr($path,-1)=='/') $path=substr($path,0,-1); if (substr($path,-1)=='/') $path=substr($path,0,-1);
$_SERVER['is_guestup_path'] = is_guestup_path($path); $_SERVER['is_guestup_path'] = is_guestup_path($path);
+18
View File
@@ -15,6 +15,24 @@ function getpath()
function getGET() function getGET()
{ {
//error_log('POST' . json_encode($_POST));
if (!$_POST) {
if (!!$HTTP_RAW_POST_DATA) {
$tmpdata = $HTTP_RAW_POST_DATA;
//error_log('RAW' . $tmpdata);
} else {
$tmpdata = file_get_contents('php://input');
//error_log('PHPINPUT' . $tmpdata);
}
if (!!$tmpdata) {
$postbody = explode("&", $tmpdata);
foreach ($postbody as $postvalues) {
$pos = strpos($postvalues,"=");
$_POST[urldecode(substr($postvalues,0,$pos))]=urldecode(substr($postvalues,$pos+1));
}
//error_log('POSTformPHPINPUT' . json_encode($_POST));
}
}
$p = strpos($_SERVER['REQUEST_URI'],'?'); $p = strpos($_SERVER['REQUEST_URI'],'?');
if ($p>0) { if ($p>0) {
$getstr = substr($_SERVER['REQUEST_URI'], $p+1); $getstr = substr($_SERVER['REQUEST_URI'], $p+1);
+31 -20
View File
@@ -4,7 +4,8 @@ function getpath()
{ {
$_SERVER['firstacceptlanguage'] = strtolower(splitfirst(splitfirst($_SERVER['HTTP_ACCEPT_LANGUAGE'],';')[0],',')[0]); $_SERVER['firstacceptlanguage'] = strtolower(splitfirst(splitfirst($_SERVER['HTTP_ACCEPT_LANGUAGE'],';')[0],',')[0]);
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR']; if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR'];
$_SERVER['base_path'] = path_format(substr($_SERVER['SCRIPT_NAME'], 0, -10) . '/'); if (isset($_SERVER['DOCUMENT_ROOT'])&&$_SERVER['DOCUMENT_ROOT']==='/app') $_SERVER['base_path'] = '/';
else $_SERVER['base_path'] = path_format(substr($_SERVER['SCRIPT_NAME'], 0, -10) . '/');
if (isset($_SERVER['UNENCODED_URL'])) $_SERVER['REQUEST_URI'] = $_SERVER['UNENCODED_URL']; if (isset($_SERVER['UNENCODED_URL'])) $_SERVER['REQUEST_URI'] = $_SERVER['UNENCODED_URL'];
$p = strpos($_SERVER['REQUEST_URI'],'?'); $p = strpos($_SERVER['REQUEST_URI'],'?');
if ($p>0) $path = substr($_SERVER['REQUEST_URI'], 0, $p); if ($p>0) $path = substr($_SERVER['REQUEST_URI'], 0, $p);
@@ -17,6 +18,20 @@ function getpath()
function getGET() function getGET()
{ {
if (!$_POST) {
if (!!$HTTP_RAW_POST_DATA) {
$tmpdata = $HTTP_RAW_POST_DATA;
} else {
$tmpdata = file_get_contents('php://input');
}
if (!!$tmpdata) {
$postbody = explode("&", $tmpdata);
foreach ($postbody as $postvalues) {
$pos = strpos($postvalues,"=");
$_POST[urldecode(substr($postvalues,0,$pos))]=urldecode(substr($postvalues,$pos+1));
}
}
}
if (isset($_SERVER['UNENCODED_URL'])) $_SERVER['REQUEST_URI'] = $_SERVER['UNENCODED_URL']; if (isset($_SERVER['UNENCODED_URL'])) $_SERVER['REQUEST_URI'] = $_SERVER['UNENCODED_URL'];
$p = strpos($_SERVER['REQUEST_URI'],'?'); $p = strpos($_SERVER['REQUEST_URI'],'?');
if ($p>0) { if ($p>0) {
@@ -45,8 +60,12 @@ function getConfig($str, $disktag = '')
{ {
global $InnerEnv; global $InnerEnv;
global $Base64Env; global $Base64Env;
//include 'config.php';
$s = file_get_contents('config.php'); $slash = '/';
if (strpos(__DIR__, ':')) $slash = '\\';
$projectPath = splitlast(__DIR__, $slash)[0];
$configPath = $projectPath . $slash . '.data' . $slash . 'config.php';
$s = file_get_contents($configPath);
//$configs = substr($s, 18, -2); //$configs = substr($s, 18, -2);
$configs = '{' . splitlast(splitfirst($s, '{')[1], '}')[0] . '}'; $configs = '{' . splitlast(splitfirst($s, '{')[1], '}')[0] . '}';
if ($configs!='') { if ($configs!='') {
@@ -72,8 +91,11 @@ function setConfig($arr, $disktag = '')
global $InnerEnv; global $InnerEnv;
global $Base64Env; global $Base64Env;
if ($disktag=='') $disktag = $_SERVER['disktag']; if ($disktag=='') $disktag = $_SERVER['disktag'];
//include 'config.php'; $slash = '/';
$s = file_get_contents('config.php'); if (strpos(__DIR__, ':')) $slash = '\\';
$projectPath = splitlast(__DIR__, $slash)[0];
$configPath = $projectPath . $slash . '.data' . $slash . 'config.php';
$s = file_get_contents($configPath);
//$configs = substr($s, 18, -2); //$configs = substr($s, 18, -2);
$configs = '{' . splitlast(splitfirst($s, '{')[1], '}')[0] . '}'; $configs = '{' . splitlast(splitfirst($s, '{')[1], '}')[0] . '}';
if ($configs!='') $envs = json_decode($configs, true); if ($configs!='') $envs = json_decode($configs, true);
@@ -114,7 +136,7 @@ function setConfig($arr, $disktag = '')
//echo '<pre>'. json_encode($envs, JSON_PRETTY_PRINT).'</pre>'; //echo '<pre>'. json_encode($envs, JSON_PRETTY_PRINT).'</pre>';
$prestr = '<?php $configs = \'' . PHP_EOL; $prestr = '<?php $configs = \'' . PHP_EOL;
$aftstr = PHP_EOL . '\';'; $aftstr = PHP_EOL . '\';';
$response = file_put_contents('config.php', $prestr . json_encode($envs, JSON_PRETTY_PRINT) . $aftstr); $response = file_put_contents($configPath, $prestr . json_encode($envs, JSON_PRETTY_PRINT) . $aftstr);
if ($response>0) return json_encode( [ 'response' => 'success' ] ); if ($response>0) return json_encode( [ 'response' => 'success' ] );
return json_encode( [ 'message' => 'Failed to write config.', 'code' => 'failed' ] ); return json_encode( [ 'message' => 'Failed to write config.', 'code' => 'failed' ] );
} }
@@ -183,7 +205,7 @@ function install()
//if (location.port!="") url += ":" + location.port; //if (location.port!="") url += ":" + location.port;
url += location.pathname; url += location.pathname;
if (url.substr(-1)!="/") url += "/"; if (url.substr(-1)!="/") url += "/";
url += "config.php"; url += "app.json";
//alert(url); //alert(url);
var xhr4 = new XMLHttpRequest(); var xhr4 = new XMLHttpRequest();
xhr4.open("GET", url); xhr4.open("GET", url);
@@ -244,17 +266,6 @@ function ConfigWriteable()
return false; return false;
} }
function RewriteEngineOn()
{
$http_type = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) ? 'https://' : 'http://';
$tmpurl = $http_type . $_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'];
$tmpurl .= path_format($_SERVER['base_path'] . '/config.php');
$tmp = curl_request($tmpurl);
if ($tmp['stat']==200) return false;
if ($tmp['stat']==201) return true; //when install return 201, after installed return 404 or 200;
return false;
}
function api_error($response) function api_error($response)
{ {
return isset($response['message']); return isset($response['message']);
@@ -308,10 +319,10 @@ function OnekeyUpate($auth = 'qkqpttgf', $project = 'OneManager-php', $branch =
if ($outPath=='') return 0; if ($outPath=='') return 0;
//unlink($outPath.'/config.php'); //unlink($outPath.'/config.php');
$response = rename($projectPath . $slash . 'config.php', $outPath . $slash . 'config.php'); $response = rename($projectPath . $slash . '.data' . $slash . 'config.php', $outPath . $slash . '.data' . $slash . 'config.php');
if (!$response) { if (!$response) {
$tmp1['code'] = "Move Failed"; $tmp1['code'] = "Move Failed";
$tmp1['message'] = "Can not move " . $projectPath . $slash . 'config.php' . " to " . $outPath . $slash . 'config.php'; $tmp1['message'] = "Can not move " . $projectPath . $slash . '.data' . $slash . 'config.php' . " to " . $outPath . $slash . '.data' . $slash . 'config.php';
return json_encode($tmp1); return json_encode($tmp1);
} }
return moveFolder($outPath, $projectPath, $slash); return moveFolder($outPath, $projectPath, $slash);
+14 -1
View File
@@ -8,12 +8,25 @@ Demo: https://herooneindex.herokuapp.com/
How to Install: Click the button [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/qkqpttgf/OneManager-php) to Deploy a new app, or create an app then deploy via connect to your github fork. How to Install: Click the button [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/qkqpttgf/OneManager-php) to Deploy a new app, or create an app then deploy via connect to your github fork.
# Deploy to Glitch
Official: https://glitch.com/
Demo: https://onemanager.glitch.me/
How to Install: New Project -> Import form Github -> paste "https://github.com/qkqpttgf/OneManager-php", after done, Show -> In a New Window.
# Deploy to Tencent Serverless Cloud Function (SCF 腾讯无服务器云函数) # Deploy to Tencent Serverless Cloud Function (SCF 腾讯无服务器云函数)
Official: https://cloud.tencent.com/product/scf Official: https://cloud.tencent.com/product/scf
DEMO: 无 DEMO: 无
注意:SCF新增限制,环境变量整体最大4KB,所以最多添加4个盘。 注意:SCF新增限制,环境变量整体最大4KB,所以最多添加4个盘。
How to Install: 无,(重点:勾选集成响应) How to Install:
1,进入函数服务,上方选择地区,然后点击新建。
2,输入函数名称,选择模板函数,在模糊搜索中输入onedrive,大小写随意,选择那个【获取onedrive信息.....】,点下一步,在代码界面不用动,直接点完成。
3,点击触发管理,创建触发器,触发方式改成API网关触发,底下勾选启用集成响应,提交。
4,在触发管理中可以看到一个 访问路径,访问它,开始安装。
(重点:勾选集成响应)
添加网盘时,SCF可能会反应不过来,不跳转到微软,导致添加失败,请不要删除这个盘,再添加一次相同标签的盘就可以了。 添加网盘时,SCF可能会反应不过来,不跳转到微软,导致添加失败,请不要删除这个盘,再添加一次相同标签的盘就可以了。
+27
View File
@@ -0,0 +1,27 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<title><!--Sitename--> /<!--PathArrayStart--><!--PathArrayName-->/<!--PathArrayEnd--></title>
</head>
<body>
<h1><!--Sitename--> /<!--DiskPathArrayStart--><!--PathArrayName-->/<!--DiskPathArrayEnd--></h1>
<table>
<tr><th><a href="?C=N;O=D">Name</a></th><th><a href="?C=M;O=A">Last modified</a></th><th><a href="?C=S;O=A">Size</a></th><th><a href="?C=D;O=A">Description</a></th></tr>
<tr><th colspan="4"><hr></th></tr>
<!--BackArrowStart-->
<tr><td><a href="<!--BackArrowUrl-->">Parent Directory</a> </td><td>&nbsp;</td><td align="right"> - </td><td>&nbsp;</td></tr>
<!--BackArrowEnd-->
<!--ListStart-->
<!--IsFolderStart-->
<!--FolderListStart-->
<tr><td><a href="<!--FileEncodeReplaceUrl-->/"><!--FileEncodeReplaceName-->/</a></td><td align="right"><!--lastModifiedDateTime--></td><td align="right"> - </td><td>&nbsp;</td></tr>
<!--FolderListEnd-->
<!--FileListStart-->
<tr><td><a href="<!--FileEncodeReplaceUrl-->"><!--FileEncodeReplaceName--></a></td><td align="right"><!--lastModifiedDateTime--></td><td align="right"><!--size--></td><td>&nbsp;</td></tr>
<!--FileListEnd-->
<!--IsFolderEnd-->
<!--ListEnd-->
<tr><th colspan="4"><hr></th></tr>
</table>
</body>
</html>
+21 -17
View File
@@ -156,16 +156,20 @@
<div style="padding:20px"> <div style="padding:20px">
<center> <center>
<form action="" method="post"> <form action="" method="post">
<input name="password1" type="password" placeholder="<!--constStr@InputPassword-->"> <input id="password1" name="password1" type="password" placeholder="<!--constStr@InputPassword-->">
<input type="submit" value="<!--constStr@Submit-->"> <input type="submit" value="<!--constStr@Submit-->">
</form> </form>
</center> </center>
</div> </div>
<!--EncryptedEnd--> <!--EncryptedEnd-->
<!--GuestUploadStart--> <!--GuestUploadStart-->
<div id="upload_div" style="margin:10px"> <div id="upload_div" style="margin:0 0 16px 0">
<div id="upload_btns" align="center"> <div id="upload_btns" align="center">
<input id="upload_file" type="file" name="upload_filename"> <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"> <input id="upload_submit" onclick="preup();" value="<!--constStr@Upload-->" type="button">
</div> </div>
</div> </div>
@@ -584,7 +588,7 @@
}); });
} }
} }
addVideos(['<!--FileDownUrl-->']); addVideos(['<!--FileEncodeUrl-->']);
<!--IsvideoFileEnd--> <!--IsvideoFileEnd-->
<!--IspdfFileStart--> <!--IspdfFileStart-->
pdfjsLib.GlobalWorkerOptions.workerSrc = '//cdn.bootcss.com/pdf.js/2.3.200/pdf.worker.min.js'; pdfjsLib.GlobalWorkerOptions.workerSrc = '//cdn.bootcss.com/pdf.js/2.3.200/pdf.worker.min.js';
@@ -848,6 +852,7 @@
<!--GuestStart--> <!--GuestStart-->
function getext(str) { function getext(str) {
strarry=str.split('.'); strarry=str.split('.');
if (strarry.length==1) return '';
ext=strarry[strarry.length-1].toLowerCase(); ext=strarry[strarry.length-1].toLowerCase();
var reg = new RegExp(".","g"); var reg = new RegExp(".","g");
var a = str.replace(reg,""); var a = str.replace(reg,"");
@@ -887,7 +892,7 @@
td2.innerHTML+='.'; td2.innerHTML+='.';
} }
xhr1.onload = function(e){ xhr1.onload = function(e){
console.log(xhr1.status+xhr1.responseText); //console.log(xhr1.status+xhr1.responseText);
td2.innerHTML='<font color="red">'+xhr1.responseText+'</font>'; td2.innerHTML='<font color="red">'+xhr1.responseText+'</font>';
if (xhr1.status==409) { if (xhr1.status==409) {
// td2.innerHTML='nameAlreadyExists'; // td2.innerHTML='nameAlreadyExists';
@@ -1015,7 +1020,8 @@
} else { } else {
MiddleStr += '<!--constStr@ThisTime--><!--constStr@AverageSpeed-->:'+size_format((totalsize-newstartsize)*1000/(EndTime.getTime()-StartTime.getTime()))+'/s<br>'; MiddleStr += '<!--constStr@ThisTime--><!--constStr@AverageSpeed-->:'+size_format((totalsize-newstartsize)*1000/(EndTime.getTime()-StartTime.getTime()))+'/s<br>';
} }
document.getElementById('upfile_td1_'+tdnum).innerHTML='<div style="color:green"><a href="<!--base_disk_path--><!--Path-->'+(file.webkitRelativePath||response.name)+'?preview" id="upfile_a_'+tdnum+'" target="_blank">'+document.getElementById('upfile_td1_'+tdnum).innerHTML+'</a><br><a href="<!--base_disk_path--><!--Path-->'+(file.webkitRelativePath||response.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>'; while (filename.indexOf('%2F')>0) filename = filename.replace('%2F', '/');
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.innerHTML=StartStr+MiddleStr;
label.style.color='green'; label.style.color='green';
// uploadbuttonshow(); // uploadbuttonshow();
@@ -1069,16 +1075,11 @@
if (num=='') { if (num=='') {
var str=''; var str='';
} else { } else {
var str=document.getElementById('file_a'+num).innerText; var str=decodeURIComponent(document.getElementById('file_a'+num).href);
if (str=='') {
str=document.getElementById('file_a'+num).getElementsByTagName("img")[0].alt;
if (str=='') {
alert('<!--constStr@GetFileNameFail-->');
operatediv_close(action);
return;
}
}
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(-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);
} }
document.getElementById(action + '_div').style.display=''; document.getElementById(action + '_div').style.display='';
document.getElementById(action + '_label').innerText=str;//.replace(/&/,'&amp;'); document.getElementById(action + '_label').innerText=str;//.replace(/&/,'&amp;');
@@ -1111,9 +1112,8 @@
function submit_operate(str) { function submit_operate(str) {
var num=document.getElementById(str+'_sid').value; var num=document.getElementById(str+'_sid').value;
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
xhr.open("GET", '?'+serializeForm(str+'_form')); xhr.open("POST", '');
xhr.setRequestHeader('x-requested-with', 'XMLHttpRequest'); xhr.setRequestHeader('x-requested-with', 'XMLHttpRequest');
xhr.send(null);
xhr.onload = function(e){ xhr.onload = function(e){
var html; var html;
if (xhr.status<300) { if (xhr.status<300) {
@@ -1133,6 +1133,7 @@
document.getElementById(str+'_div').style.display='none'; document.getElementById(str+'_div').style.display='none';
document.getElementById('mask').style.display='none'; document.getElementById('mask').style.display='none';
} }
xhr.send(serializeForm(str+'_form'));
return false; return false;
} }
function addelement(html) { function addelement(html) {
@@ -1239,6 +1240,9 @@
document.getElementById('login_input').focus(); document.getElementById('login_input').focus();
} }
<!--LoginEnd--> <!--LoginEnd-->
<!--EncryptedStart-->
document.getElementById('password1').focus();
<!--EncryptedEnd-->
</script> </script>
<script src="//unpkg.zhimg.com/ionicons@4.4.4/dist/ionicons.js"></script> <script src="//unpkg.zhimg.com/ionicons@4.4.4/dist/ionicons.js"></script>
<!--customScript--> <!--customScript-->
+24
View File
@@ -0,0 +1,24 @@
<html>
<head>
<title><!--Sitename--> - /<!--PathArrayStart--><!--PathArrayName-->/<!--PathArrayEnd--></title>
</head>
<body>
<H1><!--Sitename--> - /<!--DiskPathArrayStart--><!--PathArrayName-->/<!--DiskPathArrayEnd--></H1><hr>
<table>
<!--BackArrowStart-->
<tr><td colspan="3"><A HREF="<!--BackArrowUrl-->">[To Parent Directory]</A></td></tr>
<!--BackArrowEnd-->
<!--ListStart-->
<!--IsFolderStart-->
<!--FolderListStart-->
<tr><td><!--lastModifiedDateTime--></td><td align="right" width="20%">&lt;dir&gt;</td><td><A HREF="<!--FileEncodeReplaceUrl-->/"><!--FileEncodeReplaceName--></A></td></tr>
<!--FolderListEnd-->
<!--FileListStart-->
<tr><td><!--lastModifiedDateTime--></td><td align="right" width="20%"><!--size--></td><td><A HREF="<!--FileEncodeReplaceUrl-->"><!--FileEncodeReplaceName--></A></td></tr>
<!--FileListEnd-->
<!--IsFolderEnd-->
<!--ListEnd-->
</table>
<hr>
</body>
</html>
+24
View File
@@ -0,0 +1,24 @@
<html>
<head>
<title><!--Sitename--> - /<!--PathArrayStart--><!--PathArrayName-->/<!--PathArrayEnd--></title>
</head>
<body>
<H1><!--Sitename--> - /<!--DiskPathArrayStart--><!--PathArrayName-->/<!--DiskPathArrayEnd--></H1><hr>
<table>
<!--BackArrowStart-->
<tr><td colspan="3"><A HREF="<!--BackArrowUrl-->">../</A></td></tr>
<!--BackArrowEnd-->
<!--ListStart-->
<!--IsFolderStart-->
<!--FolderListStart-->
<tr><td><A HREF="<!--FileEncodeReplaceUrl-->/"><!--FileEncodeReplaceName-->/</A></td><td align="right"><!--lastModifiedDateTime--></td><td align="right">-</td></tr>
<!--FolderListEnd-->
<!--FileListStart-->
<tr><td><A HREF="<!--FileEncodeReplaceUrl-->"><!--FileEncodeReplaceName--></A></td><td align="right"><!--lastModifiedDateTime--></td><td align="right"><!--size--></td></tr>
<!--FileListEnd-->
<!--IsFolderEnd-->
<!--ListEnd-->
</table>
<hr>
</body>
</html>
+1252
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1044,7 +1044,7 @@
} else { } else {
MiddleStr += '<?php echo getconstStr('ThisTime').getconstStr('AverageSpeed'); ?>:'+size_format((totalsize-newstartsize)*1000/(EndTime.getTime()-StartTime.getTime()))+'/s<br>'; MiddleStr += '<?php echo getconstStr('ThisTime').getconstStr('AverageSpeed'); ?>:'+size_format((totalsize-newstartsize)*1000/(EndTime.getTime()-StartTime.getTime()))+'/s<br>';
} }
document.getElementById('upfile_td1_'+tdnum).innerHTML='<div style="color:green"><a href="<?php echo $_SERVER['base_disk_path']; ?>'+response.name+'?preview" id="upfile_a_'+tdnum+'" target="_blank">'+document.getElementById('upfile_td1_'+tdnum).innerHTML+'</a><br><a href="<?php echo $_SERVER['base_disk_path']; ?>'+response.name+'" id="upfile_a1_'+tdnum+'"></a><?php echo getconstStr('UploadComplete'); ?><button onclick="CopyAllDownloadUrl(\'#upfile_a1_'+tdnum+'\');" id="upfile_cpbt_'+tdnum+'" <?php if (!$_SERVER['admin']) echo 'style="display:none"'; ?> ><?php echo getconstStr('CopyUrl'); ?></button></div>'; document.getElementById('upfile_td1_'+tdnum).innerHTML='<div style="color:green"><a href="./'+response.name+'?preview" id="upfile_a_'+tdnum+'" target="_blank">'+document.getElementById('upfile_td1_'+tdnum).innerHTML+'</a><br><a href="./'+response.name+'" id="upfile_a1_'+tdnum+'"></a><?php echo getconstStr('UploadComplete'); ?><button onclick="CopyAllDownloadUrl(\'#upfile_a1_'+tdnum+'\');" id="upfile_cpbt_'+tdnum+'" <?php if (!$_SERVER['admin']) echo 'style="display:none"'; ?> ><?php echo getconstStr('CopyUrl'); ?></button></div>';
label.innerHTML=StartStr+MiddleStr; label.innerHTML=StartStr+MiddleStr;
uploadbuttonshow(); uploadbuttonshow();
<?php if ($_SERVER['admin']) { ?> <?php if ($_SERVER['admin']) { ?>
+273 -539
View File
@@ -1,319 +1,213 @@
<!--IconValuesStart-->
{
"music":"audiotrack",
"video":"ondemand_video",
"img":"image",
"default":"insert_drive_file"
}
<!--IconValuesEnd-->
<script>
var primary_color = "orange";
var accent_color = "deep-orange";
var bug = 0;
</script>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<!--constStr@language-->"> <html lang="zh-CN">
<head> <head>
<meta charset="utf-8"> <link rel="preconnect" href="https://cdn.jsdelivr.net">
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/> <link rel="preconnect" href="https://fonts.googleapis.com">
<title><!--Title--></title> <link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/mdui@0.4.3/dist/css/mdui.min.css"> <link rel="preconnect" href="https://renexmoe.vercel.app">
<script src="https://cdn.jsdelivr.net/npm/mdui@0.4.3/dist/js/mdui.min.js"></script> <meta charset="utf-8" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/glightbox/dist/css/glightbox.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css">
<!--<script src="https://cdn.jsdelivr.net/npm/pjax@0.2.8/pjax.js"></script>-->
<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"> <link rel="shortcut icon" href="<!--base_path-->favicon.ico" type="image/x-icon">
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no" />
<title>
<!--Title-->
</title>
<meta name="description" content="A Onemanager-PHP site with Theme-renexmoe">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/186526/renexmoe-cdn@v0.5/css/app.css"><meta name="theme-color" content="#fff" />
<!--BackgroundStart-->
<style> <style>
body { body {
<!--BackgroundStart--> --bg: url("<!--BackgroundUrl-->");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
background-attachment: fixed; background-attachment: fixed;
background-image:url("<!--BackgroundUrl-->"); background-image: var(--bg)
<!--BackgroundEnd-->
} }
.mdui-appbar .mdui-toolbar{
height:64px; .mdui-shadow-3 {
font-size: 15px; background: rgba(255, 255, 255, 0.5)
} }
.mdui-toolbar>*{
padding: 0 6px;
margin: 0 2px;
opacity:0.5;
}
.mdui-toolbar>.mdui-typo-headline{
padding: 0 1px 0 0;
}
.mdui-toolbar>i{
padding: 0;
}
.mdui-toolbar>a:hover,a.mdui-typo-headline,a.active{
opacity:1;
}
.mdui-container{
max-width:950px;
}
.mdui-list-item{
-webkit-transition:none;
transition:none;
}
.mdui-toolbar>a:last-child{
opacity:1;
}
#instantclick-bar {
background: white;
}
.mdui-video-fluid {
height: -webkit-fill-available;
}
.dplayer-video-wrap .dplayer-video {
height: -webkit-fill-available !important;
}
.gslide iframe, .gslide video {
height: -webkit-fill-available;
}
@media screen and (max-width:950px) {
.mdui-list-item .mdui-text-right{
display: none;
}
.mdui-container{
width:100% !important;
margin:0px;
}
.mdui-toolbar>*{
display: none;
}
.mdui-toolbar>a:last-child,.mdui-toolbar>a:nth-last-of-type(2),.mdui-toolbar>.mdui-typo-headline,.mdui-toolbar>i:first-child,.mdui-toolbar-spacer{
display: block;
}
}
.spec-col{padding:.9em;display:flex;align-items:center;white-space:nowrap;flex:1 50%;min-width:225px}
.spec-type{font-size:1.35em}
.spec-value{font-size:1.25em}
.spec-text{float:left}
.device-section{padding-top:30px}
.spec-device-img{height:auto;height:340px;padding-bottom:30px}
#dl-header{margin:0}
#dl-section{padding-top:10px}
#dl-latest{position:relative;top:50%;transform:translateY(-50%)}
</style> </style>
<script>window.disableddarkmode = true;</script>
<!--BackgroundEnd-->
</head> </head>
<body id="main-body"> <body
<header class="mdui-appbar"> class="mdui-appbar-with-toolbar mdui-theme-layout-auto mdui-loaded mdui-theme-accent-pink"
<div class="mdui-toolbar mdui-color-theme mdui-appbar-inset"> >
<span class="mdui-btn mdui-typo-headline mdui-btn-icon mdui-ripple" mdui-drawer="{target: '#main-drawer', swipe: true}" mdui-tooltip="{content: '菜单'}"><i class="mdui-icon material-icons mdui-text-color-white-icon">menu</i></span> <header
<a href="<!--base_path-->" class="mdui-typo-headline"><!--Sitename--></a> class="mdui-appbar mdui-appbar-fixed mdui-shadow-0 mdui-appbar-scroll-toolbar-hide"
>
<div class="mdui-toolbar">
<span
class="mdui-btn mdui-btn-icon mdui-ripple mdui-ripple-white"
mdui-tooltip="{content: '菜单'}"
onclick='mdui.$("body").toggleClass("mdui-drawer-body-left");'
id="toggle-drawer"
><i class="mdui-icon material-icons">menu</i></span
>
<a
mdui-tooltip="{content: '返回'}"
class="mdui-btn mdui-btn-icon mdui-ripple mdui-ripple-white mdui-hidden-sm-up"
onclick="window.history.back()"
>
<i class="mdui-icon material-icons">arrow_back</i>
</a>
<a href="<!--base_path-->" class="mdui-typo-headline">
<!--Sitename-->
</a>
<!--PathArrayStart--> <!--PathArrayStart-->
<i class="mdui-icon material-icons mdui-icon-dark" style="margin:0;">chevron_right</i> <i class="mdui-icon material-icons mdui-hidden-xs" style="margin: 0"
<a href="<!--PathArrayLink-->"><!--PathArrayName--></a> >chevron_right</i
><a href="<!--PathArrayLink-->" class="mdui-typo-subheading mdui-hidden-xs">
<!--PathArrayName--></a
>
<!--PathArrayEnd--> <!--PathArrayEnd-->
<div class="mdui-toolbar-spacer"></div> <div class="mdui-toolbar-spacer"></div>
<!--ShowThumbnailsStart--> <!--AdminStart--><a
<a href="javascript:thumb();" id="thumb" class="mdui-btn mdui-btn-icon mdui-ripple" mdui-tooltip="{content: '切换显示'}"><i class="mdui-icon material-icons">format_list_bulleted</i></a> href="javascript:;"
<!--ShowThumbnailsEnd--> class="mdui-btn mdui-btn-icon mdui-ripple mdui-hidden-sm-up refresh"
mdui-tooltip="{content: '刷新缓存'}"
><i class="mdui-icon material-icons">refresh</i></a
>
<!--AdminEnd-->
</div> </div>
</header> </header>
<div class="mdui-drawer mdui-drawer-close" id="main-drawer"> <div class="mdui-drawer mdui-drawer-close" id="main-drawer">
<div class="mdui-list" mdui-collapse="{accordion: true}"> <div class="mdui-list" mdui-collapse="{accordion: true}">
<!--LoginStart--> <!--LoginStart-->
<li class="mdui-list-item mdui-ripple" href="javascript:void(0);" mdui-dialog="{target: '#login_input'}"> <li class="mdui-list-item mdui-ripple" href="javascript:void(0);" mdui-dialog="{target: '#login_input'}"><a
<a class="mdui-list-item-icon mdui-icon material-icons">account_circle</a> class="mdui-list-item-icon mdui-icon material-icons">account_circle</a><a
<a class="mdui-list-item-content">登录</a> class="mdui-list-item-content">登录</a></li>
</li>
<!--LoginEnd--> <!--LoginEnd-->
<!--AdminStart--> <!--AdminStart-->
<li class="mdui-list-item mdui-ripple" href="?setup"> <li class="mdui-list-item mdui-ripple" href="?setup"><a class="mdui-list-item-icon mdui-icon material-icons"
<a class="mdui-list-item-icon mdui-icon material-icons" href="?setup">account_circle</a> href="?setup">account_circle</a><a class="mdui-list-item-content" href="?setup">管理</a></li>
<a class="mdui-list-item-content" href="?setup">管理</a> <li class="mdui-list-item mdui-ripple" onclick='document.cookie=null;window.location.reload();'><i
class="mdui-icon material-icons mdui-list-item-icon">exit_to_app</i>
<div class="mdui-list-item-content">退出登陆</div>
</li> </li>
<!--AdminEnd--> <!--AdminEnd-->
<li class="mdui-list-item mdui-ripple" href="javascript:void(0);" onclick="darkmod_use()"> <div class="mdui-divider"></div>
<a class="mdui-list-item-icon mdui-icon material-icons">brightness_4</a> <li
<a class="mdui-list-item-content">深色模式</a> class="mdui-list-item mdui-ripple"
href="javascript:void(0);"
onclick="renexmoe.toggle_theme();"
>
<a class="mdui-list-item-icon mdui-icon material-icons">brightness_4</a
><a class="mdui-list-item-content">深色模式</a>
</li> </li>
<li class="mdui-list-item mdui-ripple"> <li class="mdui-list-item mdui-ripple">
<a href="<!--base_path-->" class="mdui-list-item-icon mdui-icon material-icons">home</a> <a
<a href="<!--base_path-->" class="mdui-list-item-content"><!--constStr@Home--></a> href="<!--base_path-->"
class="mdui-list-item-icon mdui-icon material-icons"
>home</a
><a href="<!--base_path-->" class="mdui-list-item-content">
<!--constStr@Home--></a
>
</li> </li>
<!--MultiDiskAreaStart--> <!--MultiDiskAreaStart-->
<!--MultiDisksStart--> <div class="mdui-divider"></div>
<a href="<!--MultiDisksUrl-->" class="mdui-list-item mdui-ripple" <!--MultiDisksNow-->> <!--MultiDisksStart--><a
<i class="mdui-list-item-icon mdui-icon material-icons">cloud</i> href="<!--MultiDisksUrl-->"
<div class="mdui-list-item-content"><!--MultiDisksName--></div> class="mdui-list-item mdui-ripple"
<!--MultiDisksNow--
>
><i class="mdui-list-item-icon mdui-icon material-icons">cloud</i>
<div class="mdui-list-item-content">
<!--MultiDisksName-->
</div>
</a> </a>
<!--MultiDisksEnd--> <!--MultiDisksEnd-->
<div class="mdui-divider"></div>
<!--MultiDiskAreaEnd--> <!--MultiDiskAreaEnd-->
<a href="https://github.com/qkqpttgf/OneManager-php" class="mdui-list-item mdui-ripple">
<i class="mdui-list-item-icon mdui-icon material-icons">code</i> <a
href="https://github.com/qkqpttgf/OneManager-php"
class="mdui-list-item mdui-ripple mdui-hidden-sm-up"
><i class="mdui-list-item-icon mdui-icon material-icons">code</i>
<div class="mdui-list-item-content">Github</div> <div class="mdui-list-item-content">Github</div>
</a> </a>
<li
class="mdui-list-item mdui-ripple"
href="javascript:void(0);"
id="about_theme"
>
<i class="mdui-list-item-icon mdui-icon material-icons">info</i>
<div class="mdui-list-item-content">关于该主题</div>
</li>
</div> </div>
</div> </div>
<!--ListStart--> <div class="mdui-container">
<ul class="mdui-menu" id="admin-menu">
<!--EncryptedStart--> <li class="mdui-menu-item"><a href="javascript:;" class="mdui-ripple back"><i
<div class="mdui-col-md-6 mdui-col-offset-md-3" id="pjax-main"> class="mdui-menu-item-icon mdui-icon material-icons">arrow_back</i>返回上一页</a></li>
<!--<center><h1 class="mdui-typo-display-2-opacity">这是一个受保护的文件夹,您需要提供访问密码才能查看。</h1></center>--> <!--AdminStart-->
<li class="mdui-menu-item"><a href="javascript:;" class="mdui-ripple refresh"><i
class="mdui-menu-item-icon mdui-icon material-icons">refresh</i>刷新缓存</a></li>
<!--AdminEnd-->
</ul>
<i id="mouseplace" style="position: absolute;"></i> <!--EncryptedStart-->
<div class="mdui-col-md-6 mdui-col-offset-md-3"><br>
<center>
<div class="mdui-typo-title">这是一个受保护的文件夹,您需要提供访问密码才能查看。</div>
</center>
<form action="" method="post"> <form action="" method="post">
<div class="mdui-textfield mdui-textfield-floating-label"> <div class="mdui-textfield mdui-textfield-floating-label"><i
<i class="mdui-icon material-icons">https</i> class="mdui-icon material-icons">https</i><label class="mdui-textfield-label">
<label class="mdui-textfield-label"><!--constStr@InputPassword--></label> <!--constStr@InputPassword--></label><input name="password1" class="mdui-textfield-input"
<input name="password1" class="mdui-textfield-input" type="password"/> type="password" /></div><br><button type="submit"
</div> class="mdui-center mdui-btn mdui-btn-raised mdui-ripple mdui-color-theme"><i
<br> class="mdui-icon material-icons">fingerprint</i>
<button type="submit" class="mdui-center mdui-btn mdui-btn-raised mdui-ripple mdui-color-theme"> <!--constStr@Submit--></button>
<i class="mdui-icon material-icons">fingerprint</i>
<!--constStr@Submit-->
</button>
</form> </form>
</div> </div>
<!--EncryptedEnd--> <!--EncryptedEnd-->
<!--GuestUploadStart-->
<div class="nexmoe-item" style="padding: 100px!important;" id="content">
<div class="mdui-typo-display-3-opacity" style="text-align:center;">OneImages</div>
<form action="" method="post" enctype="multipart/form-data">
<input class="mdui-center" type="file" style="margin: 50px 0;" name="file" />
<div class="mdui-row-xs-3">
<div class="mdui-col"></div>
<div class="mdui-col">
<button class="mdui-btn mdui-btn-block mdui-color-theme-accent mdui-ripple"><!--constStr@Upload--></button>
</div>
</div>
</form>
</div>
<!--GuestUploadEnd-->
<!--IsFileStart-->
<div class="mdui-container-fluid" id="content">
<!--IsimgFileStart-->
<div class="nexmoe-item">
<img class="mdui-img-fluid mdui-center mdui-m-t-5 "src="<!--FileDownUrl-->"/>
</div>
<!--IsimgFileEnd-->
<!--IstxtFileStart-->
<div class="nexmoe-item">
<pre id="editor" style="white-space: pre-wrap;"><!--TxtContent--></pre>
</div>
<!--IstxtFileEnd-->
<!--IsmusicFileStart-->
<div class="nexmoe-item">
<audio class="mdui-center" src="<!--FileDownUrl-->" controls autoplay style="width: 100%;" ></audio>
</div>
<!--IsmusicFileEnd-->
<!--IsofficeFileStart-->
<div class="nexmoe-item">
<iframe id="office-a" src="https://view.officeapps.live.com/op/view.aspx?src=<!--FileEncodeDownUrl-->" style="width: 100%;height: 800px" frameborder="0"></iframe>
</div>
<!--IsofficeFileEnd-->
<!--IsvideoFileStart-->
<link class="dplayer-css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dplayer/dist/DPlayer.min.css">
<script src="https://cdn.jsdelivr.net/npm/dplayer/dist/DPlayer.min.js"></script>
<div class="nexmoe-item mdui-center" style="width: 70%;height:90%;" >
<div id="dplayer"></div>
</div>
<script>
const dp = new DPlayer({
container: document.getElementById('dplayer'),
lang:'zh-cn',
video: {
url: '<!--FileDownUrl-->',
type: 'auto'
}
});
</script>
<!--IsvideoFileEnd-->
<!--IsOtherFileStart-->
<div class="nexmoe-item"><!--constStr@FileNotSupport--></div>
<!--IsOtherFileEnd-->
</div>
<a href="<!--FileEncodeReplaceUrl-->" class="mdui-fab mdui-fab-fixed mdui-ripple mdui-color-theme-accent"><i class="mdui-icon material-icons">file_download</i></a>
<!--IsFileEnd-->
<!--IsFolderStart--> <!--IsFolderStart-->
<div class="mdui-container" id="content">
<div class="mdui-container-fluid">
<form action="?admin" method="post">
<div class="mdui-dialog" id="login_input">
<div class="mdui-dialog-title">登录</div>
<div class="mdui-dialog-content">
<div class="mdui-textfield mdui-textfield-floating-label">
<i class="mdui-icon material-icons">lock</i>
<label class="mdui-textfield-label">密码</label>
<input class="mdui-textfield-input" type="password"/>
</div>
</div>
<div class="mdui-dialog-actions">
<button class="mdui-btn mdui-ripple" mdui-dialog-close>取消</button>
<button class="mdui-btn mdui-ripple" type="submit">登录</button>
</div>
</div>
</form>
</div>
<div class="mdui-container-fluid">
<!--HeadomfStart--> <!--HeadomfStart-->
<div class="mdui-typo mdui-shadow-3" style="padding: 20px;margin: 20px 0"> <div class="mdui-typo mdui-shadow-3" style="padding: 20px;margin: 20px 0">
<!--HeadomfContent--> <!--HeadomfContent-->
</div> </div>
<!--HeadomfEnd--> <!--HeadomfEnd-->
<!--HeadmdStart--> <!--HeadmdStart-->
<div class="mdui-typo mdui-shadow-3" style="padding: 20px;margin: 20px 0"> <div class="mdui-chip mdui-ripple mdui-hidden-xs"><span class="mdui-chip-icon"><i
<!--<div class="mdui-chip"> class="mdui-icon material-icons">face</i></span><span class="mdui-chip-title">HEAD.md</span></div>
<span class="mdui-chip-icon"><i class="mdui-icon material-icons">face</i></span> <div class="mdui-typo mdui-shadow-3 markdown" style="padding: 20px;margin: 20px 0" id="head"><textarea
<span class="mdui-chip-title">HEAD.md</span> id="head-md"><!--HeadmdContent--></textarea></div>
</div>-->
<!--HeadmdContent-->
</div>
<!--HeadmdEnd--> <!--HeadmdEnd-->
<style> <div
.thumb .th{ class="mdui-row mdui-shadow-3"
display: none; style="padding: 5px; margin: 20px 0; border-radius: 8px"
} >
.thumb .mdui-text-right{
display: none;
}
.thumb .mdui-list-item a ,.thumb .mdui-list-item {
width:213px;
height: 230px;
float: left;
margin: 10px 10px !important;
}
.thumb .mdui-col-xs-12,.thumb .mdui-col-sm-7{
width:100% !important;
height:230px;
}
.thumb .mdui-list-item .mdui-icon{
font-size:100px;
display: block;
margin-top: 40px;
color: #7ab5ef;
}
.thumb .mdui-list-item span{
float: left;
display: block;
text-align: center;
width:100%;
position: absolute;
top: 180px;
}
.thumb .forcedownload {
display: none;
}
</style>
<div class="nexmoe-item">
<div class="mdui-row">
<ul class="mdui-list"> <ul class="mdui-list">
<li class="mdui-list-item th mdui-ripple" style="padding-right:36px;"> <li class="mdui-list-item mdui-ripple">
<div class="mdui-col-xs-12 mdui-col-sm-7"><!--constStr@File--> <i class="mdui-icon material-icons icon-sort" data-sort="name" data-order="downward">expand_more</i></div> <div class="mdui-row mdui-col-xs-12">
<div class="mdui-col-sm-3 mdui-text-right"><!--constStr@EditTime--> <i class="mdui-icon material-icons icon-sort" data-sort="date" data-order="downward">expand_more</i></div> <div class="mdui-col-xs-12 mdui-col-sm-7">
<div class="mdui-col-sm-2 mdui-text-right"><!--constStr@Size--> <i class="mdui-icon material-icons icon-sort" data-sort="size" data-order="downward">expand_more</i></div> <!--constStr@File--><i
class="mdui-icon material-icons icon-sort"
data-sort="name"
data-order="downward"
>expand_more</i
>
</div>
<div class="mdui-col-sm-3 mdui-text-right">
<!--constStr@EditTime--><i
class="mdui-icon material-icons icon-sort"
data-sort="date"
data-order="downward"
>expand_more</i
>
</div>
<div class="mdui-col-sm-2 mdui-text-right">
<!--constStr@Size--><i
class="mdui-icon material-icons icon-sort"
data-sort="size"
data-order="downward"
>expand_more</i
>
</div>
</div>
</li> </li>
<!--BackArrowStart--> <!--BackArrowStart-->
<li class="mdui-list-item mdui-ripple"> <li class="mdui-list-item mdui-ripple">
@@ -321,7 +215,6 @@
<a href="<!--BackArrowUrl-->"> <a href="<!--BackArrowUrl-->">
<div class="mdui-col-xs-7"> <div class="mdui-col-xs-7">
<i class="mdui-icon material-icons">arrow_upward</i> <i class="mdui-icon material-icons">arrow_upward</i>
..
</div> </div>
<div class="mdui-col-xs-3 mdui-text-right"></div> <div class="mdui-col-xs-3 mdui-text-right"></div>
<div class="mdui-col-xs-2 mdui-text-right"></div> <div class="mdui-col-xs-2 mdui-text-right"></div>
@@ -329,311 +222,152 @@
</div> </div>
</li> </li>
<!--BackArrowEnd--> <!--BackArrowEnd-->
<!--FolderListStart--> <!--FolderListStart-->
<li class="mdui-list-item mdui-ripple" data-sort data-sort-name="<!--FileEncodeReplaceName-->" data-sort-date="<!--lastModifiedDateTime-->" data-sort-size="<!--size-->" style="padding-right:36px;"> <li
class="mdui-list-item mdui-ripple"
data-sort
data-sort-name="<!--FileEncodeReplaceName-->"
data-sort-date="<!--lastModifiedDateTime-->"
data-sort-size="<!--size-->"
style="padding-right: 36px"
>
<div class="mdui-row mdui-col-sm-12"> <div class="mdui-row mdui-col-sm-12">
<a href="<!--FileEncodeReplaceUrl-->/"> <a href="<!--FileEncodeReplaceUrl-->/">
<div class="mdui-col-xs-12 mdui-col-sm-7 mdui-text-truncate"> <div class="mdui-col-xs-12 mdui-col-sm-7 mdui-text-truncate">
<i class="mdui-icon material-icons">folder_open</i> <i class="mdui-icon material-icons">folder_open</i
<span><!--FileEncodeReplaceName--></span> ><span> <!--FileEncodeReplaceName--></span>
</div>
<div class="mdui-col-sm-3 mdui-text-right">
<!--lastModifiedDateTime-->
</div>
<div class="mdui-col-sm-2 mdui-text-right">
<!--size-->
</div> </div>
<div class="mdui-col-xs-3 mdui-text-right"><!--lastModifiedDateTime--></div>
<div class="mdui-col-xs-2 mdui-text-right"><!--size--></div>
</a> </a>
</div> </div>
</li> </li>
<!--FolderListEnd--> <!--FolderListEnd-->
<!--FileListStart--> <!--FileListStart-->
<li class="mdui-list-item file mdui-ripple" data-sort data-sort-name="<!--FileEncodeReplaceName-->" data-sort-date="<!--lastModifiedDateTime-->" data-sort-size="<!--size-->" data-readypreview="<!--FileExt-->"> <li
<a class="<!--FileExtType-->" data-name="<!--FileEncodeReplaceName-->" href="<!--FileEncodeReplaceUrl-->?preview" target="_blank"> class="mdui-list-item file mdui-ripple"
<!--<?php if(isImage($item['name']) and $_COOKIE["image_mode"] == "1"):?> data-sort
<img class="mdui-img-fluid" src="<?php echo get_absolute_path($root.$path).rawurlencode($item['name']); ?>"> data-sort-name="<!--FileEncodeReplaceName-->"
<?php else:?>--> data-sort-date="<!--lastModifiedDateTime-->"
data-sort-size="<!--size-->"
data-readypreview="<!--FileExt-->"
>
<div class="mdui-row mdui-col-sm-12"> <div class="mdui-row mdui-col-sm-12">
<div class="mdui-col-xs-12 mdui-col-sm-7 mdui-text-truncate"> <div class="mdui-col-xs-12 mdui-col-sm-7 mdui-text-truncate">
<a
class="<!--FileExtType-->"
data-name="<!--FileEncodeReplaceName-->"
href="<!--FileEncodeReplaceUrl-->?preview"
aria-label="File"
>
<i class="mdui-icon material-icons"> <!--IconValue--></i> <i class="mdui-icon material-icons"> <!--IconValue--></i>
<span> <!--FileEncodeReplaceName--></span> <span> <!--FileEncodeReplaceName--></span>
</div>
<div class="mdui-col-sm-3 mdui-text-right"><!--lastModifiedDateTime--></div>
<div class="mdui-col-sm-2 mdui-text-right"><!--size--></div>
</a> </a>
</div> </div>
<div class="mdui-col-sm-3 mdui-text-right">
<!--lastModifiedDateTime-->
</div>
<div class="mdui-col-sm-2 mdui-text-right">
<!--size-->
</div>
</div>
<div class="forcedownload mdui-text-right"> <div class="forcedownload mdui-text-right">
<a title="<!--constStr@Download-->" href="<!--FileEncodeReplaceUrl-->"> <a
<button class="mdui-btn mdui-ripple mdui-btn-icon"><i class="mdui-icon material-icons">file_download</i></button> title="<!--constStr@Download-->"
</a> aria-label="Download"
href="<!--FileEncodeReplaceUrl-->"
target="_blank"
><button class="mdui-btn mdui-ripple mdui-btn-icon">
<i class="mdui-icon material-icons">file_download</i>
</button></a
>
</div> </div>
</li> </li>
<!--FileListEnd--> <!--FileListEnd-->
<!--MorePageStart-->
<form action="" method="POST" id="nextpageform">
<input type="hidden" id="pagenum" name="pagenum" value="">
<li class="mdui-list-item th">
<div class="mdui-col-sm-6 mdui-left mdui-text-left">
<!--PrePageStart-->
<a onclick="nextpage(<!--PrePageNum-->);" class="mdui-btn mdui-btn-raised"><!--constStr@PrePage--></a>
<!--PrePageEnd-->
<!--NextPageStart-->
<a onclick="nextpage(<!--NextPageNum-->);" class="mdui-btn mdui-btn-raised"><!--constStr@NextPage--></a>
<!--NextPageEnd-->
</div>
<div class="mdui-col-sm-6 mdui-right mdui-text-right">
<div class="mdui-right mdui-text-right"><span class="mdui-chip-title">Page: <!--MorePageListStart--><!--MorePageListEnd--><!--MorePageListNowStart--><!--PageNum--><!--MorePageListNowEnd-->/<!--MaxPageNum--></span></div>
</div>
</li>
</form>
<!--MorePageEnd-->
</ul> </ul>
</div> </div>
</div>
<!--ReadmemdStart--> <!--ReadmemdStart-->
<div class="mdui-typo mdui-shadow-3" style="padding: 20px;margin: 20px 0"> <div class="mdui-chip mdui-ripple mdui-hidden-xs"><span class="mdui-chip-icon"><i
<!--<div class="mdui-chip"> class="mdui-icon material-icons">face</i></span><span class="mdui-chip-title">README.md</span></div>
<span class="mdui-chip-icon"><i class="mdui-icon material-icons">face</i></span> <div class="mdui-typo mdui-shadow-3 markdown" style="padding: 20px;margin: 20px 0" id="readme"><textarea
<span class="mdui-chip-title">README.md</span> id="readme-md"><!--ReadmemdContent--></textarea></div>
</div>-->
<!--ReadmemdContent-->
</div>
<!--ReadmemdEnd--> <!--ReadmemdEnd-->
<!--FootomfStart--> <!--FootomfStart-->
<div class="mdui-typo mdui-shadow-3" style="padding: 20px;margin: 20px 0"> <div class="mdui-typo mdui-shadow-3" style="padding: 20px;margin: 20px 0">
<!--FootomfContent--> <!--FootomfContent-->
</div> </div>
<!--FootomfEnd--> <!--FootomfEnd-->
</div>
</div>
<!--IsFolderEnd--> <!--IsFolderEnd-->
<!--ListEnd--> <!--IsFileStart-->
<div id="file">
<!--IsimgFileStart-->
<img class="mdui-img-fluid mdui-center mdui-m-t-5" src="<!--FileDownUrl-->" />
<!--IsimgFileEnd-->
<script src="//cdn.jsdelivr.net/gh/mcstudios/glightbox/dist/js/glightbox.min.js"></script> <!--IsmusicFileStart-->
<script src="//cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js"></script> <audio
class="mdui-center"
src="<!--FileDownUrl-->"
controls
autoplay
style="width: 100%; margin-top: 10%"
></audio>
<!--IsmusicFileEnd-->
<!--IsvideoFileStart-->
<video class="mdui-video-fluid" controls style="margin-top: 20px">
<source src="<!--FileDownUrl-->" />
<p>
Your browser doesn't support HTML5 video. Here is a
<a href="<!--FileDownUrl-->">link to the video</a> instead.
</p>
</video>
<!--IsvideoFileEnd-->
<!--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-->
<!--IspdfFileStart-->
<pre id="editor"
style="white-space: pre-wrap;font-family: JetBrains Mono,Fira Code,Sarasa Mono SC,Cascadia Code,Menlo,Consolas,monaco,monospace;">
PDF暂不支持 懂?
</pre>
<!--IspdfFileEnd-->
<!--IstxtFileStart-->
<pre
id="editor"
style="
white-space: pre-wrap;
font-family: JetBrains Mono, Fira Code, Sarasa Mono SC, Cascadia Code, Menlo,
Consolas, monaco, monospace;
"
><!--TxtContent--></pre>
<!--IstxtFileEnd-->
<!--IsOtherFileStart-->
<!--constStr@FileNotSupport-->
<!--IsOtherFileEnd-->
</div><a href="<!--FileEncodeReplaceUrl-->" target="_blank"
class="mdui-fab mdui-fab-fixed mdui-ripple mdui-color-theme-accent"><i
class="mdui-icon material-icons">file_download</i></a>
<script> <script>
<!--MorePageStart--> document.querySelector("#admin-menu").innerHTML += '<li class="mdui-menu-item"><a href="javascript:void(0);"class="mdui-ripple downloadurl"><i class="mdui-menu-item-icon mdui-icon material-icons">cloud_download</i>下载链接</a></li>';
function nextpage(num) { document.querySelector('.mdui-toolbar').innerHTML += `<a href="javascript:;" class="mdui-btn mdui-btn-icon mdui-ripple mdui-hidden-sm-up downloadurl" mdui-tooltip="{content: '下载链接'}"><i class="mdui-icon material-icons">cloud_download</i></a>`;
document.getElementById('pagenum').value=num;
document.getElementById('nextpageform').submit();
}
<!--MorePageEnd-->
var $ = mdui.JQ;
var $$ = mdui.JQ;
var jQuery = mdui.JQ;
$$(function() {
$$('.file .iframe').each(function() {
$$(this).on('click', function() {
url=$$(this).attr('href');
//url=url.substr(0,url.length-8);
layer.open({
type: 2,
title: '<a target="_blank" href="'+url+'">'+ $$(this).find('span').text()+'(点击新窗口打开)</a>', //jia,
//shadeClose: true,
move: false,
shade: false,
maxmin: true,
area: ['100%', '100%'],
content: url //le
,min: function(layero){
//zi;
layero.css({top: '90%'})
}
});
return false;
});
});
$('.file .dl').each(function () {
$(this).on('click', function () {
var form = $('<form target=_blank method=post></form>').attr('action', $(this).attr('href')).get(0);
$(document.body).append(form);
form.submit();
$(form).remove();
return false;
});
});
});
window.TC=window.TC||{};
$$(".file .audio").on('click',function(e){e.preventDefault();TC.preview_audio(this);});
TC.preview_audio = function(aud){
if(!TC.aplayer){
TC.aplayerList=[];
jQuery(".file .audio").each(function(){
var ext = jQuery(this).data("readypreview");
var n = jQuery(this).find("span").text();
var l = n.replace("."+ext,".lrc");
var la = jQuery('a[data-name="'+l+'"]');
var lrc = undefined;
if(la.length>0){
lrc = la[0].href+"?s";
}
TC.aplayerList.push({
name:n,
url:this.href.substr(0,this.href.length-8),
artist:" ",
lrc:lrc
});
})
jQuery('<div id="aplayer">').appendTo("body");
TC.aplayer = new APlayer({
container: document.getElementById('aplayer'),
fixed: true,
audio: TC.aplayerList,
lrcType: 3
});
}
var k=-1;
for(var i in TC.aplayerList){
if(TC.aplayerList[i].name==jQuery(aud).data("name")){
k=i;
break;
}
}
if(k>=0){
TC.aplayer.list.switch(k);
TC.aplayer.play();
TC.aplayer.setMode("normal");
}
}
$ = mdui.JQ;
$.fn.extend({
sortElements: function (comparator, getSortable) {
getSortable = getSortable || function () { return this; };
var placements = this.map(function () {
var sortElement = getSortable.call(this),
parentNode = sortElement.parentNode,
nextSibling = parentNode.insertBefore(
document.createTextNode(''),
sortElement.nextSibling
);
return function () {
parentNode.insertBefore(this, nextSibling);
parentNode.removeChild(nextSibling);
};
});
return [].sort.call(this, comparator).each(function (i) {
placements[i].call(getSortable.call(this));
});
}
});
var lightbox = GLightbox();
function downall() {
let dl_link_list = Array.from(document.querySelectorAll("li a"))
.map(x => x.href) // 所有list中的链接
.filter(x => x.slice(-1) != "/"); // 筛选出非文件夹的文件下载链接
let blob = new Blob([dl_link_list.join("\r\n")], {
type: 'text/plain'
}); // 构造Blog对象
let a = document.createElement('a'); // 伪造一个a对象
a.href = window.URL.createObjectURL(blob); // 构造href属性为Blob对象生成的链接
a.download = "folder_download_link.txt"; // 文件名称,你可以根据你的需要构造
a.click() // 模拟点击
a.remove();
}
<!--ShowThumbnailsStart-->
function thumb(){
if($('#thumb i').text() == "apps"){
$('#thumb i').text("format_list_bulleted");
$('.nexmoe-item').removeClass('thumb');
$('.nexmoe-item .mdui-icon').show();
$('.nexmoe-item .mdui-list-item').css("background","");
}else{
$('#thumb i').text("apps");
$('.nexmoe-item').addClass('thumb');
$('.mdui-col-xs-12 i.mdui-icon').each(function(){
//if($(this).text() == "image" || $(this).text() == "ondemand_video"){
if($(this).text() == "image"){
var thumbnails = $(this).parent().parent().attr('href');
//var thumb =(href.indexOf('?') == -1)?'?t=220':'&t=220';
thumbnails = thumbnails.substr(0, thumbnails.length-8)+'?thumbnails&location';
$(this).hide();
//$(this).parent().parent().parent().css("background","url("+href+thumb+") no-repeat center top");
$(this).parent().parent().parent().css("background","url("+thumbnails+") no-repeat center top");
}
});
}
}
<!--ShowThumbnailsEnd-->
$(function(){
$('.icon-sort').on('click', function () {
let sort_type = $(this).attr("data-sort"), sort_order = $(this).attr("data-order");
let sort_order_to = (sort_order === "less") ? "more" : "less";
$('li[data-sort]').sortElements(function (a, b) {
let data_a = $(a).attr("data-sort-" + sort_type), data_b = $(b).attr("data-sort-" + sort_type);
let rt = data_a.localeCompare(data_b, undefined, {numeric: true});
return (sort_order === "more") ? 0-rt : rt;
});
$(this).attr("data-order", sort_order_to).text("expand_" + sort_order_to);
});
});
var ckname='image_mode';
function getCookie(name)
{
var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
if(arr=document.cookie.match(reg))
return unescape(arr[2]);
else
return null;
}
function setCookie(key,value,day){
var exp = new Date();
exp.setTime(exp.getTime() - 1);
var cval=getCookie(key);
if(cval!=null)
document.cookie= key + "="+cval+";expires="+exp.toGMTString();
var date = new Date();
var nowDate = date.getDate();
date.setDate(nowDate + day);
var cookie = key+"="+value+"; expires="+date;
document.cookie = cookie;
return cookie;
}
$('#image_view').on('click', function () {
if($(this).prop('checked') == true){
setCookie(ckname,1,1);
window.location.href=window.location.href;
}else{
setCookie(ckname,0,1);
window.location.href=window.location.href;
}
});
var mainbody = document.getElementById("main-body");
var darkmod = 0;
var pri_class = "mdui-theme-primary-"+primary_color;
var acc_class = "mdui-theme-accent-"+accent_color;
mainbody.classList.add(acc_class);
mainbody.classList.add(pri_class);
if (window.matchMedia('(prefers-color-scheme: dark)').matches)
{mainbody.classList.add("mdui-theme-layout-dark");darkmod = 1}
function darkmod_use(){
if (darkmod == 1){
mainbody.classList.remove("mdui-theme-layout-dark");darkmod = 0;
} else {
mainbody.classList.add("mdui-theme-layout-dark");darkmod = 1;
}};
function login() {
$$("content").write("")
}
//var pjax = new Pjax({
// selectors :[
// "content"
// ],
// debug: true,
// timeout: 8000
//})
</script> </script>
<!--IsFileEnd-->
</div>
</body> </body>
<!--IconValuesStart-->
{ "music":"audiotrack", "video":"ondemand_video", "img":"image",
"pdf":"picture_as_pdf", "default":"insert_drive_file"}
<!--IconValuesEnd-->
<script src="https://cdn.jsdelivr.net/gh/186526/renexmoe-cdn@v0.5/js/webpack-runtime.379a2fcc01ccf12b5342.js"></script>
<script src="https://cdn.jsdelivr.net/gh/186526/renexmoe-cdn@v0.5/js/app.0a2b4a0f9fd0828393f6.js"></script>
</html> </html>
+3 -4
View File
@@ -62,11 +62,10 @@ OneManagerPath=`cd $(dirname $0);pwd -P`
cd ${OneManagerPath} cd ${OneManagerPath}
git clone ${branch} ${gitsource} git clone ${branch} ${gitsource}
[ g"$install" == g"1" ] || \mv -b config.php OneManager-php/ [ g"$install" == g"1" ] || \mv -b .data/config.php OneManager-php/.data/
\mv -b OneManager-php/* ./ \mv -b OneManager-php/* ./
\mv -b OneManager-php/.[^.]* ./ \mv -b OneManager-php/.[^.]* ./
rm -rf *~ rm -rf *~
rm -rf .[^.]*~ #rm -rf .[^.]*~
rm -rf OneManager-php rm -rf OneManager-php
chmod 666 config.php chmod 666 .data/config.php
+7 -1
View File
@@ -1,7 +1,13 @@
20201215-1400.28
fix: hackers can upload files to ANY folder (or create a new folder) in your Onedrive. add language zh-tw. now, on heroku, xhr can post. fix: 2 or more space in file name cause bugs.
修复:构造代码后可以上传文件到你Onedrive的任意目录(甚至创建新目录)。新增zh-tw语言。xhr的post在heroku会接收了,改回post。修复:文件名有多个空格相连时造成bug。
20201106-1730.27
Add theme. A code used in CloudFlare Workers. Admin not need password in folder. Add caddy2 rewrite rule. Add new platform Glitch. <font color=red>web hosting and VPS user should backup your config.php, after update, copy it to .data foloder.</font>
添加主题。添加一段用于CF workers的代码。加密目录管理员不需要密码了。添加caddy2伪静态。新增Glitch平台。<font color=red>虚拟主机与VPS用户请备份config.php,升级后,手动将它覆盖到.data目录。</font>
20200828-1420.26 20200828-1420.26
nginx rewrite rule exclude .well-known folder, as auto SSL. add web.config to rewrite in IIS. now in windwos can do with \ in path. in aliyun FC & huawei FG API, use my code. CN 21Vianet client_id&secret expire. update description now only show new. nginx rewrite rule exclude .well-known folder, as auto SSL. add web.config to rewrite in IIS. now in windwos can do with \ in path. in aliyun FC & huawei FG API, use my code. CN 21Vianet client_id&secret expire. update description now only show new.
nginx的伪静态中排除.well-known目录,方便自动SSL。添加IIS的伪静态。与linux不同,处理windows下目录用\分隔。FC、FG中使用自己代码对接平台。<font color=red>世纪互联旧API即将过期失效,升级后世纪互联的盘需要删除重新添加。</font>更新说明只显示部分。 nginx的伪静态中排除.well-known目录,方便自动SSL。添加IIS的伪静态。与linux不同,处理windows下目录用\分隔。FC、FG中使用自己代码对接平台。<font color=red>世纪互联旧API即将过期失效,升级后世纪互联的盘需要删除重新添加。</font>更新说明只显示部分。
20200817-1740.25 20200817-1740.25
when multy disks, now will default show disks as folders in root, if set autoJumpFirstDisk 1, it will auto jump to first disk. when multy disks, now will default show disks as folders in root, if set autoJumpFirstDisk 1, it will auto jump to first disk.
多盘时,在网站根目录,默认会将各盘当成文件夹显示,可以去设置中设置autoJumpFirstDisk为1,这样可以跟以前一样自动跳到第一个盘。 多盘时,在网站根目录,默认会将各盘当成文件夹显示,可以去设置中设置autoJumpFirstDisk为1,这样可以跟以前一样自动跳到第一个盘。
+1 -1
View File
@@ -1,3 +1,3 @@
OneManagerPath=`cd $(dirname $0);pwd -P` OneManagerPath=`cd $(dirname $0);pwd -P`
cd ${OneManagerPath} cd ${OneManagerPath}
chmod 666 config.php chmod 666 .data/config.php