commit
690acfb8b2
39
conststr.php
39
conststr.php
|
@ -572,10 +572,6 @@ $constStr = [
|
||||||
],
|
],
|
||||||
'defaultSitename' => [
|
'defaultSitename' => [
|
||||||
'en-us' => 'OneManager',
|
'en-us' => 'OneManager',
|
||||||
'zh-cn' => 'OneManager',
|
|
||||||
'ja' => 'OneManager',
|
|
||||||
'ko-kr' => 'OneManager',
|
|
||||||
'fa' => 'OneManager',
|
|
||||||
],
|
],
|
||||||
'SavingToken' => [
|
'SavingToken' => [
|
||||||
'en-us' => 'Saving refresh_token!',
|
'en-us' => 'Saving refresh_token!',
|
||||||
|
@ -626,33 +622,42 @@ $constStr = [
|
||||||
'ko-kr' => 'Onedrive 표시 이름',
|
'ko-kr' => 'Onedrive 표시 이름',
|
||||||
'fa' => 'نام نشان داده شده Onedrive',
|
'fa' => 'نام نشان داده شده Onedrive',
|
||||||
],
|
],
|
||||||
'OndriveVerMS' => [
|
'DriveVerMS' => [
|
||||||
'en-us' => 'default(Onedrive, Onedrive for business)',
|
'en-us' => 'Onedrive, Onedrive for business',
|
||||||
'zh-cn' => '默认(支持商业版与个人版)',
|
'zh-cn' => '国际版(商业版与个人版)',
|
||||||
'ja' => 'デフォルト(商用版および個人版をサポート)',
|
|
||||||
'ko-kr' => '기본 (상업용 및 개인용 버전 지원)',
|
|
||||||
'fa' => 'پیش فرض(Onedrive, Onedrive for business)',
|
|
||||||
],
|
],
|
||||||
'OndriveVerCN' => [
|
'DriveVerCN' => [
|
||||||
'en-us' => 'Onedrive in China',
|
'en-us' => 'Onedrive in China',
|
||||||
'zh-cn' => '世纪互联版',
|
'zh-cn' => '世纪互联版',
|
||||||
'ja' => '中国のOnedrive',
|
'ja' => '中国のOnedrive',
|
||||||
'ko-kr' => '중국 Onedrive',
|
'ko-kr' => '중국 Onedrive',
|
||||||
'fa' => 'Onedrive در چین',
|
'fa' => 'Onedrive در چین',
|
||||||
],
|
],
|
||||||
'OndriveVerMSC' =>[
|
'CustomIdSecret' => [
|
||||||
'en-us' => 'default but use customer app id & secret',
|
'en-us' => 'Use custom client id & secret',
|
||||||
'zh-cn' => '国际版,自己申请应用ID与机密',
|
'zh-cn' => '自己申请应用ID与机密',
|
||||||
'ja' => '国際版、アプリケーションIDとシークレットを自分で申請する',
|
'ja' => 'アプリケーションIDとシークレットを自分で申請する',
|
||||||
'ko-kr' => '국제 버전, 응용 프로그램 ID 및 비밀 신청',
|
'ko-kr' => '응용 프로그램 ID 및 비밀 신청',
|
||||||
'fa' => 'به طور پیش فرض اما از شناسه برنامه و سکرت استفاده کنید',
|
'fa' => 'به طور پیش فرض اما از شناسه برنامه و سکرت استفاده کنید',
|
||||||
],
|
],
|
||||||
'GetSecretIDandKEY' => [
|
'GetSecretIDandKEY' => [
|
||||||
'en-us' => 'Get customer app id & secret',
|
'en-us' => 'Get custom client id & secret',
|
||||||
'zh-cn' => '申请应用ID与机密',
|
'zh-cn' => '申请应用ID与机密',
|
||||||
'ja' => 'アプリケーションIDとシークレット',
|
'ja' => 'アプリケーションIDとシークレット',
|
||||||
'fa' => 'دریافت شناسه برنامه و سکرت',
|
'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' => [
|
'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位',
|
||||||
|
|
|
@ -17,11 +17,15 @@ $Base64Env = [
|
||||||
//'passfile',
|
//'passfile',
|
||||||
'sitename',
|
'sitename',
|
||||||
//'theme',
|
//'theme',
|
||||||
//'Onedrive_ver',
|
//'Drive_ver',
|
||||||
|
//'Drive_custom',
|
||||||
//'client_id',
|
//'client_id',
|
||||||
'client_secret',
|
'client_secret',
|
||||||
'domain_path',
|
'domain_path',
|
||||||
'guestup_path',
|
'guestup_path',
|
||||||
|
//'usesharepoint',
|
||||||
|
'sharepointname',
|
||||||
|
//'siteid',
|
||||||
'public_path',
|
'public_path',
|
||||||
//'refresh_token',
|
//'refresh_token',
|
||||||
//'token_expires',
|
//'token_expires',
|
||||||
|
@ -62,26 +66,34 @@ $ShowedCommonEnv = [
|
||||||
];
|
];
|
||||||
|
|
||||||
$InnerEnv = [
|
$InnerEnv = [
|
||||||
'Onedrive_ver',
|
'Drive_ver',
|
||||||
|
'Drive_custom',
|
||||||
'client_id',
|
'client_id',
|
||||||
'client_secret',
|
'client_secret',
|
||||||
'diskname',
|
'diskname',
|
||||||
'domain_path',
|
'domain_path',
|
||||||
'downloadencrypt',
|
'downloadencrypt',
|
||||||
'guestup_path',
|
'guestup_path',
|
||||||
|
'usesharepoint',
|
||||||
|
'sharepointname',
|
||||||
|
'siteid',
|
||||||
'public_path',
|
'public_path',
|
||||||
'refresh_token',
|
'refresh_token',
|
||||||
'token_expires',
|
'token_expires',
|
||||||
];
|
];
|
||||||
|
|
||||||
$ShowedInnerEnv = [
|
$ShowedInnerEnv = [
|
||||||
//'Onedrive_ver',
|
//'Drive_ver',
|
||||||
|
//'Drive_custom',
|
||||||
//'client_id',
|
//'client_id',
|
||||||
//'client_secret',
|
//'client_secret',
|
||||||
'diskname',
|
'diskname',
|
||||||
'domain_path',
|
'domain_path',
|
||||||
'downloadencrypt',
|
'downloadencrypt',
|
||||||
'guestup_path',
|
'guestup_path',
|
||||||
|
//'usesharepoint',
|
||||||
|
//'sharepointname',
|
||||||
|
//'siteid',
|
||||||
'public_path',
|
'public_path',
|
||||||
//'refresh_token',
|
//'refresh_token',
|
||||||
//'token_expires',
|
//'token_expires',
|
||||||
|
@ -127,17 +139,19 @@ function config_oauth()
|
||||||
$_SERVER['sitename'] = getConfig('sitename');
|
$_SERVER['sitename'] = getConfig('sitename');
|
||||||
if (empty($_SERVER['sitename'])) $_SERVER['sitename'] = getconstStr('defaultSitename');
|
if (empty($_SERVER['sitename'])) $_SERVER['sitename'] = getconstStr('defaultSitename');
|
||||||
$_SERVER['redirect_uri'] = 'https://scfonedrive.github.io';
|
$_SERVER['redirect_uri'] = 'https://scfonedrive.github.io';
|
||||||
|
if (getConfig('Drive_ver')=='MS') {
|
||||||
if (getConfig('Onedrive_ver')=='MS') {
|
|
||||||
// MS
|
// MS
|
||||||
// https://portal.azure.com
|
// https://portal.azure.com
|
||||||
$_SERVER['client_id'] = '4da3e7f2-bf6d-467c-aaf0-578078f0bf7c';
|
//$_SERVER['client_id'] = '4da3e7f2-bf6d-467c-aaf0-578078f0bf7c';
|
||||||
$_SERVER['client_secret'] = '7/+ykq2xkfx:.DWjacuIRojIaaWL0QI6';
|
//$_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['oauth_url'] = 'https://login.microsoftonline.com/common/oauth2/v2.0/';
|
||||||
$_SERVER['api_url'] = 'https://graph.microsoft.com/v1.0/me/drive/root';
|
$_SERVER['api_url'] = 'https://graph.microsoft.com/v1.0/me/drive/root';
|
||||||
$_SERVER['scope'] = 'https://graph.microsoft.com/Files.ReadWrite.All offline_access';
|
$_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
|
// CN
|
||||||
// https://portal.azure.cn
|
// https://portal.azure.cn
|
||||||
$_SERVER['client_id'] = '04c3ca0b-8d07-4773-85ad-98b037d25631';
|
$_SERVER['client_id'] = '04c3ca0b-8d07-4773-85ad-98b037d25631';
|
||||||
|
@ -145,21 +159,36 @@ function config_oauth()
|
||||||
$_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';
|
||||||
}
|
if (getConfig('usesharepoint')=='on') $_SERVER['api_url'] = 'https://microsoftgraph.chinacloudapi.cn/v1.0/sites/' . getConfig('siteid') . '/drive/root';
|
||||||
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('Drive_custom')=='on') {
|
||||||
|
// Customer
|
||||||
|
$_SERVER['client_id'] = getConfig('client_id');
|
||||||
|
$_SERVER['client_secret'] = getConfig('client_secret');
|
||||||
|
}
|
||||||
$_SERVER['client_secret'] = urlencode($_SERVER['client_secret']);
|
$_SERVER['client_secret'] = urlencode($_SERVER['client_secret']);
|
||||||
$_SERVER['scope'] = urlencode($_SERVER['scope']);
|
$_SERVER['scope'] = urlencode($_SERVER['scope']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_siteid($access_token)
|
||||||
|
{
|
||||||
|
$i=0;
|
||||||
|
$response = [];
|
||||||
|
while ($response['stat']!=200&&$i<4) {
|
||||||
|
$response = curl_request('https://graph.microsoft.com/v1.0/sites/root:/sites/'.getConfig('sharepointname'), false, ['Authorization' => 'Bearer ' . $access_token]);
|
||||||
|
$i++;
|
||||||
|
echo 'https://graph.microsoft.com/v1.0/sites/root:/sites/'.getConfig('sharepointname').$response['stat'].$response['body'].'
|
||||||
|
';
|
||||||
|
}
|
||||||
|
return json_decode($response['body'],true)['id'];
|
||||||
|
//$_SERVER['api_url'] = 'https://graph.microsoft.com/v1.0/sites/' . $tmp['siteid'] . '/drive/root';
|
||||||
|
//setConfig($tmp);
|
||||||
|
|
||||||
|
//error_log('failed to get siteid. response' . json_encode($response));
|
||||||
|
//throw new Exception($response['stat'].', failed to get siteid.'.$response['body']);
|
||||||
|
}
|
||||||
|
|
||||||
function getListpath($domain)
|
function getListpath($domain)
|
||||||
{
|
{
|
||||||
$domain_path1 = getConfig('domain_path');
|
$domain_path1 = getConfig('domain_path');
|
||||||
|
@ -1189,11 +1218,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']);
|
$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 ($tmp['stat']==200) $ret = json_decode($tmp['body'], true);
|
||||||
if (isset($ret['refresh_token'])) {
|
if (isset($ret['refresh_token'])) {
|
||||||
$tmptoken = $ret['refresh_token'];
|
$refresh_token = $ret['refresh_token'];
|
||||||
$str = '
|
$str = '
|
||||||
refresh_token :<br>';
|
refresh_token :<br>';
|
||||||
$str .= '
|
$str .= '
|
||||||
<textarea readonly style="width: 95%">' . $tmptoken . '</textarea><br><br>
|
<textarea readonly style="width: 95%">' . $refresh_token . '</textarea><br><br>
|
||||||
'.getconstStr('SavingToken').'
|
'.getconstStr('SavingToken').'
|
||||||
<script>
|
<script>
|
||||||
var texta=document.getElementsByTagName(\'textarea\');
|
var texta=document.getElementsByTagName(\'textarea\');
|
||||||
|
@ -1203,7 +1232,10 @@ function get_refresh_token()
|
||||||
document.cookie=\'language=; path=/\';
|
document.cookie=\'language=; path=/\';
|
||||||
document.cookie=\'disktag=; path=/\';
|
document.cookie=\'disktag=; path=/\';
|
||||||
</script>';
|
</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);
|
savecache('access_token', $ret['access_token'], $ret['expires_in'] - 60);
|
||||||
//WaitSCFStat();
|
//WaitSCFStat();
|
||||||
$str .= '
|
$str .= '
|
||||||
|
@ -1216,7 +1248,7 @@ function get_refresh_token()
|
||||||
if (isset($_GET['install1'])) {
|
if (isset($_GET['install1'])) {
|
||||||
$_SERVER['disktag'] = $_COOKIE['disktag'];
|
$_SERVER['disktag'] = $_COOKIE['disktag'];
|
||||||
config_oauth();
|
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('
|
return message('
|
||||||
<a href="" id="a1">'.getconstStr('JumptoOffice').'</a>
|
<a href="" id="a1">'.getconstStr('JumptoOffice').'</a>
|
||||||
<script>
|
<script>
|
||||||
|
@ -1232,18 +1264,23 @@ function get_refresh_token()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isset($_GET['install0'])) {
|
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)) {
|
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);
|
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'];
|
$_SERVER['disktag'] = $_COOKIE['disktag'];
|
||||||
$tmp['disktag_add'] = $_POST['disktag_add'];
|
$tmp['disktag_add'] = $_POST['disktag_add'];
|
||||||
$tmp['diskname'] = $_POST['diskname'];
|
$tmp['diskname'] = $_POST['diskname'];
|
||||||
$tmp['Onedrive_ver'] = $_POST['Onedrive_ver'];
|
$tmp['Drive_ver'] = $_POST['Drive_ver'];
|
||||||
if ($_POST['Onedrive_ver']=='MSC') {
|
if ($_POST['Drive_custom']=='on') {
|
||||||
|
$tmp['Drive_custom'] = $_POST['Drive_custom'];
|
||||||
$tmp['client_id'] = $_POST['client_id'];
|
$tmp['client_id'] = $_POST['client_id'];
|
||||||
$tmp['client_secret'] = $_POST['client_secret'];
|
$tmp['client_secret'] = $_POST['client_secret'];
|
||||||
}
|
}
|
||||||
|
if ($_POST['usesharepoint']=='on') {
|
||||||
|
$tmp['usesharepoint'] = $_POST['usesharepoint'];
|
||||||
|
$tmp['sharepointname'] = $_POST['sharepointname'];
|
||||||
|
}
|
||||||
$response = setConfigResponse( setConfig($tmp, $_COOKIE['disktag']) );
|
$response = setConfigResponse( setConfig($tmp, $_COOKIE['disktag']) );
|
||||||
if (api_error($response)) {
|
if (api_error($response)) {
|
||||||
$html = api_error_msg($response);
|
$html = api_error_msg($response);
|
||||||
|
@ -1263,26 +1300,40 @@ function get_refresh_token()
|
||||||
$deepLink = "/quickstart/graphIO?publicClientSupport=false&appName=OneManager&redirectUrl=".$_SERVER['redirect_uri']."&allowImplicitFlow=false&ru=".urlencode($ru);
|
$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);
|
$app_url = "https://apps.dev.microsoft.com/?deepLink=".urlencode($deepLink);
|
||||||
$html = '
|
$html = '
|
||||||
|
<div>
|
||||||
<form action="?AddDisk&install0" method="post" onsubmit="return notnull(this);">
|
<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('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>
|
'.getconstStr('OnedriveDiskName').':<input type="text" name="diskname" placeholder="' . getconstStr('EnvironmentsDescription')['diskname'] . '" style="width:100%"><br>
|
||||||
Onedrive_Ver:<br>
|
<br>
|
||||||
<label><input type="radio" name="Onedrive_ver" value="MS" checked onclick="document.getElementById(\'secret\').style.display=\'none\';">MS: '.getconstStr('OndriveVerMS').'</label><br>
|
<div>
|
||||||
<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="Drive_ver" value="MS" checked>MS: '.getconstStr('DriveVerMS').'</label><br>
|
||||||
<label><input type="radio" name="Onedrive_ver" value="MSC" onclick="document.getElementById(\'secret\').style.display=\'\';">MSC: '.getconstStr('OndriveVerMSC').'
|
<label><input type="radio" name="Drive_ver" value="CN">CN: '.getconstStr('DriveVerCN').'</label>
|
||||||
<div id="secret" style="display:none">
|
</div>
|
||||||
|
<br>
|
||||||
|
<div>
|
||||||
|
<label><input type="checkbox" name="Drive_custom" onclick="document.getElementById(\'secret\').style.display=(document.getElementById(\'secret\').style.display==\'\'?\'none\':\'\');">'.getconstStr('CustomIdSecret').'</label>
|
||||||
|
<div id="secret" style="display:none;margin:10px 35px">
|
||||||
<a href="'.$app_url.'" target="_blank">'.getconstStr('GetSecretIDandKEY').'</a><br>
|
<a href="'.$app_url.'" target="_blank">'.getconstStr('GetSecretIDandKEY').'</a><br>
|
||||||
client_secret:<input type="text" name="client_secret"><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>
|
client_id:<input type="text" name="client_id" placeholder="12345678-90ab-cdef-ghij-klmnopqrstuv"><br>
|
||||||
</div>
|
</div>
|
||||||
</label><br>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label><input type="checkbox" name="usesharepoint" onclick="document.getElementById(\'sharepoint\').style.display=(document.getElementById(\'sharepoint\').style.display==\'\'?\'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').'">
|
<input type="submit" value="'.getconstStr('Submit').'">
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
<script>
|
<script>
|
||||||
function notnull(t)
|
function notnull(t)
|
||||||
{
|
{
|
||||||
if (t.disktag_add.value==\'\') {
|
if (t.disktag_add.value==\'\') {
|
||||||
alert(\'Input Disk Tag\');
|
alert(\''.getconstStr('OnedriveDiskTag').'\');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
envs = [' . $envs . '];
|
envs = [' . $envs . '];
|
||||||
|
@ -1295,6 +1346,18 @@ function get_refresh_token()
|
||||||
alert(\''.getconstStr('TagFormatAlert').'\');
|
alert(\''.getconstStr('TagFormatAlert').'\');
|
||||||
return false;
|
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=/\';
|
document.cookie=\'disktag=\'+t.disktag_add.value+\'; path=/\';
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="<?php echo $constStr['language']; ?>">
|
<html lang="<?php echo $constStr['language']; ?>">
|
||||||
<head>
|
<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 charset=utf-8>
|
||||||
<meta http-equiv=X-UA-Compatible content="IE=edge">
|
<meta http-equiv=X-UA-Compatible content="IE=edge">
|
||||||
<meta name=viewport content="width=device-width,initial-scale=1">
|
<meta name=viewport content="width=device-width,initial-scale=1">
|
||||||
|
|
13
version
13
version
|
@ -1,9 +1,12 @@
|
||||||
20200321-1830.15
|
20200326-0001.16
|
||||||
<font color=red>本次更新后,'index.html'功能在其它主题会导致bug。</font>
|
You can add sharepoint site drive as a disk, <font color=red>you must reinstall after update</font>.
|
||||||
文本类文件将缓存;添加hideFunctionalityFile开关;在添加网盘时会显示已经在用的标签。
|
可以将sharepoint网站添加成一个盘,<font color=red>由于结构改变,升级后只能重装</font>。
|
||||||
<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。
|
|
||||||
|
|
||||||
|
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
|
20200311-2150.14
|
||||||
Add a switch, can download a known file or not, while the folder is encrypted.
|
Add a switch, can download a known file or not, while the folder is encrypted.
|
||||||
Hide time and size in mobile.
|
Hide time and size in mobile.
|
||||||
|
|
Loading…
Reference in New Issue