commit
aa5bbbeb51
13
.htaccess
13
.htaccess
|
@ -1,2 +1,15 @@
|
||||||
|
# apache
|
||||||
|
# LoadModule rewrite_module modules/mod_rewrite.so
|
||||||
|
# AllowOverride All
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
RewriteRule ^(.*) index.php?/$1 [L]
|
RewriteRule ^(.*) index.php?/$1 [L]
|
||||||
|
|
||||||
|
#-----------------------------------
|
||||||
|
# nginx
|
||||||
|
# rewrite ^(.*) /index.php?/$1 last;
|
||||||
|
#
|
||||||
|
# caddy
|
||||||
|
# rewrite {
|
||||||
|
# to index.php?/$1
|
||||||
|
# }
|
||||||
|
#-----------------------------------
|
||||||
|
|
182
conststr.php
182
conststr.php
|
@ -3,7 +3,7 @@
|
||||||
$exts['img'] = ['ico', 'bmp', 'gif', 'jpg', 'jpeg', 'jpe', 'jfif', 'tif', 'tiff', 'png', 'heic', 'webp'];
|
$exts['img'] = ['ico', 'bmp', 'gif', 'jpg', 'jpeg', 'jpe', 'jfif', 'tif', 'tiff', 'png', 'heic', 'webp'];
|
||||||
$exts['music'] = ['mp3', 'wma', 'flac', 'wav', 'ogg'];
|
$exts['music'] = ['mp3', 'wma', 'flac', 'wav', 'ogg'];
|
||||||
$exts['office'] = ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx'];
|
$exts['office'] = ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx'];
|
||||||
$exts['txt'] = ['txt', 'bat', 'sh', 'php', 'asp', 'js', 'json', 'html', 'c', 'md'];
|
$exts['txt'] = ['txt', 'bat', 'sh', 'php', 'asp', 'js', 'json', 'html', 'c', 'md', 'py'];
|
||||||
$exts['video'] = ['mp4', 'webm', 'mkv', 'mov', 'flv', 'blv', 'avi', 'wmv', 'm3u8'];
|
$exts['video'] = ['mp4', 'webm', 'mkv', 'mov', 'flv', 'blv', 'avi', 'wmv', 'm3u8'];
|
||||||
$exts['zip'] = ['zip', 'rar', '7z', 'gz', 'tar'];
|
$exts['zip'] = ['zip', 'rar', '7z', 'gz', 'tar'];
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ $constStr = [
|
||||||
'zh-cn' => '中文',
|
'zh-cn' => '中文',
|
||||||
'ja' => '日本語',
|
'ja' => '日本語',
|
||||||
'ko-kr' => '한국어',
|
'ko-kr' => '한국어',
|
||||||
|
'fa' => 'فارسی',
|
||||||
],
|
],
|
||||||
'Week' => [
|
'Week' => [
|
||||||
'en-us' => [
|
'en-us' => [
|
||||||
|
@ -51,6 +52,15 @@ $constStr = [
|
||||||
5 => '금요일',
|
5 => '금요일',
|
||||||
6 => '토요일',
|
6 => '토요일',
|
||||||
],
|
],
|
||||||
|
'fa' => [
|
||||||
|
0 => 'یکشنبه',
|
||||||
|
1 => 'دوشنبه',
|
||||||
|
2 => 'سه شنبه',
|
||||||
|
3 => 'چهارشنبه',
|
||||||
|
4 => 'پنج شنبه',
|
||||||
|
5 => 'جمعه',
|
||||||
|
6 => 'شنبه',
|
||||||
|
],
|
||||||
],
|
],
|
||||||
'EnvironmentsDescription' => [
|
'EnvironmentsDescription' => [
|
||||||
'en-us' => [
|
'en-us' => [
|
||||||
|
@ -59,8 +69,10 @@ $constStr = [
|
||||||
'domain_path' => 'more custom domain, format is a1.com:/dirto/path1|b2.com:/path2',
|
'domain_path' => 'more custom domain, format is a1.com:/dirto/path1|b2.com:/path2',
|
||||||
'diskname' => 'The disk name you want show.',
|
'diskname' => 'The disk name you want show.',
|
||||||
'disktag' => 'A tag used in store config and url.',
|
'disktag' => 'A tag used in store config and url.',
|
||||||
'background' => 'Set an url as background photo, or put a \'background.jpg\' at showed path.',
|
'downloadencrypt' => '0 or 1. if 1, the files in encrypt folder can be downloaded without password',
|
||||||
|
'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.',
|
'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.',
|
'passfile' => 'The password of dir will save in this file.',
|
||||||
'public_path' => 'Show this Onedrive dir when through the long url of API Gateway; public show files less than private.',
|
'public_path' => 'Show this Onedrive dir when through the long url of API Gateway; public show files less than private.',
|
||||||
'sitename' => 'sitename',
|
'sitename' => 'sitename',
|
||||||
|
@ -72,8 +84,10 @@ $constStr = [
|
||||||
'domain_path' => '使用多个自定义域名时,指定每个域名看到的目录。格式为a1.com:/dirto/path1|b1.com:/path2,比private_path优先。',
|
'domain_path' => '使用多个自定义域名时,指定每个域名看到的目录。格式为a1.com:/dirto/path1|b1.com:/path2,比private_path优先。',
|
||||||
'diskname' => '这个盘你想显示什么名称。',
|
'diskname' => '这个盘你想显示什么名称。',
|
||||||
'disktag' => '一个标签,用于保存配置,多盘时会显示在url中。',
|
'disktag' => '一个标签,用于保存配置,多盘时会显示在url中。',
|
||||||
'background' => '设置一个url作为背景,或者在你显示的目录放一个background.jpg文件。',
|
'downloadencrypt' => '0 或 1。如果 1, 那加密目录内的文件可以不需要密码就能下载。',
|
||||||
|
'background' => '设置一个url作为背景。',
|
||||||
'guestup_path' => '设置游客上传路径(图床路径),不设置这个值时该目录内容会正常列文件出来,设置后只有上传界面,不显示其中文件(登录后显示)。',
|
'guestup_path' => '设置游客上传路径(图床路径),不设置这个值时该目录内容会正常列文件出来,设置后只有上传界面,不显示其中文件(登录后显示)。',
|
||||||
|
'hideFunctionalityFile' => '0 或 1。如果 1, 某些文件不列表给游客看,但它的功能正常,比如readme.md',
|
||||||
'passfile' => '自定义密码文件的名字,可以是\'pppppp\',也可以是\'aaaa.txt\'等等;列目录时不会显示,只有知道密码才能查看或下载此文件。密码是这个文件的内容,可以空格、可以中文;',
|
'passfile' => '自定义密码文件的名字,可以是\'pppppp\',也可以是\'aaaa.txt\'等等;列目录时不会显示,只有知道密码才能查看或下载此文件。密码是这个文件的内容,可以空格、可以中文;',
|
||||||
'public_path' => '使用API长链接访问时,显示网盘文件的路径,不设置时默认为根目录;不能是private_path的上级(public看到的不能比private多,要么看到的就不一样)。',
|
'public_path' => '使用API长链接访问时,显示网盘文件的路径,不设置时默认为根目录;不能是private_path的上级(public看到的不能比private多,要么看到的就不一样)。',
|
||||||
'sitename' => '网站的名称',
|
'sitename' => '网站的名称',
|
||||||
|
@ -85,6 +99,7 @@ $constStr = [
|
||||||
'domain_path' => '複数のカスタムドメイン名を使用する場合、各ドメイン名に表示されるディレクトリを指定します。形式はa1.com:/dirto/path1|b1.com:/path2で、private_pathよりも優先されます。',
|
'domain_path' => '複数のカスタムドメイン名を使用する場合、各ドメイン名に表示されるディレクトリを指定します。形式はa1.com:/dirto/path1|b1.com:/path2で、private_pathよりも優先されます。',
|
||||||
'diskname' => '',
|
'diskname' => '',
|
||||||
'disktag' => '',
|
'disktag' => '',
|
||||||
|
'downloadencrypt' => '',
|
||||||
'background' => '',
|
'background' => '',
|
||||||
'guestup_path' => 'マップベッドのパスを設定します。この値が設定されていない場合、ディレクトリの内容は通常ファイルにリストされ、設定後はアップロードインターフェイスのみが表示されます。',
|
'guestup_path' => 'マップベッドのパスを設定します。この値が設定されていない場合、ディレクトリの内容は通常ファイルにリストされ、設定後はアップロードインターフェイスのみが表示されます。',
|
||||||
'passfile' => 'カスタムパスワードファイルの名前は、\'pppppp \'、\'aaaa.txt \'などの場合があります。ディレクトリをリストするときには表示されません。パスワードを知っている場合にのみ、このファイルを表示またはダウンロードできます。 パスワードはこのファイルの内容であり、スペースまたは漢字を使用できます。',
|
'passfile' => 'カスタムパスワードファイルの名前は、\'pppppp \'、\'aaaa.txt \'などの場合があります。ディレクトリをリストするときには表示されません。パスワードを知っている場合にのみ、このファイルを表示またはダウンロードできます。 パスワードはこのファイルの内容であり、スペースまたは漢字を使用できます。',
|
||||||
|
@ -98,498 +113,617 @@ $constStr = [
|
||||||
'domain_path' => '여러 개의 사용자 정의 도메인 이름을 사용하는 경우 각 도메인 이름에 표시되는 디렉토리를 지정하십시오. 형식은 a1.com:/dirto/path1|b1.com:/path2이며 private_path보다 우선합니다.',
|
'domain_path' => '여러 개의 사용자 정의 도메인 이름을 사용하는 경우 각 도메인 이름에 표시되는 디렉토리를 지정하십시오. 형식은 a1.com:/dirto/path1|b1.com:/path2이며 private_path보다 우선합니다.',
|
||||||
'diskname' => '이 디스크에 어떤 이름을 표시 하시겠습니까?',
|
'diskname' => '이 디스크에 어떤 이름을 표시 하시겠습니까?',
|
||||||
'disktag' => '레이블은 구성을 저장하는 데 사용되며 디스크가 여러 개인 경우 URL에 표시됩니다.',
|
'disktag' => '레이블은 구성을 저장하는 데 사용되며 디스크가 여러 개인 경우 URL에 표시됩니다.',
|
||||||
'background' => 'URL을 배경으로 설정하거나 표시하는 디렉토리에 background.jpg 파일을 넣으십시오.',
|
'downloadencrypt' => '',
|
||||||
|
'background' => 'URL을 배경으로 설정하거나 표시하는.',
|
||||||
'guestup_path' => '방문자의 업로드 경로 (맵 베드 경로)를 설정합니다.이 값을 설정하지 않으면 디렉토리의 내용이 파일로 표시되고 설정 후에는 업로드 인터페이스 만 표시되고 파일은 표시되지 않습니다 (로그인 후 표시).',
|
'guestup_path' => '방문자의 업로드 경로 (맵 베드 경로)를 설정합니다.이 값을 설정하지 않으면 디렉토리의 내용이 파일로 표시되고 설정 후에는 업로드 인터페이스 만 표시되고 파일은 표시되지 않습니다 (로그인 후 표시).',
|
||||||
'passfile' => '사용자 정의 비밀번호 파일의 이름은 \'pppppp\' \'aaaa.txt \'등이 될 수 있으며 디렉토리가 나열되어 있으면 표시되지 않으며 비밀번호를 알고있는 경우에만이 파일을 보거나 다운로드 할 수 있습니다. 암호는이 파일의 내용이며 공백이거나 한국어 일 수 있습니다.',
|
'passfile' => '사용자 정의 비밀번호 파일의 이름은 \'pppppp\' \'aaaa.txt \'등이 될 수 있으며 디렉토리가 나열되어 있으면 표시되지 않으며 비밀번호를 알고있는 경우에만이 파일을 보거나 다운로드 할 수 있습니다. 암호는이 파일의 내용이며 공백이거나 한국어 일 수 있습니다.',
|
||||||
'public_path' => 'API 긴 링크 액세스를 사용하는 경우 네트워크 디스크 파일의 경로가 표시됩니다. 설정되지 않은 경우 기본적으로 루트 디렉토리로 설정됩니다.',
|
'public_path' => 'API 긴 링크 액세스를 사용하는 경우 네트워크 디스크 파일의 경로가 표시됩니다. 설정되지 않은 경우 기본적으로 루트 디렉토리로 설정됩니다.',
|
||||||
'sitename' => '웹 사이트 이름',
|
'sitename' => '웹 사이트 이름',
|
||||||
'Onedrive_ver' => 'Onedrive 버전',
|
'Onedrive_ver' => 'Onedrive 버전',
|
||||||
],
|
],
|
||||||
|
'fa' => [
|
||||||
|
'admin' => 'رمز عبور ادمین، در صورت خالی بودن دکمه لاگین به نمایش در نمیآید',
|
||||||
|
'adminloginpage' => 'در صورت تنظیم ، دکمه ورود نمایش داده نمی شود و صفحه ورود دیگر \?admin\ نیست بلکه \?{مقدار ورودی شما}\ است.',
|
||||||
|
'domain_path' => 'تنظیم دامنه سفارشی، به صورت a1.com:/dirto/path1|b2.com:/path2',
|
||||||
|
'diskname' => 'نام دیسک که میخواهید نشان دهید.',
|
||||||
|
'disktag' => 'تگی که در ذخیره پیکربندی و نشانی اینترنتی استفاده میشود.',
|
||||||
|
'downloadencrypt' => '',
|
||||||
|
'background' => 'تنظیم عکس پشت زمینه به صورت url یا قرار دادن بک گراند به صورت دستی در مسیر نشان داده شده.',
|
||||||
|
'guestup_path' => 'قبل از تنظیم این گزینه ، فایل آپلود guest را تنظیم کنید ، پرونده های موجود در این حالت به صورت عادی نشان داده می شوند.',
|
||||||
|
'passfile' => 'رمز عبور dir در این فایل ذخیره می شود.',
|
||||||
|
'public_path' => 'این مسیر Onedrive را هنگامی که از طریق آدرس طولانی API Gateway استفاده می کنید ، نشان دهید. فایل های نمایش عمومی کمتر از خصوصی.',
|
||||||
|
'sitename' => 'نام سایت',
|
||||||
|
'Onedrive_ver' => 'ورژن Onedrive',
|
||||||
|
],
|
||||||
],
|
],
|
||||||
'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!或重装。',
|
||||||
'ja' => '最初に環境変数にAPIを設定してください!',
|
'ja' => '最初に環境変数にAPIを設定してください!',
|
||||||
'ko-kr' => '먼저 환경 변수에서 API를 설정하십시오! 또는 다시 설치하십시오.',
|
'ko-kr' => '먼저 환경 변수에서 API를 설정하십시오! 또는 다시 설치하십시오.',
|
||||||
|
'fa' => 'ابتدا API را در پیکربندی تنظیم کنید! یا دوباره نصب کنید.',
|
||||||
],
|
],
|
||||||
'RefleshtoLogin' => [
|
'RefreshtoLogin' => [
|
||||||
'en-us' => '<font color="red">Reflesh</font> and login.',
|
'en-us' => '<font color="red">Refresh</font> and login.',
|
||||||
'zh-cn' => '请<font color="red">刷新</font>页面后重新登录',
|
'zh-cn' => '请<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> و لاگین.',
|
||||||
],
|
],
|
||||||
'AdminLogin' => [
|
'AdminLogin' => [
|
||||||
'en-us' => 'Admin Login',
|
'en-us' => 'Admin Login',
|
||||||
'zh-cn' => '管理登录',
|
'zh-cn' => '管理登录',
|
||||||
'ja' => 'ログインを管理する',
|
'ja' => 'ログインを管理する',
|
||||||
'ko-kr' => '로그인 관리',
|
'ko-kr' => '로그인 관리',
|
||||||
|
'fa' => 'ورود ادمین',
|
||||||
],
|
],
|
||||||
'LoginSuccess' => [
|
'LoginSuccess' => [
|
||||||
'en-us' => 'Login Success!',
|
'en-us' => 'Login Success!',
|
||||||
'zh-cn' => '登录成功,正在跳转',
|
'zh-cn' => '登录成功,正在跳转',
|
||||||
'ja' => 'ログイン成功、ジャンプ',
|
'ja' => 'ログイン成功、ジャンプ',
|
||||||
'ko-kr' => '로그인 성공, 점프',
|
'ko-kr' => '로그인 성공, 점프',
|
||||||
|
'fa' => 'ورود با موفقیت انجام شد!',
|
||||||
],
|
],
|
||||||
'InputPassword' => [
|
'InputPassword' => [
|
||||||
'en-us' => 'Input Password',
|
'en-us' => 'Input Password',
|
||||||
'zh-cn' => '输入密码',
|
'zh-cn' => '输入密码',
|
||||||
'ja' => 'パスワードを入力してください',
|
'ja' => 'パスワードを入力してください',
|
||||||
'ko-kr' => '비밀번호 입력',
|
'ko-kr' => '비밀번호 입력',
|
||||||
|
'fa' => 'رمز عبور را وارد کنید',
|
||||||
],
|
],
|
||||||
'Login' => [
|
'Login' => [
|
||||||
'en-us' => 'Login',
|
'en-us' => 'Login',
|
||||||
'zh-cn' => '登录',
|
'zh-cn' => '登录',
|
||||||
'ja' => 'サインイン',
|
'ja' => 'サインイン',
|
||||||
'ko-kr' => '로그인',
|
'ko-kr' => '로그인',
|
||||||
|
'fa' => 'ورود',
|
||||||
],
|
],
|
||||||
'encrypt' => [
|
'encrypt' => [
|
||||||
'en-us' => 'Encrypt',
|
'en-us' => 'Encrypt',
|
||||||
'zh-cn' => '加密',
|
'zh-cn' => '加密',
|
||||||
'ja' => '暗号化',
|
'ja' => '暗号化',
|
||||||
'ko-kr' => '암호화',
|
'ko-kr' => '암호화',
|
||||||
|
'fa' => 'رمزگذاری',
|
||||||
],
|
],
|
||||||
'SetpassfileBfEncrypt' => [
|
'SetpassfileBfEncrypt' => [
|
||||||
'en-us' => 'Set \'passfile\' in Environments before encrypt',
|
'en-us' => 'Set \'passfile\' in Environments before encrypt',
|
||||||
'zh-cn' => '先在环境变量设置passfile才能加密',
|
'zh-cn' => '先在环境变量设置passfile才能加密',
|
||||||
'ja' => '最初に暗号化する環境変数にパスファイルを設定します',
|
'ja' => '最初に暗号化する環境変数にパスファイルを設定します',
|
||||||
'ko-kr' => '암호화하기 전에 환경 변수에 패스 파일을 설정하십시오',
|
'ko-kr' => '암호화하기 전에 환경 변수에 패스 파일을 설정하십시오',
|
||||||
|
'fa' => 'قبل از رمزگذاری \ "pass file \" را در محیط تنظیم کنید',
|
||||||
],
|
],
|
||||||
'updateProgram' => [
|
'updateProgram' => [
|
||||||
'en-us' => 'Update Program',
|
'en-us' => 'Update Program',
|
||||||
'zh-cn' => '一键更新',
|
'zh-cn' => '一键更新',
|
||||||
'ja' => 'ワンクリック更新',
|
'ja' => 'ワンクリック更新',
|
||||||
'ko-kr' => '원 클릭 업데이트',
|
'ko-kr' => '원 클릭 업데이트',
|
||||||
|
'fa' => 'برنامه را به روز کنید',
|
||||||
],
|
],
|
||||||
'UpdateSuccess' => [
|
'UpdateSuccess' => [
|
||||||
'en-us' => 'Program update Success!',
|
'en-us' => 'Program update Success!',
|
||||||
'zh-cn' => '程序升级成功!',
|
'zh-cn' => '程序升级成功!',
|
||||||
'ja' => 'プログラムのアップグレードに成功しました!',
|
'ja' => 'プログラムのアップグレードに成功しました!',
|
||||||
'ko-kr' => '프로그램 업그레이드 성공!',
|
'ko-kr' => '프로그램 업그레이드 성공!',
|
||||||
|
'fa' => 'موفقیت به روز رسانی برنامه!',
|
||||||
],
|
],
|
||||||
'Setup' => [
|
'Setup' => [
|
||||||
'en-us' => 'Setup',
|
'en-us' => 'Setup',
|
||||||
'zh-cn' => '设置',
|
'zh-cn' => '设置',
|
||||||
'ja' => '設定する',
|
'ja' => '設定する',
|
||||||
'ko-kr' => '설정',
|
'ko-kr' => '설정',
|
||||||
|
'fa' => 'نصب',
|
||||||
],
|
],
|
||||||
'Back' => [
|
'Back' => [
|
||||||
'en-us' => 'Back',
|
'en-us' => 'Back',
|
||||||
'zh-cn' => '返回',
|
'zh-cn' => '返回',
|
||||||
'ja' => 'back',
|
'ja' => 'back',
|
||||||
'ko-kr' => '돌아 가기',
|
'ko-kr' => '돌아 가기',
|
||||||
|
'fa' => 'بازگشت',
|
||||||
],
|
],
|
||||||
'NotNeedUpdate' => [
|
'NotNeedUpdate' => [
|
||||||
'en-us' => 'Not Need Update',
|
'en-us' => 'Not Need Update',
|
||||||
'zh-cn' => '不需要更新',
|
'zh-cn' => '不需要更新',
|
||||||
'ja' => '更新不要',
|
'ja' => '更新不要',
|
||||||
'ko-kr' => '업데이트가 필요하지 않습니다',
|
'ko-kr' => '업데이트가 필요하지 않습니다',
|
||||||
|
'fa' => 'آپدیت لازم نیست',
|
||||||
],
|
],
|
||||||
'PlatformConfig' => [
|
'PlatformConfig' => [
|
||||||
'en-us' => 'Platform Config',
|
'en-us' => 'Platform Config',
|
||||||
'zh-cn' => '平台变量',
|
'zh-cn' => '平台变量',
|
||||||
'ja' => 'プラットフォーム変数',
|
'ja' => 'プラットフォーム変数',
|
||||||
'ko-kr' => '플랫폼 변수',
|
'ko-kr' => '플랫폼 변수',
|
||||||
|
'fa' => 'پیکربندی پلتفرم',
|
||||||
],
|
],
|
||||||
'DelDisk' => [
|
'DelDisk' => [
|
||||||
'en-us' => 'Del This Disk',
|
'en-us' => 'Del This Disk',
|
||||||
'zh-cn' => '删除此盘',
|
'zh-cn' => '删除此盘',
|
||||||
'ja' => 'このディスクを削除',
|
'ja' => 'このディスクを削除',
|
||||||
'ko-kr' => '이 디스크를 삭제',
|
'ko-kr' => '이 디스크를 삭제',
|
||||||
|
'fa' => 'پاک کردن این دیسک',
|
||||||
],
|
],
|
||||||
'AddDisk' => [
|
'AddDisk' => [
|
||||||
'en-us' => 'Add Onedrive Disk',
|
'en-us' => 'Add Onedrive Disk',
|
||||||
'zh-cn' => '添加Onedrive盘',
|
'zh-cn' => '添加Onedrive盘',
|
||||||
'ja' => 'Onedriveを追加',
|
'ja' => 'Onedriveを追加',
|
||||||
'ko-kr' => 'Onedrive 추가',
|
'ko-kr' => 'Onedrive 추가',
|
||||||
|
'fa' => 'اضافه کردن دیسک Onedrive',
|
||||||
],
|
],
|
||||||
'Home' => [
|
'Home' => [
|
||||||
'en-us' => 'Home',
|
'en-us' => 'Home',
|
||||||
'zh-cn' => '首页',
|
'zh-cn' => '首页',
|
||||||
'ja' => 'ホーム',
|
'ja' => 'ホーム',
|
||||||
'ko-kr' => '홈',
|
'ko-kr' => '홈',
|
||||||
|
'fa' => 'خانه',
|
||||||
],
|
],
|
||||||
'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>进入设置页面升级',
|
||||||
'ja' => 'プログラムをアップグレードできます<br>上記の管理メニューで<br>アップグレードする設定ページに入ります',
|
'ja' => 'プログラムをアップグレードできます<br>上記の管理メニューで<br>アップグレードする設定ページに入ります',
|
||||||
'ko-kr' => '프로그램을 업그레이드 할 수 있습니다. <br> 위의 관리 메뉴에서 <br> 업그레이드 할 설정 페이지를 입력하십시오.',
|
'ko-kr' => '프로그램을 업그레이드 할 수 있습니다. <br> 위의 관리 메뉴에서 <br> 업그레이드 할 설정 페이지를 입력하십시오.',
|
||||||
|
'fa' => 'برنامه می تواند آپدیت شود<br>روی گزینه نصب در بالای صفحه کلیک کنید.',
|
||||||
],
|
],
|
||||||
'Operate' => [
|
'Operate' => [
|
||||||
'en-us' => 'Operate',
|
'en-us' => 'Operate',
|
||||||
'zh-cn' => '管理',
|
'zh-cn' => '管理',
|
||||||
'ja' => '管理',
|
'ja' => '管理',
|
||||||
'ko-kr' => '관리',
|
'ko-kr' => '관리',
|
||||||
|
'fa' => 'مدیریت',
|
||||||
],
|
],
|
||||||
'Logout' => [
|
'Logout' => [
|
||||||
'en-us' => 'Logout',
|
'en-us' => 'Logout',
|
||||||
'zh-cn' => '登出',
|
'zh-cn' => '登出',
|
||||||
'ja' => 'ログアウトする',
|
'ja' => 'ログアウトする',
|
||||||
'ko-kr' => '로그 아웃',
|
'ko-kr' => '로그 아웃',
|
||||||
|
'fa' => 'خروج',
|
||||||
],
|
],
|
||||||
'Create' => [
|
'Create' => [
|
||||||
'en-us' => 'Create',
|
'en-us' => 'Create',
|
||||||
'zh-cn' => '新建',
|
'zh-cn' => '新建',
|
||||||
'ja' => '新しい',
|
'ja' => '新しい',
|
||||||
'ko-kr' => '새로운',
|
'ko-kr' => '새로운',
|
||||||
|
'fa' => 'ایجاد کردن',
|
||||||
],
|
],
|
||||||
'Download' => [
|
'Download' => [
|
||||||
'en-us' => 'download',
|
'en-us' => 'download',
|
||||||
'zh-cn' => '下载',
|
'zh-cn' => '下载',
|
||||||
'ja' => 'ダウンロードする',
|
'ja' => 'ダウンロードする',
|
||||||
'ko-kr' => '다운로드',
|
'ko-kr' => '다운로드',
|
||||||
|
'fa' => 'دانلود',
|
||||||
],
|
],
|
||||||
'ClicktoEdit' => [
|
'ClicktoEdit' => [
|
||||||
'en-us' => 'Click to edit',
|
'en-us' => 'Click to edit',
|
||||||
'zh-cn' => '点击后编辑',
|
'zh-cn' => '点击后编辑',
|
||||||
'ja' => 'クリック後に編集',
|
'ja' => 'クリック後に編集',
|
||||||
'ko-kr' => '클릭 후 편집',
|
'ko-kr' => '클릭 후 편집',
|
||||||
|
'fa' => 'برای ویرایش کلیک کنید',
|
||||||
],
|
],
|
||||||
'Save' => [
|
'Save' => [
|
||||||
'en-us' => 'Save',
|
'en-us' => 'Save',
|
||||||
'zh-cn' => '保存',
|
'zh-cn' => '保存',
|
||||||
'ja' => '保存する',
|
'ja' => '保存する',
|
||||||
'ko-kr' => '저장',
|
'ko-kr' => '저장',
|
||||||
|
'fa' => 'ذخیره',
|
||||||
],
|
],
|
||||||
'FileNotSupport' => [
|
'FileNotSupport' => [
|
||||||
'en-us' => 'File not support preview.',
|
'en-us' => 'File not support preview.',
|
||||||
'zh-cn' => '文件格式不支持预览',
|
'zh-cn' => '文件格式不支持预览',
|
||||||
'ja' => 'ファイル形式はプレビューをサポートしていません',
|
'ja' => 'ファイル形式はプレビューをサポートしていません',
|
||||||
'ko-kr' => '파일 형식은 미리보기를 지원하지 않습니다',
|
'ko-kr' => '파일 형식은 미리보기를 지원하지 않습니다',
|
||||||
|
'fa' => 'پیش نمایش برای این فایل پشتیبانی نمی شود.',
|
||||||
],
|
],
|
||||||
'File' => [
|
'File' => [
|
||||||
'en-us' => 'File',
|
'en-us' => 'File',
|
||||||
'zh-cn' => '文件',
|
'zh-cn' => '文件',
|
||||||
'ja' => 'ファイル',
|
'ja' => 'ファイル',
|
||||||
'ko-kr' => '파일',
|
'ko-kr' => '파일',
|
||||||
|
'fa' => 'فایل',
|
||||||
],
|
],
|
||||||
'ShowThumbnails' => [
|
'ShowThumbnails' => [
|
||||||
'en-us' => 'Thumbnails',
|
'en-us' => 'Thumbnails',
|
||||||
'zh-cn' => '图片缩略',
|
'zh-cn' => '图片缩略',
|
||||||
'ja' => '画像のサムネイル',
|
'ja' => '画像のサムネイル',
|
||||||
'ko-kr' => '사진 섬네일',
|
'ko-kr' => '사진 섬네일',
|
||||||
|
'fa' => 'تصویر بندانگشتی',
|
||||||
|
],
|
||||||
|
'CopyAllDownloadUrl' => [
|
||||||
|
'en-us' => 'CopyAllDownloadUrl',
|
||||||
|
'zh-cn' => '复制所有下载链接',
|
||||||
|
'ja' => 'すべてのダウンロードリンクをコピー',
|
||||||
|
'ko-kr' => '모든 다운로드 링크 복사',
|
||||||
|
'fa' => 'کپی از تمام لینک ها',
|
||||||
],
|
],
|
||||||
'EditTime' => [
|
'EditTime' => [
|
||||||
'en-us' => 'EditTime',
|
'en-us' => 'EditTime',
|
||||||
'zh-cn' => '修改时间',
|
'zh-cn' => '修改时间',
|
||||||
'ja' => '変更時間',
|
'ja' => '変更時間',
|
||||||
'ko-kr' => '수정 시간',
|
'ko-kr' => '수정 시간',
|
||||||
|
'fa' => 'زمان ویرایش',
|
||||||
],
|
],
|
||||||
'Size' => [
|
'Size' => [
|
||||||
'en-us' => 'Size',
|
'en-us' => 'Size',
|
||||||
'zh-cn' => '大小',
|
'zh-cn' => '大小',
|
||||||
'ja' => 'サイズ ',
|
'ja' => 'サイズ ',
|
||||||
'ko-kr' => '사이즈',
|
'ko-kr' => '사이즈',
|
||||||
|
'fa' => 'سایز',
|
||||||
],
|
],
|
||||||
'Rename' => [
|
'Rename' => [
|
||||||
'en-us' => 'Rename',
|
'en-us' => 'Rename',
|
||||||
'zh-cn' => '重命名',
|
'zh-cn' => '重命名',
|
||||||
'ja' => '名前を変更',
|
'ja' => '名前を変更',
|
||||||
'ko-kr' => '이름 바꾸기',
|
'ko-kr' => '이름 바꾸기',
|
||||||
|
'fa' => 'تغییر نام',
|
||||||
],
|
],
|
||||||
'Move' => [
|
'Move' => [
|
||||||
'en-us' => 'Move',
|
'en-us' => 'Move',
|
||||||
'zh-cn' => '移动',
|
'zh-cn' => '移动',
|
||||||
'ja' => '移動する',
|
'ja' => '移動する',
|
||||||
'ko-kr' => '이동',
|
'ko-kr' => '이동',
|
||||||
|
'fa' => 'انتقال',
|
||||||
],
|
],
|
||||||
'Copy' => [
|
'Copy' => [
|
||||||
'en-us' => 'Copy',
|
'en-us' => 'Copy',
|
||||||
'zh-cn' => '复制',
|
'zh-cn' => '复制',
|
||||||
'ja' => 'コピー',
|
'ja' => 'コピー',
|
||||||
'ko-kr' => '복사',
|
'ko-kr' => '복사',
|
||||||
|
'fa' => 'کپی',
|
||||||
],
|
],
|
||||||
'CannotMove' => [
|
'CannotMove' => [
|
||||||
'en-us' => 'Can not Move!',
|
'en-us' => 'Can not Move!',
|
||||||
'zh-cn' => '不能移动!',
|
'zh-cn' => '不能移动!',
|
||||||
'ja' => '動かない!',
|
'ja' => '動かない!',
|
||||||
'ko-kr' => '움직일 수 없어!',
|
'ko-kr' => '움직일 수 없어!',
|
||||||
|
'fa' => 'نمیتواند منتقل شود!',
|
||||||
],
|
],
|
||||||
'Delete' => [
|
'Delete' => [
|
||||||
'en-us' => 'Delete',
|
'en-us' => 'Delete',
|
||||||
'zh-cn' => '删除',
|
'zh-cn' => '删除',
|
||||||
'ja' => '削除する',
|
'ja' => '削除する',
|
||||||
'ko-kr' => '삭제',
|
'ko-kr' => '삭제',
|
||||||
|
'fa' => 'حذف کردن',
|
||||||
],
|
],
|
||||||
'PrePage' => [
|
'PrePage' => [
|
||||||
'en-us' => 'PrePage',
|
'en-us' => 'PrePage',
|
||||||
'zh-cn' => '上一页',
|
'zh-cn' => '上一页',
|
||||||
'ja' => '前へ',
|
'ja' => '前へ',
|
||||||
'ko-kr' => '이전',
|
'ko-kr' => '이전',
|
||||||
|
'fa' => 'صفحه قبل',
|
||||||
],
|
],
|
||||||
'NextPage' => [
|
'NextPage' => [
|
||||||
'en-us' => 'NextPage',
|
'en-us' => 'NextPage',
|
||||||
'zh-cn' => '下一页',
|
'zh-cn' => '下一页',
|
||||||
'ja' => '次のページ',
|
'ja' => '次のページ',
|
||||||
'ko-kr' => '다음 페이지',
|
'ko-kr' => '다음 페이지',
|
||||||
|
'fa' => 'صفحه بعد',
|
||||||
],
|
],
|
||||||
'Upload' => [
|
'Upload' => [
|
||||||
'en-us' => 'Upload',
|
'en-us' => 'Upload',
|
||||||
'zh-cn' => '上传',
|
'zh-cn' => '上传',
|
||||||
'ja' => 'アップロードする',
|
'ja' => 'アップロードする',
|
||||||
'ko-kr' => '업로드',
|
'ko-kr' => '업로드',
|
||||||
|
'fa' => 'آپلود',
|
||||||
],
|
],
|
||||||
'FileSelected' => [
|
'FileSelected' => [
|
||||||
'en-us' => 'Select File',
|
'en-us' => 'Select File',
|
||||||
'zh-cn' => '选择文件',
|
'zh-cn' => '选择文件',
|
||||||
'ja' => 'ファイルを選択',
|
'ja' => 'ファイルを選択',
|
||||||
'ko-kr' => '파일 선택',
|
'ko-kr' => '파일 선택',
|
||||||
|
'fa' => 'انتخاب فایل',
|
||||||
],
|
],
|
||||||
'NoFileSelected' => [
|
'NoFileSelected' => [
|
||||||
'en-us' => 'Not Select File',
|
'en-us' => 'Not Select File',
|
||||||
'zh-cn' => '没有选择文件',
|
'zh-cn' => '没有选择文件',
|
||||||
'ja' => 'ファイルが選択されていません',
|
'ja' => 'ファイルが選択されていません',
|
||||||
'ko-kr' => '선택된 파일이 없습니다',
|
'ko-kr' => '선택된 파일이 없습니다',
|
||||||
|
'fa' => 'فایل را انتخاب نکنید',
|
||||||
],
|
],
|
||||||
'Submit' => [
|
'Submit' => [
|
||||||
'en-us' => 'Submit',
|
'en-us' => 'Submit',
|
||||||
'zh-cn' => '确认',
|
'zh-cn' => '确认',
|
||||||
'ja' => '確認する',
|
'ja' => '確認する',
|
||||||
'ko-kr' => '확인',
|
'ko-kr' => '확인',
|
||||||
|
'fa' => 'ارسال',
|
||||||
],
|
],
|
||||||
'Close' => [
|
'Close' => [
|
||||||
'en-us' => 'Close',
|
'en-us' => 'Close',
|
||||||
'zh-cn' => '关闭',
|
'zh-cn' => '关闭',
|
||||||
'ja' => '閉じる',
|
'ja' => '閉じる',
|
||||||
'ko-kr' => '닫기',
|
'ko-kr' => '닫기',
|
||||||
|
'fa' => 'بستن',
|
||||||
],
|
],
|
||||||
'InputPasswordUWant' => [
|
'InputPasswordUWant' => [
|
||||||
'en-us' => 'Input Password you Want',
|
'en-us' => 'Input Password you Want',
|
||||||
'zh-cn' => '输入想要设置的密码',
|
'zh-cn' => '输入想要设置的密码',
|
||||||
'ja' => '設定するパスワードを入力してください',
|
'ja' => '設定するパスワードを入力してください',
|
||||||
'ko-kr' => '설정하려는 비밀번호를 입력하십시오',
|
'ko-kr' => '설정하려는 비밀번호를 입력하십시오',
|
||||||
|
'fa' => 'پسورد خود را وارد کنید',
|
||||||
],
|
],
|
||||||
'ParentDir' => [
|
'ParentDir' => [
|
||||||
'en-us' => 'Parent Dir',
|
'en-us' => 'Parent Dir',
|
||||||
'zh-cn' => '上一级目录',
|
'zh-cn' => '上一级目录',
|
||||||
'ja' => '親ディレクトリ',
|
'ja' => '親ディレクトリ',
|
||||||
'ko-kr' => '부모 디렉토리',
|
'ko-kr' => '부모 디렉토리',
|
||||||
|
'fa' => 'مسیر',
|
||||||
],
|
],
|
||||||
'Folder' => [
|
'Folder' => [
|
||||||
'en-us' => 'Folder',
|
'en-us' => 'Folder',
|
||||||
'zh-cn' => '文件夹',
|
'zh-cn' => '文件夹',
|
||||||
'ja' => 'フォルダー',
|
'ja' => 'フォルダー',
|
||||||
'ko-kr' => '폴더',
|
'ko-kr' => '폴더',
|
||||||
|
'fa' => 'پوشه',
|
||||||
],
|
],
|
||||||
'Name' => [
|
'Name' => [
|
||||||
'en-us' => 'Name',
|
'en-us' => 'Name',
|
||||||
'zh-cn' => '名称',
|
'zh-cn' => '名称',
|
||||||
'ja' => '名前',
|
'ja' => '名前',
|
||||||
'ko-kr' => '이름',
|
'ko-kr' => '이름',
|
||||||
|
'fa' => 'نام',
|
||||||
],
|
],
|
||||||
'Content' => [
|
'Content' => [
|
||||||
'en-us' => 'Content',
|
'en-us' => 'Content',
|
||||||
'zh-cn' => '内容',
|
'zh-cn' => '内容',
|
||||||
'ja' => '内容',
|
'ja' => '内容',
|
||||||
'ko-kr' => '내용',
|
'ko-kr' => '내용',
|
||||||
|
'fa' => 'محتوا',
|
||||||
],
|
],
|
||||||
'CancelEdit' => [
|
'CancelEdit' => [
|
||||||
'en-us' => 'Cancel Edit',
|
'en-us' => 'Cancel Edit',
|
||||||
'zh-cn' => '取消编辑',
|
'zh-cn' => '取消编辑',
|
||||||
'ja' => '編集をキャンセル',
|
'ja' => '編集をキャンセル',
|
||||||
'ko-kr' => '편집 취소',
|
'ko-kr' => '편집 취소',
|
||||||
|
'fa' => 'لغو ویرایش',
|
||||||
],
|
],
|
||||||
'GetFileNameFail' => [
|
'GetFileNameFail' => [
|
||||||
'en-us' => 'Fail to Get File Name!',
|
'en-us' => 'Fail to Get File Name!',
|
||||||
'zh-cn' => '获取文件名失败!',
|
'zh-cn' => '获取文件名失败!',
|
||||||
'ja' => 'ファイル名を取得できませんでした!',
|
'ja' => 'ファイル名を取得できませんでした!',
|
||||||
'ko-kr' => '파일 이름을 가져 오지 못했습니다!',
|
'ko-kr' => '파일 이름을 가져 오지 못했습니다!',
|
||||||
|
'fa' => 'نام فایل به دست نیامد!',
|
||||||
],
|
],
|
||||||
'GetUploadLink' => [
|
'GetUploadLink' => [
|
||||||
'en-us' => 'Get Upload Link',
|
'en-us' => 'Get Upload Link',
|
||||||
'zh-cn' => '获取上传链接',
|
'zh-cn' => '获取上传链接',
|
||||||
'ja' => 'アップロードリンクを取得',
|
'ja' => 'アップロードリンクを取得',
|
||||||
'ko-kr' => '업로드 링크 받기',
|
'ko-kr' => '업로드 링크 받기',
|
||||||
|
'fa' => 'دریافت لینک آپلود',
|
||||||
],
|
],
|
||||||
'UpFileTooLarge' => [
|
'UpFileTooLarge' => [
|
||||||
'en-us' => 'The File is too Large!',
|
'en-us' => 'The File is too Large!',
|
||||||
'zh-cn' => '文件过大,终止上传。',
|
'zh-cn' => '文件过大,终止上传。',
|
||||||
'ja' => '超えると、アップロードは終了します。',
|
'ja' => '超えると、アップロードは終了します。',
|
||||||
'ko-kr' => '파일이 너무 커서 업로드가 종료되었습니다.',
|
'ko-kr' => '파일이 너무 커서 업로드가 종료되었습니다.',
|
||||||
|
'fa' => 'فایل خیلی بزرگ است!',
|
||||||
],
|
],
|
||||||
'UploadStart' => [
|
'UploadStart' => [
|
||||||
'en-us' => 'Upload Start',
|
'en-us' => 'Upload Start',
|
||||||
'zh-cn' => '开始上传',
|
'zh-cn' => '开始上传',
|
||||||
'ja' => 'アップロードを開始',
|
'ja' => 'アップロードを開始',
|
||||||
'ko-kr' => '업로드 시작',
|
'ko-kr' => '업로드 시작',
|
||||||
|
'fa' => 'شروع آپلود',
|
||||||
],
|
],
|
||||||
'UploadStartAt' => [
|
'UploadStartAt' => [
|
||||||
'en-us' => 'Start At',
|
'en-us' => 'Start At',
|
||||||
'zh-cn' => '开始于',
|
'zh-cn' => '开始于',
|
||||||
'ja' => 'で開始',
|
'ja' => 'で開始',
|
||||||
'ko-kr' => '에서 시작',
|
'ko-kr' => '에서 시작',
|
||||||
|
'fa' => 'شروع از',
|
||||||
],
|
],
|
||||||
'ThisTime' => [
|
'ThisTime' => [
|
||||||
'en-us' => 'This Time',
|
'en-us' => 'This Time',
|
||||||
'zh-cn' => '本次',
|
'zh-cn' => '本次',
|
||||||
'ja' => '今回は',
|
'ja' => '今回は',
|
||||||
'ko-kr' => '이번에는',
|
'ko-kr' => '이번에는',
|
||||||
|
'fa' => 'این زمان',
|
||||||
],
|
],
|
||||||
'LastUpload' => [
|
'LastUpload' => [
|
||||||
'en-us' => 'Last time Upload',
|
'en-us' => 'Last time Upload',
|
||||||
'zh-cn' => '上次上传',
|
'zh-cn' => '上次上传',
|
||||||
'ja' => '上回は',
|
'ja' => '上回は',
|
||||||
'ko-kr' => '마지막 업로드',
|
'ko-kr' => '마지막 업로드',
|
||||||
|
'fa' => 'آخرین زمان آپلود',
|
||||||
],
|
],
|
||||||
'AverageSpeed' => [
|
'AverageSpeed' => [
|
||||||
'en-us' => 'AverageSpeed',
|
'en-us' => 'AverageSpeed',
|
||||||
'zh-cn' => '平均速度',
|
'zh-cn' => '平均速度',
|
||||||
'ja' => '平均速度',
|
'ja' => '平均速度',
|
||||||
'ko-kr' => '평균 속도',
|
'ko-kr' => '평균 속도',
|
||||||
|
'fa' => 'میانگین سرعت',
|
||||||
],
|
],
|
||||||
'CurrentSpeed' => [
|
'CurrentSpeed' => [
|
||||||
'en-us' => 'CurrentSpeed',
|
'en-us' => 'CurrentSpeed',
|
||||||
'zh-cn' => '即时速度',
|
'zh-cn' => '即时速度',
|
||||||
'ja' => 'インスタントスピード',
|
'ja' => 'インスタントスピード',
|
||||||
'ko-kr' => '즉각적인 속도',
|
'ko-kr' => '즉각적인 속도',
|
||||||
|
'fa' => 'سرعت فعلی',
|
||||||
],
|
],
|
||||||
'Expect' => [
|
'Expect' => [
|
||||||
'en-us' => 'Expect',
|
'en-us' => 'Expect',
|
||||||
'zh-cn' => '预计还要',
|
'zh-cn' => '预计还要',
|
||||||
'ja' => '期待される',
|
'ja' => '期待される',
|
||||||
'ko-kr' => '예상',
|
'ko-kr' => '예상',
|
||||||
|
'fa' => 'انتظار',
|
||||||
],
|
],
|
||||||
'EndAt' => [
|
'EndAt' => [
|
||||||
'en-us' => 'End At',
|
'en-us' => 'End At',
|
||||||
'zh-cn' => '结束于',
|
'zh-cn' => '结束于',
|
||||||
'ja' => 'で終了',
|
'ja' => 'で終了',
|
||||||
'ko-kr' => '에 끝남',
|
'ko-kr' => '에 끝남',
|
||||||
|
'fa' => 'پایان از',
|
||||||
],
|
],
|
||||||
'UploadErrorUpAgain' => [
|
'UploadErrorUpAgain' => [
|
||||||
'en-us' => 'Maybe error, do upload again.',
|
'en-us' => 'Maybe error, do upload again.',
|
||||||
'zh-cn' => '可能出错,重新上传。',
|
'zh-cn' => '可能出错,重新上传。',
|
||||||
'ja' => '間違っている可能性があります。もう一度アップロードしてください。',
|
'ja' => '間違っている可能性があります。もう一度アップロードしてください。',
|
||||||
'ko-kr' => '잘못되었을 수 있습니다. 다시 업로드하십시오.',
|
'ko-kr' => '잘못되었을 수 있습니다. 다시 업로드하십시오.',
|
||||||
|
'fa' => 'خطا، دوباره آپلود کنید',
|
||||||
],
|
],
|
||||||
'UploadComplete' => [
|
'UploadComplete' => [
|
||||||
'en-us' => 'Upload Complete',
|
'en-us' => 'Upload Complete',
|
||||||
'zh-cn' => '上传完成',
|
'zh-cn' => '上传完成',
|
||||||
'ja' => 'アップロード完了',
|
'ja' => 'アップロード完了',
|
||||||
'ko-kr' => '업로드 완료',
|
'ko-kr' => '업로드 완료',
|
||||||
|
'fa' => 'آپلود با موفقیت انجام شد',
|
||||||
],
|
],
|
||||||
'UploadFail23' => [
|
'UploadFail23' => [
|
||||||
'en-us' => 'Upload Fail, contain #.',
|
'en-us' => 'Upload Fail, contain #.',
|
||||||
'zh-cn' => '目录或文件名含有#,上传失败。',
|
'zh-cn' => '目录或文件名含有#,上传失败。',
|
||||||
'ja' => 'ディレクトリまたはファイル名に#が含まれています。アップロードに失敗しました。',
|
'ja' => 'ディレクトリまたはファイル名に#が含まれています。アップロードに失敗しました。',
|
||||||
'ko-kr' => '디렉토리 또는 파일 이름에 #이 포함되어 있습니다. 업로드하지 못했습니다.',
|
'ko-kr' => '디렉토리 또는 파일 이름에 #이 포함되어 있습니다. 업로드하지 못했습니다.',
|
||||||
|
'fa' => 'بارگذاری ناموفق، حاوی #.',
|
||||||
],
|
],
|
||||||
'defaultSitename' => [
|
'defaultSitename' => [
|
||||||
'en-us' => 'OneManager',
|
'en-us' => 'OneManager',
|
||||||
'zh-cn' => 'OneManager',
|
|
||||||
'ja' => 'OneManager',
|
|
||||||
'ko-kr' => 'OneManager',
|
|
||||||
],
|
],
|
||||||
'SavingToken' => [
|
'SavingToken' => [
|
||||||
'en-us' => 'Saving refresh_token!',
|
'en-us' => 'Saving refresh_token!',
|
||||||
'zh-cn' => '正在保存 refresh_token!',
|
'zh-cn' => '正在保存 refresh_token!',
|
||||||
'ja' => 'refresh_tokenを保存しています!',
|
'ja' => 'refresh_tokenを保存しています!',
|
||||||
'ko-kr' => 'refresh_token 저장 중!',
|
'ko-kr' => 'refresh_token 저장 중!',
|
||||||
|
'fa' => 'در حال ذخیره refresh_token!',
|
||||||
],
|
],
|
||||||
'MayinEnv' => [
|
'MayinEnv' => [
|
||||||
'en-us' => 'The \'Onedrive_ver\' may in Config',
|
'en-us' => 'The \'Onedrive_ver\' may in Config',
|
||||||
'zh-cn' => 'Onedrive_ver应该已经写入',
|
'zh-cn' => 'Onedrive_ver应该已经写入',
|
||||||
'ja' => 'Onedrive_verは環境変数に書き込まれている必要があります',
|
'ja' => 'Onedrive_verは環境変数に書き込まれている必要があります',
|
||||||
'ko-kr' => 'Onedrive_verが書き込まれている必要があります',
|
'ko-kr' => 'Onedrive_verが書き込まれている必要があります',
|
||||||
|
'fa' => 'The \'Onedrive_ver\' may in Config',
|
||||||
],
|
],
|
||||||
'Wait' => [
|
'Wait' => [
|
||||||
'en-us' => 'Wait',
|
'en-us' => 'Wait',
|
||||||
'zh-cn' => '稍等',
|
'zh-cn' => '稍等',
|
||||||
'ja' => 'ちょっと待って',
|
'ja' => 'ちょっと待って',
|
||||||
'ko-kr' => '잠깐만',
|
'ko-kr' => '잠깐만',
|
||||||
|
'fa' => 'منتظر بمانید',
|
||||||
],
|
],
|
||||||
'WaitJumpIndex' => [
|
'WaitJumpIndex' => [
|
||||||
'en-us' => 'Wait 5s jump to Home page',
|
'en-us' => 'Wait 5s jump to Home page',
|
||||||
'zh-cn' => '等5s跳到首页',
|
'zh-cn' => '等5s跳到首页',
|
||||||
'ja' => '5秒待ってホームページにジャンプします',
|
'ja' => '5秒待ってホームページにジャンプします',
|
||||||
'ko-kr' => '5 초 동안 홈페이지로 이동',
|
'ko-kr' => '5 초 동안 홈페이지로 이동',
|
||||||
|
'fa' => '۵ دقیقه صبر کنید تا به صفحه نخست برگردید',
|
||||||
],
|
],
|
||||||
'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',
|
||||||
'ja' => 'Officeにジャンプしてログインし、refresh_tokenを取得します',
|
'ja' => 'Officeにジャンプしてログインし、refresh_tokenを取得します',
|
||||||
'ko-kr' => '사무실로 이동하여 로그인하여 refresh_token을 받으십시오.',
|
'ko-kr' => '사무실로 이동하여 로그인하여 refresh_token을 받으십시오.',
|
||||||
|
'fa' => 'وارد Office شوید و یک refresh_token دریافت کنید',
|
||||||
],
|
],
|
||||||
'OnedriveDiskTag' => [
|
'OnedriveDiskTag' => [
|
||||||
'en-us' => 'Onedrive Disk Tag',
|
'en-us' => 'Onedrive Disk Tag',
|
||||||
'zh-cn' => 'Onedrive 标签',
|
'zh-cn' => 'Onedrive 标签',
|
||||||
'ja' => 'Onedriveタグ',
|
'ja' => 'Onedriveタグ',
|
||||||
'ko-kr' => 'Onedrive 태그',
|
'ko-kr' => 'Onedrive 태그',
|
||||||
|
'fa' => 'برچسب دیسک Onedrive',
|
||||||
],
|
],
|
||||||
'OnedriveDiskName' => [
|
'OnedriveDiskName' => [
|
||||||
'en-us' => 'Onedrive Showed Name',
|
'en-us' => 'Onedrive Showed Name',
|
||||||
'zh-cn' => 'Onedrive 显示名称',
|
'zh-cn' => 'Onedrive 显示名称',
|
||||||
'ja' => 'Onedrive表示名',
|
'ja' => 'Onedrive表示名',
|
||||||
'ko-kr' => 'Onedrive 표시 이름',
|
'ko-kr' => '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' => '기본 (상업용 및 개인용 버전 지원)',
|
|
||||||
],
|
],
|
||||||
'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 در چین',
|
||||||
],
|
],
|
||||||
'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' => 'به طور پیش فرض اما از شناسه برنامه و سکرت استفاده کنید',
|
||||||
],
|
],
|
||||||
'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' => 'دریافت شناسه برنامه و سکرت',
|
||||||
|
],
|
||||||
|
'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位',
|
||||||
'ja' => 'タグは、文字で始まり、文字または数字で終わる必要があります。少なくとも2つ',
|
'ja' => 'タグは、文字で始まり、文字または数字で終わる必要があります。少なくとも2つ',
|
||||||
'ko-kr' => '태그는 문자로 시작하고 문자 또는 숫자로 끝나야합니다 (2 이상).',
|
'ko-kr' => '태그는 문자로 시작하고 문자 또는 숫자로 끝나야합니다 (2 이상).',
|
||||||
|
'fa' => 'برچسب باید با یک حرف شروع شود، با یک حرف یا رقم پایان یابد و تنها میتواند حاوی حروف کوچک، ارقام و خط فاصله، حداقل ۲ حرف باشد!',
|
||||||
],
|
],
|
||||||
'ClickInstall' => [
|
'ClickInstall' => [
|
||||||
'en-us' => 'Click to install the project',
|
'en-us' => 'Click to install the project',
|
||||||
'zh-cn' => '点击开始安装程序',
|
'zh-cn' => '点击开始安装程序',
|
||||||
'ja' => 'クリックしてインストールプロセスを開始します',
|
'ja' => 'クリックしてインストールプロセスを開始します',
|
||||||
'ko-kr' => '설치 과정을 시작하려면 클릭',
|
'ko-kr' => '설치 과정을 시작하려면 클릭',
|
||||||
|
'fa' => 'برای نصب پروژه کلیک کنید',
|
||||||
],
|
],
|
||||||
'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。',
|
||||||
'ja' => '次に、ログインして、設定でonedriveをバインドします。',
|
'ja' => '次に、ログインして、設定でonedriveをバインドします。',
|
||||||
'ko-kr' => '그런 다음 로그인하여 onedrive를 설정에 바인딩하십시오.',
|
'ko-kr' => '그런 다음 로그인하여 onedrive를 설정에 바인딩하십시오.',
|
||||||
|
'fa' => 'پس از آن وارد سیستم شوید و تنظیمات خود را در onedrive متصل کنید',
|
||||||
],
|
],
|
||||||
'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可写。',
|
||||||
'ja' => 'config.phpが書き込み可能であることを確認してください。',
|
'ja' => 'config.phpが書き込み可能であることを確認してください。',
|
||||||
'ko-kr' => 'config.php가 쓰기 가능한지 확인하십시오.',
|
'ko-kr' => 'config.php가 쓰기 가능한지 확인하십시오.',
|
||||||
|
'fa' => 'اطمینان حاصل کنید که config.php قابل نوشتن است. writeable.sh را اجرا کنید.',
|
||||||
],
|
],
|
||||||
'MakesuerRewriteOn' => [
|
'MakesuerRewriteOn' => [
|
||||||
'en-us' => 'Plase make sure the RewriteEngine is On.',
|
'en-us' => 'Plase make sure the RewriteEngine is On.',
|
||||||
'zh-cn' => '确认重写(伪静态)功能启用。',
|
'zh-cn' => '确认重写(伪静态)功能启用。',
|
||||||
'ja' => '書き換え(擬似静的)機能が有効になっていることを確認します。',
|
'ja' => '書き換え(擬似静的)機能が有効になっていることを確認します。',
|
||||||
'ko-kr' => '다시 쓰기 (의사 정적) 기능이 활성화되어 있는지 확인하십시오.',
|
'ko-kr' => '다시 쓰기 (의사 정적) 기능이 활성화되어 있는지 확인하십시오.',
|
||||||
|
'fa' => 'لطفاً مطمئن شوید که RewriteEngine روشن است.',
|
||||||
],
|
],
|
||||||
|
'CopyUrl' => [
|
||||||
'Reflesh' => [
|
'en-us' => 'Copy URL',
|
||||||
'en-us' => 'Reflesh',
|
'zh-cn' => '复制链接',
|
||||||
|
],
|
||||||
|
'Success' => [
|
||||||
|
'en-us' => 'Success',
|
||||||
|
'zh-cn' => '成功',
|
||||||
|
],
|
||||||
|
'SetAdminPassword' => [
|
||||||
|
'en-us' => 'Set Admin Password',
|
||||||
|
'zh-cn' => '设置管理密码',
|
||||||
|
],
|
||||||
|
'Refresh' => [
|
||||||
|
'en-us' => 'Refresh',
|
||||||
'zh-cn' => '刷新',
|
'zh-cn' => '刷新',
|
||||||
'ja' => 'リフレッシュ',
|
'ja' => 'リフレッシュ',
|
||||||
'ko-kr' => '새로 고침',
|
'ko-kr' => '새로 고침',
|
||||||
|
'fa' => 'رفرش',
|
||||||
],
|
],
|
||||||
'SelectLanguage' => [
|
'SelectLanguage' => [
|
||||||
'en-us' => 'Select Language',
|
'en-us' => 'Select Language',
|
||||||
'zh-cn' => '选择语言',
|
'zh-cn' => '选择语言',
|
||||||
'ja' => '言語を選択してください',
|
'ja' => '言語を選択してください',
|
||||||
'ko-kr' => '언어를 선택하십시오',
|
'ko-kr' => '언어를 선택하십시오',
|
||||||
|
'fa' => 'زبان را انتخاب کنید',
|
||||||
],
|
],
|
||||||
'RefreshCache' => [
|
'RefreshCache' => [
|
||||||
'en-us' => 'RefreshCache',
|
'en-us' => 'RefreshCache',
|
||||||
'zh-cn' => '刷新缓存',
|
'zh-cn' => '刷新缓存',
|
||||||
'ja' => 'キャッシュを再構築',
|
'ja' => 'キャッシュを再構築',
|
||||||
'ko-kr' => '캐시 플러시',
|
'ko-kr' => '캐시 플러시',
|
||||||
|
'fa' => 'رفرش cache',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -40,16 +40,25 @@ function getGET()
|
||||||
function getConfig($str, $disktag = '')
|
function getConfig($str, $disktag = '')
|
||||||
{
|
{
|
||||||
global $InnerEnv;
|
global $InnerEnv;
|
||||||
if ($disktag=='') $disktag = $_SERVER['disktag'];
|
global $Base64Env;
|
||||||
if (in_array($str, $InnerEnv)) {
|
if (in_array($str, $InnerEnv)) {
|
||||||
return json_decode(getenv($disktag), true)[$str];
|
if ($disktag=='') $disktag = $_SERVER['disktag'];
|
||||||
|
$env = json_decode(getenv($disktag), true);
|
||||||
|
if (isset($env[$str])) {
|
||||||
|
if (in_array($str, $Base64Env)) return equal_replace($env[$str],1);
|
||||||
|
else return $env[$str];
|
||||||
}
|
}
|
||||||
return getenv($str);
|
} else {
|
||||||
|
if (in_array($str, $Base64Env)) return equal_replace(getenv($str),1);
|
||||||
|
else return getenv($str);
|
||||||
|
}
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
function setConfig($arr, $disktag = '')
|
function setConfig($arr, $disktag = '')
|
||||||
{
|
{
|
||||||
global $InnerEnv;
|
global $InnerEnv;
|
||||||
|
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);
|
||||||
|
@ -58,7 +67,8 @@ function setConfig($arr, $disktag = '')
|
||||||
$oparetdisk = 0;
|
$oparetdisk = 0;
|
||||||
foreach ($arr as $k => $v) {
|
foreach ($arr as $k => $v) {
|
||||||
if (in_array($k, $InnerEnv)) {
|
if (in_array($k, $InnerEnv)) {
|
||||||
$diskconfig[$k] = $v;
|
if (in_array($k, $Base64Env)) $diskconfig[$k] = equal_replace($v);
|
||||||
|
else $diskconfig[$k] = $v;
|
||||||
$indisk = 1;
|
$indisk = 1;
|
||||||
} elseif ($k=='disktag_add') {
|
} elseif ($k=='disktag_add') {
|
||||||
array_push($disktags, $v);
|
array_push($disktags, $v);
|
||||||
|
@ -68,7 +78,8 @@ function setConfig($arr, $disktag = '')
|
||||||
$tmp[$v] = '';
|
$tmp[$v] = '';
|
||||||
$oparetdisk = 1;
|
$oparetdisk = 1;
|
||||||
} else {
|
} else {
|
||||||
$tmp[$k] = $v;
|
if (in_array($k, $Base64Env)) $tmp[$k] = equal_replace($v);
|
||||||
|
else $tmp[$k] = $v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($indisk) {
|
if ($indisk) {
|
||||||
|
@ -82,146 +93,12 @@ function setConfig($arr, $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'] = '';
|
||||||
}
|
}
|
||||||
|
foreach ($tmp as $key => $val) if ($val=='') $tmp[$key]=null;
|
||||||
// echo '正式设置:'.json_encode($tmp,JSON_PRETTY_PRINT).'
|
// echo '正式设置:'.json_encode($tmp,JSON_PRETTY_PRINT).'
|
||||||
//';
|
//';
|
||||||
return setHerokuConfig($tmp, getConfig('function_name'), getConfig('APIKey'));
|
return setHerokuConfig($tmp, getConfig('function_name'), getConfig('APIKey'));
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_refresh_token()
|
|
||||||
{
|
|
||||||
global $constStr;
|
|
||||||
global $CommonEnv;
|
|
||||||
foreach ($CommonEnv as $env) $envs .= '\'' . $env . '\', ';
|
|
||||||
$url = path_format($_SERVER['PHP_SELF'] . '/');
|
|
||||||
if ($_GET['authorization_code'] && isset($_GET['code'])) {
|
|
||||||
$_SERVER['disktag'] = $_COOKIE['disktag'];
|
|
||||||
config_oauth();
|
|
||||||
$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'];
|
|
||||||
$str = '
|
|
||||||
refresh_token :<br>';
|
|
||||||
/*for ($i=1;strlen($tmptoken)>0;$i++) {
|
|
||||||
$t['t' . $i] = substr($tmptoken,0,128);
|
|
||||||
$str .= '
|
|
||||||
t' . $i . ':<textarea readonly style="width: 95%">' . $t['t' . $i] . '</textarea><br><br>';
|
|
||||||
$tmptoken=substr($tmptoken,128);
|
|
||||||
}
|
|
||||||
$str .= '
|
|
||||||
Add t1-t'.--$i.' to environments.*/
|
|
||||||
$str .= '
|
|
||||||
<textarea readonly style="width: 95%">' . $tmptoken . '</textarea><br><br>
|
|
||||||
'.getconstStr('SavingToken').'
|
|
||||||
<script>
|
|
||||||
var texta=document.getElementsByTagName(\'textarea\');
|
|
||||||
for(i=0;i<texta.length;i++) {
|
|
||||||
texta[i].style.height = texta[i].scrollHeight + \'px\';
|
|
||||||
}
|
|
||||||
document.cookie=\'language=; path=/\';
|
|
||||||
document.cookie=\'disktag=; path=/\';
|
|
||||||
</script>';
|
|
||||||
setConfig([ 'refresh_token' => $tmptoken, 'token_expires' => time()+30*24*60*60 ], $_COOKIE['disktag']);
|
|
||||||
savecache('access_token', $ret['access_token'], $ret['expires_in'] - 60);
|
|
||||||
$str .= '
|
|
||||||
<meta http-equiv="refresh" content="2;URL=' . $url . '">';
|
|
||||||
return message($str, getconstStr('WaitJumpIndex'));
|
|
||||||
}
|
|
||||||
return message('<pre>' . $tmp['body'] . '</pre>', $tmp['stat']);
|
|
||||||
//return message('<pre>' . json_encode($ret, JSON_PRETTY_PRINT) . '</pre>', 500);
|
|
||||||
}
|
|
||||||
if ($_GET['install1']) {
|
|
||||||
$_SERVER['disk_oprating'] = $_COOKIE['disktag'];
|
|
||||||
$_SERVER['disktag'] = $_COOKIE['disktag'];
|
|
||||||
config_oauth();
|
|
||||||
if (getConfig('Onedrive_ver')=='MS' || getConfig('Onedrive_ver')=='CN' || getConfig('Onedrive_ver')=='MSC') {
|
|
||||||
return message('
|
|
||||||
<a href="" id="a1">'.getconstStr('JumptoOffice').'</a>
|
|
||||||
<script>
|
|
||||||
url=location.protocol + "//" + location.host + "'.$url.'";
|
|
||||||
url="'. $_SERVER['oauth_url'] .'authorize?scope='. $_SERVER['scope'] .'&response_type=code&client_id='. $_SERVER['client_id'] .'&redirect_uri='. $_SERVER['redirect_uri'] . '&state=' .'"+encodeURIComponent(url);
|
|
||||||
document.getElementById(\'a1\').href=url;
|
|
||||||
//window.open(url,"_blank");
|
|
||||||
location.href = url;
|
|
||||||
</script>
|
|
||||||
', getconstStr('Wait').' 1s', 201);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($_GET['install0']) {
|
|
||||||
if ($_POST['disktag_add']!='' && ($_POST['Onedrive_ver']=='MS' || $_POST['Onedrive_ver']=='CN' || $_POST['Onedrive_ver']=='MSC')) {
|
|
||||||
if (in_array($_COOKIE['disktag'], $CommonEnv)) {
|
|
||||||
return message('Do not input ' . $envs . '<br><button onclick="location.href = location.href;">'.getconstStr('Reflesh').'</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['client_id'] = $_POST['client_id'];
|
|
||||||
$tmp['client_secret'] = equal_replace(base64_encode($_POST['client_secret']));
|
|
||||||
//$_POST['client_secret'];
|
|
||||||
}
|
|
||||||
$response = json_decode( setConfig($tmp, $_COOKIE['disktag']), true )['Response'];
|
|
||||||
$title = getconstStr('MayinEnv');
|
|
||||||
$html = getconstStr('Wait') . ' 3s<meta http-equiv="refresh" content="3;URL=' . $url . '?AddDisk&install1">';
|
|
||||||
if (isset($response['id'])&&isset($response['message'])) {
|
|
||||||
$html = $response['id'] . '<br>
|
|
||||||
' . $response['message'] . '<br><br>
|
|
||||||
function_name:' . $_SERVER['function_name'] . '<br>
|
|
||||||
<button onclick="location.href = location.href;">'.$constStr['Reflesh'][$constStr['language']].'</button>';
|
|
||||||
$title = 'Error';
|
|
||||||
}
|
|
||||||
return message($html, $title, 201);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($constStr['language']!='zh-cn') {
|
|
||||||
$linklang='en-us';
|
|
||||||
} else $linklang='zh-cn';
|
|
||||||
$ru = "https://developer.microsoft.com/".$linklang."/graph/quick-start?appID=_appId_&appName=_appName_&redirectUrl=".$_SERVER['redirect_uri']."&platform=option-php";
|
|
||||||
$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 = '
|
|
||||||
<form action="?AddDisk&install0" method="post" onsubmit="return notnull(this);">
|
|
||||||
'.getconstStr('OnedriveDiskTag').':<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>MS: '.getconstStr('OndriveVerMS').'</label><br>
|
|
||||||
<label><input type="radio" name="Onedrive_ver" value="CN">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">
|
|
||||||
<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>
|
|
||||||
<input type="submit" value="'.getconstStr('Submit').'">
|
|
||||||
</form>
|
|
||||||
<script>
|
|
||||||
function notnull(t)
|
|
||||||
{
|
|
||||||
if (t.disktag_add.value==\'\') {
|
|
||||||
alert(\'Input Disk Tag\');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
envs = [' . $envs . '];
|
|
||||||
if (envs.indexOf(t.disktag_add.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_add.value)) {
|
|
||||||
alert(\''.getconstStr('TagFormatAlert').'\');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
document.cookie=\'disktag=\'+t.disktag_add.value+\'; path=/\';
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
</script>';
|
|
||||||
$title = 'Bind Onedrive';
|
|
||||||
return message($html, $title, 201);
|
|
||||||
}
|
|
||||||
|
|
||||||
function install()
|
function install()
|
||||||
{
|
{
|
||||||
global $constStr;
|
global $constStr;
|
||||||
|
@ -243,11 +120,8 @@ function install()
|
||||||
$tmp['function_name'] = $function_name;
|
$tmp['function_name'] = $function_name;
|
||||||
}
|
}
|
||||||
$response = json_decode(setHerokuConfig($tmp, $function_name, $APIKey)['body'], true);
|
$response = json_decode(setHerokuConfig($tmp, $function_name, $APIKey)['body'], true);
|
||||||
if (isset($response['id'])&&isset($response['message'])) {
|
if (api_error($response)) {
|
||||||
$html = $response['id'] . '<br>
|
$html = api_error_msg($response);
|
||||||
' . $response['message'] . '<br><br>
|
|
||||||
function_name:' . $_SERVER['function_name'] . '<br>
|
|
||||||
<button onclick="location.href = location.href;">'.$constStr['Reflesh'][$constStr['language']].'</button>';
|
|
||||||
$title = 'Error';
|
$title = 'Error';
|
||||||
} else {
|
} else {
|
||||||
return output('Jump<meta http-equiv="refresh" content="3;URL=' . path_format($_SERVER['base_path'] . '/') . '">', 302);
|
return output('Jump<meta http-equiv="refresh" content="3;URL=' . path_format($_SERVER['base_path'] . '/') . '">', 302);
|
||||||
|
@ -352,173 +226,25 @@ function updateHerokuapp($function_name, $apikey)
|
||||||
return HerokuAPI('POST', 'https://api.heroku.com/apps/' . $function_name . '/builds', $data, $apikey);
|
return HerokuAPI('POST', 'https://api.heroku.com/apps/' . $function_name . '/builds', $data, $apikey);
|
||||||
}
|
}
|
||||||
|
|
||||||
function EnvOpt($function_name, $needUpdate = 0)
|
function api_error($response)
|
||||||
{
|
{
|
||||||
global $constStr;
|
return isset($response['id'])&&isset($response['message']);
|
||||||
global $ShowedCommonEnv;
|
}
|
||||||
global $ShowedInnerEnv;
|
|
||||||
asort($ShowedCommonEnv);
|
function api_error_msg($response)
|
||||||
asort($ShowedInnerEnv);
|
{
|
||||||
$html = '<title>OneManager '.getconstStr('Setup').'</title>';
|
return $response['id'] . '<br>
|
||||||
if ($_POST['updateProgram']==getconstStr('updateProgram')) {
|
|
||||||
$response = json_decode(updateHerokuapp(getConfig('function_name'), getConfig('APIKey'))['body'], true);
|
|
||||||
if (isset($response['id'])&&isset($response['message'])) {
|
|
||||||
$html = $response['id'] . '<br>
|
|
||||||
' . $response['message'] . '<br><br>
|
' . $response['message'] . '<br><br>
|
||||||
function_name:' . $_SERVER['function_name'] . '<br>
|
function_name:' . $_SERVER['function_name'] . '<br>
|
||||||
<button onclick="location.href = location.href;">'.$constStr['Reflesh'][$constStr['language']].'</button>';
|
<button onclick="location.href = location.href;">'.getconstStr('Refresh').'</button>';
|
||||||
$title = 'Error';
|
|
||||||
} else {
|
|
||||||
$html .= getconstStr('UpdateSuccess') . '<br>
|
|
||||||
<button onclick="location.href = location.href;">'.getconstStr('Reflesh').'</button>';
|
|
||||||
$title = getconstStr('Setup');
|
|
||||||
}
|
}
|
||||||
return message($html, $title);
|
|
||||||
|
function OnekeyUpate()
|
||||||
|
{
|
||||||
|
return json_decode(updateHerokuapp(getConfig('function_name'), getConfig('APIKey'))['body'], true);
|
||||||
}
|
}
|
||||||
if ($_POST['submit1']) {
|
|
||||||
foreach ($_POST as $k => $v) {
|
function setConfigResponse($response)
|
||||||
if (in_array($k, $constEnv)) {
|
{
|
||||||
if (!(getConfig($k)==''&&$v=='')) $tmp[$k] = $v;
|
return json_decode( $response['body'], true );
|
||||||
}
|
|
||||||
}
|
|
||||||
$_SERVER['disk_oprating'] = '';
|
|
||||||
foreach ($_POST as $k => $v) {
|
|
||||||
if (in_array($k, $ShowedCommonEnv)) {
|
|
||||||
if (!(getConfig($k)==''&&$v=='')) $tmp[$k] = $v;
|
|
||||||
}
|
|
||||||
if (in_array($k, $ShowedInnerEnv)||$k=='disktag_del' || $k=='disktag_add') {
|
|
||||||
$tmp[$k] = $v;
|
|
||||||
}
|
|
||||||
if ($k == 'disk') $_SERVER['disk_oprating'] = $v;
|
|
||||||
}
|
|
||||||
/*if ($tmp['domain_path']!='') {
|
|
||||||
$tmp1 = explode("|",$tmp['domain_path']);
|
|
||||||
$tmparr = [];
|
|
||||||
foreach ($tmp1 as $multidomain_paths){
|
|
||||||
$pos = strpos($multidomain_paths,":");
|
|
||||||
if ($pos>0) $tmparr[substr($multidomain_paths, 0, $pos)] = path_format(substr($multidomain_paths, $pos+1));
|
|
||||||
}
|
|
||||||
$tmp['domain_path'] = $tmparr;
|
|
||||||
}*/
|
|
||||||
$response = json_decode(setConfig($tmp, $_SERVER['disk_oprating'])['body'], true);
|
|
||||||
if (isset($response['id'])&&isset($response['message'])) {
|
|
||||||
$html = $response['id'] . '<br>
|
|
||||||
' . $response['message'] . '<br><br>
|
|
||||||
function_name:' . $_SERVER['function_name'] . '<br>
|
|
||||||
<button onclick="location.href = location.href;">'.$constStr['Reflesh'][$constStr['language']].'</button>';
|
|
||||||
$title = 'Error';
|
|
||||||
} else {
|
|
||||||
$html .= '<script>location.href=location.href</script>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($_GET['preview']) {
|
|
||||||
$preurl = $_SERVER['PHP_SELF'] . '?preview';
|
|
||||||
} else {
|
|
||||||
$preurl = path_format($_SERVER['PHP_SELF'] . '/');
|
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
<a href="'.$preurl.'">'.getconstStr('Back').'</a> <a href="'.$_SERVER['base_path'].'">'.getconstStr('Back').getconstStr('Home').'</a><br>
|
|
||||||
<a href="https://github.com/qkqpttgf/OneManager-php">Github</a><br>
|
|
||||||
<form action="" method="post">
|
|
||||||
';
|
|
||||||
if ($needUpdate) {
|
|
||||||
$html .= '<pre>' . $_SERVER['github_version'] . '</pre>';
|
|
||||||
} else {
|
|
||||||
$html .= getconstStr('NotNeedUpdate');
|
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
<input type="submit" name="updateProgram" value="'.getconstStr('updateProgram').'">
|
|
||||||
</form>
|
|
||||||
<table border=1 width=100%>
|
|
||||||
<form name="common" action="" method="post">
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">'.getconstStr('PlatformConfig').'</td>
|
|
||||||
</tr>';
|
|
||||||
foreach ($ShowedCommonEnv as $key) {
|
|
||||||
if ($key=='language') {
|
|
||||||
$html .= '
|
|
||||||
<tr>
|
|
||||||
<td><label>' . $key . '</label></td>
|
|
||||||
<td width=100%>
|
|
||||||
<select name="' . $key .'">';
|
|
||||||
foreach ($constStr['languages'] as $key1 => $value1) {
|
|
||||||
$html .= '
|
|
||||||
<option value="'.$key1.'" '.($key1==getConfig($key)?'selected="selected"':'').'>'.$value1.'</option>';
|
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>';
|
|
||||||
} elseif ($key=='theme') {
|
|
||||||
$theme_arr = scandir('theme');
|
|
||||||
$html .= '
|
|
||||||
<tr>
|
|
||||||
<td><label>' . $key . '</label></td>
|
|
||||||
<td width=100%>
|
|
||||||
<select name="' . $key .'">
|
|
||||||
<option value=""></option>';
|
|
||||||
foreach ($theme_arr as $v1) {
|
|
||||||
if ($v1!='.' && $v1!='..') $html .= '
|
|
||||||
<option value="'.$v1.'" '.($v1==getConfig($key)?'selected="selected"':'').'>'.$v1.'</option>';
|
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>';
|
|
||||||
} /*elseif ($key=='domain_path') {
|
|
||||||
$tmp = getConfig($key);
|
|
||||||
$domain_path = '';
|
|
||||||
foreach ($tmp as $k1 => $v1) {
|
|
||||||
$domain_path .= $k1 . ':' . $v1 . '|';
|
|
||||||
}
|
|
||||||
$domain_path = substr($domain_path, 0, -1);
|
|
||||||
$html .= '
|
|
||||||
<tr>
|
|
||||||
<td><label>' . $key . '</label></td>
|
|
||||||
<td width=100%><input type="text" name="' . $key .'" value="' . $domain_path . '" placeholder="' . getconstStr('EnvironmentsDescription')[$key] . '" style="width:100%"></td>
|
|
||||||
</tr>';
|
|
||||||
}*/ else $html .= '
|
|
||||||
<tr>
|
|
||||||
<td><label>' . $key . '</label></td>
|
|
||||||
<td width=100%><input type="text" name="' . $key .'" value="' . getConfig($key) . '" placeholder="' . getconstStr('EnvironmentsDescription')[$key] . '" style="width:100%"></td>
|
|
||||||
</tr>';
|
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
<tr><td><input type="submit" name="submit1" value="'.getconstStr('Setup').'"></td></tr>
|
|
||||||
</form>
|
|
||||||
</table><br>';
|
|
||||||
foreach (explode("|",getConfig('disktag')) as $disktag) {
|
|
||||||
if ($disktag!='') {
|
|
||||||
$html .= '
|
|
||||||
<table border=1 width=100%>
|
|
||||||
<form action="" method="post">
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">'.$disktag.':
|
|
||||||
<input type="hidden" name="disktag_del" value="'.$disktag.'">
|
|
||||||
<input type="submit" name="submit1" value="'.getconstStr('DelDisk').'">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</form>';
|
|
||||||
if (getConfig('refresh_token', $disktag)!='') {
|
|
||||||
$html .= '
|
|
||||||
<form name="'.$disktag.'" action="" method="post">
|
|
||||||
<input type="hidden" name="disk" value="'.$disktag.'">';
|
|
||||||
foreach ($ShowedInnerEnv as $key) {
|
|
||||||
$html .= '
|
|
||||||
<tr>
|
|
||||||
<td><label>' . $key . '</label></td>
|
|
||||||
<td width=100%><input type="text" name="' . $key .'" value="' . getConfig($key, $disktag) . '" placeholder="' . getconstStr('EnvironmentsDescription')[$key] . '" style="width:100%"></td>
|
|
||||||
</tr>';
|
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
<tr><td><input type="submit" name="submit1" value="'.getconstStr('Setup').'"></td></tr>
|
|
||||||
</form>';
|
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
</table><br>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
<a href="?AddDisk">'.getconstStr('AddDisk').'</a>';
|
|
||||||
return message($html, getconstStr('Setup'));
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,15 +39,24 @@ function getGET()
|
||||||
function getConfig($str, $disktag = '')
|
function getConfig($str, $disktag = '')
|
||||||
{
|
{
|
||||||
global $InnerEnv;
|
global $InnerEnv;
|
||||||
|
global $Base64Env;
|
||||||
//include 'config.php';
|
//include 'config.php';
|
||||||
if ($disktag=='') $disktag = $_SERVER['disktag'];
|
|
||||||
$s = file_get_contents('config.php');
|
$s = file_get_contents('config.php');
|
||||||
$configs = substr($s, 18, -2);
|
$configs = substr($s, 18, -2);
|
||||||
if ($configs!='') {
|
if ($configs!='') {
|
||||||
$envs = json_decode($configs, true);
|
$envs = json_decode($configs, true);
|
||||||
if (in_array($str, $InnerEnv)) {
|
if (in_array($str, $InnerEnv)) {
|
||||||
if (isset($envs[$disktag][$str])) return $envs[$disktag][$str];
|
if ($disktag=='') $disktag = $_SERVER['disktag'];
|
||||||
} else if (isset($envs[$str])) return $envs[$str];
|
if (isset($envs[$disktag][$str])) {
|
||||||
|
if (in_array($str, $Base64Env)) return equal_replace($envs[$disktag][$str],1);
|
||||||
|
else return $envs[$disktag][$str];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (isset($envs[$str])) {
|
||||||
|
if (in_array($str, $Base64Env)) return equal_replace($envs[$str],1);
|
||||||
|
else return $envs[$str];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
@ -55,6 +64,7 @@ function getConfig($str, $disktag = '')
|
||||||
function setConfig($arr, $disktag = '')
|
function setConfig($arr, $disktag = '')
|
||||||
{
|
{
|
||||||
global $InnerEnv;
|
global $InnerEnv;
|
||||||
|
global $Base64Env;
|
||||||
if ($disktag=='') $disktag = $_SERVER['disktag'];
|
if ($disktag=='') $disktag = $_SERVER['disktag'];
|
||||||
//include 'config.php';
|
//include 'config.php';
|
||||||
$s = file_get_contents('config.php');
|
$s = file_get_contents('config.php');
|
||||||
|
@ -65,7 +75,8 @@ function setConfig($arr, $disktag = '')
|
||||||
$operatedisk = 0;
|
$operatedisk = 0;
|
||||||
foreach ($arr as $k => $v) {
|
foreach ($arr as $k => $v) {
|
||||||
if (in_array($k, $InnerEnv)) {
|
if (in_array($k, $InnerEnv)) {
|
||||||
$envs[$disktag][$k] = $v;
|
if (in_array($k, $Base64Env)) $envs[$disktag][$k] = equal_replace($v);
|
||||||
|
else $envs[$disktag][$k] = $v;
|
||||||
/*$diskconfig[$k] = $v;
|
/*$diskconfig[$k] = $v;
|
||||||
$indisk = 1;*/
|
$indisk = 1;*/
|
||||||
} elseif ($k=='disktag_add') {
|
} elseif ($k=='disktag_add') {
|
||||||
|
@ -76,7 +87,8 @@ function setConfig($arr, $disktag = '')
|
||||||
$envs[$v] = '';
|
$envs[$v] = '';
|
||||||
$operatedisk = 1;
|
$operatedisk = 1;
|
||||||
} else {
|
} else {
|
||||||
$envs[$k] = $v;
|
if (in_array($k, $Base64Env)) $envs[$k] = equal_replace($v);
|
||||||
|
else $envs[$k] = $v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*if ($indisk) {
|
/*if ($indisk) {
|
||||||
|
@ -100,180 +112,86 @@ function setConfig($arr, $disktag = '')
|
||||||
return file_put_contents('config.php', $prestr . json_encode($envs, JSON_PRETTY_PRINT) . $aftstr);
|
return file_put_contents('config.php', $prestr . json_encode($envs, JSON_PRETTY_PRINT) . $aftstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_refresh_token()
|
|
||||||
{
|
|
||||||
global $constStr;
|
|
||||||
global $CommonEnv;
|
|
||||||
foreach ($CommonEnv as $env) $envs .= '\'' . $env . '\', ';
|
|
||||||
$url = path_format($_SERVER['PHP_SELF'] . '/');
|
|
||||||
if ($_GET['authorization_code'] && isset($_GET['code'])) {
|
|
||||||
$_SERVER['disktag'] = $_COOKIE['disktag'];
|
|
||||||
config_oauth();
|
|
||||||
$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'];
|
|
||||||
$str = '
|
|
||||||
refresh_token :<br>';
|
|
||||||
/*for ($i=1;strlen($tmptoken)>0;$i++) {
|
|
||||||
$t['t' . $i] = substr($tmptoken,0,128);
|
|
||||||
$str .= '
|
|
||||||
t' . $i . ':<textarea readonly style="width: 95%">' . $t['t' . $i] . '</textarea><br><br>';
|
|
||||||
$tmptoken=substr($tmptoken,128);
|
|
||||||
}
|
|
||||||
$str .= '
|
|
||||||
Add t1-t'.--$i.' to environments.*/
|
|
||||||
$str .= '
|
|
||||||
<textarea readonly style="width: 95%">' . $tmptoken . '</textarea><br><br>
|
|
||||||
'.getconstStr('SavingToken').'
|
|
||||||
<script>
|
|
||||||
var texta=document.getElementsByTagName(\'textarea\');
|
|
||||||
for(i=0;i<texta.length;i++) {
|
|
||||||
texta[i].style.height = texta[i].scrollHeight + \'px\';
|
|
||||||
}
|
|
||||||
document.cookie=\'language=; path=/\';
|
|
||||||
document.cookie=\'disktag=; path=/\';
|
|
||||||
</script>';
|
|
||||||
setConfig([ 'refresh_token' => $tmptoken, 'token_expires' => time()+30*24*60*60 ], $_COOKIE['disktag']);
|
|
||||||
savecache('access_token', $ret['access_token'], $ret['expires_in'] - 60);
|
|
||||||
$str .= '
|
|
||||||
<meta http-equiv="refresh" content="2;URL=' . $url . '">';
|
|
||||||
return message($str, getconstStr('WaitJumpIndex'));
|
|
||||||
}
|
|
||||||
return message('<pre>' . $tmp['body'] . '</pre>', $tmp['stat']);
|
|
||||||
//return message('<pre>' . json_encode($ret, JSON_PRETTY_PRINT) . '</pre>', 500);
|
|
||||||
}
|
|
||||||
if ($_GET['install1']) {
|
|
||||||
$_SERVER['disk_oprating'] = $_COOKIE['disktag'];
|
|
||||||
$_SERVER['disktag'] = $_COOKIE['disktag'];
|
|
||||||
config_oauth();
|
|
||||||
if (getConfig('Onedrive_ver')=='MS' || getConfig('Onedrive_ver')=='CN' || getConfig('Onedrive_ver')=='MSC') {
|
|
||||||
return message('
|
|
||||||
<a href="" id="a1">'.getconstStr('JumptoOffice').'</a>
|
|
||||||
<script>
|
|
||||||
url=location.protocol + "//" + location.host + "'.$url.'";
|
|
||||||
url="'. $_SERVER['oauth_url'] .'authorize?scope='. $_SERVER['scope'] .'&response_type=code&client_id='. $_SERVER['client_id'] .'&redirect_uri='. $_SERVER['redirect_uri'] . '&state=' .'"+encodeURIComponent(url);
|
|
||||||
document.getElementById(\'a1\').href=url;
|
|
||||||
//window.open(url,"_blank");
|
|
||||||
location.href = url;
|
|
||||||
</script>
|
|
||||||
', getconstStr('Wait').' 1s', 201);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($_GET['install0']) {
|
|
||||||
if ($_POST['disktag_add']!='' && ($_POST['Onedrive_ver']=='MS' || $_POST['Onedrive_ver']=='CN' || $_POST['Onedrive_ver']=='MSC')) {
|
|
||||||
if (in_array($_COOKIE['disktag'], $CommonEnv)) {
|
|
||||||
return message('Do not input ' . $envs . '<br><button onclick="location.href = location.href;">'.getconstStr('Reflesh').'</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['client_id'] = $_POST['client_id'];
|
|
||||||
$tmp['client_secret'] = equal_replace(base64_encode($_POST['client_secret']));
|
|
||||||
//$_POST['client_secret'];
|
|
||||||
}
|
|
||||||
$response = setConfig($tmp, $_COOKIE['disktag']);
|
|
||||||
$title = getconstStr('MayinEnv');
|
|
||||||
$html = getconstStr('Wait') . ' 3s<meta http-equiv="refresh" content="3;URL=' . $url . '?AddDisk&install1">';
|
|
||||||
if (!$response) {
|
|
||||||
$html = $response . '<br>
|
|
||||||
Can not write config to file.<br>
|
|
||||||
<button onclick="location.href = location.href;">'.getconstStr('Reflesh').'</button>';
|
|
||||||
$title = 'Error';
|
|
||||||
}
|
|
||||||
return message($html, $title, 201);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($constStr['language']!='zh-cn') {
|
|
||||||
$linklang='en-us';
|
|
||||||
} else $linklang='zh-cn';
|
|
||||||
$ru = "https://developer.microsoft.com/".$linklang."/graph/quick-start?appID=_appId_&appName=_appName_&redirectUrl=".$_SERVER['redirect_uri']."&platform=option-php";
|
|
||||||
$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 = '
|
|
||||||
<form action="?AddDisk&install0" method="post" onsubmit="return notnull(this);">
|
|
||||||
'.getconstStr('OnedriveDiskTag').':<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>MS: '.getconstStr('OndriveVerMS').'</label><br>
|
|
||||||
<label><input type="radio" name="Onedrive_ver" value="CN">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">
|
|
||||||
<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>
|
|
||||||
<input type="submit" value="'.getconstStr('Submit').'">
|
|
||||||
</form>
|
|
||||||
<script>
|
|
||||||
function notnull(t)
|
|
||||||
{
|
|
||||||
if (t.disktag_add.value==\'\') {
|
|
||||||
alert(\'Input Disk Tag\');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
envs = [' . $envs . '];
|
|
||||||
if (envs.indexOf(t.disktag_add.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_add.value)) {
|
|
||||||
alert(\''.getconstStr('TagFormatAlert').'\');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
document.cookie=\'disktag=\'+t.disktag_add.value+\'; path=/\';
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
</script>';
|
|
||||||
$title = 'Bind Onedrive';
|
|
||||||
return message($html, $title, 201);
|
|
||||||
}
|
|
||||||
|
|
||||||
function install()
|
function install()
|
||||||
{
|
{
|
||||||
global $constStr;
|
global $constStr;
|
||||||
if ($_GET['install1']) {
|
if ($_GET['install2']) {
|
||||||
if ($_POST['admin']!='') {
|
if ($_POST['admin']!='') {
|
||||||
$tmp['admin'] = $_POST['admin'];
|
$tmp['admin'] = $_POST['admin'];
|
||||||
$tmp['language'] = $_POST['language'];
|
$tmp['language'] = $_COOKIE['language'];
|
||||||
$response = setConfig($tmp);
|
$response = setConfig($tmp);
|
||||||
if (!$response) {
|
if (api_error($response)) {
|
||||||
$html = $response . '<br>
|
$html = api_error_msg($response);
|
||||||
Can not write config to file.<br>
|
|
||||||
<button onclick="location.href = location.href;">'.getconstStr('Reflesh').'</button>';
|
|
||||||
$title = 'Error';
|
$title = 'Error';
|
||||||
return message($html, $title, 201);
|
return message($html, $title, 201);
|
||||||
} else {
|
} else {
|
||||||
return output('Jump<meta http-equiv="refresh" content="3;URL=' . path_format($_SERVER['base_path'] . '/') . '">', 302);
|
return output('Jump<script>document.cookie=\'language=; path=/\';</script><meta http-equiv="refresh" content="3;URL=' . path_format($_SERVER['base_path'] . '/') . '">', 302);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($_GET['install0']) {
|
if ($_GET['install1']) {
|
||||||
if (!ConfigWriteable()) {
|
if (!ConfigWriteable()) {
|
||||||
$html .= getconstStr('MakesuerWriteable');
|
$html .= getconstStr('MakesuerWriteable');
|
||||||
$title = 'Error';
|
$title = 'Error';
|
||||||
return message($html, $title, 201);
|
return message($html, $title, 201);
|
||||||
}
|
}
|
||||||
if (!RewriteEngineOn()) {
|
/*if (!RewriteEngineOn()) {
|
||||||
$html .= getconstStr('MakesuerRewriteOn');
|
$html .= getconstStr('MakesuerRewriteOn');
|
||||||
$title = 'Error';
|
$title = 'Error';
|
||||||
return message($html, $title, 201);
|
return message($html, $title, 201);
|
||||||
|
}*/
|
||||||
|
$html .= '<button id="checkrewritebtn" onclick="checkrewrite();">'.getconstStr('MakesuerRewriteOn').'</button>
|
||||||
|
<div id="formdiv" style="display: none">
|
||||||
|
<form action="?install2" method="post" onsubmit="return notnull(this);">
|
||||||
|
<input name="admin" type="password" placeholder="' . getconstStr('EnvironmentsDescription')['admin'] . '" size="' . strlen(getconstStr('EnvironmentsDescription')['admin']) . '"><br>
|
||||||
|
<input id="submitbtn" type="submit" value="'.getconstStr('Submit').'" disabled>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
function notnull(t)
|
||||||
|
{
|
||||||
|
if (t.admin.value==\'\') {
|
||||||
|
alert(\''.getconstStr('SetAdminPassword').'\');
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
function checkrewrite()
|
||||||
|
{
|
||||||
|
url=location.protocol + "//" + location.host;
|
||||||
|
//if (location.port!="") url += ":" + location.port;
|
||||||
|
url += location.pathname;
|
||||||
|
if (url.substr(-1)!="/") url += "/";
|
||||||
|
url += "config.php";
|
||||||
|
//alert(url);
|
||||||
|
var xhr4 = new XMLHttpRequest();
|
||||||
|
xhr4.open("GET", url);
|
||||||
|
xhr4.setRequestHeader("x-requested-with","XMLHttpRequest");
|
||||||
|
xhr4.send(null);
|
||||||
|
xhr4.onload = function(e){
|
||||||
|
console.log(xhr4.responseText+","+xhr4.status);
|
||||||
|
if (xhr4.status==201) {
|
||||||
|
document.getElementById("checkrewritebtn").style.display = "none";
|
||||||
|
document.getElementById("submitbtn").disabled = false;
|
||||||
|
document.getElementById("formdiv").style.display = "";
|
||||||
|
} else {
|
||||||
|
alert(url+"\n"+xhr4.status);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>';
|
||||||
|
$title = getconstStr('SetAdminPassword');
|
||||||
|
return message($html, $title, 201);
|
||||||
|
}
|
||||||
|
if ($_GET['install0']) {
|
||||||
$html .= '
|
$html .= '
|
||||||
<form action="?install1" method="post" onsubmit="return notnull(this);">
|
<form action="?install1" method="post">
|
||||||
language:<br>';
|
language:<br>';
|
||||||
foreach ($constStr['languages'] as $key1 => $value1) {
|
foreach ($constStr['languages'] as $key1 => $value1) {
|
||||||
$html .= '
|
$html .= '
|
||||||
<label><input type="radio" name="language" value="'.$key1.'" '.($key1==$constStr['language']?'checked':'').' onclick="changelanguage(\''.$key1.'\')">'.$value1.'</label><br>';
|
<label><input type="radio" name="language" value="'.$key1.'" '.($key1==$constStr['language']?'checked':'').' onclick="changelanguage(\''.$key1.'\')">'.$value1.'</label><br>';
|
||||||
}
|
}
|
||||||
$html .= '
|
$html .= '
|
||||||
<label>Set admin password:<input name="admin" type="password" placeholder="' . getconstStr('EnvironmentsDescription')['admin'] . '" size="' . strlen(getconstStr('EnvironmentsDescription')['admin']) . '"></label><br>';
|
|
||||||
$html .= '
|
|
||||||
<input type="submit" value="'.getconstStr('Submit').'">
|
<input type="submit" value="'.getconstStr('Submit').'">
|
||||||
</form>
|
</form>
|
||||||
<script>
|
<script>
|
||||||
|
@ -282,14 +200,6 @@ language:<br>';
|
||||||
document.cookie=\'language=\'+str+\'; path=/\';
|
document.cookie=\'language=\'+str+\'; path=/\';
|
||||||
location.href = location.href;
|
location.href = location.href;
|
||||||
}
|
}
|
||||||
function notnull(t)
|
|
||||||
{
|
|
||||||
if (t.admin.value==\'\') {
|
|
||||||
alert(\'input admin\');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
</script>';
|
</script>';
|
||||||
$title = getconstStr('SelectLanguage');
|
$title = getconstStr('SelectLanguage');
|
||||||
return message($html, $title, 201);
|
return message($html, $title, 201);
|
||||||
|
@ -302,10 +212,11 @@ language:<br>';
|
||||||
function ConfigWriteable()
|
function ConfigWriteable()
|
||||||
{
|
{
|
||||||
$t = md5( md5(time()).rand(1000,9999) );
|
$t = md5( md5(time()).rand(1000,9999) );
|
||||||
setConfig([ 'tmp' => $t ]);
|
$r = setConfig([ 'tmp' => $t ]);
|
||||||
$tmp = getConfig('tmp');
|
$tmp = getConfig('tmp');
|
||||||
setConfig([ 'tmp' => '' ]);
|
setConfig([ 'tmp' => '' ]);
|
||||||
if ($tmp == $t) return true;
|
if ($tmp == $t) return true;
|
||||||
|
if ($r) return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -320,164 +231,24 @@ function RewriteEngineOn()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function EnvOpt($function_name, $needUpdate = 0)
|
function api_error($response)
|
||||||
{
|
{
|
||||||
global $constStr;
|
return !$response;
|
||||||
global $ShowedCommonEnv;
|
|
||||||
global $ShowedInnerEnv;
|
|
||||||
asort($ShowedCommonEnv);
|
|
||||||
asort($ShowedInnerEnv);
|
|
||||||
$html = '<title>OneManager '.getconstStr('Setup').'</title>';
|
|
||||||
/*if ($_POST['updateProgram']==getconstStr('updateProgram')) {
|
|
||||||
$response = json_decode(updataProgram($function_name, $Region, $namespace), true)['Response'];
|
|
||||||
if (isset($response['Error'])) {
|
|
||||||
$html = $response['Error']['Code'] . '<br>
|
|
||||||
' . $response['Error']['Message'] . '<br><br>
|
|
||||||
function_name:' . $_SERVER['function_name'] . '<br>
|
|
||||||
Region:' . $_SERVER['Region'] . '<br>
|
|
||||||
namespace:' . $namespace . '<br>
|
|
||||||
<button onclick="location.href = location.href;">'.getconstStr('Reflesh').'</button>';
|
|
||||||
$title = 'Error';
|
|
||||||
} else {
|
|
||||||
$html .= getconstStr('UpdateSuccess') . '<br>
|
|
||||||
<button onclick="location.href = location.href;">'.getconstStr('Reflesh').'</button>';
|
|
||||||
$title = getconstStr('Setup');
|
|
||||||
}
|
}
|
||||||
return message($html, $title);
|
|
||||||
}*/
|
function api_error_msg($response)
|
||||||
if ($_POST['submit1']) {
|
{
|
||||||
$_SERVER['disk_oprating'] = '';
|
return $response . '<br>
|
||||||
foreach ($_POST as $k => $v) {
|
Can not write config to file.<br>
|
||||||
if (in_array($k, $ShowedCommonEnv)||in_array($k, $ShowedInnerEnv)||$k=='disktag_del' || $k=='disktag_add') {
|
<button onclick="location.href = location.href;">'.getconstStr('Refresh').'</button>';
|
||||||
$tmp[$k] = $v;
|
|
||||||
}
|
}
|
||||||
if ($k == 'disk') $_SERVER['disk_oprating'] = $v;
|
|
||||||
|
function OnekeyUpate()
|
||||||
|
{
|
||||||
|
return json_decode(updateHerokuapp(getConfig('function_name'), getConfig('APIKey'))['body'], true);
|
||||||
}
|
}
|
||||||
/*if ($tmp['domain_path']!='') {
|
|
||||||
$tmp1 = explode("|",$tmp['domain_path']);
|
function setConfigResponse($response)
|
||||||
$tmparr = [];
|
{
|
||||||
foreach ($tmp1 as $multidomain_paths){
|
return $response;
|
||||||
$pos = strpos($multidomain_paths,":");
|
|
||||||
if ($pos>0) $tmparr[substr($multidomain_paths, 0, $pos)] = path_format(substr($multidomain_paths, $pos+1));
|
|
||||||
}
|
|
||||||
$tmp['domain_path'] = $tmparr;
|
|
||||||
}*/
|
|
||||||
$response = setConfig($tmp, $_SERVER['disk_oprating']);
|
|
||||||
if (!$response) {
|
|
||||||
$html = $response . '<br>
|
|
||||||
<button onclick="location.href = location.href;">'.getconstStr('Reflesh').'</button>';
|
|
||||||
$title = 'Error';
|
|
||||||
} else {
|
|
||||||
$html .= '<script>location.href=location.href</script>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($_GET['preview']) {
|
|
||||||
$preurl = $_SERVER['PHP_SELF'] . '?preview';
|
|
||||||
} else {
|
|
||||||
$preurl = path_format($_SERVER['PHP_SELF'] . '/');
|
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
<a href="'.$preurl.'">'.getconstStr('Back').'</a> <a href="'.$_SERVER['base_path'].'">'.getconstStr('Back').getconstStr('Home').'</a><br>
|
|
||||||
<a href="https://github.com/qkqpttgf/OneManager-php">Github</a><br>';
|
|
||||||
/*if ($needUpdate) {
|
|
||||||
$html .= '<pre>' . $_SERVER['github_version'] . '</pre>
|
|
||||||
<form action="" method="post">
|
|
||||||
<input type="submit" name="updateProgram" value="'.getconstStr('updateProgram').'">
|
|
||||||
</form>';
|
|
||||||
} else {
|
|
||||||
$html .= getconstStr('NotNeedUpdate');
|
|
||||||
}*/
|
|
||||||
$html .= 'Can not update by a click!<br>
|
|
||||||
<table border=1 width=100%>
|
|
||||||
<form name="common" action="" method="post">
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">'.getconstStr('PlatformConfig').'</td>
|
|
||||||
</tr>';
|
|
||||||
foreach ($ShowedCommonEnv as $key) {
|
|
||||||
if ($key=='language') {
|
|
||||||
$html .= '
|
|
||||||
<tr>
|
|
||||||
<td><label>' . $key . '</label></td>
|
|
||||||
<td width=100%>
|
|
||||||
<select name="' . $key .'">';
|
|
||||||
foreach ($constStr['languages'] as $key1 => $value1) {
|
|
||||||
$html .= '
|
|
||||||
<option value="'.$key1.'" '.($key1==getConfig($key)?'selected="selected"':'').'>'.$value1.'</option>';
|
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>';
|
|
||||||
} elseif ($key=='theme') {
|
|
||||||
$theme_arr = scandir('theme');
|
|
||||||
$html .= '
|
|
||||||
<tr>
|
|
||||||
<td><label>' . $key . '</label></td>
|
|
||||||
<td width=100%>
|
|
||||||
<select name="' . $key .'">
|
|
||||||
<option value=""></option>';
|
|
||||||
foreach ($theme_arr as $v1) {
|
|
||||||
if ($v1!='.' && $v1!='..') $html .= '
|
|
||||||
<option value="'.$v1.'" '.($v1==getConfig($key)?'selected="selected"':'').'>'.$v1.'</option>';
|
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>';
|
|
||||||
} /*elseif ($key=='domain_path') {
|
|
||||||
$tmp = getConfig($key);
|
|
||||||
$domain_path = '';
|
|
||||||
foreach ($tmp as $k1 => $v1) {
|
|
||||||
$domain_path .= $k1 . ':' . $v1 . '|';
|
|
||||||
}
|
|
||||||
$domain_path = substr($domain_path, 0, -1);
|
|
||||||
$html .= '
|
|
||||||
<tr>
|
|
||||||
<td><label>' . $key . '</label></td>
|
|
||||||
<td width=100%><input type="text" name="' . $key .'" value="' . $domain_path . '" placeholder="' . getconstStr('EnvironmentsDescription')[$key] . '" style="width:100%"></td>
|
|
||||||
</tr>';
|
|
||||||
}*/ else $html .= '
|
|
||||||
<tr>
|
|
||||||
<td><label>' . $key . '</label></td>
|
|
||||||
<td width=100%><input type="text" name="' . $key .'" value="' . getConfig($key) . '" placeholder="' . getconstStr('EnvironmentsDescription')[$key] . '" style="width:100%"></td>
|
|
||||||
</tr>';
|
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
<tr><td><input type="submit" name="submit1" value="'.getconstStr('Setup').'"></td></tr>
|
|
||||||
</form>
|
|
||||||
</table><br>';
|
|
||||||
foreach (explode("|",getConfig('disktag')) as $disktag) {
|
|
||||||
if ($disktag!='') {
|
|
||||||
$html .= '
|
|
||||||
<table border=1 width=100%>
|
|
||||||
<form action="" method="post">
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">'.$disktag.':
|
|
||||||
<input type="hidden" name="disktag_del" value="'.$disktag.'">
|
|
||||||
<input type="submit" name="submit1" value="'.getconstStr('DelDisk').'">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</form>';
|
|
||||||
if (getConfig('refresh_token', $disktag)!='') {
|
|
||||||
$html .= '
|
|
||||||
<form name="'.$disktag.'" action="" method="post">
|
|
||||||
<input type="hidden" name="disk" value="'.$disktag.'">';
|
|
||||||
foreach ($ShowedInnerEnv as $key) {
|
|
||||||
$html .= '
|
|
||||||
<tr>
|
|
||||||
<td><label>' . $key . '</label></td>
|
|
||||||
<td width=100%><input type="text" name="' . $key .'" value="' . getConfig($key, $disktag) . '" placeholder="' . getconstStr('EnvironmentsDescription')[$key] . '" style="width:100%"></td>
|
|
||||||
</tr>';
|
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
<tr><td><input type="submit" name="submit1" value="'.getconstStr('Setup').'"></td></tr>
|
|
||||||
</form>';
|
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
</table><br>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
<a href="?AddDisk">'.getconstStr('AddDisk').'</a>';
|
|
||||||
return message($html, getconstStr('Setup'));
|
|
||||||
}
|
}
|
||||||
|
|
415
function/scf.php
415
function/scf.php
|
@ -35,8 +35,11 @@ function GetPathSetting($event, $context)
|
||||||
$serviceId = $event['requestContext']['serviceId'];
|
$serviceId = $event['requestContext']['serviceId'];
|
||||||
if ( $serviceId === substr($host_name,0,strlen($serviceId)) ) {
|
if ( $serviceId === substr($host_name,0,strlen($serviceId)) ) {
|
||||||
$_SERVER['base_path'] = '/'.$event['requestContext']['stage'].'/'.$_SERVER['function_name'].'/';
|
$_SERVER['base_path'] = '/'.$event['requestContext']['stage'].'/'.$_SERVER['function_name'].'/';
|
||||||
|
$_SERVER['Region'] = getenv('Region');
|
||||||
|
if ($_SERVER['Region'] == '') {
|
||||||
$_SERVER['Region'] = substr($host_name, strpos($host_name, '.')+1);
|
$_SERVER['Region'] = substr($host_name, strpos($host_name, '.')+1);
|
||||||
$_SERVER['Region'] = substr($_SERVER['Region'], 0, strpos($_SERVER['Region'], '.'));
|
$_SERVER['Region'] = substr($_SERVER['Region'], 0, strpos($_SERVER['Region'], '.'));
|
||||||
|
}
|
||||||
$path = substr($event['path'], strlen('/'.$_SERVER['function_name'].'/'));
|
$path = substr($event['path'], strlen('/'.$_SERVER['function_name'].'/'));
|
||||||
} else {
|
} else {
|
||||||
$_SERVER['base_path'] = $event['requestContext']['path'];
|
$_SERVER['base_path'] = $event['requestContext']['path'];
|
||||||
|
@ -54,16 +57,25 @@ function GetPathSetting($event, $context)
|
||||||
function getConfig($str, $disktag = '')
|
function getConfig($str, $disktag = '')
|
||||||
{
|
{
|
||||||
global $InnerEnv;
|
global $InnerEnv;
|
||||||
if ($disktag=='') $disktag = $_SERVER['disktag'];
|
global $Base64Env;
|
||||||
if (in_array($str, $InnerEnv)) {
|
if (in_array($str, $InnerEnv)) {
|
||||||
return json_decode(getenv($disktag), true)[$str];
|
if ($disktag=='') $disktag = $_SERVER['disktag'];
|
||||||
|
$env = json_decode(getenv($disktag), true);
|
||||||
|
if (isset($env[$str])) {
|
||||||
|
if (in_array($str, $Base64Env)) return equal_replace($env[$str],1);
|
||||||
|
else return $env[$str];
|
||||||
}
|
}
|
||||||
return getenv($str);
|
} else {
|
||||||
|
if (in_array($str, $Base64Env)) return equal_replace(getenv($str),1);
|
||||||
|
else return getenv($str);
|
||||||
|
}
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
function setConfig($arr, $disktag = '')
|
function setConfig($arr, $disktag = '')
|
||||||
{
|
{
|
||||||
global $InnerEnv;
|
global $InnerEnv;
|
||||||
|
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);
|
||||||
|
@ -72,7 +84,8 @@ function setConfig($arr, $disktag = '')
|
||||||
$oparetdisk = 0;
|
$oparetdisk = 0;
|
||||||
foreach ($arr as $k => $v) {
|
foreach ($arr as $k => $v) {
|
||||||
if (in_array($k, $InnerEnv)) {
|
if (in_array($k, $InnerEnv)) {
|
||||||
$diskconfig[$k] = $v;
|
if (in_array($k, $Base64Env)) $diskconfig[$k] = equal_replace($v);
|
||||||
|
else $diskconfig[$k] = $v;
|
||||||
$indisk = 1;
|
$indisk = 1;
|
||||||
} elseif ($k=='disktag_add') {
|
} elseif ($k=='disktag_add') {
|
||||||
array_push($disktags, $v);
|
array_push($disktags, $v);
|
||||||
|
@ -82,7 +95,8 @@ function setConfig($arr, $disktag = '')
|
||||||
$tmp[$v] = '';
|
$tmp[$v] = '';
|
||||||
$oparetdisk = 1;
|
$oparetdisk = 1;
|
||||||
} else {
|
} else {
|
||||||
$tmp[$k] = $v;
|
if (in_array($k, $Base64Env)) $tmp[$k] = equal_replace($v);
|
||||||
|
else $tmp[$k] = $v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($indisk) {
|
if ($indisk) {
|
||||||
|
@ -98,7 +112,9 @@ function setConfig($arr, $disktag = '')
|
||||||
}
|
}
|
||||||
// echo '正式设置:'.json_encode($tmp,JSON_PRETTY_PRINT).'
|
// echo '正式设置:'.json_encode($tmp,JSON_PRETTY_PRINT).'
|
||||||
//';
|
//';
|
||||||
return 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'));
|
||||||
|
WaitSCFStat();
|
||||||
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
function WaitSCFStat()
|
function WaitSCFStat()
|
||||||
|
@ -108,151 +124,22 @@ function WaitSCFStat()
|
||||||
'.++$trynum;
|
'.++$trynum;
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_refresh_token()
|
|
||||||
{
|
|
||||||
global $constStr;
|
|
||||||
global $CommonEnv;
|
|
||||||
foreach ($CommonEnv as $env) $envs .= '\'' . $env . '\', ';
|
|
||||||
$url = path_format($_SERVER['PHP_SELF'] . '/');
|
|
||||||
if ($_GET['authorization_code'] && isset($_GET['code'])) {
|
|
||||||
$_SERVER['disktag'] = $_COOKIE['disktag'];
|
|
||||||
config_oauth();
|
|
||||||
$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'];
|
|
||||||
$str = '
|
|
||||||
refresh_token :<br>';
|
|
||||||
/*for ($i=1;strlen($tmptoken)>0;$i++) {
|
|
||||||
$t['t' . $i] = substr($tmptoken,0,128);
|
|
||||||
$str .= '
|
|
||||||
t' . $i . ':<textarea readonly style="width: 95%">' . $t['t' . $i] . '</textarea><br><br>';
|
|
||||||
$tmptoken=substr($tmptoken,128);
|
|
||||||
}
|
|
||||||
$str .= '
|
|
||||||
Add t1-t'.--$i.' to environments.*/
|
|
||||||
$str .= '
|
|
||||||
<textarea readonly style="width: 95%">' . $tmptoken . '</textarea><br><br>
|
|
||||||
'.getconstStr('SavingToken').'
|
|
||||||
<script>
|
|
||||||
var texta=document.getElementsByTagName(\'textarea\');
|
|
||||||
for(i=0;i<texta.length;i++) {
|
|
||||||
texta[i].style.height = texta[i].scrollHeight + \'px\';
|
|
||||||
}
|
|
||||||
document.cookie=\'language=; path=/\';
|
|
||||||
document.cookie=\'disktag=; path=/\';
|
|
||||||
</script>';
|
|
||||||
setConfig([ 'refresh_token' => $tmptoken, 'token_expires' => time()+30*24*60*60 ], $_COOKIE['disktag']);
|
|
||||||
savecache('access_token', $ret['access_token'], $ret['expires_in'] - 60);
|
|
||||||
WaitSCFStat();
|
|
||||||
$str .= '
|
|
||||||
<meta http-equiv="refresh" content="2;URL=' . $url . '">';
|
|
||||||
return message($str, getconstStr('WaitJumpIndex'));
|
|
||||||
}
|
|
||||||
return message('<pre>' . json_encode(json_decode($tmp['body']), JSON_PRETTY_PRINT) . '</pre>', $tmp['stat']);
|
|
||||||
//return message('<pre>' . json_encode($ret, JSON_PRETTY_PRINT) . '</pre>', 500);
|
|
||||||
}
|
|
||||||
if ($_GET['install1']) {
|
|
||||||
$_SERVER['disk_oprating'] = $_COOKIE['disktag'];
|
|
||||||
$_SERVER['disktag'] = $_COOKIE['disktag'];
|
|
||||||
config_oauth();
|
|
||||||
if (getConfig('Onedrive_ver')=='MS' || getConfig('Onedrive_ver')=='CN' || getConfig('Onedrive_ver')=='MSC') {
|
|
||||||
return message('
|
|
||||||
<a href="" id="a1">'.getconstStr('JumptoOffice').'</a>
|
|
||||||
<script>
|
|
||||||
url=location.protocol + "//" + location.host + "'.$url.'";
|
|
||||||
url="'. $_SERVER['oauth_url'] .'authorize?scope='. $_SERVER['scope'] .'&response_type=code&client_id='. $_SERVER['client_id'] .'&redirect_uri='. $_SERVER['redirect_uri'] . '&state=' .'"+encodeURIComponent(url);
|
|
||||||
document.getElementById(\'a1\').href=url;
|
|
||||||
//window.open(url,"_blank");
|
|
||||||
location.href = url;
|
|
||||||
</script>
|
|
||||||
', getconstStr('Wait').' 1s', 201);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($_GET['install0']) {
|
|
||||||
if ($_POST['disktag_add']!='' && ($_POST['Onedrive_ver']=='MS' || $_POST['Onedrive_ver']=='CN' || $_POST['Onedrive_ver']=='MSC')) {
|
|
||||||
if (in_array($_COOKIE['disktag'], $CommonEnv)) {
|
|
||||||
return message('Do not input ' . $envs . '<br><button onclick="location.href = location.href;">'.getconstStr('Reflesh').'</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['client_id'] = $_POST['client_id'];
|
|
||||||
$tmp['client_secret'] = equal_replace(base64_encode($_POST['client_secret']));
|
|
||||||
//$_POST['client_secret'];
|
|
||||||
}
|
|
||||||
$response = json_decode( setConfig($tmp, $_COOKIE['disktag']), true )['Response'];
|
|
||||||
$title = getconstStr('MayinEnv');
|
|
||||||
$html = getconstStr('Wait') . ' 3s<meta http-equiv="refresh" content="3;URL=' . $url . '?AddDisk&install1">';
|
|
||||||
if (isset($response['Error'])) {
|
|
||||||
$html = $response['Error']['Code'] . '<br>
|
|
||||||
' . $response['Error']['Message'] . '<br><br>
|
|
||||||
function_name:' . $_SERVER['function_name'] . '<br>
|
|
||||||
Region:' . $_SERVER['Region'] . '<br>
|
|
||||||
namespace:' . $_SERVER['namespace'] . '<br>
|
|
||||||
<button onclick="location.href = location.href;">'.getconstStr('Reflesh').'</button>';
|
|
||||||
$title = 'Error';
|
|
||||||
}
|
|
||||||
return message($html, $title, 201);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($constStr['language']!='zh-cn') {
|
|
||||||
$linklang='en-us';
|
|
||||||
} else $linklang='zh-cn';
|
|
||||||
$ru = "https://developer.microsoft.com/".$linklang."/graph/quick-start?appID=_appId_&appName=_appName_&redirectUrl=".$_SERVER['redirect_uri']."&platform=option-php";
|
|
||||||
$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 = '
|
|
||||||
<form action="?AddDisk&install0" method="post" onsubmit="return notnull(this);">
|
|
||||||
'.getconstStr('OnedriveDiskTag').':<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>MS: '.getconstStr('OndriveVerMS').'</label><br>
|
|
||||||
<label><input type="radio" name="Onedrive_ver" value="CN">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">
|
|
||||||
<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>
|
|
||||||
<input type="submit" value="'.getconstStr('Submit').'">
|
|
||||||
</form>
|
|
||||||
<script>
|
|
||||||
function notnull(t)
|
|
||||||
{
|
|
||||||
if (t.disktag_add.value==\'\') {
|
|
||||||
alert(\'Input Disk Tag\');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
envs = [' . $envs . '];
|
|
||||||
if (envs.indexOf(t.disktag_add.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_add.value)) {
|
|
||||||
alert(\''.getconstStr('TagFormatAlert').'\');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
document.cookie=\'disktag=\'+t.disktag_add.value+\'; path=/\';
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
</script>';
|
|
||||||
$title = 'Bind Onedrive';
|
|
||||||
return message($html, $title, 201);
|
|
||||||
}
|
|
||||||
|
|
||||||
function install()
|
function install()
|
||||||
{
|
{
|
||||||
global $constStr;
|
global $constStr;
|
||||||
if ($_GET['install1']) {
|
if ($_GET['install2']) {
|
||||||
if ($_POST['admin']!='') {
|
|
||||||
$tmp['admin'] = $_POST['admin'];
|
$tmp['admin'] = $_POST['admin'];
|
||||||
|
setConfig($tmp);
|
||||||
|
if (needUpdate()) {
|
||||||
|
updateProgram($_SERVER['function_name'], $_SERVER['Region'], $_SERVER['namespace'], $SecretId, $SecretKey);
|
||||||
|
return message('update to github version, reinstall.<script>document.cookie=\'language=; path=/\';</script><meta http-equiv="refresh" content="3;URL=' . $url . '">', 'Program updating', 201);
|
||||||
|
}
|
||||||
|
return output('Jump<script>document.cookie=\'language=; path=/\';</script><meta http-equiv="refresh" content="3;URL=' . path_format($_SERVER['base_path'] . '/') . '">', 302);
|
||||||
|
}
|
||||||
|
if ($_GET['install1']) {
|
||||||
|
//if ($_POST['admin']!='') {
|
||||||
$tmp['language'] = $_POST['language'];
|
$tmp['language'] = $_POST['language'];
|
||||||
|
$tmp['Region'] = $_POST['Region'];
|
||||||
$SecretId = getConfig('SecretId');
|
$SecretId = getConfig('SecretId');
|
||||||
if ($SecretId=='') {
|
if ($SecretId=='') {
|
||||||
$SecretId = $_POST['SecretId'];
|
$SecretId = $_POST['SecretId'];
|
||||||
|
@ -263,28 +150,31 @@ function install()
|
||||||
$SecretKey = $_POST['SecretKey'];
|
$SecretKey = $_POST['SecretKey'];
|
||||||
$tmp['SecretKey'] = $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 (isset($response['Error'])) {
|
if (api_error($response)) {
|
||||||
$html = $response['Error']['Code'] . '<br>
|
$html = api_error_msg($response);
|
||||||
' . $response['Error']['Message'] . '<br><br>
|
|
||||||
function_name:' . $_SERVER['function_name'] . '<br>
|
|
||||||
Region:' . $_SERVER['Region'] . '<br>
|
|
||||||
namespace:' . $_SERVER['namespace'] . '<br>
|
|
||||||
<button onclick="location.href = location.href;">'.getconstStr('Reflesh').'</button>';
|
|
||||||
$title = 'Error';
|
$title = 'Error';
|
||||||
|
return message($html, $title, 201);
|
||||||
} else {
|
} else {
|
||||||
$trynum = 0;
|
$html .= '
|
||||||
while( json_decode(getfunctioninfo($_SERVER['function_name'], $_SERVER['Region'], $_SERVER['namespace'], $SecretId, $SecretKey),true)['Response']['Status']!='Active' ) echo '
|
<form action="?install2" method="post" onsubmit="return notnull(this);">
|
||||||
'.++$trynum;
|
<label>'.getconstStr('SetAdminPassword').':<input name="admin" type="password" placeholder="' . getconstStr('EnvironmentsDescription')['admin'] . '" size="' . strlen(getconstStr('EnvironmentsDescription')['admin']) . '"></label><br>
|
||||||
//$response = json_decode( updateEnvironment($tmp, $_SERVER['function_name'], $_SERVER['Region'], $_SERVER['namespace'], $SecretId, $SecretKey), true)['Response'];
|
<input type="submit" value="'.getconstStr('Submit').'">
|
||||||
if (needUpdate()) {
|
</form>
|
||||||
updateProgram($_SERVER['function_name'], $_SERVER['Region'], $_SERVER['namespace'], $SecretId, $SecretKey);
|
<script>
|
||||||
return message('update to github version, reinstall.<meta http-equiv="refresh" content="3;URL=' . $url . '">', 'Program updating', 201);
|
function notnull(t)
|
||||||
|
{
|
||||||
|
if (t.admin.value==\'\') {
|
||||||
|
alert(\''.getconstStr('SetAdminPassword').'\');
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return output('Jump<meta http-equiv="refresh" content="3;URL=' . path_format($_SERVER['base_path'] . '/') . '">', 302);
|
return true;
|
||||||
}
|
}
|
||||||
|
</script>';
|
||||||
|
$title = getconstStr('SetAdminPassword');
|
||||||
return message($html, $title, 201);
|
return message($html, $title, 201);
|
||||||
}
|
}
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
if ($_GET['install0']) {
|
if ($_GET['install0']) {
|
||||||
$html .= '
|
$html .= '
|
||||||
|
@ -299,8 +189,21 @@ language:<br>';
|
||||||
<label>SecretId:<input name="SecretId" type="text" placeholder="" size=""></label><br>
|
<label>SecretId:<input name="SecretId" type="text" placeholder="" size=""></label><br>
|
||||||
<label>SecretKey:<input name="SecretKey" type="text" placeholder="" size=""></label><br>';
|
<label>SecretKey:<input name="SecretKey" type="text" placeholder="" size=""></label><br>';
|
||||||
$html .= '
|
$html .= '
|
||||||
<label>Set admin password:<input name="admin" type="password" placeholder="' . getconstStr('EnvironmentsDescription')['admin'] . '" size="' . strlen(getconstStr('EnvironmentsDescription')['admin']) . '"></label><br>';
|
<select class="changelanguage" name="Region">
|
||||||
$html .= '
|
<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').'">
|
<input type="submit" value="'.getconstStr('Submit').'">
|
||||||
</form>
|
</form>
|
||||||
<script>
|
<script>
|
||||||
|
@ -310,11 +213,7 @@ language:<br>';
|
||||||
location.href = location.href;
|
location.href = location.href;
|
||||||
}
|
}
|
||||||
function notnull(t)
|
function notnull(t)
|
||||||
{
|
{';
|
||||||
if (t.admin.value==\'\') {
|
|
||||||
alert(\'input admin\');
|
|
||||||
return false;
|
|
||||||
}';
|
|
||||||
if (getConfig('SecretId')==''||getConfig('SecretKey')=='') $html .= '
|
if (getConfig('SecretId')==''||getConfig('SecretKey')=='') $html .= '
|
||||||
if (t.SecretId.value==\'\') {
|
if (t.SecretId.value==\'\') {
|
||||||
alert(\'input SecretId\');
|
alert(\'input SecretId\');
|
||||||
|
@ -493,175 +392,27 @@ function updateProgram($function_name, $Region, $Namespace, $SecretId, $SecretKe
|
||||||
return post2url('https://'.$host, $data.'&Signature='.urlencode($signStr));
|
return post2url('https://'.$host, $data.'&Signature='.urlencode($signStr));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function api_error($response)
|
||||||
function EnvOpt($function_name, $needUpdate = 0)
|
|
||||||
{
|
{
|
||||||
global $constStr;
|
return isset($response['Error']);
|
||||||
global $ShowedCommonEnv;
|
|
||||||
global $ShowedInnerEnv;
|
|
||||||
asort($ShowedCommonEnv);
|
|
||||||
asort($ShowedInnerEnv);
|
|
||||||
$html = '<title>OneManager '.getconstStr('Setup').'</title>';
|
|
||||||
if ($_POST['updateProgram']==getconstStr('updateProgram')) {
|
|
||||||
$response = json_decode(updateProgram($function_name, $_SERVER['Region'], $_SERVER['namespace'], getConfig('SecretId'), getConfig('SecretKey')), true)['Response'];
|
|
||||||
if (isset($response['Error'])) {
|
|
||||||
$html = $response['Error']['Code'] . '<br>
|
|
||||||
' . $response['Error']['Message'] . '<br><br>
|
|
||||||
function_name:' . $_SERVER['function_name'] . '<br>
|
|
||||||
Region:' . $_SERVER['Region'] . '<br>
|
|
||||||
namespace:' . $namespace . '<br>
|
|
||||||
<button onclick="location.href = location.href;">'.getconstStr('Reflesh').'</button>';
|
|
||||||
$title = 'Error';
|
|
||||||
} else {
|
|
||||||
WaitSCFStat();
|
|
||||||
$html .= getconstStr('UpdateSuccess') . '<br>
|
|
||||||
<button onclick="location.href = location.href;">'.getconstStr('Reflesh').'</button>';
|
|
||||||
$title = getconstStr('Setup');
|
|
||||||
}
|
}
|
||||||
return message($html, $title);
|
|
||||||
}
|
function api_error_msg($response)
|
||||||
if ($_POST['submit1']) {
|
{
|
||||||
$_SERVER['disk_oprating'] = '';
|
return $response['Error']['Code'] . '<br>
|
||||||
foreach ($_POST as $k => $v) {
|
|
||||||
if (in_array($k, $ShowedCommonEnv)||in_array($k, $ShowedInnerEnv)||$k=='disktag_del' || $k=='disktag_add') {
|
|
||||||
$tmp[$k] = $v;
|
|
||||||
}
|
|
||||||
if ($k == 'disk') $_SERVER['disk_oprating'] = $v;
|
|
||||||
}
|
|
||||||
/*if ($tmp['domain_path']!='') {
|
|
||||||
$tmp1 = explode("|",$tmp['domain_path']);
|
|
||||||
$tmparr = [];
|
|
||||||
foreach ($tmp1 as $multidomain_paths){
|
|
||||||
$pos = strpos($multidomain_paths,":");
|
|
||||||
if ($pos>0) $tmparr[substr($multidomain_paths, 0, $pos)] = path_format(substr($multidomain_paths, $pos+1));
|
|
||||||
}
|
|
||||||
$tmp['domain_path'] = $tmparr;
|
|
||||||
}*/
|
|
||||||
$response = json_decode( setConfig($tmp, $_SERVER['disk_oprating']), true )['Response'];
|
|
||||||
if (isset($response['Error'])) {
|
|
||||||
$html = $response['Error']['Code'] . '<br>
|
|
||||||
' . $response['Error']['Message'] . '<br><br>
|
' . $response['Error']['Message'] . '<br><br>
|
||||||
function_name:' . $_SERVER['function_name'] . '<br>
|
function_name:' . $_SERVER['function_name'] . '<br>
|
||||||
Region:' . $_SERVER['Region'] . '<br>
|
Region:' . $_SERVER['Region'] . '<br>
|
||||||
namespace:' . $_SERVER['namespace'] . '<br>
|
namespace:' . $_SERVER['namespace'] . '<br>
|
||||||
<button onclick="location.href = location.href;">'.getconstStr('Reflesh').'</button>';
|
<button onclick="location.href = location.href;">'.getconstStr('Refresh').'</button>';
|
||||||
$title = 'Error';
|
|
||||||
} else {
|
|
||||||
WaitSCFStat();
|
|
||||||
//sleep(3);
|
|
||||||
$html .= json_encode($response,JSON_PRETTY_PRINT).'<script>location.href=location.href</script>';
|
|
||||||
$title = getconstStr('Setup');
|
|
||||||
}
|
}
|
||||||
return message($html, $title);
|
|
||||||
|
function OnekeyUpate()
|
||||||
|
{
|
||||||
|
return json_decode(updateProgram($_SERVER['function_name'], $_SERVER['Region'], $_SERVER['namespace'], getConfig('SecretId'), getConfig('SecretKey')), true)['Response'];
|
||||||
}
|
}
|
||||||
if ($_GET['preview']) {
|
|
||||||
$preurl = $_SERVER['PHP_SELF'] . '?preview';
|
function setConfigResponse($response)
|
||||||
} else {
|
{
|
||||||
$preurl = path_format($_SERVER['PHP_SELF'] . '/');
|
return json_decode( $response, true )['Response'];
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
<a href="'.$preurl.'">'.getconstStr('Back').'</a> <a href="'.$_SERVER['base_path'].'">'.getconstStr('Back').getconstStr('Home').'</a><br>
|
|
||||||
<a href="https://github.com/qkqpttgf/OneManager-php">Github</a><br>
|
|
||||||
<form action="" method="post">
|
|
||||||
';
|
|
||||||
if ($needUpdate) {
|
|
||||||
$html .= '<pre>' . $_SERVER['github_version'] . '</pre>';
|
|
||||||
} else {
|
|
||||||
$html .= getconstStr('NotNeedUpdate');
|
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
<input type="submit" name="updateProgram" value="'.getconstStr('updateProgram').'">
|
|
||||||
</form>
|
|
||||||
<table border=1 width=100%>
|
|
||||||
<form name="common" action="" method="post">
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">'.getconstStr('PlatformConfig').'</td>
|
|
||||||
</tr>';
|
|
||||||
foreach ($ShowedCommonEnv as $key) {
|
|
||||||
if ($key=='language') {
|
|
||||||
$html .= '
|
|
||||||
<tr>
|
|
||||||
<td><label>' . $key . '</label></td>
|
|
||||||
<td width=100%>
|
|
||||||
<select name="' . $key .'">';
|
|
||||||
foreach ($constStr['languages'] as $key1 => $value1) {
|
|
||||||
$html .= '
|
|
||||||
<option value="'.$key1.'" '.($key1==getConfig($key)?'selected="selected"':'').'>'.$value1.'</option>';
|
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>';
|
|
||||||
} elseif ($key=='theme') {
|
|
||||||
$theme_arr = scandir('theme');
|
|
||||||
$html .= '
|
|
||||||
<tr>
|
|
||||||
<td><label>' . $key . '</label></td>
|
|
||||||
<td width=100%>
|
|
||||||
<select name="' . $key .'">
|
|
||||||
<option value=""></option>';
|
|
||||||
foreach ($theme_arr as $v1) {
|
|
||||||
if ($v1!='.' && $v1!='..') $html .= '
|
|
||||||
<option value="'.$v1.'" '.($v1==getConfig($key)?'selected="selected"':'').'>'.$v1.'</option>';
|
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>';
|
|
||||||
} /*elseif ($key=='domain_path') {
|
|
||||||
$tmp = getConfig($key);
|
|
||||||
$domain_path = '';
|
|
||||||
foreach ($tmp as $k1 => $v1) {
|
|
||||||
$domain_path .= $k1 . ':' . $v1 . '|';
|
|
||||||
}
|
|
||||||
$domain_path = substr($domain_path, 0, -1);
|
|
||||||
$html .= '
|
|
||||||
<tr>
|
|
||||||
<td><label>' . $key . '</label></td>
|
|
||||||
<td width=100%><input type="text" name="' . $key .'" value="' . $domain_path . '" placeholder="' . getconstStr('EnvironmentsDescription')[$key] . '" style="width:100%"></td>
|
|
||||||
</tr>';
|
|
||||||
}*/ else $html .= '
|
|
||||||
<tr>
|
|
||||||
<td><label>' . $key . '</label></td>
|
|
||||||
<td width=100%><input type="text" name="' . $key .'" value="' . getConfig($key) . '" placeholder="' . getconstStr('EnvironmentsDescription')[$key] . '" style="width:100%"></td>
|
|
||||||
</tr>';
|
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
<tr><td><input type="submit" name="submit1" value="'.getconstStr('Setup').'"></td></tr>
|
|
||||||
</form>
|
|
||||||
</table><br>';
|
|
||||||
foreach (explode("|",getConfig('disktag')) as $disktag) {
|
|
||||||
if ($disktag!='') {
|
|
||||||
$html .= '
|
|
||||||
<table border=1 width=100%>
|
|
||||||
<form action="" method="post">
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">'.$disktag.':
|
|
||||||
<input type="hidden" name="disktag_del" value="'.$disktag.'">
|
|
||||||
<input type="submit" name="submit1" value="'.getconstStr('DelDisk').'">
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</form>';
|
|
||||||
if (getConfig('refresh_token', $disktag)!='') {
|
|
||||||
$html .= '
|
|
||||||
<form name="'.$disktag.'" action="" method="post">
|
|
||||||
<input type="hidden" name="disk" value="'.$disktag.'">';
|
|
||||||
foreach ($ShowedInnerEnv as $key) {
|
|
||||||
$html .= '
|
|
||||||
<tr>
|
|
||||||
<td><label>' . $key . '</label></td>
|
|
||||||
<td width=100%><input type="text" name="' . $key .'" value="' . getConfig($key, $disktag) . '" placeholder="' . getconstStr('EnvironmentsDescription')[$key] . '" style="width:100%"></td>
|
|
||||||
</tr>';
|
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
<tr><td><input type="submit" name="submit1" value="'.getconstStr('Setup').'"></td></tr>
|
|
||||||
</form>';
|
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
</table><br>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$html .= '
|
|
||||||
<a href="?AddDisk">'.getconstStr('AddDisk').'</a>';
|
|
||||||
return message($html, getconstStr('Setup'));
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,9 @@ include 'conststr.php';
|
||||||
include 'function/common.php';
|
include 'function/common.php';
|
||||||
|
|
||||||
//echo '<pre>'. json_encode($_SERVER, JSON_PRETTY_PRINT).'</pre>';
|
//echo '<pre>'. json_encode($_SERVER, JSON_PRETTY_PRINT).'</pre>';
|
||||||
if ($_SERVER['USER']==='qcloud') {
|
if (isset($_SERVER['USER'])&&$_SERVER['USER']==='qcloud') {
|
||||||
include 'function/scf.php';
|
include 'function/scf.php';
|
||||||
} elseif ($_SERVER['HEROKU_APP_DIR']==='/app') {
|
} elseif (isset($_SERVER['HEROKU_APP_DIR'])&&$_SERVER['HEROKU_APP_DIR']==='/app') {
|
||||||
include 'function/heroku.php';
|
include 'function/heroku.php';
|
||||||
$path = getpath();
|
$path = getpath();
|
||||||
//echo 'path:'. $path;
|
//echo 'path:'. $path;
|
||||||
|
|
19
readme.md
19
readme.md
|
@ -1,5 +1,5 @@
|
||||||
QQ Group: 943919989
|
Install program first, then add onedrive in setup after login.
|
||||||
Telegram Group: https://t.me/joinchat/I_RVc0bqxuxlT-d0cO7ozw
|
先安装程序,登录后在设置中添加onedrive。
|
||||||
|
|
||||||
# Deploy to heroku
|
# Deploy to heroku
|
||||||
Official: https://heroku.com
|
Official: https://heroku.com
|
||||||
|
@ -13,20 +13,21 @@ How to Install:
|
||||||
1.Start web service on your server (httpd or other), make sure you can visit it.
|
1.Start web service on your server (httpd or other), make sure you can visit it.
|
||||||
启动web服务器,确保你能访问到。
|
启动web服务器,确保你能访问到。
|
||||||
2.Make the rewrite works, the rule is in .htaccess file, make sure any query redirect to index.php.
|
2.Make the rewrite works, the rule is in .htaccess file, make sure any query redirect to index.php.
|
||||||
开启伪静态(重写)功能,规则在.htaccess文件中,ngnix自行转换,我们的目的是不管访问什么都让index.php来处理。
|
开启伪静态(重写)功能,规则在.htaccess文件中,ngnix从里面复制,我们的目的是不管访问什么都让index.php来处理。
|
||||||
3.Upload code.
|
3.Upload code.
|
||||||
上传好代码。
|
上传好代码。
|
||||||
4.Change the file config.php can be read&write (666 is suggested).
|
4.Change the file config.php can be read&write (666 is suggested).
|
||||||
让代码中的config.php文件程序可读写,推荐chmod 666 config.php。
|
让代码中的config.php文件程序可读写,推荐chmod 666 config.php。
|
||||||
5.View the website in chrome or other.
|
5.View the website in chrome or other.
|
||||||
在浏览器中访问。
|
在浏览器中访问。
|
||||||
6.Follow the guide, bind your onedrive.
|
|
||||||
根据引导,绑定你的OneDrive。
|
|
||||||
|
|
||||||
# Deploy to SCF
|
# Deploy to SCF
|
||||||
Official: https://cloud.tencent.com/product/scf
|
Official: https://cloud.tencent.com/product/scf
|
||||||
|
|
||||||
How to Install: https://service-pgxgvop2-1258064400.ap-hongkong.apigateway.myqcloud.com/test/abcdef/%E6%97%A0%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%87%BD%E6%95%B0SCF%E6%90%AD%E5%BB%BAOneDrive.mp4?preview
|
~~How to Install: https://service-pgxgvop2-1258064400.ap-hongkong.apigateway.myqcloud.com/test/abcdef/%E6%97%A0%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%87%BD%E6%95%B0SCF%E6%90%AD%E5%BB%BAOneDrive.mp4?preview~~
|
||||||
|
|
||||||
|
先手动在环境变量添加Region,ap-hongkong或ap-guangzhou之类,具体看 https://cloud.tencent.com/document/api/583/17238 最底下,然后再安装。
|
||||||
|
添加网盘时,SCF反应不过来,会添加失败,请不要删除,再添加一次相同的就可以了。
|
||||||
|
|
||||||
DEMO: https://service-pgxgvop2-1258064400.ap-hongkong.apigateway.myqcloud.com/test/abcdef/
|
DEMO: https://service-pgxgvop2-1258064400.ap-hongkong.apigateway.myqcloud.com/test/abcdef/
|
||||||
|
|
||||||
|
@ -39,8 +40,8 @@ The XXX_path in setting is the path in Onedrive, not in url, program will find t
|
||||||
设置中的 XXX_path 是Onedrive里面的路径,并不是你url里面的,程序会去你Onedrive里面找这个路径。
|
设置中的 XXX_path 是Onedrive里面的路径,并不是你url里面的,程序会去你Onedrive里面找这个路径。
|
||||||
LOGO ICON: put your 'favicon.ico' in the path you showed, make sure xxxxx.com/favicon.ico can be visited.
|
LOGO ICON: put your 'favicon.ico' in the path you showed, make sure xxxxx.com/favicon.ico can be visited.
|
||||||
网站图标:将favicon.ico文件放在你要展示的目录中,确保 xxxxx.com/favicon.ico 可以访问到。
|
网站图标:将favicon.ico文件放在你要展示的目录中,确保 xxxxx.com/favicon.ico 可以访问到。
|
||||||
Program will show content of 'readme.md' under file list.
|
Program will show content of 'readme.md' & 'head.md'.
|
||||||
可以在文件列表下面显示readme.md文件的内容。
|
可以在文件列表显示head.md跟readme.md文件的内容。
|
||||||
guest up path, is a folder that the guest can upload files, but can not be list (exclude admin).
|
guest up path, is a folder that the guest can upload files, but can not be list (exclude admin).
|
||||||
游客上传目录(也叫图床目录),是指定一个目录,让游客可以上传文件,不限格式,不限大小。这个目录里面的内容不列清单(除非管理登录)。
|
游客上传目录(也叫图床目录),是指定一个目录,让游客可以上传文件,不限格式,不限大小。这个目录里面的内容不列清单(除非管理登录)。
|
||||||
If there is 'index.html' file, program will only show the content of 'index.html', not list the files.
|
If there is 'index.html' file, program will only show the content of 'index.html', not list the files.
|
||||||
|
@ -48,3 +49,5 @@ 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.
|
||||||
点击“时间”、“大小”,可以排序显示,点“文件”恢复原样。
|
点击“时间”、“大小”,可以排序显示,点“文件”恢复原样。
|
||||||
|
|
||||||
|
QQ Group: 943919989
|
||||||
|
Telegram Group: https://t.me/joinchat/I_RVc0bqxuxlT-d0cO7ozw
|
||||||
|
|
|
@ -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;?> - <?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">
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
<link rel="icon" href="<?php echo $_SERVER['base_disk_path'];?>favicon.ico" type="image/x-icon" />
|
<link rel="icon" href="<?php echo $_SERVER['base_disk_path'];?>favicon.ico" type="image/x-icon" />
|
||||||
<link rel="shortcut icon" href="<?php echo $_SERVER['base_disk_path'];?>favicon.ico" type="image/x-icon" />
|
<link rel="shortcut icon" href="<?php echo $_SERVER['base_disk_path'];?>favicon.ico" type="image/x-icon" />
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;line-height:1em;color:#000;background-color:#f7f7f9;background-image:url("<?php echo getConfig('background')?getConfig('background'):($_SERVER['base_disk_path'].'background.jpg'); ?>");background-repeat:no-repeat;background-size:cover;background-size:100%;background-attachment:fixed}
|
body{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;line-height:1em;color:#000;background-color:#f7f7f9;<?php if (getConfig('background')) { ?>background-repeat:no-repeat;background-size:cover;background-attachment:fixed;background-image:url("<?php echo getConfig('background'); ?>");<?php } ?>}
|
||||||
a{color:#24292e;cursor:pointer;text-decoration:none}
|
a{color:#24292e;cursor:pointer;text-decoration:none}
|
||||||
ion-icon{font-size:15px;vertical-align:bottom}
|
ion-icon{font-size:15px;vertical-align:bottom}
|
||||||
.changelanguage{position:absolute;right:5px;}
|
.changelanguage{position:absolute;right:5px;}
|
||||||
|
@ -24,8 +24,8 @@
|
||||||
.table-header{margin:0;border:0 none;padding:30px 60px;text-align:left;font-weight:400;color:#000;background-color:rgba(245,245,245,0.5);word-break: break-all;word-wrap: break-word;}
|
.table-header{margin:0;border:0 none;padding:30px 60px;text-align:left;font-weight:400;color:#000;background-color:rgba(245,245,245,0.5);word-break: break-all;word-wrap: break-word;}
|
||||||
.list-body-container{position:relative;left:0;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;background:rgba(245,245,245,0.5)}
|
.list-body-container{position:relative;left:0;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;background:rgba(245,245,245,0.5)}
|
||||||
.more-disk{margin:0;border:0 none;padding:30px 30px;text-align:left;font-weight:400;color:#000;background-color:rgba(245,245,245,0.5);white-space:nowrap;overflow:auto;}
|
.more-disk{margin:0;border:0 none;padding:30px 30px;text-align:left;font-weight:400;color:#000;background-color:rgba(245,245,245,0.5);white-space:nowrap;overflow:auto;}
|
||||||
.more-disk a{padding:5px;transition-duration: 0.4s;border-radius: 12px; background-color: white; color: black; border: 2px solid rgba(85,85,85,0.7); }
|
.more-disk a{margin:0 10px;padding:5px;transition-duration: 0.4s;border-radius: 12px; background-color: white; color: black; border: 2px solid rgba(85,85,85,0.7); }
|
||||||
.more-disk a:hover{ background-color: rgba(85,85,85,0.7); color: white; }
|
.more-disk a:hover, .more-disk a[now]{ background-color: rgba(85,85,85,0.7); color: white; }
|
||||||
.list-table{width:100%;padding:0 20px 20px 20px;border-spacing:0}
|
.list-table{width:100%;padding:0 20px 20px 20px;border-spacing:0}
|
||||||
.list-table tr{height:40px}
|
.list-table tr{height:40px}
|
||||||
.list-table tr[data-to]:hover{background:rgba(85,85,85,0.7);color:white;}
|
.list-table tr[data-to]:hover{background:rgba(85,85,85,0.7);color:white;}
|
||||||
|
@ -51,6 +51,7 @@
|
||||||
.list-wrapper{width:95%; margin-bottom:24px;}
|
.list-wrapper{width:95%; margin-bottom:24px;}
|
||||||
.list-table {padding:8px}
|
.list-table {padding:8px}
|
||||||
.list-table td, .list-table th{white-space:nowrap;overflow:auto;max-width:80px}
|
.list-table td, .list-table th{white-space:nowrap;overflow:auto;max-width:80px}
|
||||||
|
.size, .updated_at{display:none}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
@ -69,7 +70,7 @@
|
||||||
<li><a onclick="showdiv(event,'encrypt','');"><ion-icon name="lock"></ion-icon><?php echo getconstStr('encrypt'); ?></a></li>
|
<li><a onclick="showdiv(event,'encrypt','');"><ion-icon name="lock"></ion-icon><?php echo getconstStr('encrypt'); ?></a></li>
|
||||||
<li><a href="?RefreshCache"><ion-icon name="refresh"></ion-icon><?php echo getconstStr('RefreshCache'); ?></a></li>
|
<li><a href="?RefreshCache"><ion-icon name="refresh"></ion-icon><?php echo getconstStr('RefreshCache'); ?></a></li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<li><a href="<?php echo $_GET['preview']?'?preview&':'?';?>setup"><ion-icon name="settings"></ion-icon><?php echo getconstStr('Setup'); ?></a></li>
|
<li><a href="<?php echo isset($_GET['preview'])?'?preview&':'?';?>setup"><ion-icon name="settings"></ion-icon><?php echo getconstStr('Setup'); ?></a></li>
|
||||||
<li><a onclick="logout()"><ion-icon name="log-out"></ion-icon><?php echo getconstStr('Logout'); ?></a></li>
|
<li><a onclick="logout()"><ion-icon name="log-out"></ion-icon><?php echo getconstStr('Logout'); ?></a></li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
<?php
|
<?php
|
||||||
|
@ -85,7 +86,7 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if ($_SERVER['needUpdate']) { ?>
|
if (isset($_SERVER['needUpdate'])&&$_SERVER['needUpdate']) { ?>
|
||||||
<div style='position:absolute;'><font color='red'><?php echo getconstStr('NeedUpdate'); ?></font></div>
|
<div style='position:absolute;'><font color='red'><?php echo getconstStr('NeedUpdate'); ?></font></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<h1 class="title">
|
<h1 class="title">
|
||||||
|
@ -100,14 +101,28 @@
|
||||||
<?php foreach ($disktags as $disk) {
|
<?php foreach ($disktags as $disk) {
|
||||||
$diskname = getConfig('diskname', $disk);
|
$diskname = getConfig('diskname', $disk);
|
||||||
if ($diskname=='') $diskname = $disk;
|
if ($diskname=='') $diskname = $disk;
|
||||||
echo '<a href="'.path_format($_SERVER['base_path'].'/'.$disk).'">'.$diskname.'</a>  ';
|
echo ' <a href="'.path_format($_SERVER['base_path'].'/'.$disk.'/').'"'.($_SERVER['disktag']==$disk?' now':'').'>'.$diskname.'</a>
|
||||||
|
';
|
||||||
} ?>
|
} ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php }
|
<?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-wrapper" id="list-div">
|
||||||
<div class="list-container">
|
<div class="list-container">
|
||||||
<div class="list-header-container">
|
<div class="list-header-container">
|
||||||
|
@ -131,6 +146,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="list-body-container">
|
<div class="list-body-container">
|
||||||
<?php
|
<?php
|
||||||
|
$pdfurl = false;
|
||||||
|
$DPvideo = false;
|
||||||
if ($_SERVER['is_guestup_path']&&!$_SERVER['admin']) { ?>
|
if ($_SERVER['is_guestup_path']&&!$_SERVER['admin']) { ?>
|
||||||
<div id="upload_div" style="margin:10px">
|
<div id="upload_div" style="margin:10px">
|
||||||
<center>
|
<center>
|
||||||
|
@ -153,8 +170,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="margin: 24px">
|
<div style="margin: 24px">
|
||||||
<?php $ext = strtolower(substr($path, strrpos($path, '.') + 1));
|
<?php $ext = strtolower(substr($path, strrpos($path, '.') + 1));
|
||||||
$DPvideo = '';
|
|
||||||
$pdfurl = '';
|
|
||||||
if (in_array($ext, $exts['img'])) {
|
if (in_array($ext, $exts['img'])) {
|
||||||
echo ' <img src="' . $files['@microsoft.graph.downloadUrl'] . '" alt="' . substr($path, strrpos($path, '/')) . '" onload="if(this.offsetWidth>document.getElementById(\'url\').offsetWidth) this.style.width=\'100%\';" />
|
echo ' <img src="' . $files['@microsoft.graph.downloadUrl'] . '" alt="' . substr($path, strrpos($path, '/')) . '" onload="if(this.offsetWidth>document.getElementById(\'url\').offsetWidth) this.style.width=\'100%\';" />
|
||||||
';
|
';
|
||||||
|
@ -200,12 +215,12 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php } elseif (isset($files['folder'])) {
|
<?php } elseif (isset($files['folder'])) {
|
||||||
$filenum = $_POST['filenum'];
|
if (isset($_POST['filenum'])) $filenum = $_POST['filenum'];
|
||||||
if (!$filenum and $files['folder']['page']) $filenum = ($files['folder']['page']-1)*200;
|
if (!isset($filenum) and isset($files['folder']['page'])) $filenum = ($files['folder']['page']-1)*200;
|
||||||
$readme = false; ?>
|
else $filenum = 0; ?>
|
||||||
<table class="list-table" id="list-table">
|
<table class="list-table" id="list-table">
|
||||||
<tr id="tr0">
|
<tr id="tr0">
|
||||||
<th class="file"><a onclick="sortby('a');"><?php echo getconstStr('File'); ?></a><?php if ($_SERVER['USER']!='qcloud') { ?> <button onclick="showthumbnails(this);"><?php echo getconstStr('ShowThumbnails'); ?></button><?php } ?></th>
|
<th class="file"><a onclick="sortby('a');"><?php echo getconstStr('File'); ?></a><?php if (!(isset($_SERVER['USER'])&&$_SERVER['USER']=='qcloud')) { ?> <button onclick="showthumbnails(this);"><?php echo getconstStr('ShowThumbnails'); ?></button><?php } ?> <button onclick="CopyAllDownloadUrl('.download');"><?php echo getconstStr('CopyAllDownloadUrl'); ?></button></th>
|
||||||
<th class="updated_at" width="25%"><a onclick="sortby('time');"><?php echo getconstStr('EditTime'); ?></a></th>
|
<th class="updated_at" width="25%"><a onclick="sortby('time');"><?php echo getconstStr('EditTime'); ?></a></th>
|
||||||
<th class="size" width="15%"><a onclick="sortby('size');"><?php echo getconstStr('Size'); ?></a></th>
|
<th class="size" width="15%"><a onclick="sortby('size');"><?php echo getconstStr('Size'); ?></a></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -240,13 +255,7 @@
|
||||||
foreach ($files['children'] as $file) {
|
foreach ($files['children'] as $file) {
|
||||||
// Files
|
// Files
|
||||||
if (isset($file['file'])) {
|
if (isset($file['file'])) {
|
||||||
if ($_SERVER['admin'] or (substr($file['name'],0,1) !== '.' and $file['name'] !== getConfig('passfile') ) ) {
|
if ($_SERVER['admin'] or !isHideFile($file['name'])) {
|
||||||
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);
|
|
||||||
}
|
|
||||||
$filenum++; ?>
|
$filenum++; ?>
|
||||||
<tr data-to id="tr<?php echo $filenum;?>">
|
<tr data-to id="tr<?php echo $filenum;?>">
|
||||||
<td class="file">
|
<td class="file">
|
||||||
|
@ -283,7 +292,7 @@
|
||||||
<ion-icon name="document"></ion-icon>
|
<ion-icon name="document"></ion-icon>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<a id="file_a<?php echo $filenum;?>" name="filelist" href="<?php echo path_format($_SERVER['base_disk_path'] . '/' . $path . '/' . encode_str_replace($file['name'])); ?>?preview" target=_blank><?php echo str_replace('&','&', $file['name']); ?></a>
|
<a id="file_a<?php echo $filenum;?>" name="filelist" href="<?php echo path_format($_SERVER['base_disk_path'] . '/' . $path . '/' . encode_str_replace($file['name'])); ?>?preview" target=_blank><?php echo str_replace('&','&', $file['name']); ?></a>
|
||||||
<a href="<?php echo path_format($_SERVER['base_disk_path'] . '/' . $path . '/' . str_replace('&','&', $file['name']));?>"><ion-icon name="download"></ion-icon></a>
|
<a class="download" href="<?php echo path_format($_SERVER['base_disk_path'] . '/' . $path . '/' . str_replace('&','&', $file['name']));?>"><ion-icon name="download"></ion-icon></a>
|
||||||
</td>
|
</td>
|
||||||
<td class="updated_at" id="file_time<?php echo $filenum;?>"><?php echo time_format($file['lastModifiedDateTime']); ?></td>
|
<td class="updated_at" id="file_time<?php echo $filenum;?>"><?php echo time_format($file['lastModifiedDateTime']); ?></td>
|
||||||
<td class="size" id="file_size<?php echo $filenum;?>"><?php echo size_format($file['size']); ?></td>
|
<td class="size" id="file_size<?php echo $filenum;?>"><?php echo size_format($file['size']); ?></td>
|
||||||
|
@ -347,25 +356,7 @@
|
||||||
echo 'Unknown path or file.';
|
echo 'Unknown path or file.';
|
||||||
echo json_encode($files, JSON_PRETTY_PRINT);
|
echo json_encode($files, JSON_PRETTY_PRINT);
|
||||||
}
|
}
|
||||||
if ($head) {
|
if (isset($files['children']['readme.md'])) {
|
||||||
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) {
|
|
||||||
echo '
|
echo '
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -374,11 +365,8 @@
|
||||||
<div class="list-container">
|
<div class="list-container">
|
||||||
<div class="list-header-container">
|
<div class="list-header-container">
|
||||||
<div class="readme">
|
<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">
|
<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 id="readme-md" style="display:none;">' . fetch_files(spurlencode(path_format($path . '/readme.md'),'/'))['content']['body'] . '</textarea>
|
||||||
</textarea>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
';
|
';
|
||||||
|
@ -404,7 +392,7 @@
|
||||||
<div id="mask" class="mask" style="display:none;"></div>
|
<div id="mask" class="mask" style="display:none;"></div>
|
||||||
<?php
|
<?php
|
||||||
if ($_SERVER['admin']) {
|
if ($_SERVER['admin']) {
|
||||||
if (!$_GET['preview']) { ?>
|
if (!isset($_GET['preview'])) { ?>
|
||||||
<div style="word-break: break-all;word-wrap: break-word;">
|
<div style="word-break: break-all;word-wrap: break-word;">
|
||||||
<div id="rename_div" class="operatediv" style="display:none">
|
<div id="rename_div" class="operatediv" style="display:none">
|
||||||
<div>
|
<div>
|
||||||
|
@ -513,7 +501,7 @@
|
||||||
<div style="margin:50px">
|
<div style="margin:50px">
|
||||||
<a onclick="operatediv_close('login')" class="operatediv_close"><?php echo getconstStr('Close'); ?></a>
|
<a onclick="operatediv_close('login')" class="operatediv_close"><?php echo getconstStr('Close'); ?></a>
|
||||||
<center>
|
<center>
|
||||||
<form action="<?php echo $_GET['preview']?'?preview&':'?';?>admin" method="post">
|
<form action="<?php echo isset($_GET['preview'])?'?preview&':'?';?>admin" method="post">
|
||||||
<input id="login_input" name="password1" type="password" placeholder="<?php echo getconstStr('InputPassword'); ?>">
|
<input id="login_input" name="password1" type="password" placeholder="<?php echo getconstStr('InputPassword'); ?>">
|
||||||
<input type="submit" value="<?php echo getconstStr('Login'); ?>">
|
<input type="submit" value="<?php echo getconstStr('Login'); ?>">
|
||||||
</form>
|
</form>
|
||||||
|
@ -525,12 +513,18 @@
|
||||||
<div style="color: rgba(247,247,249,0);"><?php echo date("Y-m-d H:i:s")." ".getconstStr('Week')[date("w")]." ".$_SERVER['REMOTE_ADDR'];?></div>
|
<div style="color: rgba(247,247,249,0);"><?php echo date("Y-m-d H:i:s")." ".getconstStr('Week')[date("w")]." ".$_SERVER['REMOTE_ADDR'];?></div>
|
||||||
</body>
|
</body>
|
||||||
<?php if ($files) { ?>
|
<?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 } ?>
|
<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 (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 if ($pdfurl!='') { ?><script src="//cdn.bootcss.com/pdf.js/2.3.200/pdf.min.js"></script><?php } ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
function changelanguage(str)
|
||||||
|
{
|
||||||
|
if (str=='Language') str = '';
|
||||||
|
document.cookie='language='+str+'; path=/';
|
||||||
|
location.href = location.href;
|
||||||
|
}
|
||||||
<?php if ($files) { ?>
|
<?php if ($files) { ?>
|
||||||
var root = '<?php echo $_SERVER["base_disk_path"]; ?>';
|
var root = '<?php echo $_SERVER["base_disk_path"]; ?>';
|
||||||
function path_format(path) {
|
function path_format(path) {
|
||||||
|
@ -552,25 +546,8 @@
|
||||||
e.innerHTML += paths[paths.length - 1];
|
e.innerHTML += paths[paths.length - 1];
|
||||||
e.innerHTML = e.innerHTML.replace(/\s\/\s$/, '')
|
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
|
<?php
|
||||||
if ($_GET['preview']) { //is preview mode. 在预览时处理 ?>
|
if (isset($_GET['preview'])) { //is preview mode. 在预览时处理 ?>
|
||||||
var $url = document.getElementById('url');
|
var $url = document.getElementById('url');
|
||||||
if ($url) {
|
if ($url) {
|
||||||
$url.innerHTML = location.protocol + '//' + location.host + $url.innerHTML;
|
$url.innerHTML = location.protocol + '//' + location.host + $url.innerHTML;
|
||||||
|
@ -681,7 +658,16 @@
|
||||||
}
|
}
|
||||||
<?php }
|
<?php }
|
||||||
} else { // view folder. 不预览,即浏览目录时?>
|
} else { // view folder. 不预览,即浏览目录时?>
|
||||||
var sort=0;
|
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) {
|
function showthumbnails(obj) {
|
||||||
var files=document.getElementsByName('filelist');
|
var files=document.getElementsByName('filelist');
|
||||||
for ($i=0;$i<files.length;$i++) {
|
for ($i=0;$i<files.length;$i++) {
|
||||||
|
@ -709,6 +695,19 @@
|
||||||
} else console.log(xhr.status+'\n'+xhr.responseText);
|
} else console.log(xhr.status+'\n'+xhr.responseText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function CopyAllDownloadUrl(str) {
|
||||||
|
var tmptextarea=document.createElement('textarea');
|
||||||
|
document.body.appendChild(tmptextarea);
|
||||||
|
tmptextarea.setAttribute('style','position:absolute;left:-100px;width:0px;height:0px;');
|
||||||
|
document.querySelectorAll(str).forEach(function (e) {
|
||||||
|
tmptextarea.innerHTML+=e.href+"\r\n";
|
||||||
|
});
|
||||||
|
tmptextarea.select();
|
||||||
|
tmptextarea.setSelectionRange(0, tmptextarea.value.length);
|
||||||
|
document.execCommand("copy");
|
||||||
|
alert(tmptextarea.innerHTML+'<?php echo getconstStr('Success'); ?>');
|
||||||
|
}
|
||||||
|
var sort=0;
|
||||||
function sortby(string) {
|
function sortby(string) {
|
||||||
if (string=='a') if (sort!=0) {
|
if (string=='a') if (sort!=0) {
|
||||||
for (i = 1; i <= <?php echo $filenum?$filenum:0;?>; i++) document.getElementById('tr'+i).parentNode.insertBefore(document.getElementById('tr'+i),document.getElementById('tr'+(i-1)).nextSibling);
|
for (i = 1; i <= <?php echo $filenum?$filenum:0;?>; i++) document.getElementById('tr'+i).parentNode.insertBefore(document.getElementById('tr'+i),document.getElementById('tr'+(i-1)).nextSibling);
|
||||||
|
@ -807,7 +806,7 @@
|
||||||
location.href=location.protocol + "//" + location.host + "<?php echo path_format($_SERVER['base_path'] . '/' . $path );?>" ;
|
location.href=location.protocol + "//" + location.host + "<?php echo path_format($_SERVER['base_path'] . '/' . $path );?>" ;
|
||||||
}
|
}
|
||||||
<?php }
|
<?php }
|
||||||
if ($files['folder']['childCount']>200) { // more than 200. 有下一页 ?>
|
if (isset($files['folder']['childCount'])&&$files['folder']['childCount']>200) { // more than 200. 有下一页 ?>
|
||||||
function nextpage(num) {
|
function nextpage(num) {
|
||||||
document.getElementById('pagenum').value=num;
|
document.getElementById('pagenum').value=num;
|
||||||
document.getElementById('nextpageform').submit();
|
document.getElementById('nextpageform').submit();
|
||||||
|
@ -985,8 +984,9 @@
|
||||||
xhr4.onload = function(e){
|
xhr4.onload = function(e){
|
||||||
console.log(xhr4.responseText+','+xhr4.status);
|
console.log(xhr4.responseText+','+xhr4.status);
|
||||||
var filename;
|
var filename;
|
||||||
if (xhr4.status==200) filename = JSON.parse(xhr4.responseText)['name'];
|
//if (xhr4.status==200) filename = JSON.parse(xhr4.responseText)['name'];
|
||||||
if (xhr4.status==409) filename = filemd5 + file.name.substr(file.name.indexOf('.'));
|
//if (xhr4.status==409) filename = filemd5 + file.name.substr(file.name.indexOf('.'));
|
||||||
|
filename = JSON.parse(xhr4.responseText)['name'];
|
||||||
if (filename=='') {
|
if (filename=='') {
|
||||||
alert('<?php echo getconstStr('UploadErrorUpAgain'); ?>');
|
alert('<?php echo getconstStr('UploadErrorUpAgain'); ?>');
|
||||||
uploadbuttonshow();
|
uploadbuttonshow();
|
||||||
|
@ -995,8 +995,10 @@
|
||||||
var lasturl = location.href;
|
var lasturl = location.href;
|
||||||
if (lasturl.substr(lasturl.length-1)!='/') lasturl += '/';
|
if (lasturl.substr(lasturl.length-1)!='/') lasturl += '/';
|
||||||
lasturl += filename + '?preview';
|
lasturl += filename + '?preview';
|
||||||
//alert(lasturl);
|
//window.open(lasturl);
|
||||||
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 } ?>
|
<?php } ?>
|
||||||
EndTime=new Date();
|
EndTime=new Date();
|
||||||
|
@ -1006,7 +1008,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='<font color="green"><?php if (!$_SERVER['admin']) { ?>'+filemd5+'<br><?php } ?>'+document.getElementById('upfile_td1_'+tdnum).innerHTML+'<br><?php echo getconstStr('UploadComplete'); ?></font>';
|
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;
|
label.innerHTML=StartStr+MiddleStr;
|
||||||
uploadbuttonshow();
|
uploadbuttonshow();
|
||||||
<?php if ($_SERVER['admin']) { ?>
|
<?php if ($_SERVER['admin']) { ?>
|
||||||
|
@ -1048,7 +1050,7 @@
|
||||||
document.cookie = "admin=; path=/";
|
document.cookie = "admin=; path=/";
|
||||||
location.href = location.href;
|
location.href = location.href;
|
||||||
}
|
}
|
||||||
<?php if (!$_GET['preview']) {?>
|
<?php if (!isset($_GET['preview'])) {?>
|
||||||
function showdiv(event,action,num) {
|
function showdiv(event,action,num) {
|
||||||
var $operatediv=document.getElementsByName('operatediv');
|
var $operatediv=document.getElementsByName('operatediv');
|
||||||
for ($i=0;$i<$operatediv.length;$i++) {
|
for ($i=0;$i<$operatediv.length;$i++) {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="<?php echo $constStr['language']; ?>">
|
<html lang="<?php echo $constStr['language']; ?>">
|
||||||
<head>
|
<head>
|
||||||
|
@ -9,47 +10,51 @@
|
||||||
<link rel="icon" href="<?php echo $_SERVER['base_disk_path'];?>favicon.ico" type="image/x-icon" />
|
<link rel="icon" href="<?php echo $_SERVER['base_disk_path'];?>favicon.ico" type="image/x-icon" />
|
||||||
<link rel="shortcut icon" href="<?php echo $_SERVER['base_disk_path'];?>favicon.ico" type="image/x-icon" />
|
<link rel="shortcut icon" href="<?php echo $_SERVER['base_disk_path'];?>favicon.ico" type="image/x-icon" />
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;line-height:1em;color:#4c4c4c;background-color:#000000;background-image:url("<?php echo getConfig('background')?getConfig('background'):($_SERVER['base_disk_path'].'background.jpg'); ?>");background-repeat:no-repeat;width:100%;height:100%;min-width:1000px;background-size:cover;-webkit-background-size:cover;-o-background-size:cover;background-position:center0;}
|
body{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;line-height:1em;color:#000;background-color:#000000;background-image:url("<?php echo getConfig('background')?getConfig('background'):($_SERVER['base_disk_path'].'background.jpg'); ?>")!important;
|
||||||
a{color:#FFFFFF;cursor:pointer;text-decoration:none;}
|
background-position: center bottom !important;
|
||||||
a:hover{color:#b3b3b3;}
|
background-size: cover !important;
|
||||||
.login ion-icon{vertical-align:bottom;}
|
background-attachment: fixed !important;
|
||||||
|
background-repeat: no-repeat !important;
|
||||||
|
}
|
||||||
|
a{color:#FFFFFF;cursor:pointer;text-decoration:none}
|
||||||
|
ion-icon{font-size:15px;vertical-align:bottom}
|
||||||
|
a:hover{color:#05f7d5;}
|
||||||
.changelanguage{position:absolute;right:5px;}
|
.changelanguage{position:absolute;right:5px;}
|
||||||
.title{text-align:center;margin-top:1rem;letter-spacing:2px;margin-bottom:2rem}
|
.title{text-align:center;margin-top:1rem;letter-spacing:2px;margin-bottom:2rem}
|
||||||
.title a{color:#FFFFFF;text-decoration:none}
|
.title a{color:#FFF;text-decoration:none}
|
||||||
.list-wrapper{width:80%;margin:0 auto 30px;position:relative;box-shadow:0 0 32px 0 rgb(128,128,128);border-radius:15px;}
|
.title a:hover{color: #05f7d5; }
|
||||||
|
.list-wrapper{width:80%;margin:0 auto 30px;position:relative;box-shadow:0 0 32px 0 rgba(0,0,0,0.3);border-radius:15px;}
|
||||||
.list-container{position:relative;overflow:hidden;border-radius:15px;}
|
.list-container{position:relative;overflow:hidden;border-radius:15px;}
|
||||||
.list-header-container{position:relative}
|
.list-header-container{position:relative}
|
||||||
.list-header-container a.back-link{color:#fdfdfd;display:inline-block;position:absolute;font-size:16px;margin:20px 10px;padding:10px 10px;vertical-align:middle;text-decoration:none}
|
.list-header-container a.back-link{color:#FFF;display:inline-block;position:absolute;font-size:16px;margin:20px 10px;padding:10px 10px;vertical-align:middle;text-decoration:none}
|
||||||
.list-container,.list-header-container,.list-wrapper,a.back-link:hover,body{color:#FFF}
|
a.back-link:hover,body{color:#05f7d5}
|
||||||
.table-header{margin:0;border:0 none;padding:30px 60px;text-align:left;font-weight:400;color:#FFF;background-color:rgba(245,245,245,0);word-break: break-all;word-wrap: break-word;}
|
.list-container,.list-header-container,.list-wrapper,body{color:#FFF}
|
||||||
.list-body-container{position:relative;left:0;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;background:rgba(245,245,245,0)}
|
.table-header{margin:0;border:0 none;padding:30px 60px;text-align:left;font-weight:400;color:#FFF;background-color:rgba(0,0,0,0.3);word-break: break-all;word-wrap: break-word;}
|
||||||
.more-disk{margin:0;border:0 none;padding:30px 30px;text-align:left;font-weight:400;color:#FFFFFF;background-color:rgba(85,85,85,0);}
|
.list-body-container{position:relative;left:0;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;background:rgba(0,0,0,0.3)}
|
||||||
.more-disk a{padding:5px;transition-duration: 0.4s;border-radius: 12px; background-color:rgba(144, 144, 144, 0.5); color:#ffffff; border: 2px solid rgba(85,85,85,0); }
|
.more-disk{margin:0;border:0 none;padding:30px 30px;text-align:left;font-weight:400;color:#FFF;background-color:rgba(0,0,0,0.3);white-space:nowrap;overflow:auto;}
|
||||||
.more-disk a:hover{ background-color:#a0a0a0; color:#000000; }
|
.more-disk a{margin:0 10px;padding:5px;transition-duration: 0.4s;border-radius: 12px; background-color: rgba(0, 0, 0, 0.1); color: #FFF; border: 2px solid rgba(85,85,85,0.7); }
|
||||||
|
.more-disk a:hover{ background-color: rgba(0,0,0,0.4); color: #05f7d5; }
|
||||||
.list-table{width:100%;padding:0 20px 20px 20px;border-spacing:0}
|
.list-table{width:100%;padding:0 20px 20px 20px;border-spacing:0}
|
||||||
.list-table tr{height:40px}
|
.list-table tr{height:40px}
|
||||||
.list-table tr[data-to]:hover{background:rgba(72,72,72,0.5);color:white;}
|
.list-table tr[data-to]:hover{background:rgba(0,0,0,0.3);color:#05f7d5;}
|
||||||
.list-table tr[data-to]:hover a[name~="filelist"]{color:white}
|
.list-table tr[data-to]:hover a[name~="filelist"]{color:#05f7d5}
|
||||||
.list-table tr:first-child{background:rgba(85,85,85,0)}
|
.list-table tr:first-child{background:rgba(0,0,0,0)}
|
||||||
.list-table td,.list-table th{padding:0 10px;text-align:left}
|
.list-table td,.list-table th{padding:0 10px;text-align:left}
|
||||||
.list-table .size,.list-table .updated_at{text-align:right}
|
.list-table .size,.list-table .updated_at{text-align:right}
|
||||||
.list-table .file ion-icon{font-size:15px;/*margin-right:5px;*/vertical-align:bottom}
|
|
||||||
.mask{position:absolute;left:0px;top:0px;width:100%;background-color:#000;filter:alpha(opacity=50);opacity:0.5;z-index:2;}
|
.mask{position:absolute;left:0px;top:0px;width:100%;background-color:#000;filter:alpha(opacity=50);opacity:0.5;z-index:2;}
|
||||||
<?php if ($_SERVER['admin']) { ?>
|
<?php if ($_SERVER['admin']) { ?>
|
||||||
.operate{display:inline-table;margin:0;list-style:none}
|
.operate{display:inline-table;margin:0;margin-right:5px;list-style:none}
|
||||||
.operate ion-icon{vertical-align:bottom}
|
.operate ul{position:absolute;display:none;background:rgba(121, 121, 121, 0.7);border:0px #000000 solid;border-radius:5px;margin:-7px 0 0 0;padding:0 7px;color:#205D67;z-index:1;}
|
||||||
.operate ul{position:absolute;display:none;background:rgb(105,105,105,0.8);border:0px #f7f7f7 solid;border-radius:5px;margin:-7px 0 0 0;padding:0 7px;color:#205D67;z-index:1;}
|
|
||||||
.operate:hover ul{position:absolute;display:inline-table;}
|
.operate:hover ul{position:absolute;display:inline-table;}
|
||||||
.operate ul li{padding:7px;list-style:none;display:inline-table;}
|
.operate ul li{padding:7px;list-style:none;display:block;}
|
||||||
.operate ul li ion-icon{vertical-align:bottom}
|
.operate ul li ion-icon{vertical-align:bottom}
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
.operatediv{position:absolute;border:1px rgba(85,85,85,0);background-color:rgba(85,85,85,0);z-index:2;}
|
.operatediv{position:absolute;border:1px #000000;background-color:rgba(0,0,0,0.3);z-index:2;}
|
||||||
.operatediv div{margin:16px}
|
.operatediv div{margin:16px}
|
||||||
.operatediv_close{position:absolute;right:3px;top:3px;}
|
.operatediv_close{position:absolute;right:3px;top:3px;}
|
||||||
.readme{padding:8px;background-color:rgba(85,85,85,0);}
|
.readme{padding:8px;background-color:rgba(0,0,0,0.3);}
|
||||||
.markdown-body{padding:10px;text-align:left}
|
.markdown-body{padding:20px;text-align:left}
|
||||||
@media only screen and (max-width:480px){
|
@media only screen and (max-width:480px){
|
||||||
.more-disk{white-space:nowrap;overflow:auto;}
|
|
||||||
.title{margin-bottom:24px}
|
.title{margin-bottom:24px}
|
||||||
.list-wrapper{width:95%; margin-bottom:24px;}
|
.list-wrapper{width:95%; margin-bottom:24px;}
|
||||||
.list-table {padding:8px}
|
.list-table {padding:8px}
|
||||||
|
@ -57,6 +62,7 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div style="padding:1px">
|
<div style="padding:1px">
|
||||||
<?php
|
<?php
|
||||||
|
@ -102,7 +108,8 @@
|
||||||
<?php foreach ($disktags as $disk) {
|
<?php foreach ($disktags as $disk) {
|
||||||
$diskname = getConfig('diskname', $disk);
|
$diskname = getConfig('diskname', $disk);
|
||||||
if ($diskname=='') $diskname = $disk;
|
if ($diskname=='') $diskname = $disk;
|
||||||
echo '<a href="'.path_format($_SERVER['base_path'].'/'.$disk).'">'.$diskname.'</a>  ';
|
echo ' <a href="'.path_format($_SERVER['base_path'].'/'.$disk).'"'.($_SERVER['disktag']==$disk?' now':'').'>'.$diskname.'</a>
|
||||||
|
';
|
||||||
} ?>
|
} ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -207,9 +214,9 @@
|
||||||
$readme = false; ?>
|
$readme = false; ?>
|
||||||
<table class="list-table" id="list-table">
|
<table class="list-table" id="list-table">
|
||||||
<tr id="tr0">
|
<tr id="tr0">
|
||||||
<th class="file" onclick="sortby('a');"><?php echo getconstStr('File'); if ($_SERVER['USER']!='qcloud') { ?> <button onclick="showthumbnails(this);"><?php echo getconstStr('ShowThumbnails'); ?></button><?php } ?></th>
|
<th class="file"><a onclick="sortby('a');"><?php echo getconstStr('File'); ?></a><?php if ($_SERVER['USER']!='qcloud') { ?> <button onclick="showthumbnails(this);"><?php echo getconstStr('ShowThumbnails'); ?></button><?php } ?><button onclick="CopyAllDownloadUrl();"><?php echo getconstStr('CopyAllDownloadUrl'); ?></button></th>
|
||||||
<th class="updated_at" width="25%" onclick="sortby('time');"><?php echo getconstStr('EditTime'); ?></th>
|
<th class="updated_at" width="25%"><a onclick="sortby('time');"><?php echo getconstStr('EditTime'); ?></a></th>
|
||||||
<th class="size" width="15%" onclick="sortby('size');"><?php echo getconstStr('Size'); ?></th>
|
<th class="size" width="15%"><a onclick="sortby('size');"><?php echo getconstStr('Size'); ?></a></th>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- Dirs -->
|
<!-- Dirs -->
|
||||||
<?php //echo json_encode($files['children'], JSON_PRETTY_PRINT);
|
<?php //echo json_encode($files['children'], JSON_PRETTY_PRINT);
|
||||||
|
@ -220,7 +227,7 @@
|
||||||
<tr data-to id="tr<?php echo $filenum;?>">
|
<tr data-to id="tr<?php echo $filenum;?>">
|
||||||
<td class="file">
|
<td class="file">
|
||||||
<?php if ($_SERVER['admin']) { ?>
|
<?php if ($_SERVER['admin']) { ?>
|
||||||
<li class="operate"><ion-icon name="construct"></ion-icon><?php echo getconstStr('Operate'); ?>
|
<li class="operate"><ion-icon name="construct"></ion-icon><a><?php echo getconstStr('Operate'); ?></a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a onclick="showdiv(event,'encrypt',<?php echo $filenum;?>);"><ion-icon name="lock"></ion-icon><?php echo getconstStr('encrypt'); ?></a></li>
|
<li><a onclick="showdiv(event,'encrypt',<?php echo $filenum;?>);"><ion-icon name="lock"></ion-icon><?php echo getconstStr('encrypt'); ?></a></li>
|
||||||
<li><a onclick="showdiv(event, 'rename',<?php echo $filenum;?>);"><ion-icon name="create"></ion-icon><?php echo getconstStr('Rename'); ?></a></li>
|
<li><a onclick="showdiv(event, 'rename',<?php echo $filenum;?>);"><ion-icon name="create"></ion-icon><?php echo getconstStr('Rename'); ?></a></li>
|
||||||
|
@ -228,7 +235,7 @@
|
||||||
<li><a onclick="showdiv(event, 'copy',<?php echo $filenum;?>);"><ion-icon name="copy"></ion-icon><?php echo getconstStr('Copy'); ?></a></li>
|
<li><a onclick="showdiv(event, 'copy',<?php echo $filenum;?>);"><ion-icon name="copy"></ion-icon><?php echo getconstStr('Copy'); ?></a></li>
|
||||||
<li><a onclick="showdiv(event, 'delete',<?php echo $filenum;?>);"><ion-icon name="trash"></ion-icon><?php echo getconstStr('Delete'); ?></a></li>
|
<li><a onclick="showdiv(event, 'delete',<?php echo $filenum;?>);"><ion-icon name="trash"></ion-icon><?php echo getconstStr('Delete'); ?></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<ion-icon name="folder"></ion-icon>
|
<ion-icon name="folder"></ion-icon>
|
||||||
<a id="file_a<?php echo $filenum;?>" name="filelist" href="<?php echo path_format($_SERVER['base_disk_path'] . '/' . $path . '/' . encode_str_replace($file['name']) . '/'); ?>"><?php echo str_replace('&','&', $file['name']);?></a>
|
<a id="file_a<?php echo $filenum;?>" name="filelist" href="<?php echo path_format($_SERVER['base_disk_path'] . '/' . $path . '/' . encode_str_replace($file['name']) . '/'); ?>"><?php echo str_replace('&','&', $file['name']);?></a>
|
||||||
|
@ -253,14 +260,14 @@
|
||||||
<tr data-to id="tr<?php echo $filenum;?>">
|
<tr data-to id="tr<?php echo $filenum;?>">
|
||||||
<td class="file">
|
<td class="file">
|
||||||
<?php if ($_SERVER['admin']) { ?>
|
<?php if ($_SERVER['admin']) { ?>
|
||||||
<li class="operate"><ion-icon name="construct"></ion-icon><?php echo getconstStr('Operate'); ?>
|
<li class="operate"><ion-icon name="construct"></ion-icon><a><?php echo getconstStr('Operate'); ?></a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a onclick="showdiv(event, 'rename',<?php echo $filenum;?>);"><ion-icon name="create"></ion-icon><?php echo getconstStr('Rename'); ?></a></li>
|
<li><a onclick="showdiv(event, 'rename',<?php echo $filenum;?>);"><ion-icon name="create"></ion-icon><?php echo getconstStr('Rename'); ?></a></li>
|
||||||
<li><a onclick="showdiv(event, 'move',<?php echo $filenum;?>);"><ion-icon name="move"></ion-icon><?php echo getconstStr('Move'); ?></a></li>
|
<li><a onclick="showdiv(event, 'move',<?php echo $filenum;?>);"><ion-icon name="move"></ion-icon><?php echo getconstStr('Move'); ?></a></li>
|
||||||
<li><a onclick="showdiv(event, 'copy',<?php echo $filenum;?>);"><ion-icon name="copy"></ion-icon><?php echo getconstStr('Copy'); ?></a></li>
|
<li><a onclick="showdiv(event, 'copy',<?php echo $filenum;?>);"><ion-icon name="copy"></ion-icon><?php echo getconstStr('Copy'); ?></a></li>
|
||||||
<li><a onclick="showdiv(event, 'delete',<?php echo $filenum;?>);"><ion-icon name="trash"></ion-icon><?php echo getconstStr('Delete'); ?></a></li>
|
<li><a onclick="showdiv(event, 'delete',<?php echo $filenum;?>);"><ion-icon name="trash"></ion-icon><?php echo getconstStr('Delete'); ?></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<?php }
|
<?php }
|
||||||
$ext = strtolower(substr($file['name'], strrpos($file['name'], '.') + 1));
|
$ext = strtolower(substr($file['name'], strrpos($file['name'], '.') + 1));
|
||||||
if (in_array($ext, $exts['music'])) { ?>
|
if (in_array($ext, $exts['music'])) { ?>
|
||||||
|
@ -285,7 +292,7 @@
|
||||||
<ion-icon name="document"></ion-icon>
|
<ion-icon name="document"></ion-icon>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<a id="file_a<?php echo $filenum;?>" name="filelist" href="<?php echo path_format($_SERVER['base_disk_path'] . '/' . $path . '/' . encode_str_replace($file['name'])); ?>?preview" target=_blank><?php echo str_replace('&','&', $file['name']); ?></a>
|
<a id="file_a<?php echo $filenum;?>" name="filelist" href="<?php echo path_format($_SERVER['base_disk_path'] . '/' . $path . '/' . encode_str_replace($file['name'])); ?>?preview" target=_blank><?php echo str_replace('&','&', $file['name']); ?></a>
|
||||||
<a href="<?php echo path_format($_SERVER['base_disk_path'] . '/' . $path . '/' . str_replace('&','&', $file['name']));?>"><ion-icon name="download"></ion-icon></a>
|
<a class="download" href="<?php echo path_format($_SERVER['base_disk_path'] . '/' . $path . '/' . str_replace('&','&', $file['name']));?>"><ion-icon name="download"></ion-icon></a>
|
||||||
</td>
|
</td>
|
||||||
<td class="updated_at" id="file_time<?php echo $filenum;?>"><?php echo time_format($file['lastModifiedDateTime']); ?></td>
|
<td class="updated_at" id="file_time<?php echo $filenum;?>"><?php echo time_format($file['lastModifiedDateTime']); ?></td>
|
||||||
<td class="size" id="file_size<?php echo $filenum;?>"><?php echo size_format($file['size']); ?></td>
|
<td class="size" id="file_size<?php echo $filenum;?>"><?php echo size_format($file['size']); ?></td>
|
||||||
|
@ -541,7 +548,7 @@ function setTime() {
|
||||||
var hour = date.getHours();
|
var hour = date.getHours();
|
||||||
var minute = date.getMinutes();
|
var minute = date.getMinutes();
|
||||||
var second = date.getSeconds();
|
var second = date.getSeconds();
|
||||||
var time = year+"年"+$(month)+'月'+$(day)+"日"+$(hour)+":"+$(minute)+":"+$(second);
|
var time = year+"/"+$(month)+'/'+$(day)+" "+$(hour)+":"+$(minute)+":"+$(second);
|
||||||
document.getElementById("date1").innerHTML=time;
|
document.getElementById("date1").innerHTML=time;
|
||||||
}
|
}
|
||||||
setTime();
|
setTime();
|
||||||
|
@ -551,7 +558,7 @@ setInterval('setTime()',500);
|
||||||
<?php
|
<?php
|
||||||
$ip = ($_SERVER["HTTP_VIA"]) ? $_SERVER["HTTP_X_FORWARDED_FOR"] : $_SERVER["REMOTE_ADDR"];
|
$ip = ($_SERVER["HTTP_VIA"]) ? $_SERVER["HTTP_X_FORWARDED_FOR"] : $_SERVER["REMOTE_ADDR"];
|
||||||
$ip = ($ip) ? $ip : $_SERVER["REMOTE_ADDR"];
|
$ip = ($ip) ? $ip : $_SERVER["REMOTE_ADDR"];
|
||||||
echo '当前IP地址: ' ,$ip, "\n";
|
echo 'IPv4: ' ,$ip, "\n";
|
||||||
?></center>
|
?></center>
|
||||||
</body>
|
</body>
|
||||||
<?php if ($files) { ?>
|
<?php if ($files) { ?>
|
||||||
|
@ -599,7 +606,6 @@ echo '当前IP地址: ' ,$ip, "\n";
|
||||||
if ($readme) {
|
if ($readme) {
|
||||||
$readme.innerHTML = marked(document.getElementById('readme-md').innerText);
|
$readme.innerHTML = marked(document.getElementById('readme-md').innerText);
|
||||||
}
|
}
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($_GET['preview']) { //is preview mode. 在预览时处理 ?>
|
if ($_GET['preview']) { //is preview mode. 在预览时处理 ?>
|
||||||
var $url = document.getElementById('url');
|
var $url = document.getElementById('url');
|
||||||
|
@ -712,7 +718,6 @@ echo '当前IP地址: ' ,$ip, "\n";
|
||||||
}
|
}
|
||||||
<?php }
|
<?php }
|
||||||
} else { // view folder. 不预览,即浏览目录时?>
|
} else { // view folder. 不预览,即浏览目录时?>
|
||||||
var sort=0;
|
|
||||||
function showthumbnails(obj) {
|
function showthumbnails(obj) {
|
||||||
var files=document.getElementsByName('filelist');
|
var files=document.getElementsByName('filelist');
|
||||||
for ($i=0;$i<files.length;$i++) {
|
for ($i=0;$i<files.length;$i++) {
|
||||||
|
@ -740,6 +745,19 @@ echo '当前IP地址: ' ,$ip, "\n";
|
||||||
} else console.log(xhr.status+'\n'+xhr.responseText);
|
} else console.log(xhr.status+'\n'+xhr.responseText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function CopyAllDownloadUrl() {
|
||||||
|
var tmptextarea=document.createElement('textarea');
|
||||||
|
document.body.appendChild(tmptextarea);
|
||||||
|
tmptextarea.setAttribute('style','position:absolute;left:-100px;width:0px;height:0px;');
|
||||||
|
document.querySelectorAll('.download').forEach(function (e) {
|
||||||
|
tmptextarea.innerHTML+=e.href+"\r\n";
|
||||||
|
});
|
||||||
|
tmptextarea.select();
|
||||||
|
tmptextarea.setSelectionRange(0, tmptextarea.value.length);
|
||||||
|
document.execCommand("copy");
|
||||||
|
alert(tmptextarea.innerHTML);
|
||||||
|
}
|
||||||
|
var sort=0;
|
||||||
function sortby(string) {
|
function sortby(string) {
|
||||||
if (string=='a') if (sort!=0) {
|
if (string=='a') if (sort!=0) {
|
||||||
for (i = 1; i <= <?php echo $filenum?$filenum:0;?>; i++) document.getElementById('tr'+i).parentNode.insertBefore(document.getElementById('tr'+i),document.getElementById('tr'+(i-1)).nextSibling);
|
for (i = 1; i <= <?php echo $filenum?$filenum:0;?>; i++) document.getElementById('tr'+i).parentNode.insertBefore(document.getElementById('tr'+i),document.getElementById('tr'+(i-1)).nextSibling);
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,16 @@
|
||||||
|
#!bash
|
||||||
|
|
||||||
|
gitsource='https://github.com/qkqpttgf/OneManager-php'
|
||||||
|
|
||||||
|
OneManagerPath=`cd $(dirname $0);pwd -P`
|
||||||
|
cd ${OneManagerPath}
|
||||||
|
|
||||||
|
git clone ${gitsource}
|
||||||
|
\mv -b config.php OneManager-php/
|
||||||
|
\mv -b OneManager-php/* ./
|
||||||
|
\mv -b OneManager-php/.[^.]* ./
|
||||||
|
rm -rf *~
|
||||||
|
rm -rf .[^.]*~
|
||||||
|
rm -rf OneManager-php
|
||||||
|
chmod 666 config.php
|
||||||
|
|
20
version
20
version
|
@ -1,7 +1,25 @@
|
||||||
|
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.
|
||||||
|
Now, you can get a random 'jpg' from a folder when you type '?random=jpg' after the folder.
|
||||||
|
增加一个开关,在目录加密后能否下载其中的某个文件。
|
||||||
|
在手机上浏览时,隐藏修改时间跟大小。
|
||||||
|
加入一个功能,现在可以在某个目录后面加上'?random=jpg'来得到本目录里面的一张随机jpg。
|
||||||
|
20200229-1300.13
|
||||||
|
In SCF, some config can input Special symbols now, like ?&= 。
|
||||||
|
在SCF中,某些配置可以输入特殊符号了,像background可以用?&=之类的了。
|
||||||
20200225-1310.12
|
20200225-1310.12
|
||||||
Can update by one click any time. fix bugs: special tag, reupload.
|
Can update by one click any time. fix bugs: special tag, reupload.
|
||||||
可以不管版本直接一键更新(覆盖)了。修复可以使用特殊onedrive标签的bug,修复断网续传的问题。
|
可以不管版本直接一键更新(覆盖)了。修复可以使用特殊onedrive标签的bug,修复断网续传的问题。
|
||||||
|
|
||||||
20200222-2130.11
|
20200222-2130.11
|
||||||
you can set background now. fix bug: 2nd disk upload.
|
you can set background now. fix bug: 2nd disk upload.
|
||||||
可以设置背景图片了。第2个盘上传后链接不对。
|
可以设置背景图片了。第2个盘上传后链接不对。
|
||||||
|
|
Loading…
Reference in New Issue