Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
01ff467b07 | ||
|
|
da012e8009 | ||
|
|
37462b5e9a | ||
|
|
0cfccddc4d | ||
|
|
3b2251fe82 | ||
|
|
69f74da711 | ||
|
|
5c42aef340 | ||
|
|
0fb6614332 | ||
|
|
858fa2811a | ||
|
|
d4d5895455 | ||
|
|
09553fff82 | ||
|
|
0452f7f278 | ||
|
|
9383978499 | ||
|
|
aa15da3ffb |
+25
-20
@@ -70,7 +70,7 @@ $constStr = [
|
||||
'diskname' => 'The disk name you want show.',
|
||||
'disktag' => 'A tag used in store config and url.',
|
||||
'downloadencrypt' => '0 or 1. if 1, the files in encrypt folder can be downloaded without password',
|
||||
'background' => 'Set an url as background photo, or put a \'background.jpg\' at showed path.',
|
||||
'background' => 'Set an url as background photo.',
|
||||
'guestup_path' => 'Set guest upload dir, before set this, the files in this dir will show as normal.',
|
||||
'hideFunctionalityFile' => '0 or 1. if 1, some file will not show in list to guest, like readme.md',
|
||||
'passfile' => 'The password of dir will save in this file.',
|
||||
@@ -85,7 +85,7 @@ $constStr = [
|
||||
'diskname' => '这个盘你想显示什么名称。',
|
||||
'disktag' => '一个标签,用于保存配置,多盘时会显示在url中。',
|
||||
'downloadencrypt' => '0 或 1。如果 1, 那加密目录内的文件可以不需要密码就能下载。',
|
||||
'background' => '设置一个url作为背景,或者在你显示的目录放一个background.jpg文件。',
|
||||
'background' => '设置一个url作为背景。',
|
||||
'guestup_path' => '设置游客上传路径(图床路径),不设置这个值时该目录内容会正常列文件出来,设置后只有上传界面,不显示其中文件(登录后显示)。',
|
||||
'hideFunctionalityFile' => '0 或 1。如果 1, 某些文件不列表给游客看,但它的功能正常,比如readme.md',
|
||||
'passfile' => '自定义密码文件的名字,可以是\'pppppp\',也可以是\'aaaa.txt\'等等;列目录时不会显示,只有知道密码才能查看或下载此文件。密码是这个文件的内容,可以空格、可以中文;',
|
||||
@@ -114,7 +114,7 @@ $constStr = [
|
||||
'diskname' => '이 디스크에 어떤 이름을 표시 하시겠습니까?',
|
||||
'disktag' => '레이블은 구성을 저장하는 데 사용되며 디스크가 여러 개인 경우 URL에 표시됩니다.',
|
||||
'downloadencrypt' => '',
|
||||
'background' => 'URL을 배경으로 설정하거나 표시하는 디렉토리에 background.jpg 파일을 넣으십시오.',
|
||||
'background' => 'URL을 배경으로 설정하거나 표시하는.',
|
||||
'guestup_path' => '방문자의 업로드 경로 (맵 베드 경로)를 설정합니다.이 값을 설정하지 않으면 디렉토리의 내용이 파일로 표시되고 설정 후에는 업로드 인터페이스 만 표시되고 파일은 표시되지 않습니다 (로그인 후 표시).',
|
||||
'passfile' => '사용자 정의 비밀번호 파일의 이름은 \'pppppp\' \'aaaa.txt \'등이 될 수 있으며 디렉토리가 나열되어 있으면 표시되지 않으며 비밀번호를 알고있는 경우에만이 파일을 보거나 다운로드 할 수 있습니다. 암호는이 파일의 내용이며 공백이거나 한국어 일 수 있습니다.',
|
||||
'public_path' => 'API 긴 링크 액세스를 사용하는 경우 네트워크 디스크 파일의 경로가 표시됩니다. 설정되지 않은 경우 기본적으로 루트 디렉토리로 설정됩니다.',
|
||||
@@ -572,10 +572,6 @@ $constStr = [
|
||||
],
|
||||
'defaultSitename' => [
|
||||
'en-us' => 'OneManager',
|
||||
'zh-cn' => 'OneManager',
|
||||
'ja' => 'OneManager',
|
||||
'ko-kr' => 'OneManager',
|
||||
'fa' => 'OneManager',
|
||||
],
|
||||
'SavingToken' => [
|
||||
'en-us' => 'Saving refresh_token!',
|
||||
@@ -626,33 +622,42 @@ $constStr = [
|
||||
'ko-kr' => 'Onedrive 표시 이름',
|
||||
'fa' => 'نام نشان داده شده Onedrive',
|
||||
],
|
||||
'OndriveVerMS' => [
|
||||
'en-us' => 'default(Onedrive, Onedrive for business)',
|
||||
'zh-cn' => '默认(支持商业版与个人版)',
|
||||
'ja' => 'デフォルト(商用版および個人版をサポート)',
|
||||
'ko-kr' => '기본 (상업용 및 개인용 버전 지원)',
|
||||
'fa' => 'پیش فرض(Onedrive, Onedrive for business)',
|
||||
'DriveVerMS' => [
|
||||
'en-us' => 'Onedrive, Onedrive for business',
|
||||
'zh-cn' => '国际版(商业版与个人版)',
|
||||
],
|
||||
'OndriveVerCN' => [
|
||||
'DriveVerCN' => [
|
||||
'en-us' => 'Onedrive in China',
|
||||
'zh-cn' => '世纪互联版',
|
||||
'ja' => '中国のOnedrive',
|
||||
'ko-kr' => '중국 Onedrive',
|
||||
'fa' => 'Onedrive در چین',
|
||||
],
|
||||
'OndriveVerMSC' =>[
|
||||
'en-us' => 'default but use customer app id & secret',
|
||||
'zh-cn' => '国际版,自己申请应用ID与机密',
|
||||
'ja' => '国際版、アプリケーションIDとシークレットを自分で申請する',
|
||||
'ko-kr' => '국제 버전, 응용 프로그램 ID 및 비밀 신청',
|
||||
'CustomIdSecret' => [
|
||||
'en-us' => 'Use custom client id & secret',
|
||||
'zh-cn' => '自己申请应用ID与机密',
|
||||
'ja' => 'アプリケーションIDとシークレットを自分で申請する',
|
||||
'ko-kr' => '응용 프로그램 ID 및 비밀 신청',
|
||||
'fa' => 'به طور پیش فرض اما از شناسه برنامه و سکرت استفاده کنید',
|
||||
],
|
||||
'GetSecretIDandKEY' => [
|
||||
'en-us' => 'Get customer app id & secret',
|
||||
'en-us' => 'Get custom client id & secret',
|
||||
'zh-cn' => '申请应用ID与机密',
|
||||
'ja' => 'アプリケーションIDとシークレット',
|
||||
'fa' => 'دریافت شناسه برنامه و سکرت',
|
||||
],
|
||||
'UseSharepointInstead' => [
|
||||
'en-us' => 'Use space in Sharepoint website instead of Onedrive',
|
||||
'zh-cn' => '使用Sharepoint网站的空间,不使用Onedrive',
|
||||
],
|
||||
'GetSharepointName' => [
|
||||
'en-us' => 'Login office.com and click the SharePoint, create a website or find an exist website, input the name below',
|
||||
'zh-cn' => '登录office.com,点击Sharepoint,创建一个网站或使用原有网站,然后将它的名字填在下方',
|
||||
],
|
||||
'InputSharepointName' => [
|
||||
'en-us' => 'Input the name of Sharepoint website',
|
||||
'zh-cn' => '输入Sharepoint网站的名称',
|
||||
],
|
||||
'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!',
|
||||
'zh-cn' => '标签只能以字母开头,以字母或数字结尾,至少2位',
|
||||
|
||||
+129
-55
@@ -17,11 +17,15 @@ $Base64Env = [
|
||||
//'passfile',
|
||||
'sitename',
|
||||
//'theme',
|
||||
//'Onedrive_ver',
|
||||
//'Drive_ver',
|
||||
//'Drive_custom',
|
||||
//'client_id',
|
||||
'client_secret',
|
||||
'domain_path',
|
||||
'guestup_path',
|
||||
//'usesharepoint',
|
||||
'sharepointname',
|
||||
//'siteid',
|
||||
'public_path',
|
||||
//'refresh_token',
|
||||
//'token_expires',
|
||||
@@ -62,26 +66,34 @@ $ShowedCommonEnv = [
|
||||
];
|
||||
|
||||
$InnerEnv = [
|
||||
'Onedrive_ver',
|
||||
'Drive_ver',
|
||||
'Drive_custom',
|
||||
'client_id',
|
||||
'client_secret',
|
||||
'diskname',
|
||||
'domain_path',
|
||||
'downloadencrypt',
|
||||
'guestup_path',
|
||||
'usesharepoint',
|
||||
'sharepointname',
|
||||
'siteid',
|
||||
'public_path',
|
||||
'refresh_token',
|
||||
'token_expires',
|
||||
];
|
||||
|
||||
$ShowedInnerEnv = [
|
||||
//'Onedrive_ver',
|
||||
//'Drive_ver',
|
||||
//'Drive_custom',
|
||||
//'client_id',
|
||||
//'client_secret',
|
||||
'diskname',
|
||||
'domain_path',
|
||||
'downloadencrypt',
|
||||
'guestup_path',
|
||||
//'usesharepoint',
|
||||
//'sharepointname',
|
||||
//'siteid',
|
||||
'public_path',
|
||||
//'refresh_token',
|
||||
//'token_expires',
|
||||
@@ -127,17 +139,19 @@ function config_oauth()
|
||||
$_SERVER['sitename'] = getConfig('sitename');
|
||||
if (empty($_SERVER['sitename'])) $_SERVER['sitename'] = getconstStr('defaultSitename');
|
||||
$_SERVER['redirect_uri'] = 'https://scfonedrive.github.io';
|
||||
|
||||
if (getConfig('Onedrive_ver')=='MS') {
|
||||
if (getConfig('Drive_ver')=='MS') {
|
||||
// MS
|
||||
// https://portal.azure.com
|
||||
$_SERVER['client_id'] = '4da3e7f2-bf6d-467c-aaf0-578078f0bf7c';
|
||||
$_SERVER['client_secret'] = '7/+ykq2xkfx:.DWjacuIRojIaaWL0QI6';
|
||||
//$_SERVER['client_id'] = '4da3e7f2-bf6d-467c-aaf0-578078f0bf7c';
|
||||
//$_SERVER['client_secret'] = '7/+ykq2xkfx:.DWjacuIRojIaaWL0QI6';
|
||||
$_SERVER['client_id'] = '734ef928-d74c-4555-8d1b-d942fa0a1a41';
|
||||
$_SERVER['client_secret'] = ':EK[e0/4vQ@mQgma8LmnWb6j4_C1CSIW';
|
||||
$_SERVER['oauth_url'] = 'https://login.microsoftonline.com/common/oauth2/v2.0/';
|
||||
$_SERVER['api_url'] = 'https://graph.microsoft.com/v1.0/me/drive/root';
|
||||
$_SERVER['scope'] = 'https://graph.microsoft.com/Files.ReadWrite.All offline_access';
|
||||
if (getConfig('usesharepoint')=='on') $_SERVER['api_url'] = 'https://graph.microsoft.com/v1.0/sites/' . getConfig('siteid') . '/drive/root';
|
||||
}
|
||||
if (getConfig('Onedrive_ver')=='CN') {
|
||||
if (getConfig('Drive_ver')=='CN') {
|
||||
// CN
|
||||
// https://portal.azure.cn
|
||||
$_SERVER['client_id'] = '04c3ca0b-8d07-4773-85ad-98b037d25631';
|
||||
@@ -145,21 +159,37 @@ function config_oauth()
|
||||
$_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['scope'] = 'https://microsoftgraph.chinacloudapi.cn/Files.ReadWrite.All offline_access';
|
||||
}
|
||||
if (getConfig('Onedrive_ver')=='MSC') {
|
||||
// MS Customer
|
||||
// https://portal.azure.com
|
||||
$_SERVER['client_id'] = getConfig('client_id');
|
||||
$_SERVER['client_secret'] = getConfig('client_secret');
|
||||
$_SERVER['oauth_url'] = 'https://login.microsoftonline.com/common/oauth2/v2.0/';
|
||||
$_SERVER['api_url'] = 'https://graph.microsoft.com/v1.0/me/drive/root';
|
||||
$_SERVER['scope'] = 'https://graph.microsoft.com/Files.ReadWrite.All offline_access';
|
||||
if (getConfig('usesharepoint')=='on') $_SERVER['api_url'] = 'https://microsoftgraph.chinacloudapi.cn/v1.0/sites/' . getConfig('siteid') . '/drive/root';
|
||||
}
|
||||
|
||||
if (getConfig('Drive_custom')=='on') {
|
||||
// Customer
|
||||
$_SERVER['client_id'] = getConfig('client_id');
|
||||
$_SERVER['client_secret'] = getConfig('client_secret');
|
||||
}
|
||||
$_SERVER['client_secret'] = urlencode($_SERVER['client_secret']);
|
||||
$_SERVER['scope'] = urlencode($_SERVER['scope']);
|
||||
}
|
||||
|
||||
function get_siteid($access_token)
|
||||
{
|
||||
if (getConfig('Drive_ver')=='MS') $url = 'https://graph.microsoft.com/v1.0/sites/root:/sites/'.getConfig('sharepointname');
|
||||
if (getConfig('Drive_ver')=='CN') $url = 'https://microsoftgraph.chinacloudapi.cn/v1.0/sites/root:/sites/'.getConfig('sharepointname');
|
||||
$i=0;
|
||||
$response = [];
|
||||
while ($url!=''&&$response['stat']!=200&&$i<4) {
|
||||
$response = curl_request($url, false, ['Authorization' => 'Bearer ' . $access_token]);
|
||||
$i++;
|
||||
//echo 'https://graph.microsoft.com/v1.0/sites/root:/sites/'.getConfig('sharepointname').$response['stat'].$response['body'].'
|
||||
//';
|
||||
}
|
||||
if ($response['stat']!=200) {
|
||||
error_log('failed to get siteid. response' . json_encode($response));
|
||||
throw new Exception($response['stat'].', failed to get siteid.'.$response['body']);
|
||||
}
|
||||
return json_decode($response['body'],true)['id'];
|
||||
}
|
||||
|
||||
function getListpath($domain)
|
||||
{
|
||||
$domain_path1 = getConfig('domain_path');
|
||||
@@ -230,7 +260,7 @@ function array_value_isnot_null($arr)
|
||||
return $arr!=='';
|
||||
}
|
||||
|
||||
function curl_request($url, $data = false, $headers = [])
|
||||
function curl_request($url, $data = false, $headers = [], $returnheader = 0)
|
||||
{
|
||||
if (!isset($headers['Accept'])) $headers['Accept'] = '*/*';
|
||||
//if (!isset($headers['Referer'])) $headers['Referer'] = $url;
|
||||
@@ -248,14 +278,23 @@ function curl_request($url, $data = false, $headers = [])
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_HEADER, 0);
|
||||
curl_setopt($ch, CURLOPT_HEADER, $returnheader);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $sendHeaders);
|
||||
//$response['body'] = curl_exec($ch);
|
||||
if ($returnheader) {
|
||||
list($returnhead, $response['body']) = explode("\r\n\r\n", curl_exec($ch));
|
||||
foreach (explode("\r\n", $returnhead) as $head) {
|
||||
$tmp = explode(': ', $head);
|
||||
$heads[$tmp[0]] = $tmp[1];
|
||||
}
|
||||
$response['returnhead'] = $heads;
|
||||
} else {
|
||||
$response['body'] = curl_exec($ch);
|
||||
}
|
||||
$response['stat'] = curl_getinfo($ch,CURLINFO_HTTP_CODE);
|
||||
curl_close($ch);
|
||||
//if ($response['stat']==0) return curl_request($url, $data, $headers);
|
||||
return $response;
|
||||
}
|
||||
|
||||
@@ -513,26 +552,8 @@ function main($path)
|
||||
if ($constStr['language']=='') $constStr['language'] = 'en-us';
|
||||
$_SERVER['language'] = $constStr['language'];
|
||||
$_SERVER['PHP_SELF'] = path_format($_SERVER['base_path'] . $path);
|
||||
$_SERVER['base_disk_path'] = $_SERVER['base_path'];
|
||||
$disktags = explode("|",getConfig('disktag'));
|
||||
// echo 'count$disk:'.count($disktags);
|
||||
if (count($disktags)>1) {
|
||||
if ($path=='/'||$path=='') return output('', 302, [ 'Location' => path_format($_SERVER['base_path'].'/'.$disktags[0].'/') ]);
|
||||
$_SERVER['disktag'] = $path;
|
||||
$pos = strpos($path, '/');
|
||||
if ($pos>1) $_SERVER['disktag'] = substr($path, 0, $pos);
|
||||
if (!in_array($_SERVER['disktag'], $disktags)) return message('<meta http-equiv="refresh" content="2;URL='.$_SERVER['base_path'].'">Please visit from <a href="'.$_SERVER['base_path'].'">Home Page</a>.', 'Error', 404);
|
||||
$path = substr($path, strlen('/'.$_SERVER['disktag']));
|
||||
if ($_SERVER['disktag']!='') $_SERVER['base_disk_path'] = path_format($_SERVER['base_disk_path']. '/' . $_SERVER['disktag'] . '/');
|
||||
} else $_SERVER['disktag'] = $disktags[0];
|
||||
// echo 'main.disktag:'.$_SERVER['disktag'].',path:'.$path.'
|
||||
//';
|
||||
$_SERVER['list_path'] = getListpath($_SERVER['HTTP_HOST']);
|
||||
if ($_SERVER['list_path']=='') $_SERVER['list_path'] = '/';
|
||||
$_SERVER['is_guestup_path'] = is_guestup_path($path);
|
||||
$_SERVER['ajax']=0;
|
||||
if (isset($_SERVER['HTTP_X_REQUESTED_WITH'])) if ($_SERVER['HTTP_X_REQUESTED_WITH']=='XMLHttpRequest') $_SERVER['ajax']=1;
|
||||
|
||||
if (getConfig('admin')=='') return install();
|
||||
if (getConfig('adminloginpage')=='') {
|
||||
$adminloginpage = 'admin';
|
||||
} else {
|
||||
@@ -568,7 +589,26 @@ function main($path)
|
||||
return output('<script>alert(\''.getconstStr('SetSecretsFirst').'\');</script>', 302, [ 'Location' => $url ]);
|
||||
}
|
||||
|
||||
if (getConfig('admin')=='') return install();
|
||||
$_SERVER['base_disk_path'] = $_SERVER['base_path'];
|
||||
$disktags = explode("|",getConfig('disktag'));
|
||||
// echo 'count$disk:'.count($disktags);
|
||||
if (count($disktags)>1) {
|
||||
if ($path=='/'||$path=='') return output('', 302, [ 'Location' => path_format($_SERVER['base_path'].'/'.$disktags[0].'/') ]);
|
||||
$_SERVER['disktag'] = $path;
|
||||
$pos = strpos($path, '/');
|
||||
if ($pos>1) $_SERVER['disktag'] = substr($path, 0, $pos);
|
||||
if (!in_array($_SERVER['disktag'], $disktags)) return message('<meta http-equiv="refresh" content="2;URL='.$_SERVER['base_path'].'">Please visit from <a href="'.$_SERVER['base_path'].'">Home Page</a>.', 'Error', 404);
|
||||
$path = substr($path, strlen('/'.$_SERVER['disktag']));
|
||||
if ($_SERVER['disktag']!='') $_SERVER['base_disk_path'] = path_format($_SERVER['base_disk_path']. '/' . $_SERVER['disktag'] . '/');
|
||||
} else $_SERVER['disktag'] = $disktags[0];
|
||||
// echo 'main.disktag:'.$_SERVER['disktag'].',path:'.$path.'
|
||||
//';
|
||||
$_SERVER['list_path'] = getListpath($_SERVER['HTTP_HOST']);
|
||||
if ($_SERVER['list_path']=='') $_SERVER['list_path'] = '/';
|
||||
$_SERVER['is_guestup_path'] = is_guestup_path($path);
|
||||
$_SERVER['ajax']=0;
|
||||
if (isset($_SERVER['HTTP_X_REQUESTED_WITH'])) if ($_SERVER['HTTP_X_REQUESTED_WITH']=='XMLHttpRequest') $_SERVER['ajax']=1;
|
||||
|
||||
config_oauth();
|
||||
if ($_SERVER['admin']) if (isset($_GET['AddDisk'])||isset($_GET['authorization_code'])) return get_refresh_token();
|
||||
$refresh_token = getConfig('refresh_token');
|
||||
@@ -1189,11 +1229,11 @@ function get_refresh_token()
|
||||
$tmp = curl_request($_SERVER['oauth_url'] . 'token', 'client_id=' . $_SERVER['client_id'] .'&client_secret=' . $_SERVER['client_secret'] . '&grant_type=authorization_code&requested_token_use=on_behalf_of&redirect_uri=' . $_SERVER['redirect_uri'] .'&code=' . $_GET['code']);
|
||||
if ($tmp['stat']==200) $ret = json_decode($tmp['body'], true);
|
||||
if (isset($ret['refresh_token'])) {
|
||||
$tmptoken = $ret['refresh_token'];
|
||||
$refresh_token = $ret['refresh_token'];
|
||||
$str = '
|
||||
refresh_token :<br>';
|
||||
$str .= '
|
||||
<textarea readonly style="width: 95%">' . $tmptoken . '</textarea><br><br>
|
||||
<textarea readonly style="width: 95%">' . $refresh_token . '</textarea><br><br>
|
||||
'.getconstStr('SavingToken').'
|
||||
<script>
|
||||
var texta=document.getElementsByTagName(\'textarea\');
|
||||
@@ -1203,7 +1243,10 @@ function get_refresh_token()
|
||||
document.cookie=\'language=; path=/\';
|
||||
document.cookie=\'disktag=; path=/\';
|
||||
</script>';
|
||||
setConfig([ 'refresh_token' => $tmptoken, 'token_expires' => time()+30*24*60*60 ], $_COOKIE['disktag']);
|
||||
$tmptoken['refresh_token'] = $refresh_token;
|
||||
$tmptoken['token_expires'] = time()+7*24*60*60;
|
||||
if (getConfig('usesharepoint')=='on') $tmptoken['siteid'] = get_siteid($ret['access_token']);
|
||||
setConfig($tmptoken, $_COOKIE['disktag']);
|
||||
savecache('access_token', $ret['access_token'], $ret['expires_in'] - 60);
|
||||
//WaitSCFStat();
|
||||
$str .= '
|
||||
@@ -1216,7 +1259,7 @@ function get_refresh_token()
|
||||
if (isset($_GET['install1'])) {
|
||||
$_SERVER['disktag'] = $_COOKIE['disktag'];
|
||||
config_oauth();
|
||||
if (getConfig('Onedrive_ver')=='MS' || getConfig('Onedrive_ver')=='CN' || getConfig('Onedrive_ver')=='MSC') {
|
||||
if (getConfig('Drive_ver')=='MS' || getConfig('Drive_ver')=='CN') {
|
||||
return message('
|
||||
<a href="" id="a1">'.getconstStr('JumptoOffice').'</a>
|
||||
<script>
|
||||
@@ -1232,18 +1275,23 @@ function get_refresh_token()
|
||||
}
|
||||
}
|
||||
if (isset($_GET['install0'])) {
|
||||
if ($_POST['disktag_add']!='' && ($_POST['Onedrive_ver']=='MS' || $_POST['Onedrive_ver']=='CN' || $_POST['Onedrive_ver']=='MSC')) {
|
||||
if ($_POST['disktag_add']!='' && ($_POST['Drive_ver']=='MS' || $_POST['Drive_ver']=='CN')) {
|
||||
if (in_array($_COOKIE['disktag'], $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);
|
||||
}
|
||||
$_SERVER['disktag'] = $_COOKIE['disktag'];
|
||||
$tmp['disktag_add'] = $_POST['disktag_add'];
|
||||
$tmp['diskname'] = $_POST['diskname'];
|
||||
$tmp['Onedrive_ver'] = $_POST['Onedrive_ver'];
|
||||
if ($_POST['Onedrive_ver']=='MSC') {
|
||||
$tmp['Drive_ver'] = $_POST['Drive_ver'];
|
||||
if ($_POST['Drive_custom']=='on') {
|
||||
$tmp['Drive_custom'] = $_POST['Drive_custom'];
|
||||
$tmp['client_id'] = $_POST['client_id'];
|
||||
$tmp['client_secret'] = $_POST['client_secret'];
|
||||
}
|
||||
if ($_POST['usesharepoint']=='on') {
|
||||
$tmp['usesharepoint'] = $_POST['usesharepoint'];
|
||||
$tmp['sharepointname'] = $_POST['sharepointname'];
|
||||
}
|
||||
$response = setConfigResponse( setConfig($tmp, $_COOKIE['disktag']) );
|
||||
if (api_error($response)) {
|
||||
$html = api_error_msg($response);
|
||||
@@ -1263,26 +1311,40 @@ function get_refresh_token()
|
||||
$deepLink = "/quickstart/graphIO?publicClientSupport=false&appName=OneManager&redirectUrl=".$_SERVER['redirect_uri']."&allowImplicitFlow=false&ru=".urlencode($ru);
|
||||
$app_url = "https://apps.dev.microsoft.com/?deepLink=".urlencode($deepLink);
|
||||
$html = '
|
||||
<div>
|
||||
<form action="?AddDisk&install0" method="post" onsubmit="return notnull(this);">
|
||||
'.getconstStr('OnedriveDiskTag').': ('.getConfig('disktag').')<input type="text" name="disktag_add" placeholder="' . getconstStr('EnvironmentsDescription')['disktag'] . '" style="width:100%"><br>
|
||||
'.getconstStr('OnedriveDiskName').':<input type="text" name="diskname" placeholder="' . getconstStr('EnvironmentsDescription')['diskname'] . '" style="width:100%"><br>
|
||||
Onedrive_Ver:<br>
|
||||
<label><input type="radio" name="Onedrive_ver" value="MS" checked onclick="document.getElementById(\'secret\').style.display=\'none\';">MS: '.getconstStr('OndriveVerMS').'</label><br>
|
||||
<label><input type="radio" name="Onedrive_ver" value="CN" onclick="document.getElementById(\'secret\').style.display=\'none\';">CN: '.getconstStr('OndriveVerCN').'</label><br>
|
||||
<label><input type="radio" name="Onedrive_ver" value="MSC" onclick="document.getElementById(\'secret\').style.display=\'\';">MSC: '.getconstStr('OndriveVerMSC').'
|
||||
<div id="secret" style="display:none">
|
||||
<br>
|
||||
<div>
|
||||
<label><input type="radio" name="Drive_ver" value="MS" checked>MS: '.getconstStr('DriveVerMS').'</label><br>
|
||||
<label><input type="radio" name="Drive_ver" value="CN">CN: '.getconstStr('DriveVerCN').'</label>
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
<label><input type="checkbox" name="Drive_custom" onclick="document.getElementById(\'secret\').style.display=(this.checked?\'\':\'none\');">'.getconstStr('CustomIdSecret').'</label>
|
||||
<div id="secret" style="display:none;margin:10px 35px">
|
||||
<a href="'.$app_url.'" target="_blank">'.getconstStr('GetSecretIDandKEY').'</a><br>
|
||||
client_secret:<input type="text" name="client_secret"><br>
|
||||
client_id:<input type="text" name="client_id" placeholder="12345678-90ab-cdef-ghij-klmnopqrstuv"><br>
|
||||
</div>
|
||||
</label><br>
|
||||
</div>
|
||||
<div>
|
||||
<label><input type="checkbox" name="usesharepoint" onclick="document.getElementById(\'sharepoint\').style.display=(this.checked?\'\':\'none\');">'.getconstStr('UseSharepointInstead').'</label><br>
|
||||
<div id="sharepoint" style="display:none;margin:10px 35px">
|
||||
'.getconstStr('GetSharepointName').'<br>
|
||||
<input type="text" name="sharepointname" placeholder="'.getconstStr('InputSharepointName').'"><br>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<input type="submit" value="'.getconstStr('Submit').'">
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
function notnull(t)
|
||||
{
|
||||
if (t.disktag_add.value==\'\') {
|
||||
alert(\'Input Disk Tag\');
|
||||
alert(\''.getconstStr('OnedriveDiskTag').'\');
|
||||
return false;
|
||||
}
|
||||
envs = [' . $envs . '];
|
||||
@@ -1295,6 +1357,18 @@ function get_refresh_token()
|
||||
alert(\''.getconstStr('TagFormatAlert').'\');
|
||||
return false;
|
||||
}
|
||||
if (t.Drive_custom.checked==true) {
|
||||
if (t.client_secret.value==\'\'||t.client_id.value==\'\') {
|
||||
alert(\'client_id & client_secret\');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (t.usesharepoint.checked==true) {
|
||||
if (t.sharepointname.value==\'\') {
|
||||
alert(\''.getconstStr('InputSharepointName').'\');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
document.cookie=\'disktag=\'+t.disktag_add.value+\'; path=/\';
|
||||
return true;
|
||||
}
|
||||
@@ -1348,7 +1422,7 @@ function EnvOpt($needUpdate = 0)
|
||||
} else {
|
||||
//WaitSCFStat();
|
||||
//sleep(3);
|
||||
$html .= 'Success!<br>
|
||||
$html .= getconstStr('Success') . '!<br>
|
||||
<button onclick="location.href = location.href;">'.getconstStr('Refresh').'</button>';
|
||||
$title = getconstStr('Setup');
|
||||
}
|
||||
|
||||
+1
-1
@@ -118,7 +118,7 @@ function install()
|
||||
if ($_GET['install2']) {
|
||||
if ($_POST['admin']!='') {
|
||||
$tmp['admin'] = $_POST['admin'];
|
||||
$tmp['language'] = $_POST['language'];
|
||||
$tmp['language'] = $_COOKIE['language'];
|
||||
$response = setConfig($tmp);
|
||||
if (api_error($response)) {
|
||||
$html = api_error_msg($response);
|
||||
|
||||
+17
-3
@@ -139,6 +139,7 @@ function install()
|
||||
if ($_GET['install1']) {
|
||||
//if ($_POST['admin']!='') {
|
||||
$tmp['language'] = $_POST['language'];
|
||||
$tmp['Region'] = $_POST['Region'];
|
||||
$SecretId = getConfig('SecretId');
|
||||
if ($SecretId=='') {
|
||||
$SecretId = $_POST['SecretId'];
|
||||
@@ -149,11 +150,9 @@ function install()
|
||||
$SecretKey = $_POST['SecretKey'];
|
||||
$tmp['SecretKey'] = $SecretKey;
|
||||
}
|
||||
$response = json_decode(SetbaseConfig($tmp, $_SERVER['function_name'], $_SERVER['Region'], $_SERVER['namespace'], $SecretId, $SecretKey), true)['Response'];
|
||||
$response = json_decode(SetbaseConfig($tmp, $_SERVER['function_name'], $_POST['Region'], $_SERVER['namespace'], $SecretId, $SecretKey), true)['Response'];
|
||||
if (api_error($response)) {
|
||||
$html = api_error_msg($response);
|
||||
$html .= '<br>
|
||||
<button onclick="location.href = location.href;">'.getconstStr('Refresh').'</button>';
|
||||
$title = 'Error';
|
||||
return message($html, $title, 201);
|
||||
} else {
|
||||
@@ -190,6 +189,21 @@ language:<br>';
|
||||
<label>SecretId:<input name="SecretId" type="text" placeholder="" size=""></label><br>
|
||||
<label>SecretKey:<input name="SecretKey" type="text" placeholder="" size=""></label><br>';
|
||||
$html .= '
|
||||
<select class="changelanguage" name="Region">
|
||||
<option value="">选择区域</option>
|
||||
<option value="ap-beijing">华北地区(北京)</option>
|
||||
<option value="ap-chengdu">西南地区(成都)</option>
|
||||
<option value="ap-guangzhou">华南地区(广州)</option>
|
||||
<option value="ap-guangzhou-open">华南地区(广州Open)</option>
|
||||
<option value="ap-hongkong">港澳台地区(中国香港)</option>
|
||||
<option value="ap-mumbai">亚太南部(孟买)</option>
|
||||
<option value="ap-shanghai">华东地区(上海)</option>
|
||||
<option value="ap-shanghai-fsi">华东地区(上海金融)</option>
|
||||
<option value="ap-singapore">亚太东南(新加坡)</option>
|
||||
<option value="ap-tokyo">亚太东北(东京)</option>
|
||||
<option value="na-siliconvalley">美国西部(硅谷)</option>
|
||||
<option value="na-toronto">北美地区(多伦多)</option>
|
||||
</select>(腾讯几个月了还不做出来,只能先弄选择了)<br>
|
||||
<input type="submit" value="'.getconstStr('Submit').'">
|
||||
</form>
|
||||
<script>
|
||||
|
||||
+2
-3
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?php echo $constStr['language']; ?>">
|
||||
<head>
|
||||
<title><?php echo $pretitle; if ($_SERVER['base_disk_path']!=$_SERVER['base_path']) echo ' - ' . getConfig('diskname');?> - <?php echo $_SERVER['sitename'];?></title>
|
||||
<title><?php echo $pretitle; if ($_SERVER['base_disk_path']!=$_SERVER['base_path']) { if (getConfig('diskname')!='') $diskname = getConfig('diskname'); else $diskname = $_SERVER['disktag']; echo ' - ' . $diskname; } ?> - <?php echo $_SERVER['sitename'];?></title>
|
||||
<meta charset=utf-8>
|
||||
<meta http-equiv=X-UA-Compatible content="IE=edge">
|
||||
<meta name=viewport content="width=device-width,initial-scale=1">
|
||||
@@ -705,8 +705,7 @@
|
||||
tmptextarea.select();
|
||||
tmptextarea.setSelectionRange(0, tmptextarea.value.length);
|
||||
document.execCommand("copy");
|
||||
//alert(tmptextarea.innerHTML);
|
||||
alert('Success');
|
||||
alert(tmptextarea.innerHTML+'<?php echo getconstStr('Success'); ?>');
|
||||
}
|
||||
var sort=0;
|
||||
function sortby(string) {
|
||||
|
||||
+41
-57
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?php echo $constStr['language']; ?>">
|
||||
<head>
|
||||
<title><?php echo $pretitle; if ($_SERVER['base_disk_path']!=$_SERVER['base_path']) echo ' - ' . getConfig('diskname');?> - <?php echo $_SERVER['sitename'];?></title>
|
||||
<title><?php echo $pretitle; if ($_SERVER['base_disk_path']!=$_SERVER['base_path']) { if (getConfig('diskname')!='') $diskname = getConfig('diskname'); else $diskname = $_SERVER['disktag']; echo ' - ' . $diskname; } ?> - <?php echo $_SERVER['sitename'];?></title>
|
||||
<meta charset=utf-8>
|
||||
<meta http-equiv=X-UA-Compatible content="IE=edge">
|
||||
<meta name=viewport content="width=device-width,initial-scale=1">
|
||||
@@ -59,6 +59,7 @@
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div style="padding:1px">
|
||||
<?php
|
||||
@@ -67,7 +68,6 @@
|
||||
<a class="login" onclick="login();"><ion-icon name="log-in"></ion-icon><?php echo getconstStr('Login'); ?></a>
|
||||
<?php }
|
||||
} else { ?>
|
||||
|
||||
<li class="operate"><ion-icon name="construct"></ion-icon><?php echo getconstStr('Operate'); ?><ul>
|
||||
<?php if (isset($files['folder'])) { ?>
|
||||
<li><a onclick="showdiv(event,'create','');"><ion-icon name="add-circle"></ion-icon><?php echo getconstStr('Create'); ?></a></li>
|
||||
@@ -79,6 +79,7 @@
|
||||
</ul></li>
|
||||
<?php
|
||||
} ?>
|
||||
|
||||
<select class="changelanguage" name="language" onchange="changelanguage(this.options[this.options.selectedIndex].value)">
|
||||
<option value="">Language</option>
|
||||
<?php
|
||||
@@ -104,7 +105,7 @@
|
||||
<?php foreach ($disktags as $disk) {
|
||||
$diskname = getConfig('diskname', $disk);
|
||||
if ($diskname=='') $diskname = $disk;
|
||||
echo ' <a href="'.path_format($_SERVER['base_path'].'/'.$disk).'"'.($_SERVER['disktag']==$disk?' now':'').'>'.$diskname.'</a>
|
||||
echo ' <a href="'.path_format($_SERVER['base_path'].'/'.$disk.'/').'"'.($_SERVER['disktag']==$disk?' now':'').'>'.$diskname.'</a>
|
||||
';
|
||||
} ?>
|
||||
</div>
|
||||
@@ -112,7 +113,20 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php }
|
||||
if ($files) { ?>
|
||||
if ($files) {
|
||||
if (isset($files['children']['head.md'])) { ?>
|
||||
<div class="list-wrapper" id="head-div">
|
||||
<div class="list-container">
|
||||
<div class="list-header-container">
|
||||
<div class="readme">
|
||||
<div class="markdown-body" id="head">
|
||||
<textarea id="head-md" style="display:none;"><?php echo fetch_files(spurlencode(path_format($path . '/head.md'),'/'))['content']['body']; ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="list-wrapper" id="list-div">
|
||||
<div class="list-container">
|
||||
<div class="list-header-container">
|
||||
@@ -136,8 +150,6 @@
|
||||
</div>
|
||||
<div class="list-body-container">
|
||||
<?php
|
||||
$head = false;
|
||||
$readme = false;
|
||||
$pdfurl = false;
|
||||
$DPvideo = false;
|
||||
if ($_SERVER['is_guestup_path']&&!$_SERVER['admin']) { ?>
|
||||
@@ -247,12 +259,6 @@
|
||||
foreach ($files['children'] as $file) {
|
||||
// Files
|
||||
if (isset($file['file'])) {
|
||||
if (strtolower($file['name']) === 'head.md') $head = $file;
|
||||
if (strtolower($file['name']) === 'readme.md') $readme = $file;
|
||||
if (strtolower($file['name']) === 'index.html' && !$_SERVER['admin']) {
|
||||
$html = curl_request(fetch_files(spurlencode(path_format($path . '/' .$file['name']),'/'))['@microsoft.graph.downloadUrl'])['body'];
|
||||
return output($html,200);
|
||||
}
|
||||
if ($_SERVER['admin'] or !isHideFile($file['name'])) {
|
||||
$filenum++; ?>
|
||||
<tr data-to id="tr<?php echo $filenum;?>">
|
||||
@@ -354,25 +360,7 @@
|
||||
echo 'Unknown path or file.';
|
||||
echo json_encode($files, JSON_PRETTY_PRINT);
|
||||
}
|
||||
if ($head) {
|
||||
echo '
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-wrapper" id="head-div">
|
||||
<div class="list-container">
|
||||
<div class="list-header-container">
|
||||
<div class="readme">
|
||||
<!--<svg class="octicon octicon-book" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3 5h4v1H3V5zm0 3h4V7H3v1zm0 2h4V9H3v1zm11-5h-4v1h4V5zm0 2h-4v1h4V7zm0 2h-4v1h4V9zm2-6v9c0 .55-.45 1-1 1H9.5l-1 1-1-1H2c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h5.5l1 1 1-1H15c.55 0 1 .45 1 1zm-8 .5L7.5 3H2v9h6V3.5zm7-.5H9.5l-.5.5V12h6V3z"></path></svg>
|
||||
<span style="line-height: 16px;vertical-align: top;">'.$head['name'].'</span>-->
|
||||
<div class="markdown-body" id="head">
|
||||
<textarea id="head-md" style="display:none;">' . curl_request(fetch_files(spurlencode(path_format($path . '/' .$head['name']),'/'))['@microsoft.graph.downloadUrl'])['body'] . '
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
}
|
||||
if ($readme) {
|
||||
if (isset($files['children']['readme.md'])) {
|
||||
echo '
|
||||
</div>
|
||||
</div>
|
||||
@@ -381,11 +369,8 @@
|
||||
<div class="list-container">
|
||||
<div class="list-header-container">
|
||||
<div class="readme">
|
||||
<!--<svg class="octicon octicon-book" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3 5h4v1H3V5zm0 3h4V7H3v1zm0 2h4V9H3v1zm11-5h-4v1h4V5zm0 2h-4v1h4V7zm0 2h-4v1h4V9zm2-6v9c0 .55-.45 1-1 1H9.5l-1 1-1-1H2c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h5.5l1 1 1-1H15c.55 0 1 .45 1 1zm-8 .5L7.5 3H2v9h6V3.5zm7-.5H9.5l-.5.5V12h6V3z"></path></svg>
|
||||
<span style="line-height: 16px;vertical-align: top;">'.$readme['name'].'</span>-->
|
||||
<div class="markdown-body" id="readme">
|
||||
<textarea id="readme-md" style="display:none;">' . curl_request(fetch_files(spurlencode(path_format($path . '/' .$readme['name']),'/'))['@microsoft.graph.downloadUrl'])['body'] . '
|
||||
</textarea>
|
||||
<textarea id="readme-md" style="display:none;">' . fetch_files(spurlencode(path_format($path . '/readme.md'),'/'))['content']['body'] . '</textarea>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
@@ -575,18 +560,24 @@ echo 'IPv4: ' ,$ip, "\n";
|
||||
<center>
|
||||
<span id="clock"><span> <!--顶部span的id为clock-->
|
||||
<div class="footer_copyright">
|
||||
Copyright © 2019-2020 - <span id="footyear"></span>OneManager,Power_by_逸笙 <em> 主题归彼岸云端版权所有</em>
|
||||
Copyright © 2019-2020 - <span id="footyear"></span>OneManager Powered_by_逸笙 <em> 本主题(归彼岸云端)版权所有</em>
|
||||
</div>
|
||||
</center>
|
||||
|
||||
</body>
|
||||
<?php if ($files) { ?>
|
||||
<?php if ($head||$readme) { ?><link rel="stylesheet" href="//unpkg.zhimg.com/github-markdown-css@3.0.1/github-markdown.css">
|
||||
<?php if (isset($files['children']['head.md'])||isset($files['children']['readme.md'])) { ?><link rel="stylesheet" href="//unpkg.zhimg.com/github-markdown-css@3.0.1/github-markdown.css">
|
||||
<script type="text/javascript" src="//unpkg.zhimg.com/marked@0.6.2/marked.min.js"></script><?php } ?>
|
||||
<?php if (isset($files['folder']) && $_SERVER['is_guestup_path'] && !$_SERVER['admin']) { ?><script type="text/javascript" src="//cdn.bootcss.com/spark-md5/3.0.0/spark-md5.min.js"></script><?php } ?>
|
||||
<?php if ($pdfurl!='') { ?><script src="//cdn.bootcss.com/pdf.js/2.3.200/pdf.min.js"></script><?php } ?>
|
||||
<?php } ?>
|
||||
<script type="text/javascript">
|
||||
function changelanguage(str)
|
||||
{
|
||||
if (str=='Language') str = '';
|
||||
document.cookie='language='+str+'; path=/';
|
||||
location.href = location.href;
|
||||
}
|
||||
<?php if ($files) { ?>
|
||||
var root = '<?php echo $_SERVER["base_disk_path"]; ?>';
|
||||
function path_format(path) {
|
||||
@@ -608,23 +599,6 @@ echo 'IPv4: ' ,$ip, "\n";
|
||||
e.innerHTML += paths[paths.length - 1];
|
||||
e.innerHTML = e.innerHTML.replace(/\s\/\s$/, '')
|
||||
});
|
||||
|
||||
function changelanguage(str)
|
||||
{
|
||||
if (str=='Language') str = '';
|
||||
document.cookie='language='+str+'; path=/';
|
||||
location.href = location.href;
|
||||
}
|
||||
var $head = document.getElementById('head');
|
||||
if ($head) {
|
||||
document.getElementById('head-div').parentNode.insertBefore(document.getElementById('head-div'),document.getElementById('list-div'));
|
||||
$head.innerHTML = marked(document.getElementById('head-md').innerText);
|
||||
|
||||
}
|
||||
var $readme = document.getElementById('readme');
|
||||
if ($readme) {
|
||||
$readme.innerHTML = marked(document.getElementById('readme-md').innerText);
|
||||
}
|
||||
<?php
|
||||
if (isset($_GET['preview'])) { //is preview mode. 在预览时处理 ?>
|
||||
var $url = document.getElementById('url');
|
||||
@@ -737,6 +711,16 @@ echo 'IPv4: ' ,$ip, "\n";
|
||||
}
|
||||
<?php }
|
||||
} else { // view folder. 不预览,即浏览目录时?>
|
||||
var $head = document.getElementById('head');
|
||||
if ($head) {
|
||||
//document.getElementById('head-div').parentNode.insertBefore(document.getElementById('head-div'),document.getElementById('list-div'));
|
||||
$head.innerHTML = marked(document.getElementById('head-md').innerText);
|
||||
|
||||
}
|
||||
var $readme = document.getElementById('readme');
|
||||
if ($readme) {
|
||||
$readme.innerHTML = marked(document.getElementById('readme-md').innerText);
|
||||
}
|
||||
function showthumbnails(obj) {
|
||||
var files=document.getElementsByName('filelist');
|
||||
for ($i=0;$i<files.length;$i++) {
|
||||
@@ -774,8 +758,7 @@ echo 'IPv4: ' ,$ip, "\n";
|
||||
tmptextarea.select();
|
||||
tmptextarea.setSelectionRange(0, tmptextarea.value.length);
|
||||
document.execCommand("copy");
|
||||
alert(tmptextarea.innerHTML);
|
||||
//alert('Success');
|
||||
alert(tmptextarea.innerHTML+'<?php echo getconstStr('Success'); ?>');
|
||||
}
|
||||
var sort=0;
|
||||
function sortby(string) {
|
||||
@@ -1068,6 +1051,7 @@ echo 'IPv4: ' ,$ip, "\n";
|
||||
//window.open(lasturl);
|
||||
document.getElementById('upfile_a_'+tdnum).href = lasturl;
|
||||
document.getElementById('upfile_a1_'+tdnum).href = filename;
|
||||
document.getElementById('upfile_cpbt_'+tdnum).style.display = "";
|
||||
}
|
||||
<?php } ?>
|
||||
EndTime=new Date();
|
||||
@@ -1077,7 +1061,7 @@ echo 'IPv4: ' ,$ip, "\n";
|
||||
} else {
|
||||
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="'+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+'\');"><?php echo getconstStr('CopyUrl'); ?></button></div>';
|
||||
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>';
|
||||
label.innerHTML=StartStr+MiddleStr;
|
||||
uploadbuttonshow();
|
||||
<?php if ($_SERVER['admin']) { ?>
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
20200321-1830.15
|
||||
<font color=red>本次更新后,'index.html'功能在其它主题会导致bug。</font>
|
||||
文本类文件将缓存;添加hideFunctionalityFile开关;在添加网盘时会显示已经在用的标签。
|
||||
<font color=red>after this update, then 'index.html' function will bug in other theme.</font>
|
||||
cache text file content;add hideFunctionalityFile;list exist disktags when AddDisk。
|
||||
20200326-0001.16
|
||||
You can add sharepoint site drive as a disk, <font color=red>you must reinstall after update</font>.
|
||||
可以将sharepoint网站添加成一个盘,<font color=red>由于结构改变,升级后只能重装</font>。
|
||||
|
||||
20200321-1830.15
|
||||
本次更新后,'index.html'功能在其它主题会导致bug。
|
||||
文本类文件将缓存;添加hideFunctionalityFile开关;在添加网盘时会显示已经在用的标签。
|
||||
after this update, then 'index.html' function will bug in other theme.
|
||||
cache text file content;add hideFunctionalityFile;list exist disktags when AddDisk。
|
||||
20200311-2150.14
|
||||
Add a switch, can download a known file or not, while the folder is encrypted.
|
||||
Hide time and size in mobile.
|
||||
|
||||
Reference in New Issue
Block a user