Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41350cc604 | ||
|
|
372a42bc05 | ||
|
|
b8c4cc1312 | ||
|
|
4e434ede6b | ||
|
|
086ac6d3e0 | ||
|
|
26b49c7a69 | ||
|
|
10a071df64 | ||
|
|
352a078829 | ||
|
|
de5ccd74cb | ||
|
|
218e7e5230 | ||
|
|
40eca60aba | ||
|
|
67da665f11 | ||
|
|
6b5c26b897 | ||
|
|
4d48228d8a | ||
|
|
20d210945e | ||
|
|
95a62a9d81 | ||
|
|
6ed09dde72 | ||
|
|
bc38d419e0 | ||
|
|
432fdc5f46 | ||
|
|
7c09b0f33c | ||
|
|
b0f10e1434 | ||
|
|
7a4398a55b | ||
|
|
9ed1b58c8d | ||
|
|
4add1167db | ||
|
|
07cd427066 | ||
|
|
e50e48014e | ||
|
|
75702b9a77 | ||
|
|
498a4ce5a8 | ||
|
|
90d4cf7aef | ||
|
|
ef5e410472 | ||
|
|
4279d1931d | ||
|
|
c1bc939a64 | ||
|
|
9422cbc4b8 | ||
|
|
ff7d92a9e9 | ||
|
|
2efc62257b | ||
|
|
c4df31d045 | ||
|
|
21ab0a6e1a | ||
|
|
e40223eb72 | ||
|
|
1d7d667220 | ||
|
|
7e952b39be | ||
|
|
f9858affa5 | ||
|
|
826b3f7f1a | ||
|
|
22a4cc70c9 | ||
|
|
c7a835d457 | ||
|
|
bd98c88f84 | ||
|
|
74f0d173b9 | ||
|
|
862b89d5e6 | ||
|
|
a54d907ea3 | ||
|
|
da87d45edc | ||
|
|
bd629d954c | ||
|
|
580cd87af0 | ||
|
|
0db7040d01 | ||
|
|
1824feabc7 | ||
|
|
375fa49035 | ||
|
|
1b4be18301 | ||
|
|
146ce057f2 | ||
|
|
e17398d336 | ||
|
|
c502a1b6ab | ||
|
|
32479a9dcf | ||
|
|
ab54a7af37 | ||
|
|
f6f7c6bbac | ||
|
|
c4c2c20bce | ||
|
|
11e75eec03 | ||
|
|
4e526f4c58 | ||
|
|
061da4fd7c | ||
|
|
a908ec285e | ||
|
|
c25df135ad | ||
|
|
ded802f448 | ||
|
|
936764d7b6 | ||
|
|
b8095a38b0 | ||
|
|
0d408f208e | ||
|
|
4b3c3a9407 | ||
|
|
ab1ceefdeb | ||
|
|
e08ee5ab99 | ||
|
|
acaeb5d3a0 | ||
|
|
00f486b0c7 | ||
|
|
87f3ce7b4e | ||
|
|
6162f2e3c9 | ||
|
|
efc2d0d0f5 | ||
|
|
91d118d567 |
@@ -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}
|
||||||
|
#
|
||||||
###-----------------------------------
|
###-----------------------------------
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
+267
-110
@@ -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('&','&', path_format(urldecode($path)));
|
$path = str_replace('&','&', 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'));
|
||||||
@@ -1696,13 +1722,14 @@ function get_refresh_token()
|
|||||||
<input type="text" name="sharepointSiteAddress" style="width:100%" placeholder="'.getconstStr('InputSharepointSiteAddress').'"><br>
|
<input type="text" name="sharepointSiteAddress" style="width:100%" placeholder="'.getconstStr('InputSharepointSiteAddress').'"><br>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>';
|
||||||
<input type="submit" value="'.getconstStr('Submit').'">
|
if ($_SERVER['language']=='zh-cn') $html .= '你要理解 scfonedrive.github.io 是github上的静态网站,<br>除非github真的挂掉了,<br>不然,稍后你如果连不上,请检查你的运营商或其它“你懂的”问题!<br>';
|
||||||
|
$html .='
|
||||||
|
<input type="submit" value="' . getconstStr('Submit') . '">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
function notnull(t)
|
function notnull(t) {
|
||||||
{
|
|
||||||
if (t.disktag_add.value==\'\') {
|
if (t.disktag_add.value==\'\') {
|
||||||
alert(\''.getconstStr('OnedriveDiskTag').'\');
|
alert(\''.getconstStr('OnedriveDiskTag').'\');
|
||||||
return false;
|
return false;
|
||||||
@@ -1712,7 +1739,7 @@ function get_refresh_token()
|
|||||||
alert("Do not input ' . $envs . '");
|
alert("Do not input ' . $envs . '");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var reg = /^[a-zA-Z]([-_a-zA-Z0-9]{1,20})$/;
|
var reg = /^[a-zA-Z]([_a-zA-Z0-9]{1,20})$/;
|
||||||
if (!reg.test(t.disktag_add.value)) {
|
if (!reg.test(t.disktag_add.value)) {
|
||||||
alert(\''.getconstStr('TagFormatAlert').'\');
|
alert(\''.getconstStr('TagFormatAlert').'\');
|
||||||
return false;
|
return false;
|
||||||
@@ -1750,11 +1777,15 @@ function get_refresh_token()
|
|||||||
function EnvOpt($needUpdate = 0)
|
function EnvOpt($needUpdate = 0)
|
||||||
{
|
{
|
||||||
global $constStr;
|
global $constStr;
|
||||||
|
global $CommonEnv;
|
||||||
global $ShowedCommonEnv;
|
global $ShowedCommonEnv;
|
||||||
global $ShowedInnerEnv;
|
global $ShowedInnerEnv;
|
||||||
global $timezones;
|
global $timezones;
|
||||||
asort($ShowedCommonEnv);
|
asort($ShowedCommonEnv);
|
||||||
asort($ShowedInnerEnv);
|
asort($ShowedInnerEnv);
|
||||||
|
$envs = '';
|
||||||
|
foreach ($CommonEnv as $env) $envs .= '\'' . $env . '\', ';
|
||||||
|
|
||||||
$html = '<title>OneManager '.getconstStr('Setup').'</title>';
|
$html = '<title>OneManager '.getconstStr('Setup').'</title>';
|
||||||
if (isset($_POST['updateProgram'])&&$_POST['updateProgram']==getconstStr('updateProgram')) {
|
if (isset($_POST['updateProgram'])&&$_POST['updateProgram']==getconstStr('updateProgram')) {
|
||||||
$response = setConfigResponse(OnekeyUpate($_POST['auth'], $_POST['project'], $_POST['branch']));
|
$response = setConfigResponse(OnekeyUpate($_POST['auth'], $_POST['project'], $_POST['branch']));
|
||||||
@@ -1772,9 +1803,26 @@ function EnvOpt($needUpdate = 0)
|
|||||||
if (isset($_POST['submit1'])) {
|
if (isset($_POST['submit1'])) {
|
||||||
$_SERVER['disk_oprating'] = '';
|
$_SERVER['disk_oprating'] = '';
|
||||||
foreach ($_POST as $k => $v) {
|
foreach ($_POST as $k => $v) {
|
||||||
if (in_array($k, $ShowedCommonEnv)||in_array($k, $ShowedInnerEnv)||$k=='disktag_del' || $k=='disktag_add') {
|
if (in_array($k, $ShowedCommonEnv) || in_array($k, $ShowedInnerEnv) || $k=='disktag_del' || $k=='disktag_add' || $k=='disktag_rename') {
|
||||||
$tmp[$k] = $v;
|
$tmp[$k] = $v;
|
||||||
}
|
}
|
||||||
|
if ($k=='disktag_newname') {
|
||||||
|
$v = preg_replace('/[^0-9a-zA-Z|_]/i', '', $v);
|
||||||
|
$f = substr($v, 0, 1);
|
||||||
|
if (strlen($v)==1) $v .= '_';
|
||||||
|
if (in_array($v, $CommonEnv)) {
|
||||||
|
return message('Do not input ' . $envs . '<br><button onclick="location.href = location.href;">'.getconstStr('Refresh').'</button><script>document.cookie=\'disktag=; path=/\';</script>', 'Error', 201);
|
||||||
|
} elseif (!(('a'<=$f && $f<='z') || ('A'<=$f && $f<='Z'))) {
|
||||||
|
return message('Please start with letters');
|
||||||
|
} else {
|
||||||
|
$tmp[$k] = $v;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($k=='disktag_sort') {
|
||||||
|
$td = implode('|', json_decode($v));
|
||||||
|
if (strlen($td)==strlen(getConfig('disktag'))) $tmp['disktag'] = $td;
|
||||||
|
else return message('Something wrong.');
|
||||||
|
}
|
||||||
if ($k == 'disk') $_SERVER['disk_oprating'] = $v;
|
if ($k == 'disk') $_SERVER['disk_oprating'] = $v;
|
||||||
}
|
}
|
||||||
/*if ($tmp['domain_path']!='') {
|
/*if ($tmp['domain_path']!='') {
|
||||||
@@ -1791,7 +1839,6 @@ function EnvOpt($needUpdate = 0)
|
|||||||
$html = api_error_msg($response);
|
$html = api_error_msg($response);
|
||||||
$title = 'Error';
|
$title = 'Error';
|
||||||
} else {
|
} else {
|
||||||
//WaitSCFStat();
|
|
||||||
$html .= getconstStr('Success') . '!<br>
|
$html .= getconstStr('Success') . '!<br>
|
||||||
<button onclick="location.href = location.href;">'.getconstStr('Refresh').'</button>';
|
<button onclick="location.href = location.href;">'.getconstStr('Refresh').'</button>';
|
||||||
$title = getconstStr('Setup');
|
$title = getconstStr('Setup');
|
||||||
@@ -1830,7 +1877,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>
|
||||||
@@ -1868,18 +1917,102 @@ function EnvOpt($needUpdate = 0)
|
|||||||
<tr><td><input type="submit" name="submit1" value="'.getconstStr('Setup').'"></td></tr>
|
<tr><td><input type="submit" name="submit1" value="'.getconstStr('Setup').'"></td></tr>
|
||||||
</form>
|
</form>
|
||||||
</table><br>';
|
</table><br>';
|
||||||
foreach (explode("|",getConfig('disktag')) as $disktag) {
|
$disktags = explode('|', getConfig('disktag'));
|
||||||
|
if (count($disktags)>1) {
|
||||||
|
$html .= '
|
||||||
|
<script src="//cdn.bootcss.com/Sortable/1.8.3/Sortable.js"></script>
|
||||||
|
<style>
|
||||||
|
.sortable-ghost {
|
||||||
|
opacity: 0.4;
|
||||||
|
background-color: #1748ce;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sortdisks td {
|
||||||
|
cursor: move;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<table border=1>
|
||||||
|
<form id="sortdisks_form" action="" method="post" style="margin: 0" onsubmit="return dragsort(this);">
|
||||||
|
<tr id="sortdisks">
|
||||||
|
<input type="hidden" name="disktag_sort" value="">';
|
||||||
|
$num = 0;
|
||||||
|
foreach ($disktags as $disktag) {
|
||||||
|
if ($disktag!='') {
|
||||||
|
$num++;
|
||||||
|
$html .= '
|
||||||
|
<td>' . $disktag . '</td>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$html .= '
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="' . $num . '">' . getconstStr('DragSort') . '<input type="submit" name="submit1" value="' . getconstStr('SubmitSortdisks') . '"></td></tr>
|
||||||
|
</form>
|
||||||
|
</table>
|
||||||
|
<script>
|
||||||
|
var disks=' . json_encode($disktags) . ';
|
||||||
|
function change(arr, oldindex, newindex) {
|
||||||
|
//console.log(oldindex + "," + newindex);
|
||||||
|
tmp=arr.splice(oldindex-1, 1);
|
||||||
|
if (oldindex > newindex) {
|
||||||
|
tmp1=JSON.parse(JSON.stringify(arr));
|
||||||
|
tmp1.splice(newindex-1, arr.length-newindex+1);
|
||||||
|
tmp2=JSON.parse(JSON.stringify(arr));
|
||||||
|
tmp2.splice(0, newindex-1);
|
||||||
|
} else {
|
||||||
|
tmp1=JSON.parse(JSON.stringify(arr));
|
||||||
|
tmp1.splice(newindex-1, arr.length-newindex+1);
|
||||||
|
tmp2=JSON.parse(JSON.stringify(arr));
|
||||||
|
tmp2.splice(0, newindex-1);
|
||||||
|
}
|
||||||
|
arr=tmp1.concat(tmp, tmp2);
|
||||||
|
//console.log(arr);
|
||||||
|
return arr;
|
||||||
|
}
|
||||||
|
function dragsort(t) {
|
||||||
|
if (t.disktag_sort.value==\'\') {
|
||||||
|
alert(\'' . getconstStr('DragSort') . '\');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
envs = [' . $envs . '];
|
||||||
|
if (envs.indexOf(t.disktag_sort.value)>-1) {
|
||||||
|
alert("Do not input ' . $envs . '");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
Sortable.create(document.getElementById(\'sortdisks\'), {
|
||||||
|
animation: 150,
|
||||||
|
onEnd: function (evt) { //拖拽完毕之后发生该事件
|
||||||
|
//console.log(evt.oldIndex);
|
||||||
|
//console.log(evt.newIndex);
|
||||||
|
if (evt.oldIndex!=evt.newIndex) {
|
||||||
|
disks=change(disks, evt.oldIndex, evt.newIndex);
|
||||||
|
document.getElementById(\'sortdisks_form\').disktag_sort.value=JSON.stringify(disks);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script><br>';
|
||||||
|
}
|
||||||
|
foreach ($disktags as $disktag) {
|
||||||
if ($disktag!='') {
|
if ($disktag!='') {
|
||||||
$html .= '
|
$html .= '
|
||||||
<table border=1 width=100%>
|
<table border=1 width=100%>
|
||||||
<form action="" method="post">
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">'.$disktag.':
|
<td>
|
||||||
|
<form action="" method="post" style="margin: 0">
|
||||||
<input type="hidden" name="disktag_del" value="'.$disktag.'">
|
<input type="hidden" name="disktag_del" value="'.$disktag.'">
|
||||||
<input type="submit" name="submit1" value="'.getconstStr('DelDisk').'">
|
<input type="submit" name="submit1" value="'.getconstStr('DelDisk').'">
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<form action="" method="post" style="margin: 0" onsubmit="return renametag(this);">
|
||||||
|
<input type="hidden" name="disktag_rename" value="'.$disktag.'">
|
||||||
|
<input type="text" name="disktag_newname" value="'.$disktag.'">
|
||||||
|
<input type="submit" name="submit1" value="'.getconstStr('RenameDisk').'">
|
||||||
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</form>';
|
';
|
||||||
if (getConfig('refresh_token', $disktag)!='') {
|
if (getConfig('refresh_token', $disktag)!='') {
|
||||||
$html .= '
|
$html .= '
|
||||||
<form name="'.$disktag.'" action="" method="post">
|
<form name="'.$disktag.'" action="" method="post">
|
||||||
@@ -1892,7 +2025,7 @@ function EnvOpt($needUpdate = 0)
|
|||||||
</tr>';
|
</tr>';
|
||||||
}
|
}
|
||||||
$html .= '
|
$html .= '
|
||||||
<tr><td><input type="submit" name="submit1" value="'.getconstStr('Setup').'"></td></tr>
|
<tr><td></td><td><input type="submit" name="submit1" value="'.getconstStr('Setup').'"></td></tr>
|
||||||
</form>';
|
</form>';
|
||||||
} else {
|
} else {
|
||||||
$html .= '
|
$html .= '
|
||||||
@@ -1940,6 +2073,27 @@ function EnvOpt($needUpdate = 0)
|
|||||||
<input type="submit" name="updateProgram" value="'.getconstStr('updateProgram').'">
|
<input type="submit" name="updateProgram" value="'.getconstStr('updateProgram').'">
|
||||||
</form>
|
</form>
|
||||||
<script>
|
<script>
|
||||||
|
function renametag(t) {
|
||||||
|
if (t.disktag_newname.value==\'\') {
|
||||||
|
alert(\''.getconstStr('OnedriveDiskTag').'\');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (t.disktag_newname.value==t.disktag_rename.value) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
envs = [' . $envs . '];
|
||||||
|
if (envs.indexOf(t.disktag_newname.value)>-1) {
|
||||||
|
alert("Do not input ' . $envs . '");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var reg = /^[a-zA-Z]([_a-zA-Z0-9]{1,20})$/;
|
||||||
|
if (!reg.test(t.disktag_newname.value)) {
|
||||||
|
alert(\''.getconstStr('TagFormatAlert').'\');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
function querybranchs()
|
function querybranchs()
|
||||||
{
|
{
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
@@ -1985,6 +2139,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 +2194,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 +2220,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 +2860,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 +2868,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 +2901,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 +2923,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 +3013,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)">
|
||||||
|
|||||||
+150
@@ -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,20 +306,38 @@ $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' => 'پیکربندی پلتفرم',
|
||||||
],
|
],
|
||||||
|
'DragSort' => [
|
||||||
|
'en-us' => 'Drag to Sort Disk',
|
||||||
|
'zh-cn' => '拖拽改变顺序',
|
||||||
|
'zh-tw' => '拖曳改變順序',
|
||||||
|
],
|
||||||
|
'SubmitSortdisks' => [
|
||||||
|
'en-us' => 'Submit Sort',
|
||||||
|
'zh-cn' => '确认排序',
|
||||||
|
'zh-tw' => '確認排序',
|
||||||
|
],
|
||||||
'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' => 'پاک کردن این دیسک',
|
||||||
],
|
],
|
||||||
|
'RenameDisk' => [
|
||||||
|
'en-us' => 'Rename Disk Tag',
|
||||||
|
'zh-cn' => '改变标签',
|
||||||
|
'zh-tw' => '修改標籤',
|
||||||
|
],
|
||||||
'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 +345,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 +353,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 +371,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 +379,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 +387,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 +395,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 +403,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 +411,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 +419,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 +427,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 +435,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 +443,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 +456,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 +469,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 +477,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 +485,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 +493,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 +501,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 +509,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 +517,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 +525,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 +533,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 +541,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 +559,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 +567,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 +575,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 +583,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 +591,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 +599,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 +607,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 +615,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 +623,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 +631,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 +639,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 +647,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 +660,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 +668,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 +676,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 +684,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 +692,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 +700,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 +708,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 +716,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 +724,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 +732,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 +740,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 +751,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 +759,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 +767,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 +775,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 +783,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 +791,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 +799,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 +807,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 +820,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 +838,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 +858,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 +866,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 +874,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 +882,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 +890,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 +898,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 +921,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 +929,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 +937,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' => '配置儲存在程式碼文件中,可能產生費用',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"start": "php -S 0.0.0.0:8080 index.php"
|
||||||
|
}
|
||||||
@@ -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(),
|
||||||
|
|||||||
+20
-8
@@ -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);
|
||||||
@@ -74,11 +78,11 @@ function setConfig($arr, $disktag = '')
|
|||||||
global $InnerEnv;
|
global $InnerEnv;
|
||||||
global $Base64Env;
|
global $Base64Env;
|
||||||
if ($disktag=='') $disktag = $_SERVER['disktag'];
|
if ($disktag=='') $disktag = $_SERVER['disktag'];
|
||||||
$disktags = explode("|",getConfig('disktag'));
|
$disktags = explode("|", getConfig('disktag'));
|
||||||
$diskconfig = json_decode(getenv($disktag), true);
|
$diskconfig = json_decode(getenv($disktag), true);
|
||||||
$tmp = [];
|
$tmp = [];
|
||||||
$indisk = 0;
|
$indisk = 0;
|
||||||
$oparetdisk = 0;
|
$operatedisk = 0;
|
||||||
foreach ($arr as $k => $v) {
|
foreach ($arr as $k => $v) {
|
||||||
if (in_array($k, $InnerEnv)) {
|
if (in_array($k, $InnerEnv)) {
|
||||||
if (in_array($k, $Base64Env)) $diskconfig[$k] = base64y_encode($v);
|
if (in_array($k, $Base64Env)) $diskconfig[$k] = base64y_encode($v);
|
||||||
@@ -86,11 +90,13 @@ function setConfig($arr, $disktag = '')
|
|||||||
$indisk = 1;
|
$indisk = 1;
|
||||||
} elseif ($k=='disktag_add') {
|
} elseif ($k=='disktag_add') {
|
||||||
array_push($disktags, $v);
|
array_push($disktags, $v);
|
||||||
$oparetdisk = 1;
|
$operatedisk = 1;
|
||||||
} elseif ($k=='disktag_del') {
|
} elseif ($k=='disktag_del') {
|
||||||
$disktags = array_diff($disktags, [ $v ]);
|
$disktags = array_diff($disktags, [ $v ]);
|
||||||
$tmp[$v] = '';
|
$tmp[$v] = '';
|
||||||
$oparetdisk = 1;
|
$operatedisk = 1;
|
||||||
|
} elseif ($k=='disktag_rename' || $k=='disktag_newname') {
|
||||||
|
if ($arr['disktag_rename']!=$arr['disktag_newname']) $operatedisk = 1;
|
||||||
} else {
|
} else {
|
||||||
if (in_array($k, $Base64Env)) $tmp[$k] = base64y_encode($v);
|
if (in_array($k, $Base64Env)) $tmp[$k] = base64y_encode($v);
|
||||||
else $tmp[$k] = $v;
|
else $tmp[$k] = $v;
|
||||||
@@ -101,12 +107,18 @@ function setConfig($arr, $disktag = '')
|
|||||||
ksort($diskconfig);
|
ksort($diskconfig);
|
||||||
$tmp[$disktag] = json_encode($diskconfig);
|
$tmp[$disktag] = json_encode($diskconfig);
|
||||||
}
|
}
|
||||||
if ($oparetdisk) {
|
if ($operatedisk) {
|
||||||
|
if (isset($arr['disktag_newname']) && $arr['disktag_newname']!='') {
|
||||||
|
$tmp['disktag'] = str_replace($arr['disktag_rename'], $arr['disktag_newname'], getConfig('disktag'));
|
||||||
|
$tmp[$arr['disktag_newname']] = getConfig($arr['disktag_rename']);
|
||||||
|
$tmp[$arr['disktag_rename']] = '';
|
||||||
|
} else {
|
||||||
$disktags = array_unique($disktags);
|
$disktags = array_unique($disktags);
|
||||||
foreach ($disktags as $disktag) if ($disktag!='') $disktag_s .= $disktag . '|';
|
foreach ($disktags as $disktag) if ($disktag!='') $disktag_s .= $disktag . '|';
|
||||||
if ($disktag_s!='') $tmp['disktag'] = substr($disktag_s, 0, -1);
|
if ($disktag_s!='') $tmp['disktag'] = substr($disktag_s, 0, -1);
|
||||||
else $tmp['disktag'] = '';
|
else $tmp['disktag'] = '';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// echo '正式设置:'.json_encode($tmp,JSON_PRETTY_PRINT).'
|
// echo '正式设置:'.json_encode($tmp,JSON_PRETTY_PRINT).'
|
||||||
//';
|
//';
|
||||||
$response = updateEnvironment($tmp, $_SERVER['accountId'], $_SERVER['region'], $_SERVER['service_name'], $_SERVER['function_name'], getConfig('AccessKeyID'), getConfig('AccessKeySecret'));
|
$response = updateEnvironment($tmp, $_SERVER['accountId'], $_SERVER['region'], $_SERVER['service_name'], $_SERVER['function_name'], getConfig('AccessKeyID'), getConfig('AccessKeySecret'));
|
||||||
|
|||||||
+12
-4
@@ -72,7 +72,7 @@ function setConfig($arr, $disktag = '')
|
|||||||
$diskconfig = json_decode(getenv($disktag), true);
|
$diskconfig = json_decode(getenv($disktag), true);
|
||||||
$tmp = [];
|
$tmp = [];
|
||||||
$indisk = 0;
|
$indisk = 0;
|
||||||
$oparetdisk = 0;
|
$operatedisk = 0;
|
||||||
foreach ($arr as $k => $v) {
|
foreach ($arr as $k => $v) {
|
||||||
if (in_array($k, $InnerEnv)) {
|
if (in_array($k, $InnerEnv)) {
|
||||||
if (in_array($k, $Base64Env)) $diskconfig[$k] = base64y_encode($v);
|
if (in_array($k, $Base64Env)) $diskconfig[$k] = base64y_encode($v);
|
||||||
@@ -80,11 +80,13 @@ function setConfig($arr, $disktag = '')
|
|||||||
$indisk = 1;
|
$indisk = 1;
|
||||||
} elseif ($k=='disktag_add') {
|
} elseif ($k=='disktag_add') {
|
||||||
array_push($disktags, $v);
|
array_push($disktags, $v);
|
||||||
$oparetdisk = 1;
|
$operatedisk = 1;
|
||||||
} elseif ($k=='disktag_del') {
|
} elseif ($k=='disktag_del') {
|
||||||
$disktags = array_diff($disktags, [ $v ]);
|
$disktags = array_diff($disktags, [ $v ]);
|
||||||
$tmp[$v] = '';
|
$tmp[$v] = '';
|
||||||
$oparetdisk = 1;
|
$operatedisk = 1;
|
||||||
|
} elseif ($k=='disktag_rename' || $k=='disktag_newname') {
|
||||||
|
if ($arr['disktag_rename']!=$arr['disktag_newname']) $operatedisk = 1;
|
||||||
} else {
|
} else {
|
||||||
if (in_array($k, $Base64Env)) $tmp[$k] = base64y_encode($v);
|
if (in_array($k, $Base64Env)) $tmp[$k] = base64y_encode($v);
|
||||||
else $tmp[$k] = $v;
|
else $tmp[$k] = $v;
|
||||||
@@ -95,12 +97,18 @@ function setConfig($arr, $disktag = '')
|
|||||||
ksort($diskconfig);
|
ksort($diskconfig);
|
||||||
$tmp[$disktag] = json_encode($diskconfig);
|
$tmp[$disktag] = json_encode($diskconfig);
|
||||||
}
|
}
|
||||||
if ($oparetdisk) {
|
if ($operatedisk) {
|
||||||
|
if (isset($arr['disktag_newname']) && $arr['disktag_newname']!='') {
|
||||||
|
$tmp['disktag'] = str_replace($arr['disktag_rename'], $arr['disktag_newname'], getConfig('disktag'));
|
||||||
|
$tmp[$arr['disktag_newname']] = getConfig($arr['disktag_rename']);
|
||||||
|
$tmp[$arr['disktag_rename']] = '';
|
||||||
|
} else {
|
||||||
$disktags = array_unique($disktags);
|
$disktags = array_unique($disktags);
|
||||||
foreach ($disktags as $disktag) if ($disktag!='') $disktag_s .= $disktag . '|';
|
foreach ($disktags as $disktag) if ($disktag!='') $disktag_s .= $disktag . '|';
|
||||||
if ($disktag_s!='') $tmp['disktag'] = substr($disktag_s, 0, -1);
|
if ($disktag_s!='') $tmp['disktag'] = substr($disktag_s, 0, -1);
|
||||||
else $tmp['disktag'] = '';
|
else $tmp['disktag'] = '';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// echo '正式设置:'.json_encode($tmp,JSON_PRETTY_PRINT).'
|
// echo '正式设置:'.json_encode($tmp,JSON_PRETTY_PRINT).'
|
||||||
//';
|
//';
|
||||||
$response = updateEnvironment($tmp, getConfig('SecretId'), getConfig('SecretKey'));
|
$response = updateEnvironment($tmp, getConfig('SecretId'), getConfig('SecretKey'));
|
||||||
|
|||||||
+31
-5
@@ -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);
|
||||||
@@ -65,7 +83,7 @@ function setConfig($arr, $disktag = '')
|
|||||||
$diskconfig = json_decode(getenv($disktag), true);
|
$diskconfig = json_decode(getenv($disktag), true);
|
||||||
$tmp = [];
|
$tmp = [];
|
||||||
$indisk = 0;
|
$indisk = 0;
|
||||||
$oparetdisk = 0;
|
$operatedisk = 0;
|
||||||
foreach ($arr as $k => $v) {
|
foreach ($arr as $k => $v) {
|
||||||
if (in_array($k, $InnerEnv)) {
|
if (in_array($k, $InnerEnv)) {
|
||||||
if (in_array($k, $Base64Env)) $diskconfig[$k] = base64y_encode($v);
|
if (in_array($k, $Base64Env)) $diskconfig[$k] = base64y_encode($v);
|
||||||
@@ -73,11 +91,13 @@ function setConfig($arr, $disktag = '')
|
|||||||
$indisk = 1;
|
$indisk = 1;
|
||||||
} elseif ($k=='disktag_add') {
|
} elseif ($k=='disktag_add') {
|
||||||
array_push($disktags, $v);
|
array_push($disktags, $v);
|
||||||
$oparetdisk = 1;
|
$operatedisk = 1;
|
||||||
} elseif ($k=='disktag_del') {
|
} elseif ($k=='disktag_del') {
|
||||||
$disktags = array_diff($disktags, [ $v ]);
|
$disktags = array_diff($disktags, [ $v ]);
|
||||||
$tmp[$v] = '';
|
$tmp[$v] = '';
|
||||||
$oparetdisk = 1;
|
$operatedisk = 1;
|
||||||
|
} elseif ($k=='disktag_rename' || $k=='disktag_newname') {
|
||||||
|
if ($arr['disktag_rename']!=$arr['disktag_newname']) $operatedisk = 1;
|
||||||
} else {
|
} else {
|
||||||
if (in_array($k, $Base64Env)) $tmp[$k] = base64y_encode($v);
|
if (in_array($k, $Base64Env)) $tmp[$k] = base64y_encode($v);
|
||||||
else $tmp[$k] = $v;
|
else $tmp[$k] = $v;
|
||||||
@@ -88,11 +108,17 @@ function setConfig($arr, $disktag = '')
|
|||||||
ksort($diskconfig);
|
ksort($diskconfig);
|
||||||
$tmp[$disktag] = json_encode($diskconfig);
|
$tmp[$disktag] = json_encode($diskconfig);
|
||||||
}
|
}
|
||||||
if ($oparetdisk) {
|
if ($operatedisk) {
|
||||||
|
if (isset($arr['disktag_newname']) && $arr['disktag_newname']!='') {
|
||||||
|
$tmp['disktag'] = str_replace($arr['disktag_rename'], $arr['disktag_newname'], getConfig('disktag'));
|
||||||
|
$tmp[$arr['disktag_newname']] = getConfig($arr['disktag_rename']);
|
||||||
|
$tmp[$arr['disktag_rename']] = null;
|
||||||
|
} else {
|
||||||
$disktags = array_unique($disktags);
|
$disktags = array_unique($disktags);
|
||||||
foreach ($disktags as $disktag) if ($disktag!='') $disktag_s .= $disktag . '|';
|
foreach ($disktags as $disktag) if ($disktag!='') $disktag_s .= $disktag . '|';
|
||||||
if ($disktag_s!='') $tmp['disktag'] = substr($disktag_s, 0, -1);
|
if ($disktag_s!='') $tmp['disktag'] = substr($disktag_s, 0, -1);
|
||||||
else $tmp['disktag'] = '';
|
else $tmp['disktag'] = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
foreach ($tmp as $key => $val) if ($val=='') $tmp[$key]=null;
|
foreach ($tmp as $key => $val) if ($val=='') $tmp[$key]=null;
|
||||||
// echo '正式设置:'.json_encode($tmp,JSON_PRETTY_PRINT).'
|
// echo '正式设置:'.json_encode($tmp,JSON_PRETTY_PRINT).'
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ function setConfig($arr, $disktag = '')
|
|||||||
$diskconfig = json_decode($contextUserData->getUserData($disktag), true);
|
$diskconfig = json_decode($contextUserData->getUserData($disktag), true);
|
||||||
$tmp = [];
|
$tmp = [];
|
||||||
$indisk = 0;
|
$indisk = 0;
|
||||||
$oparetdisk = 0;
|
$operatedisk = 0;
|
||||||
foreach ($arr as $k => $v) {
|
foreach ($arr as $k => $v) {
|
||||||
if (in_array($k, $InnerEnv)) {
|
if (in_array($k, $InnerEnv)) {
|
||||||
if (in_array($k, $Base64Env)) $diskconfig[$k] = base64y_encode($v);
|
if (in_array($k, $Base64Env)) $diskconfig[$k] = base64y_encode($v);
|
||||||
@@ -104,11 +104,13 @@ function setConfig($arr, $disktag = '')
|
|||||||
$indisk = 1;
|
$indisk = 1;
|
||||||
} elseif ($k=='disktag_add') {
|
} elseif ($k=='disktag_add') {
|
||||||
array_push($disktags, $v);
|
array_push($disktags, $v);
|
||||||
$oparetdisk = 1;
|
$operatedisk = 1;
|
||||||
} elseif ($k=='disktag_del') {
|
} elseif ($k=='disktag_del') {
|
||||||
$disktags = array_diff($disktags, [ $v ]);
|
$disktags = array_diff($disktags, [ $v ]);
|
||||||
$tmp[$v] = '';
|
$tmp[$v] = '';
|
||||||
$oparetdisk = 1;
|
$operatedisk = 1;
|
||||||
|
} elseif ($k=='disktag_rename' || $k=='disktag_newname') {
|
||||||
|
if ($arr['disktag_rename']!=$arr['disktag_newname']) $operatedisk = 1;
|
||||||
} else {
|
} else {
|
||||||
if (in_array($k, $Base64Env)) $tmp[$k] = base64y_encode($v);
|
if (in_array($k, $Base64Env)) $tmp[$k] = base64y_encode($v);
|
||||||
else $tmp[$k] = $v;
|
else $tmp[$k] = $v;
|
||||||
@@ -119,12 +121,18 @@ function setConfig($arr, $disktag = '')
|
|||||||
ksort($diskconfig);
|
ksort($diskconfig);
|
||||||
$tmp[$disktag] = json_encode($diskconfig);
|
$tmp[$disktag] = json_encode($diskconfig);
|
||||||
}
|
}
|
||||||
if ($oparetdisk) {
|
if ($operatedisk) {
|
||||||
|
if (isset($arr['disktag_newname']) && $arr['disktag_newname']!='') {
|
||||||
|
$tmp['disktag'] = str_replace($arr['disktag_rename'], $arr['disktag_newname'], getConfig('disktag'));
|
||||||
|
$tmp[$arr['disktag_newname']] = getConfig($arr['disktag_rename']);
|
||||||
|
$tmp[$arr['disktag_rename']] = '';
|
||||||
|
} else {
|
||||||
$disktags = array_unique($disktags);
|
$disktags = array_unique($disktags);
|
||||||
foreach ($disktags as $disktag) if ($disktag!='') $disktag_s .= $disktag . '|';
|
foreach ($disktags as $disktag) if ($disktag!='') $disktag_s .= $disktag . '|';
|
||||||
if ($disktag_s!='') $tmp['disktag'] = substr($disktag_s, 0, -1);
|
if ($disktag_s!='') $tmp['disktag'] = substr($disktag_s, 0, -1);
|
||||||
else $tmp['disktag'] = '';
|
else $tmp['disktag'] = '';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// echo '正式设置:'.json_encode($tmp,JSON_PRETTY_PRINT).'
|
// echo '正式设置:'.json_encode($tmp,JSON_PRETTY_PRINT).'
|
||||||
//';
|
//';
|
||||||
$response = updateEnvironment($tmp, getConfig('HW_urn'), getConfig('HW_key'), getConfig('HW_secret'));
|
$response = updateEnvironment($tmp, getConfig('HW_urn'), getConfig('HW_key'), getConfig('HW_secret'));
|
||||||
|
|||||||
@@ -118,6 +118,8 @@ function setConfig($arr, $disktag = '')
|
|||||||
$disktags = array_diff($disktags, [ $v ]);
|
$disktags = array_diff($disktags, [ $v ]);
|
||||||
$envs[$v] = '';
|
$envs[$v] = '';
|
||||||
$operatedisk = 1;
|
$operatedisk = 1;
|
||||||
|
} elseif ($k=='disktag_rename' || $k=='disktag_newname') {
|
||||||
|
if ($arr['disktag_rename']!=$arr['disktag_newname']) $operatedisk = 1;
|
||||||
} else {
|
} else {
|
||||||
if (in_array($k, $Base64Env)) $envs[$k] = base64y_encode($v);
|
if (in_array($k, $Base64Env)) $envs[$k] = base64y_encode($v);
|
||||||
else $envs[$k] = $v;
|
else $envs[$k] = $v;
|
||||||
@@ -130,11 +132,17 @@ function setConfig($arr, $disktag = '')
|
|||||||
$envs[$disktag] = $diskconfig;
|
$envs[$disktag] = $diskconfig;
|
||||||
}
|
}
|
||||||
if ($operatedisk) {
|
if ($operatedisk) {
|
||||||
|
if (isset($arr['disktag_newname']) && $arr['disktag_newname']!='') {
|
||||||
|
$envs['disktag'] = str_replace($arr['disktag_rename'], $arr['disktag_newname'], getConfig('disktag'));
|
||||||
|
$envs[$arr['disktag_newname']] = $envs[$arr['disktag_rename']];
|
||||||
|
$envs[$arr['disktag_rename']] = '';
|
||||||
|
} else {
|
||||||
$disktags = array_unique($disktags);
|
$disktags = array_unique($disktags);
|
||||||
foreach ($disktags as $disktag) if ($disktag!='') $disktag_s .= $disktag . '|';
|
foreach ($disktags as $disktag) if ($disktag!='') $disktag_s .= $disktag . '|';
|
||||||
if ($disktag_s!='') $envs['disktag'] = substr($disktag_s, 0, -1);
|
if ($disktag_s!='') $envs['disktag'] = substr($disktag_s, 0, -1);
|
||||||
else $envs['disktag'] = '';
|
else $envs['disktag'] = '';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$envs = array_filter($envs, 'array_value_isnot_null');
|
$envs = array_filter($envs, 'array_value_isnot_null');
|
||||||
ksort($envs);
|
ksort($envs);
|
||||||
$response = updateEnvironment($envs, getConfig('HW_urn'), getConfig('HW_key'), getConfig('HW_secret'));
|
$response = updateEnvironment($envs, getConfig('HW_urn'), getConfig('HW_key'), getConfig('HW_secret'));
|
||||||
@@ -340,7 +348,7 @@ function getfunctioncode($HW_urn, $HW_key, $HW_secret)
|
|||||||
' . '/' . $bucket . '/' . $path;
|
' . '/' . $bucket . '/' . $path;
|
||||||
|
|
||||||
$signature = base64_encode(hash_hmac('sha1', $StringToSign, $HW_secret, true));
|
$signature = base64_encode(hash_hmac('sha1', $StringToSign, $HW_secret, true));
|
||||||
$response = curl_request($url, false, [ 'Authorization' => 'OBS ' . $HW_key . ':' . $signature, 'x-obs-date' => $date, 'Content-Type' => '' ]);
|
$response = curl('GET', $url, false, [ 'Authorization' => 'OBS ' . $HW_key . ':' . $signature, 'x-obs-date' => $date, 'Content-Type' => '' ]);
|
||||||
//if ($response['stat']==200) return $response['body'];
|
//if ($response['stat']==200) return $response['body'];
|
||||||
if ($response['stat']==0) return json_encode( [ 'error_code' => 'Network', 'error_msg' => 'Network error in getting code.' ] );
|
if ($response['stat']==0) return json_encode( [ 'error_code' => 'Network', 'error_msg' => 'Network error in getting code.' ] );
|
||||||
else return $response['body'];
|
else return $response['body'];
|
||||||
|
|||||||
+41
-21
@@ -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,12 +91,15 @@ 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);
|
||||||
$disktags = explode("|",getConfig('disktag'));
|
$disktags = explode("|", getConfig('disktag'));
|
||||||
$indisk = 0;
|
$indisk = 0;
|
||||||
$operatedisk = 0;
|
$operatedisk = 0;
|
||||||
foreach ($arr as $k => $v) {
|
foreach ($arr as $k => $v) {
|
||||||
@@ -92,6 +114,8 @@ function setConfig($arr, $disktag = '')
|
|||||||
$disktags = array_diff($disktags, [ $v ]);
|
$disktags = array_diff($disktags, [ $v ]);
|
||||||
$envs[$v] = '';
|
$envs[$v] = '';
|
||||||
$operatedisk = 1;
|
$operatedisk = 1;
|
||||||
|
} elseif ($k=='disktag_rename' || $k=='disktag_newname') {
|
||||||
|
if ($arr['disktag_rename']!=$arr['disktag_newname']) $operatedisk = 1;
|
||||||
} else {
|
} else {
|
||||||
if (in_array($k, $Base64Env)) $envs[$k] = base64y_encode($v);
|
if (in_array($k, $Base64Env)) $envs[$k] = base64y_encode($v);
|
||||||
else $envs[$k] = $v;
|
else $envs[$k] = $v;
|
||||||
@@ -104,17 +128,24 @@ function setConfig($arr, $disktag = '')
|
|||||||
$envs[$disktag] = $diskconfig;
|
$envs[$disktag] = $diskconfig;
|
||||||
}
|
}
|
||||||
if ($operatedisk) {
|
if ($operatedisk) {
|
||||||
|
if (isset($arr['disktag_newname']) && $arr['disktag_newname']!='') {
|
||||||
|
$envs['disktag'] = str_replace($arr['disktag_rename'], $arr['disktag_newname'], getConfig('disktag'));
|
||||||
|
$envs[$arr['disktag_newname']] = $envs[$arr['disktag_rename']];
|
||||||
|
unset($envs[$arr['disktag_rename']]);
|
||||||
|
} else {
|
||||||
$disktags = array_unique($disktags);
|
$disktags = array_unique($disktags);
|
||||||
foreach ($disktags as $disktag) if ($disktag!='') $disktag_s .= $disktag . '|';
|
foreach ($disktags as $disktag) if ($disktag!='') $disktag_s .= $disktag . '|';
|
||||||
if ($disktag_s!='') $envs['disktag'] = substr($disktag_s, 0, -1);
|
if ($disktag_s!='') $envs['disktag'] = substr($disktag_s, 0, -1);
|
||||||
else $envs['disktag'] = '';
|
else $envs['disktag'] = '';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$envs = array_filter($envs, 'array_value_isnot_null');
|
$envs = array_filter($envs, 'array_value_isnot_null');
|
||||||
ksort($envs);
|
ksort($envs);
|
||||||
|
|
||||||
//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 +214,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 +275,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 +328,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);
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ function setConfig($arr, $disktag = '')
|
|||||||
$diskconfig = json_decode(getenv($disktag), true);
|
$diskconfig = json_decode(getenv($disktag), true);
|
||||||
$tmp = [];
|
$tmp = [];
|
||||||
$indisk = 0;
|
$indisk = 0;
|
||||||
$oparetdisk = 0;
|
$operatedisk = 0;
|
||||||
foreach ($arr as $k => $v) {
|
foreach ($arr as $k => $v) {
|
||||||
if (in_array($k, $InnerEnv)) {
|
if (in_array($k, $InnerEnv)) {
|
||||||
if (in_array($k, $Base64Env)) $diskconfig[$k] = base64y_encode($v);
|
if (in_array($k, $Base64Env)) $diskconfig[$k] = base64y_encode($v);
|
||||||
@@ -87,11 +87,13 @@ function setConfig($arr, $disktag = '')
|
|||||||
$indisk = 1;
|
$indisk = 1;
|
||||||
} elseif ($k=='disktag_add') {
|
} elseif ($k=='disktag_add') {
|
||||||
array_push($disktags, $v);
|
array_push($disktags, $v);
|
||||||
$oparetdisk = 1;
|
$operatedisk = 1;
|
||||||
} elseif ($k=='disktag_del') {
|
} elseif ($k=='disktag_del') {
|
||||||
$disktags = array_diff($disktags, [ $v ]);
|
$disktags = array_diff($disktags, [ $v ]);
|
||||||
$tmp[$v] = '';
|
$tmp[$v] = '';
|
||||||
$oparetdisk = 1;
|
$operatedisk = 1;
|
||||||
|
} elseif ($k=='disktag_rename' || $k=='disktag_newname') {
|
||||||
|
if ($arr['disktag_rename']!=$arr['disktag_newname']) $operatedisk = 1;
|
||||||
} else {
|
} else {
|
||||||
if (in_array($k, $Base64Env)) $tmp[$k] = base64y_encode($v);
|
if (in_array($k, $Base64Env)) $tmp[$k] = base64y_encode($v);
|
||||||
else $tmp[$k] = $v;
|
else $tmp[$k] = $v;
|
||||||
@@ -102,12 +104,18 @@ function setConfig($arr, $disktag = '')
|
|||||||
ksort($diskconfig);
|
ksort($diskconfig);
|
||||||
$tmp[$disktag] = json_encode($diskconfig);
|
$tmp[$disktag] = json_encode($diskconfig);
|
||||||
}
|
}
|
||||||
if ($oparetdisk) {
|
if ($operatedisk) {
|
||||||
|
if (isset($arr['disktag_newname']) && $arr['disktag_newname']!='') {
|
||||||
|
$tmp['disktag'] = str_replace($arr['disktag_rename'], $arr['disktag_newname'], getConfig('disktag'));
|
||||||
|
$tmp[$arr['disktag_newname']] = getConfig($arr['disktag_rename']);
|
||||||
|
$tmp[$arr['disktag_rename']] = '';
|
||||||
|
} else {
|
||||||
$disktags = array_unique($disktags);
|
$disktags = array_unique($disktags);
|
||||||
foreach ($disktags as $disktag) if ($disktag!='') $disktag_s .= $disktag . '|';
|
foreach ($disktags as $disktag) if ($disktag!='') $disktag_s .= $disktag . '|';
|
||||||
if ($disktag_s!='') $tmp['disktag'] = substr($disktag_s, 0, -1);
|
if ($disktag_s!='') $tmp['disktag'] = substr($disktag_s, 0, -1);
|
||||||
else $tmp['disktag'] = '';
|
else $tmp['disktag'] = '';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// echo '正式设置:'.json_encode($tmp,JSON_PRETTY_PRINT).'
|
// echo '正式设置:'.json_encode($tmp,JSON_PRETTY_PRINT).'
|
||||||
//';
|
//';
|
||||||
$response = updateEnvironment($tmp, $_SERVER['function_name'], $_SERVER['Region'], $_SERVER['namespace'], getConfig('SecretId'), getConfig('SecretKey'));
|
$response = updateEnvironment($tmp, $_SERVER['function_name'], $_SERVER['Region'], $_SERVER['namespace'], getConfig('SecretId'), getConfig('SecretKey'));
|
||||||
|
|||||||
@@ -103,6 +103,8 @@ function setConfig($arr, $disktag = '')
|
|||||||
$disktags = array_diff($disktags, [ $v ]);
|
$disktags = array_diff($disktags, [ $v ]);
|
||||||
$envs[$v] = '';
|
$envs[$v] = '';
|
||||||
$operatedisk = 1;
|
$operatedisk = 1;
|
||||||
|
} elseif ($k=='disktag_rename' || $k=='disktag_newname') {
|
||||||
|
if ($arr['disktag_rename']!=$arr['disktag_newname']) $operatedisk = 1;
|
||||||
} else {
|
} else {
|
||||||
if (in_array($k, $Base64Env)) $envs[$k] = base64y_encode($v);
|
if (in_array($k, $Base64Env)) $envs[$k] = base64y_encode($v);
|
||||||
else $envs[$k] = $v;
|
else $envs[$k] = $v;
|
||||||
@@ -115,11 +117,17 @@ function setConfig($arr, $disktag = '')
|
|||||||
$envs[$disktag] = $diskconfig;
|
$envs[$disktag] = $diskconfig;
|
||||||
}
|
}
|
||||||
if ($operatedisk) {
|
if ($operatedisk) {
|
||||||
|
if (isset($arr['disktag_newname']) && $arr['disktag_newname']!='') {
|
||||||
|
$envs['disktag'] = str_replace($arr['disktag_rename'], $arr['disktag_newname'], getConfig('disktag'));
|
||||||
|
$envs[$arr['disktag_newname']] = $envs[$arr['disktag_rename']];
|
||||||
|
$envs[$arr['disktag_rename']] = '';
|
||||||
|
} else {
|
||||||
$disktags = array_unique($disktags);
|
$disktags = array_unique($disktags);
|
||||||
foreach ($disktags as $disktag) if ($disktag!='') $disktag_s .= $disktag . '|';
|
foreach ($disktags as $disktag) if ($disktag!='') $disktag_s .= $disktag . '|';
|
||||||
if ($disktag_s!='') $envs['disktag'] = substr($disktag_s, 0, -1);
|
if ($disktag_s!='') $envs['disktag'] = substr($disktag_s, 0, -1);
|
||||||
else $envs['disktag'] = '';
|
else $envs['disktag'] = '';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$envs = array_filter($envs, 'array_value_isnot_null');
|
$envs = array_filter($envs, 'array_value_isnot_null');
|
||||||
ksort($envs);
|
ksort($envs);
|
||||||
$response = updateEnvironment($envs, $_SERVER['function_name'], $_SERVER['Region'], $_SERVER['namespace'], getConfig('SecretId'), getConfig('SecretKey'));
|
$response = updateEnvironment($envs, $_SERVER['function_name'], $_SERVER['Region'], $_SERVER['namespace'], getConfig('SecretId'), getConfig('SecretKey'));
|
||||||
@@ -539,7 +547,7 @@ function updateProgram($function_name, $Region, $Namespace, $SecretId, $SecretKe
|
|||||||
$headers['X-TC-Timestamp'] = $timestamp;
|
$headers['X-TC-Timestamp'] = $timestamp;
|
||||||
$headers['X-TC-Version'] = $version;
|
$headers['X-TC-Version'] = $version;
|
||||||
$headers['X-TC-Region'] = $region;
|
$headers['X-TC-Region'] = $region;
|
||||||
return curl_request('https://'.$host, $payload, $headers)['body'];
|
return curl('POST', 'https://'.$host, $payload, $headers)['body'];
|
||||||
}
|
}
|
||||||
|
|
||||||
function api_error($response)
|
function api_error($response)
|
||||||
|
|||||||
@@ -8,12 +8,25 @@ Demo: https://herooneindex.herokuapp.com/
|
|||||||
How to Install: Click the button [](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 [](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可能会反应不过来,不跳转到微软,导致添加失败,请不要删除这个盘,再添加一次相同标签的盘就可以了。
|
||||||
|
|
||||||
@@ -91,5 +104,15 @@ If there is 'index.html' file, program will only show the content of 'index.html
|
|||||||
Click 'EditTime' or 'Size', the list will sort by time or size, Click 'File' can resume sort.
|
Click 'EditTime' or 'Size', the list will sort by time or size, Click 'File' can resume sort.
|
||||||
点击“时间”、“大小”,可以排序显示,点“文件”恢复原样。
|
点击“时间”、“大小”,可以排序显示,点“文件”恢复原样。
|
||||||
|
|
||||||
|
# Functional files 功能性文件
|
||||||
|
### favicon.ico
|
||||||
|
put it in the showing home folder of FIRST disk (maybe not root of onedrive). 放在第一个盘的显示目录(不一定是onedrive根目录)。
|
||||||
|
### index.html
|
||||||
|
show content of index.html as html. 将index.html以静态网页显示出来。
|
||||||
|
### head.md readme.md
|
||||||
|
it will showed at top or bottom as markdown. 以MD语法显示在顶部或底部。
|
||||||
|
### head.omf foot.omf
|
||||||
|
it will showed at top or bottom as html (javascript works!). 以html显示在顶部或底部(可以跑js)。
|
||||||
|
|
||||||
QQ Group: 943919989 (请看完上面的中英双语再加群,谢谢!)
|
QQ Group: 943919989 (请看完上面的中英双语再加群,谢谢!)
|
||||||
Telegram Group: https://t.me/joinchat/I_RVc0bqxuxlT-d0cO7ozw
|
Telegram Group: https://t.me/joinchat/I_RVc0bqxuxlT-d0cO7ozw
|
||||||
|
|||||||
@@ -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> </td><td align="right"> - </td><td> </td></tr>
|
||||||
|
<!--BackArrowEnd-->
|
||||||
|
<!--ListStart-->
|
||||||
|
<!--IsFolderStart-->
|
||||||
|
<!--FolderListStart-->
|
||||||
|
<tr><td><a href="<!--FileEncodeReplaceUrl-->/"><!--FileEncodeReplaceName-->/</a></td><td align="right"><!--lastModifiedDateTime--></td><td align="right"> - </td><td> </td></tr>
|
||||||
|
<!--FolderListEnd-->
|
||||||
|
<!--FileListStart-->
|
||||||
|
<tr><td><a href="<!--FileEncodeReplaceUrl-->"><!--FileEncodeReplaceName--></a></td><td align="right"><!--lastModifiedDateTime--></td><td align="right"><!--size--></td><td> </td></tr>
|
||||||
|
<!--FileListEnd-->
|
||||||
|
<!--IsFolderEnd-->
|
||||||
|
<!--ListEnd-->
|
||||||
|
<tr><th colspan="4"><hr></th></tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
+23
-19
@@ -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=='') {
|
if (str.substr(-1)==' ') str=str.substr(0, str.length-1);
|
||||||
str=document.getElementById('file_a'+num).getElementsByTagName("img")[0].alt;
|
if (str.substr(-1)=='/') str=str.substr(0, str.length-1);
|
||||||
if (str=='') {
|
if (str.substr(-8)=='?preview') str=str.substr(0, str.length-8);
|
||||||
alert('<!--constStr@GetFileNameFail-->');
|
if (str.lastIndexOf('/')>-1) str=str.substr(str.lastIndexOf('/')+1);
|
||||||
operatediv_close(action);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (str.substr(-1)==' ') str=str.substr(0,str.length-1);
|
|
||||||
}
|
}
|
||||||
document.getElementById(action + '_div').style.display='';
|
document.getElementById(action + '_div').style.display='';
|
||||||
document.getElementById(action + '_label').innerText=str;//.replace(/&/,'&');
|
document.getElementById(action + '_label').innerText=str;//.replace(/&/,'&');
|
||||||
@@ -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-->
|
||||||
|
|||||||
@@ -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%"><dir></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>
|
||||||
@@ -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
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -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']) { ?>
|
||||||
|
|||||||
+392
-565
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user