From 02f36229ef71f381842c45e9d1bd71c263ce4294 Mon Sep 17 00:00:00 2001 From: BingoKingo Date: Fri, 1 May 2020 17:27:50 +0800 Subject: [PATCH] re --- app.json | 8 +- platform/heroku.php | 5 +- platform/scf.php | 2 +- readme.md | 15 + tfo/ga.php | 30 + theme/tfo_md.php | 1246 +++++++++++++++++++++++++++++++++++++++ theme/tfo_mdtr.php | 1246 +++++++++++++++++++++++++++++++++++++++ theme/tfo_mdtr_baw.php | 1247 ++++++++++++++++++++++++++++++++++++++++ version | 65 +-- 9 files changed, 3809 insertions(+), 55 deletions(-) create mode 100644 tfo/ga.php create mode 100644 theme/tfo_md.php create mode 100644 theme/tfo_mdtr.php create mode 100644 theme/tfo_mdtr_baw.php diff --git a/app.json b/app.json index 755c2aa..b3f61c0 100644 --- a/app.json +++ b/app.json @@ -1,7 +1,7 @@ { - "name": "OneManager", - "description": "Deploy OneManager to heroku", - "website": "https://github.com/qkqpttgf/OneManager-php", - "repository": "https://github.com/qkqpttgf/OneManager-php", + "name": "Tfo", + "description": "Deploy Tfo to heroku", + "website": "https://github.com/BingoKingo/Tfo", + "repository": "https://github.com/BingoKingo/Tfo", "success_url": "/" } diff --git a/platform/heroku.php b/platform/heroku.php index d628c44..f2066c9 100644 --- a/platform/heroku.php +++ b/platform/heroku.php @@ -247,9 +247,10 @@ function_name:' . $_SERVER['function_name'] . '
'; } -function OnekeyUpate($auth = 'qkqpttgf', $project = 'OneManager-php', $branch = 'master') +function OnekeyUpate($auth = 'BingoKingo', $project = 'Tfo', $branch = 'master') { - //'https://github.com/qkqpttgf/OneManager-php/tarball/master/'; + //'original:https://github.com/qkqpttgf/OneManager-php/tarball/master/'; + //'mine:https://https://github.com/BingoKingo/Tfo/tarball/master/'; $source = 'https://github.com/' . $auth . '/' . $project . '/tarball/' . $branch . '/'; return json_decode(updateHerokuapp(getConfig('function_name'), getConfig('APIKey'), $source)['body'], true); } diff --git a/platform/scf.php b/platform/scf.php index 6db29c6..7f005da 100644 --- a/platform/scf.php +++ b/platform/scf.php @@ -416,7 +416,7 @@ namespace:' . $_SERVER['namespace'] . '
'; } -function OnekeyUpate($auth = 'qkqpttgf', $project = 'OneManager-php', $branch = 'master') +function OnekeyUpate($auth = 'BingoKingo', $project = 'Tfo', $branch = 'master') { $source['url'] = 'https://github.com/' . $auth . '/' . $project; $source['branch'] = $branch; diff --git a/readme.md b/readme.md index 1ea478e..982415c 100644 --- a/readme.md +++ b/readme.md @@ -1,3 +1,18 @@ +Tfo: + +# List of files changed 文件更改 +Information [app.json](/app.json "app.json"),[version](/version "version"),[readme.md](/readme.md "readme.md") + +UpdateAddress [heroku.php](/platform/heroku.php "heroku.php"),[scf.php](/platform/scf.php "scf.php") + +Theme + +Material Design for Classic Series(对默认主题的MD风格小优化,有对页宽度、按钮大小的适配调整): [tfo_mdtr.php](/theme/tfo_mdtr.php "tfo_mdtr.php")(Transparent Material Design), [tfo_md.php](/theme/tfo_md.php "tfo_md.php")(Material Design), [tfo_mdtr_baw.php](/theme/tfo_mdtr_baw.php "tfo_mdtr_baw.php")(Black & White Material Design for Tomb-Sweeping Day) (All based on classic.php,latest at 2020.4.8) + +具体地,您可以下载/复制体验一下或参考示例中运用tfo_mdtr.php的[Li Share Storage Mini](https://tfo.herokuapp.com/ "Li Share Storage Mini")。需要注意:以上系列主题**默认隐藏多盘和右上角语言框**,请谨慎使用!若强迫开启多盘,可以自行定位修改#L111左右more-disk位置去掉display:none !important字符。目前,主题仍存在诸多问题,请谅解。PS:主题**将要实现**的功能有背景模糊/标题随机赋色适应背景图片等,敬请期待... + +Original: + Install program first, then add onedrive in setup after login. 先安装程序,登录后在设置中添加onedrive。 diff --git a/tfo/ga.php b/tfo/ga.php new file mode 100644 index 0000000..2266ab7 --- /dev/null +++ b/tfo/ga.php @@ -0,0 +1,30 @@ +verifyCode($secret, $oneCode, 2); + if($checkResult){ + $user = $_POST['user']; + $pass = $_POST['pass']; + if($user=='admin'&&$pass=='admin000'){ + exit('登录成功'); + }else{ + exit('密码错误'); + } + }else{ + exit('验证码错误'); + }}?> + 登录 +
+
+

账号:

+

密码:

+

验证码:

+ +
+
diff --git a/theme/tfo_md.php b/theme/tfo_md.php new file mode 100644 index 0000000..ae71c99 --- /dev/null +++ b/theme/tfo_md.php @@ -0,0 +1,1246 @@ + + + + <?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'];?> + + + + + + + + + + +'; +?> + +'; +?> +
+ + + +
    • + +
    • +
    • +
    • + +
    • +
    • +
  • + +   + +
    + +
    + +

    + +

    +1) { ?> +
    +
    +
    +
    +'.$diskname.' +'; + } ?> +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    + + + + + +

    +
    +
    + +
    +
    + + +
    +
    +' . $files['error']['message'] . '
    '; + $statusCode=404; + } else { + if (isset($files['file'])) { +?> +
    +
    + +   +
    +
    +document.getElementById(\'url\').offsetWidth) this.style.width=\'100%\';" /> +'; + } elseif (in_array($ext, $exts['video'])) { + //echo ''; + $DPvideo=$files[$_SERVER['DownurlStrName']]; + echo '
    +'; + } elseif (in_array($ext, $exts['music'])) { + echo ' +'; + } elseif (in_array($ext, ['pdf'])) { + /*echo ' + +';*/ + $pdfurl = $files[$_SERVER['DownurlStrName']]; + echo '
    +'; + } elseif (in_array($ext, $exts['office'])) { + echo ' +'; + } elseif (in_array($ext, $exts['txt'])) { + $txtstr = htmlspecialchars(curl_request($files[$_SERVER['DownurlStrName']])['body']); +?> +
    + +
    + +     + + + +'; ?> +
    + + +
    +'; + }*/ else { + echo ''.getconstStr('FileNotSupport').''; + } ?> +
    +
    + + + + + + + + + + + + + + +'; + foreach ($files['children'] as $file) { + // Files + if (isset($file['file'])) { + if ($_SERVER['admin'] or !isHideFile($file['name'])) { + $filenum++; ?> + + + + + + +
        
    + +
  • +
      +
    • +
    • +
    • +
    • +
    • +
    +
  • + + + +
    + +
  • +
      +
    • +
    • +
    • +
    • +
    +
  • + + + + + + + + + + + + + + + + + + + + + + + +
    +200) { + $pagenum = $files['folder']['page']; + $maxpage = ceil($files['folder']['childCount']/200); + $prepagenext = ' + + + + + + + + +
    '; + if ($pagenum!=1) { + $prepagenum = $pagenum-1; + $prepagenext .= ' + '.getconstStr('PrePage').''; + } + $prepagenext .= ' + '; + for ($page=1;$page<=$maxpage;$page++) { + if ($page == $pagenum) { + $prepagenext .= ' + ' . $page . ' '; + } else { + $prepagenext .= ' + ' . $page . ' '; + } + } + $prepagenext = substr($prepagenext,0,-1); + $prepagenext .= ' + '; + if ($pagenum!=$maxpage) { + $nextpagenum = $pagenum+1; + $prepagenext .= ' + '.getconstStr('NextPage').''; + } + $prepagenext .= ' +
    + '; + echo $prepagenext; + } + if ($_SERVER['admin']) { ?> +
    +
    + + +
    +
    + +
    + +
    +
    +
    +
    +
    + +
    +
    +'; + } + } + } else { + echo ' +
    +
    +
    + + +
    +
    +
    '; + $statusCode = 401; + } + } ?> +
    +
    +
    + + + +
    + + + + + + +
    + + + +
    + + + + + + + + + + diff --git a/theme/tfo_mdtr.php b/theme/tfo_mdtr.php new file mode 100644 index 0000000..ba1b75b --- /dev/null +++ b/theme/tfo_mdtr.php @@ -0,0 +1,1246 @@ + + + + <?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'];?> + + + + + + + + + + +'; +?> + +'; +?> +
    + + + +
    • + +
    • +
    • +
    • + +
    • +
    • +
  • + +   + +
    + +
    + +

    + +

    +1) { ?> +
    +
    +
    +
    +'.$diskname.' +'; + } ?> +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    + + + + + +

    +
    +
    + +
    +
    + + +
    +
    +' . $files['error']['message'] . '
    '; + $statusCode=404; + } else { + if (isset($files['file'])) { +?> +
    +
    + +   +
    +
    +document.getElementById(\'url\').offsetWidth) this.style.width=\'100%\';" /> +'; + } elseif (in_array($ext, $exts['video'])) { + //echo ''; + $DPvideo=$files[$_SERVER['DownurlStrName']]; + echo '
    +'; + } elseif (in_array($ext, $exts['music'])) { + echo ' +'; + } elseif (in_array($ext, ['pdf'])) { + /*echo ' + +';*/ + $pdfurl = $files[$_SERVER['DownurlStrName']]; + echo '
    +'; + } elseif (in_array($ext, $exts['office'])) { + echo ' +'; + } elseif (in_array($ext, $exts['txt'])) { + $txtstr = htmlspecialchars(curl_request($files[$_SERVER['DownurlStrName']])['body']); +?> +
    + +
    + +     + + + +'; ?> +
    + + +
    +'; + }*/ else { + echo ''.getconstStr('FileNotSupport').''; + } ?> +
    +
    + + + + + + + + + + + + + + +'; + foreach ($files['children'] as $file) { + // Files + if (isset($file['file'])) { + if ($_SERVER['admin'] or !isHideFile($file['name'])) { + $filenum++; ?> + + + + + + +
        
    + +
  • +
      +
    • +
    • +
    • +
    • +
    • +
    +
  • + + + +
    + +
  • +
      +
    • +
    • +
    • +
    • +
    +
  • + + + + + + + + + + + + + + + + + + + + + + + +
    +200) { + $pagenum = $files['folder']['page']; + $maxpage = ceil($files['folder']['childCount']/200); + $prepagenext = ' + + + + + + + + +
    '; + if ($pagenum!=1) { + $prepagenum = $pagenum-1; + $prepagenext .= ' + '.getconstStr('PrePage').''; + } + $prepagenext .= ' + '; + for ($page=1;$page<=$maxpage;$page++) { + if ($page == $pagenum) { + $prepagenext .= ' + ' . $page . ' '; + } else { + $prepagenext .= ' + ' . $page . ' '; + } + } + $prepagenext = substr($prepagenext,0,-1); + $prepagenext .= ' + '; + if ($pagenum!=$maxpage) { + $nextpagenum = $pagenum+1; + $prepagenext .= ' + '.getconstStr('NextPage').''; + } + $prepagenext .= ' +
    + '; + echo $prepagenext; + } + if ($_SERVER['admin']) { ?> +
    +
    + + +
    +
    + +
    + +
    +
    +
    +
    +
    + +
    +
    +'; + } + } + } else { + echo ' +
    +
    +
    + + +
    +
    +
    '; + $statusCode = 401; + } + } ?> +
    +
    +
    + + + +
    + + + + + + +
    + + + +
    + + + + + + + + + + diff --git a/theme/tfo_mdtr_baw.php b/theme/tfo_mdtr_baw.php new file mode 100644 index 0000000..c2b855c --- /dev/null +++ b/theme/tfo_mdtr_baw.php @@ -0,0 +1,1247 @@ + + + + <?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'];?> + + + + + + + + + + +'; +?> + +'; +?> +
    + + + +
    • + +
    • +
    • +
    • + +
    • +
    • +
  • + +   + +
    + +
    + +

    + +

    +1) { ?> +
    +
    +
    +
    +'.$diskname.' +'; + } ?> +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    + + + + + +

    +
    +
    + +
    +
    + + +
    +
    +' . $files['error']['message'] . '
    '; + $statusCode=404; + } else { + if (isset($files['file'])) { +?> +
    +
    + +   +
    +
    +document.getElementById(\'url\').offsetWidth) this.style.width=\'100%\';" /> +'; + } elseif (in_array($ext, $exts['video'])) { + //echo ''; + $DPvideo=$files[$_SERVER['DownurlStrName']]; + echo '
    +'; + } elseif (in_array($ext, $exts['music'])) { + echo ' +'; + } elseif (in_array($ext, ['pdf'])) { + /*echo ' + +';*/ + $pdfurl = $files[$_SERVER['DownurlStrName']]; + echo '
    +'; + } elseif (in_array($ext, $exts['office'])) { + echo ' +'; + } elseif (in_array($ext, $exts['txt'])) { + $txtstr = htmlspecialchars(curl_request($files[$_SERVER['DownurlStrName']])['body']); +?> +
    + +
    + +     + + + +'; ?> +
    + + +
    +'; + }*/ else { + echo ''.getconstStr('FileNotSupport').''; + } ?> +
    +
    + + + + + + + + + + + + + + +'; + foreach ($files['children'] as $file) { + // Files + if (isset($file['file'])) { + if ($_SERVER['admin'] or !isHideFile($file['name'])) { + $filenum++; ?> + + + + + + +
        
    + +
  • +
      +
    • +
    • +
    • +
    • +
    • +
    +
  • + + + +
    + +
  • +
      +
    • +
    • +
    • +
    • +
    +
  • + + + + + + + + + + + + + + + + + + + + + + + +
    +200) { + $pagenum = $files['folder']['page']; + $maxpage = ceil($files['folder']['childCount']/200); + $prepagenext = ' + + + + + + + + +
    '; + if ($pagenum!=1) { + $prepagenum = $pagenum-1; + $prepagenext .= ' + '.getconstStr('PrePage').''; + } + $prepagenext .= ' + '; + for ($page=1;$page<=$maxpage;$page++) { + if ($page == $pagenum) { + $prepagenext .= ' + ' . $page . ' '; + } else { + $prepagenext .= ' + ' . $page . ' '; + } + } + $prepagenext = substr($prepagenext,0,-1); + $prepagenext .= ' + '; + if ($pagenum!=$maxpage) { + $nextpagenum = $pagenum+1; + $prepagenext .= ' + '.getconstStr('NextPage').''; + } + $prepagenext .= ' +
    + '; + echo $prepagenext; + } + if ($_SERVER['admin']) { ?> +
    +
    + + +
    +
    + +
    + +
    +
    +
    +
    +
    + +
    +
    +'; + } + } + } else { + echo ' +
    +
    +
    + + +
    +
    +
    '; + $statusCode = 401; + } + } ?> +
    +
    +
    + + + +
    + + + + + + +
    + + + +
    + + + + + + + + + + diff --git a/version b/version index 2f454f4..05e0bac 100644 --- a/version +++ b/version @@ -1,51 +1,20 @@ 20200402-1830.17 Oneclick update can select which branch to update. Now use the accept language instead of the language config. 一键更新可以选择哪个分支了。现在开始使用浏览器语言,抛弃language设置。 - -20200326-0001.16 -You can add sharepoint site drive as a disk, you must reinstall after update. -可以将sharepoint网站添加成一个盘,由于结构改变,升级后只能重装。 -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 -Can update by one click any time. fix bugs: special tag, reupload. -可以不管版本直接一键更新(覆盖)了。修复可以使用特殊onedrive标签的bug,修复断网续传的问题。 -20200222-2130.11 -you can set background now. fix bug: 2nd disk upload. -可以设置背景图片了。第2个盘上传后链接不对。 -20200222-1700.09 -Can copy file and folder now. -可以复制文件跟目录了。 -20200220-1220.08 -Multy Mode! You can add more Onedrive in one project (bind Onedrive in setup). And now, heroku apps can update in setup! -多盘来了,在设置中添加Onedrive,另,heroku 上也能一键更新了! -20200215-1850.07 -fix: head.md not show if no readme.md. -修复当没有readme的时候就不显示head的问题。 -20200215-1700.06 -classic theme can read the head.md file now. -classic主题可以处理head.md文件了。 -20200202-2010.05 -refresh token expires in 90 day, save a new token per month. classic theme add some icon for admin. -refresh token 90天过期,所以每月保存一个新的token。classic主题加了点管理图标。 -20200129-2050.04 -if there is 'index.html', then do not show file but show the index.html, except admin. -如果有index.html,就不显示文件列表了,直接显示index.html内容,除非是管理员。 -20200120.02 -fix domain_path do not work. domain_path正常工作了。 -20200118.01 -Can be deploy to heroku/SCF/normal space. SCF、heroku、普通VPS,三种环境都可以用了。 -Change imgup_path to guestup_path, plz make sure it after update. 将imgup_path改成guestup_path更符合用途,更新后请注意更改。 + +Update Data: +20200326-0001.16 You can add sharepoint site drive as a disk,you must reinstall after update.可以将sharepoint网站添加成一个盘,由于结构改变,升级后只能重装。 +20200321-1830.15 after this update, then 'index.html' function will bug in other theme.cache text file content;add hideFunctionalityFile;list exist disktags when AddDisk。本次更新后,'index.html'功能在其它主题会导致bug。文本类文件将缓存;添加hideFunctionalityFile开关;在添加网盘时会显示已经在用的标签。 +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 Can update by one click any time. fix bugs: special tag, reupload.可以不管版本直接一键更新(覆盖)了。修复可以使用特殊onedrive标签的bug,修复断网续传的问题。 +20200222-2130.11 you can set background now. fix bug: 2nd disk upload.可以设置背景图片了。第2个盘上传后链接不对。 +20200222-1700.09 Can copy file and folder now.可以复制文件跟目录了。 +20200220-1220.08 Multy Mode! You can add more Onedrive in one project (bind Onedrive in setup). And now, heroku apps can update in setup! 多盘来了,在设置中添加Onedrive,另,heroku 上也能一键更新了! +20200215-1850.07 fix: head.md not show if no readme.md.修复当没有readme的时候就不显示head的问题。 +20200215-1700.06 classic theme can read the head.md file now.classic主题可以处理head.md文件了。 +20200202-2010.05 refresh token expires in 90 day, save a new token per month. classic theme add some icon for admin.refresh token 90天过期,所以每月保存一个新的token。classic主题加了点管理图标。 +20200129-2050.04 if there is 'index.html', then do not show file but show the index.html, except admin.如果有index.html,就不显示文件列表了,直接显示index.html内容,除非是管理员。 +20200120.02 fix domain_path do not work. domain_path正常工作了。 +20200118.01 Can be deploy to heroku/SCF/normal space.Change imgup_path to guestup_path, plz make sure it after update. SCF、heroku、普通VPS,三种环境都可以用了。将imgup_path改成guestup_path更符合用途,更新后请注意更改。 + \ No newline at end of file