136 Commits
Author SHA1 Message Date
qkqpttgfandGitHub e4693b29ed add exts 2020-06-13 17:45:10 +08:00
qkqpttgfandGitHub a1268da0fe Guest upload folder will Encrypted after uploaded 2020-06-13 17:44:24 +08:00
qkqpttgfandGitHub 4b816fb206 Update readme.md 2020-06-11 14:41:35 +08:00
qkqpttgfandGitHub bb8c1afc58 fix: Error in install 2020-06-11 14:22:08 +08:00
qkqpttgfandGitHub e439ed8e68 Update version 2020-06-07 19:02:16 +08:00
qkqpttgfandGitHub 44bedf16a7 Update readme.md 2020-06-07 18:55:18 +08:00
qkqpttgfandGitHub 53f88aa506 Alifc (#73)
* Update index.php

* Update common.php

* Update and rename scf.php to tencentscf.php

* Create alifc.php

* Update common.php

* Update alifc.php

* Update alifc.php

* Update alifc.php

* Update normal.php

* Update common.php

* Update common.php

* Update conststr.php

* Update normal.php

* Update normal.php

* Update conststr.php

* Update index.php

* Update common.php

* Rename alifc.php to AliyunFC.php

* Rename heroku.php to Heroku.php

* Rename normal.php to Normal.php

* Rename tencentscf.php to TencentSCF.php

* Update common.php

* Update conststr.php

* Update common.php

* Update common.php

* Update common.php
2020-06-07 18:43:47 +08:00
186526andGitHub 7f07ab1b38 Add New Theme Name renexmoe (#72) 2020-06-07 17:57:09 +08:00
qkqpttgfandGitHub 1e437f8864 Update tfo_mdtrbaw.php 2020-05-30 17:57:14 +08:00
qkqpttgfandGitHub f50949dae6 Update tfo_mdtr.php 2020-05-30 17:56:01 +08:00
qkqpttgfandGitHub 27091d5085 Update tfo_md.php 2020-05-30 17:54:33 +08:00
qkqpttgfandGitHub d31aad16e9 txt preview break 2020-05-30 15:09:41 +08:00
qkqpttgfandGitHub 185824353e multiDisk width, txt preview word break 2020-05-30 15:07:59 +08:00
qkqpttgfandGitHub 0e907d4873 guest calculate md5 before upload 2020-05-30 15:05:23 +08:00
qkqpttgfandGitHub 388b8f33a9 guest calculate md5 before upload 2020-05-30 15:01:48 +08:00
qkqpttgfandGitHub c69bbe3eca guest calculate md5 before upload 2020-05-30 15:00:13 +08:00
qkqpttgfandGitHub bddd6e91f2 show aplayer in nexmoe 2020-05-26 09:49:13 +08:00
qkqpttgfandGitHub 64dd0f238c show aplayer 2020-05-26 09:48:50 +08:00
qkqpttgfandGitHub 6a616eca6b fix: in preview, parent folders url error 2020-05-24 20:08:36 +08:00
qkqpttgfandGitHub 0cea4dee5e Update conststr.php 2020-05-24 19:17:52 +08:00
qkqpttgfandGitHub 8912bf7c30 show or disable ShowThumb btn 2020-05-24 19:15:09 +08:00
qkqpttgfandGitHub 3edd92f168 Update nexmoe2.html 2020-05-24 19:05:39 +08:00
qkqpttgfandGitHub f5c7e1e2b5 Update nexmoe1.html 2020-05-24 19:05:18 +08:00
qkqpttgfandGitHub 1e987c8504 Update onemoe.html 2020-05-24 18:43:48 +08:00
qkqpttgfandGitHub 06a077085b morepage and thumb 2020-05-24 18:18:45 +08:00
qkqpttgfandGitHub ac2012df31 morepage and thumb 2020-05-24 18:16:46 +08:00
qkqpttgfandGitHub d344fa2245 nexmoe thumb 2020-05-24 18:15:31 +08:00
qkqpttgfandGitHub 65fa8c290f Description of theme & timezone in setup 2020-05-24 15:42:19 +08:00
qkqpttgfandGitHub 64265e4185 Update conststr.php 2020-05-24 15:38:49 +08:00
qkqpttgfandGitHub 0da8412119 customTheme 2020-05-24 15:31:35 +08:00
qkqpttgfandGitHub ad14918cd7 echo Path in php 2020-05-24 15:14:58 +08:00
qkqpttgfandGitHub 8d961d72de customTheme (url) 2020-05-24 15:07:56 +08:00
qkqpttgfandGitHub b3c61d22d3 add background img 2020-05-22 18:53:23 +08:00
qkqpttgfandGitHub 1929c65011 add background img 2020-05-22 18:49:56 +08:00
qkqpttgfandGitHub 5edd249144 add github link 2020-05-22 16:18:26 +08:00
qkqpttgfandGitHub baa884ab07 Create nexmoe2.html 2020-05-22 16:08:34 +08:00
qkqpttgfandGitHub 47014d73e3 split path to folders 2020-05-22 16:07:52 +08:00
qkqpttgfandGitHub c8a9540d03 split path to folders 2020-05-22 16:05:12 +08:00
qkqpttgfandGitHub ca75c22de1 backarrow 2020-05-21 18:38:45 +08:00
qkqpttgfandGitHub 133990ceff theme change move out 2020-05-21 18:05:18 +08:00
qkqpttgfandGitHub 23fa448a2f Update conststr.php 2020-05-21 18:01:03 +08:00
qkqpttgfandGitHub e85c6eab0d try to change theme at front 2020-05-21 17:56:45 +08:00
qkqpttgfandGitHub cd45927eaa fix: original will jump a pic 2020-05-21 11:00:58 +08:00
qkqpttgfandGitHub 40053a64c5 original or thumb 2020-05-20 20:23:19 +08:00
qkqpttgfandGitHub adfe133522 Update classic.html 2020-05-20 19:39:36 +08:00
qkqpttgfandGitHub 08f177bca5 Update nexmoe.html 2020-05-20 17:24:09 +08:00
qkqpttgfandGitHub b273bdf961 Create nchyn_grey.html 2020-05-20 17:22:08 +08:00
qkqpttgfandGitHub bd568a5630 Update classic.html 2020-05-20 17:21:10 +08:00
qkqpttgfandGitHub 45205ff347 Update common.php 2020-05-20 17:20:10 +08:00
qkqpttgfandGitHub 72bcd304bf add multidisk (has bug) 2020-05-16 13:06:02 +08:00
qkqpttgfandGitHub 2f41e4f7b3 use local url link instead of MS long url in privew 2020-05-16 13:03:56 +08:00
qkqpttgfandGitHub c5cf5b7fae Update conststr.php 2020-05-15 20:23:57 +08:00
qkqpttgfandGitHub f986460bba Update common.php 2020-05-15 20:22:35 +08:00
qkqpttgfandGitHub c57b8606be Create nexmoe.html 2020-05-15 20:20:59 +08:00
qkqpttgfandGitHub 9a101d78c7 Update conststr.php 2020-05-14 18:26:19 +08:00
qkqpttgfandGitHub 44caac5cec Update common.php 2020-05-14 18:25:52 +08:00
qkqpttgfandGitHub 902488ebd0 Update conststr.php 2020-05-14 18:12:51 +08:00
qkqpttgfandGitHub 3b8c0d82ad add runtime mem in foot string 2020-05-14 18:05:43 +08:00
qkqpttgfandGitHub 938d7cfda1 fix: output guest upload in encrypted folder 2020-05-12 14:13:46 +08:00
qkqpttgfandGitHub 788df4b518 fix: proxy remote addr 2020-05-11 15:17:05 +08:00
qkqpttgfandGitHub dfb5255511 if no disktag 302 to 1st disk 2020-05-11 13:12:47 +08:00
qkqpttgfandGitHub 8836da8432 if no disktag 302 to 1st disk 2020-05-11 13:12:19 +08:00
qkqpttgfandGitHub 8075c3d2d8 if no disktag 302 to 1st disk 2020-05-11 13:11:07 +08:00
qkqpttgfandGitHub f5eaea3917 fix: guest upload error when hide login btn 2020-05-10 15:20:05 +08:00
qkqpttgfandGitHub cb0cf8f8e4 fix: guest upload error when hide login btn 2020-05-10 15:18:37 +08:00
qkqpttgfandGitHub fb64194010 fix: guest upload error when hide login btn 2020-05-10 15:17:52 +08:00
qkqpttgfandGitHub fdf37489e4 fix: preview link error in uploading folder 2020-05-08 16:56:57 +08:00
qkqpttgfandGitHub 1d062e0fc5 fix: preview link error in uploading folder 2020-05-08 16:54:35 +08:00
qkqpttgfandGitHub 4fb6007e55 fix: an encrypt form in guest upload folder 2020-05-08 16:18:28 +08:00
qkqpttgfandGitHub d0f7eefe2e the heroku button Adding an explicit parameter 2020-05-08 15:46:19 +08:00
qkqpttgfandGitHub 166573b0cc fix: when no files 2020-05-07 18:45:10 +08:00
qkqpttgfandGitHub 0e5320dd93 Update common.php 2020-05-05 17:40:14 +08:00
qkqpttgfandGitHub ca9fc485b5 Update common.php 2020-05-05 16:18:06 +08:00
qkqpttgfandGitHub 46786637bc Update onemoe.html 2020-05-04 13:47:04 +08:00
qkqpttgfandGitHub a9f3629748 Update classic.html 2020-05-04 13:32:48 +08:00
qkqpttgfandGitHub 855a805f29 fix: guest upload 2020-05-04 13:18:04 +08:00
qkqpttgfandGitHub e3843c7060 fix : guest up 2020-05-04 13:16:36 +08:00
qkqpttgfandGitHub 88dfcd00dc fix bug: read big file by mistake, not need 2020-05-04 12:58:31 +08:00
qkqpttgfandGitHub 94ab3fec4c fix bug: encrypt->Encrypt 2020-05-04 12:34:08 +08:00
qkqpttgfandGitHub 73e952bb5c Update common.php 2020-05-04 11:41:31 +08:00
qkqpttgfandGitHub 78fb66fb24 Create minus.php 2020-05-03 22:15:23 +08:00
qkqpttgfandGitHub e75fa0eaab Rename onemoe.php to onemoe.html 2020-05-03 20:52:08 +08:00
qkqpttgfandGitHub b82daa3f36 Update onemoe.php 2020-05-03 20:51:41 +08:00
qkqpttgfandGitHub 040305aa10 Update version 2020-05-03 18:58:14 +08:00
qkqpttgfandGitHub 9c680bb929 Update version 2020-05-03 18:50:05 +08:00
qkqpttgfandGitHub 160d1ca438 Update onemoe.php 2020-05-03 18:47:38 +08:00
qkqpttgfandGitHub 6e0622c793 Update lybwb.php 2020-05-03 18:46:10 +08:00
qkqpttgfandGitHub 7aaab81a18 Update ly_white.php 2020-05-03 18:43:30 +08:00
qkqpttgfandGitHub 526eacf936 Update purenice.php 2020-05-03 18:39:10 +08:00
qkqpttgfandGitHub bfb816fa63 rebuild theme 2020-05-03 18:25:39 +08:00
qkqpttgfandGitHub 2d4dcd9703 Update scf.php 2020-05-03 18:23:55 +08:00
qkqpttgfandGitHub 34748c5824 clean empty config 2020-05-03 18:23:05 +08:00
qkqpttgfandGitHub 4b1b83b95c Update heroku.php 2020-05-03 18:21:57 +08:00
qkqpttgfandGitHub 72a7c1043d Update update.sh 2020-05-03 18:21:07 +08:00
qkqpttgfandGitHub 33657feefb error_reporting 2020-05-03 18:20:38 +08:00
qkqpttgfandGitHub 9867a91246 encrypt->Encrypt 2020-05-03 18:19:34 +08:00
qkqpttgfandGitHub 18b59e0f11 rebuild theme, upload folder 2020-05-03 18:17:18 +08:00
qkqpttgfandGitHub 83b8e53ef3 Create tfo_mdtr.php 2020-05-02 22:11:46 +08:00
qkqpttgfandGitHub 9ade25d872 Create tfo_md.php 2020-05-02 22:10:09 +08:00
qkqpttgfandGitHub ffbf4472ca Update tfo_mdtrbaw.php 2020-05-02 22:07:50 +08:00
qkqpttgfandGitHub ed64a5acf9 Create tfo_mdtrbaw.php 2020-05-02 21:36:48 +08:00
qkqpttgfandGitHub ab69e108d3 Add files via upload 2020-05-02 09:02:37 +08:00
qkqpttgfandGitHub c85403c719 Update update.sh 2020-04-29 15:07:02 +08:00
qkqpttgfandGitHub 57c80a3e4f Update ruoli_blue.php 2020-04-27 15:57:33 +08:00
qkqpttgfandGitHub 443348f822 Update classic.php 2020-04-21 17:06:50 +08:00
qkqpttgfandGitHub bb943b8551 try fix file content 2020-04-10 10:40:18 +08:00
qkqpttgfandGitHub 2a1b9af033 fix: index.html 2020-04-09 16:47:37 +08:00
qkqpttgfandGitHub caa73378e1 fix: folderpass=adminpass 2020-04-08 17:49:16 +08:00
qkqpttgfandGitHub 0b6cb4ba66 fix: shareurl no apiurl 2020-04-07 20:54:10 +08:00
qkqpttgfandGitHub 09270d47cd Update readme.md 2020-04-06 16:04:46 +08:00
qkqpttgfandGitHub 52afcecb0d timezone 3.5 2020-04-05 14:32:23 +08:00
qkqpttgfandGitHub e9743c648f timezone setting 2020-04-05 13:48:02 +08:00
qkqpttgfandGitHub 064da3da9c timezone setting 2020-04-05 13:47:32 +08:00
qkqpttgfandGitHub a1abd4d5ca timezone setting 2020-04-05 13:47:07 +08:00
qkqpttgfandGitHub 0377867200 timezone setting 2020-04-05 13:46:27 +08:00
qkqpttgfandGitHub acb0ac3913 timezone setting 2020-04-05 13:45:28 +08:00
qkqpttgfandGitHub cf5aa37633 pre-lang & p_path 2020-04-04 13:50:29 +08:00
qkqpttgfandGitHub 97735aec43 add meta description 2020-04-04 13:49:07 +08:00
qkqpttgfandGitHub a244fb7ffb Update version 2020-04-02 18:37:51 +08:00
qkqpttgfandGitHub 5051a05adf Update conststr.php 2020-04-02 18:32:26 +08:00
qkqpttgfandGitHub 89daee97cf Update common.php 2020-04-02 18:32:08 +08:00
qkqpttgfandGitHub f1a6d2821e Update common.php 2020-04-02 18:23:58 +08:00
qkqpttgfandGitHub 00023986b3 use accept_language 2020-04-02 18:21:00 +08:00
qkqpttgfandGitHub 23ee2630ef use accept_language 2020-04-02 18:20:19 +08:00
qkqpttgfandGitHub 8ca9a9d628 use accept_language 2020-04-02 18:19:31 +08:00
qkqpttgfandGitHub 286046b82a use accept_language 2020-04-02 18:18:08 +08:00
qkqpttgfandGitHub a868d5df44 Update conststr.php 2020-04-02 18:16:13 +08:00
qkqpttgfandGitHub 0a78999463 Update update.sh 2020-04-02 16:33:55 +08:00
qkqpttgfandGitHub a6211d3382 Update update.sh 2020-04-02 16:27:45 +08:00
qkqpttgfandGitHub 2dc44a92d3 fix scf update 2020-04-02 11:17:45 +08:00
qkqpttgfandGitHub 925ff9fe90 Update purenice.php 2020-04-01 19:08:30 +08:00
root 989de97dde renamed: function/common.php -> common.php
modified:   index.php
	renamed:    function/heroku.php -> platform/heroku.php
	renamed:    function/normal.php -> platform/normal.php
	renamed:    function/scf.php -> platform/scf.php
	modified:   theme/classic.php
2020-04-01 18:44:50 +08:00
qkqpttgfandGitHub 0d9996c6c8 Update onemoe.php 2020-04-01 17:57:42 +08:00
qkqpttgfandGitHub cd56380d39 Update purenice.php 2020-04-01 17:56:18 +08:00
qkqpttgfandGitHub 6bd47b2a13 Update purenice.php 2020-04-01 15:49:38 +08:00
qkqpttgfandGitHub bd91e82552 Add files via upload 2020-04-01 13:15:39 +08:00
25 changed files with 13214 additions and 1718 deletions
+2682
View File
File diff suppressed because it is too large Load Diff
+79 -18
View File
@@ -1,10 +1,10 @@
<?php <?php
$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', 'ape', 'wav', 'ogg', 'm4a'];
$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', 'py']; $exts['txt'] = ['txt', 'bat', 'sh', 'php', 'asp', 'js', 'css', 'json', 'html', 'c', 'cpp', 'md', 'py', 'omf'];
$exts['video'] = ['mp4', 'webm', 'mkv', 'mov', 'flv', 'blv', 'avi', 'wmv', 'm3u8']; $exts['video'] = ['mp4', 'webm', 'mkv', 'mov', 'flv', 'blv', 'avi', 'wmv', 'm3u8', 'rm', 'rmvb'];
$exts['zip'] = ['zip', 'rar', '7z', 'gz', 'tar']; $exts['zip'] = ['zip', 'rar', '7z', 'gz', 'tar'];
$constStr = [ $constStr = [
@@ -66,14 +66,21 @@ $constStr = [
'en-us' => [ 'en-us' => [
'admin' => 'The admin password, Login button will not show when empty', 'admin' => 'The admin password, Login button will not show when empty',
'adminloginpage' => 'if set, the Login button will not display, and the login page no longer \'?admin\', it is \'?{this value}\'.', 'adminloginpage' => 'if set, the Login button will not display, and the login page no longer \'?admin\', it is \'?{this value}\'.',
'customScript' => '<script> in all pages, e.g. http turn to https',
'customCss' => '<style> in <head>',
'customTheme' => 'an url of html',
'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.',
'disableShowThumb' => 'if 1, the ShowThumbnail button will not display',
'downloadencrypt' => '0 or 1. if 1, the files in encrypt folder can be downloaded without password', 'downloadencrypt' => '0 or 1. if 1, the files in encrypt folder can be downloaded without password',
'background' => 'Set an url as background photo.', 'background' => 'Set an url as background photo.',
'theme' => 'Select theme.',
'timezone' => 'Set default timezone.',
'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', '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 folder(& its childrens) will save in this file.',
'domainforproxy' => 'Will replace the https://xxxxx-my.sharepoint.com with this value.Add &Origindomain=xxxxx-my.sharepoint.com at last',
'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',
'Onedrive_ver' => 'Onedrive version', 'Onedrive_ver' => 'Onedrive version',
@@ -81,14 +88,21 @@ $constStr = [
'zh-cn' => [ 'zh-cn' => [
'admin' => '管理密码,不添加时不显示登录页面且无法登录。', 'admin' => '管理密码,不添加时不显示登录页面且无法登录。',
'adminloginpage' => '如果设置,登录按钮及页面隐藏。管理登录的页面不再是\'?admin\',而是\'?此设置的值\'。', 'adminloginpage' => '如果设置,登录按钮及页面隐藏。管理登录的页面不再是\'?admin\',而是\'?此设置的值\'。',
'customScript' => '<script>,在所有页都会存在,例如放一个http跳转https',
'customCss' => '<style>,在<head>最后面',
'customTheme' => 'html格式的主题的url',
'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中。',
'disableShowThumb' => '如果填 1, ‘显示缩略’按钮将被隐藏。',
'downloadencrypt' => '0 或 1。如果 1, 那加密目录内的文件可以不需要密码就能下载。', 'downloadencrypt' => '0 或 1。如果 1, 那加密目录内的文件可以不需要密码就能下载。',
'background' => '设置一个url作为背景。', 'background' => '设置一个url作为背景。',
'theme' => '选择一个主题。',
'timezone' => '设置默认时区。',
'guestup_path' => '设置游客上传路径(图床路径),不设置这个值时该目录内容会正常列文件出来,设置后只有上传界面,不显示其中文件(登录后显示)。', 'guestup_path' => '设置游客上传路径(图床路径),不设置这个值时该目录内容会正常列文件出来,设置后只有上传界面,不显示其中文件(登录后显示)。',
'hideFunctionalityFile' => '0 或 1。如果 1, 某些文件不列表给游客看,但它的功能正常,比如readme.md', 'hideFunctionalityFile' => '0 或 1。如果 1, 某些文件不列表给游客看,但它的功能正常,比如readme.md',
'passfile' => '自定义密码文件的名字,可以是\'pppppp\',也可以是\'aaaa.txt\'等等;列目录时不会显示,只有知道密码才能查看或下载此文件。密码是这个文件的内容,可以空格、可以中文;', 'passfile' => '自定义密码文件的名字,可以是\'pppppp\',也可以是\'aaaa.txt\'等等;列目录时不会显示,只有知道密码才能查看或下载此文件。密码是这个文件的内容,可以空格、可以中文;',
'domainforproxy' => '会将https://xxxxx-my.sharepoint.com替换成这个值,在目标需要自己设置反代。会加上&Origindomain=原域名',
'public_path' => '使用API长链接访问时,显示网盘文件的路径,不设置时默认为根目录;不能是private_path的上级(public看到的不能比private多,要么看到的就不一样)。', 'public_path' => '使用API长链接访问时,显示网盘文件的路径,不设置时默认为根目录;不能是private_path的上级(public看到的不能比private多,要么看到的就不一样)。',
'sitename' => '网站的名称', 'sitename' => '网站的名称',
'Onedrive_ver' => 'Onedrive版本', 'Onedrive_ver' => 'Onedrive版本',
@@ -178,7 +192,7 @@ $constStr = [
'ko-kr' => '로그인', 'ko-kr' => '로그인',
'fa' => 'ورود', 'fa' => 'ورود',
], ],
'encrypt' => [ 'Encrypt' => [
'en-us' => 'Encrypt', 'en-us' => 'Encrypt',
'zh-cn' => '加密', 'zh-cn' => '加密',
'ja' => '暗号化', 'ja' => '暗号化',
@@ -220,6 +234,10 @@ $constStr = [
'ko-kr' => '돌아 가기', 'ko-kr' => '돌아 가기',
'fa' => 'بازگشت', 'fa' => 'بازگشت',
], ],
'Theme' => [
'en-us' => 'Theme',
'zh-cn' => '主题',
],
'NotNeedUpdate' => [ 'NotNeedUpdate' => [
'en-us' => 'Not Need Update', 'en-us' => 'Not Need Update',
'zh-cn' => '不需要更新', 'zh-cn' => '不需要更新',
@@ -255,6 +273,14 @@ $constStr = [
'ko-kr' => '홈', 'ko-kr' => '홈',
'fa' => 'خانه', 'fa' => 'خانه',
], ],
'Preview' => [
'en-us' => 'Preview',
'zh-cn' => '预览',
],
'List' => [
'en-us' => 'List',
'zh-cn' => '列表',
],
'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>进入设置页面升级',
@@ -325,6 +351,10 @@ $constStr = [
'ko-kr' => '사진 섬네일', 'ko-kr' => '사진 섬네일',
'fa' => 'تصویر بندانگشتی', 'fa' => 'تصویر بندانگشتی',
], ],
'OriginalPic' => [
'en-us' => 'OriginalPic',
'zh-cn' => '原图',
],
'CopyAllDownloadUrl' => [ 'CopyAllDownloadUrl' => [
'en-us' => 'CopyAllDownloadUrl', 'en-us' => 'CopyAllDownloadUrl',
'zh-cn' => '复制所有下载链接', 'zh-cn' => '复制所有下载链接',
@@ -332,6 +362,10 @@ $constStr = [
'ko-kr' => '모든 다운로드 링크 복사', 'ko-kr' => '모든 다운로드 링크 복사',
'fa' => 'کپی از تمام لینک ها', 'fa' => 'کپی از تمام لینک ها',
], ],
'Search' => [
'en-us' => 'Search',
'zh-cn' => '搜索',
],
'EditTime' => [ 'EditTime' => [
'en-us' => 'EditTime', 'en-us' => 'EditTime',
'zh-cn' => '修改时间', 'zh-cn' => '修改时间',
@@ -402,6 +436,14 @@ $constStr = [
'ko-kr' => '업로드', 'ko-kr' => '업로드',
'fa' => 'آپلود', 'fa' => 'آپلود',
], ],
'UploadFile' => [
'en-us' => 'Upload File(s)',
'zh-cn' => '上传文件',
],
'UploadFolder' => [
'en-us' => 'Upload Folder',
'zh-cn' => '上传文件夹',
],
'FileSelected' => [ 'FileSelected' => [
'en-us' => 'Select File', 'en-us' => 'Select File',
'zh-cn' => '选择文件', 'zh-cn' => '选择文件',
@@ -486,6 +528,10 @@ $constStr = [
'ko-kr' => '업로드 링크 받기', 'ko-kr' => '업로드 링크 받기',
'fa' => 'دریافت لینک آپلود', 'fa' => 'دریافت لینک آپلود',
], ],
'Calculate' => [
'en-us' => 'Calculate',
'zh-cn' => '计算',
],
'UpFileTooLarge' => [ 'UpFileTooLarge' => [
'en-us' => 'The File is too Large!', 'en-us' => 'The File is too Large!',
'zh-cn' => '文件过大,终止上传。', 'zh-cn' => '文件过大,终止上传。',
@@ -581,11 +627,11 @@ $constStr = [
'fa' => 'در حال ذخیره refresh_token!', 'fa' => 'در حال ذخیره refresh_token!',
], ],
'MayinEnv' => [ 'MayinEnv' => [
'en-us' => 'The \'Onedrive_ver\' may in Config', 'en-us' => 'The \'Drive_ver\' may in Config',
'zh-cn' => 'Onedrive_ver应该已经写入', 'zh-cn' => 'Drive_ver应该已经写入',
'ja' => 'Onedrive_verは環境変数に書き込まれている必要があります', 'ja' => 'Drive_verは環境変数に書き込まれている必要があります',
'ko-kr' => 'Onedrive_verが書き込まれている必要があります', 'ko-kr' => 'Drive_verが書き込まれている必要があります',
'fa' => 'The \'Onedrive_ver\' may in Config', 'fa' => 'The \'Drive_ver\' may in Config',
], ],
'Wait' => [ 'Wait' => [
'en-us' => 'Wait', 'en-us' => 'Wait',
@@ -633,9 +679,17 @@ $constStr = [
'ko-kr' => '중국 Onedrive', 'ko-kr' => '중국 Onedrive',
'fa' => 'Onedrive در چین', 'fa' => 'Onedrive در چین',
], ],
'DriveVerShareurl' => [
'en-us' => 'A share link of a folder',
'zh-cn' => '共享链接',
],
'UseShareLink' => [
'en-us' => 'Share a folder in Onedrive (enable EDIT for everyone), input the link url below.',
'zh-cn' => '对一个Onedrive文件夹共享,允许所有人编辑,然后将共享链接填在下方',
],
'CustomIdSecret' => [ 'CustomIdSecret' => [
'en-us' => 'Use custom client id & secret', 'en-us' => 'Use custom client id & secret instead of OneManager default',
'zh-cn' => '自己申请应用ID与机密', 'zh-cn' => '自己申请应用ID与机密,不用OneManager默认的',
'ja' => 'アプリケーションIDとシークレットを自分で申請する', 'ja' => 'アプリケーションIDとシークレットを自分で申請する',
'ko-kr' => '응용 프로그램 ID 및 비밀 신청', 'ko-kr' => '응용 프로그램 ID 및 비밀 신청',
'fa' => 'به طور پیش فرض اما از شناسه برنامه و سکرت استفاده کنید', 'fa' => 'به طور پیش فرض اما از شناسه برنامه و سکرت استفاده کنید',
@@ -650,13 +704,12 @@ $constStr = [
'en-us' => 'Use space in Sharepoint website instead of Onedrive', 'en-us' => 'Use space in Sharepoint website instead of Onedrive',
'zh-cn' => '使用Sharepoint网站的空间,不使用Onedrive', 'zh-cn' => '使用Sharepoint网站的空间,不使用Onedrive',
], ],
'GetSharepointName' => [ 'GetSharepointSiteAddress' => [
'en-us' => 'Login office.com and click the SharePoint, create a website or find an exist website, input the name below', 'en-us' => 'Login office.com and click the SharePoint, create a website or find an exist website, input the Site address below',
'zh-cn' => '登录office.com,点击Sharepoint,创建一个网站或使用原有网站,然后将它的名字填在下方', 'zh-cn' => '登录office.com,点击Sharepoint,创建一个网站或使用原有网站,然后将它的站点地址填在下方',
], ],
'InputSharepointName' => [ 'InputSharepointSiteAddress' => [
'en-us' => 'Input the name of Sharepoint website', 'en-us' => 'https://xxxxx.sharepoint.com/sites(teams)/{name}',
'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!',
@@ -726,4 +779,12 @@ $constStr = [
'ko-kr' => '캐시 플러시', 'ko-kr' => '캐시 플러시',
'fa' => 'رفرش cache', 'fa' => 'رفرش cache',
], ],
'CannotOneKeyUpate' => [
'en-us' => 'Can not update by a click! run update.sh',
'zh-cn' => '不能一键更新,可以运行update.sh',
],
'QueryBranchs' => [
'en-us' => 'Query Branchs',
'zh-cn' => '查询分支',
],
]; ];
-1548
View File
File diff suppressed because it is too large Load Diff
+62 -4
View File
@@ -1,13 +1,17 @@
<?php <?php
error_reporting(E_ALL & ~E_NOTICE);
include 'vendor/autoload.php'; include 'vendor/autoload.php';
include 'conststr.php'; include 'conststr.php';
include 'function/common.php'; include 'common.php';
//echo '<pre>'. json_encode($_SERVER, JSON_PRETTY_PRINT).'</pre>'; //echo '<pre>'. json_encode($_SERVER, JSON_PRETTY_PRINT).'</pre>';
if (isset($_SERVER['USER'])&&$_SERVER['USER']==='qcloud') { if (isset($_SERVER['USER'])&&$_SERVER['USER']==='qcloud') {
include 'function/scf.php'; include 'platform/TencentSCF.php';
} elseif (isset($_SERVER['FC_SERVER_PATH'])&&$_SERVER['FC_SERVER_PATH']==='/var/fc/runtime/php7.2') {
//echo '<pre>'. json_encode($_SERVER, JSON_PRETTY_PRINT).'</pre>';
include 'platform/AliyunFC.php';
} elseif (isset($_SERVER['HEROKU_APP_DIR'])&&$_SERVER['HEROKU_APP_DIR']==='/app') { } elseif (isset($_SERVER['HEROKU_APP_DIR'])&&$_SERVER['HEROKU_APP_DIR']==='/app') {
include 'function/heroku.php'; include 'platform/Heroku.php';
$path = getpath(); $path = getpath();
//echo 'path:'. $path; //echo 'path:'. $path;
$_GET = getGET(); $_GET = getGET();
@@ -20,7 +24,7 @@ if (isset($_SERVER['USER'])&&$_SERVER['USER']==='qcloud') {
http_response_code($re['statusCode']); http_response_code($re['statusCode']);
echo $re['body']; echo $re['body'];
} else { } else {
include 'function/normal.php'; include 'platform/Normal.php';
$path = getpath(); $path = getpath();
//echo 'path:'. $path; //echo 'path:'. $path;
$_GET = getGET(); $_GET = getGET();
@@ -35,6 +39,7 @@ if (isset($_SERVER['USER'])&&$_SERVER['USER']==='qcloud') {
echo $re['body']; echo $re['body'];
} }
// Tencent SCF
function main_handler($event, $context) function main_handler($event, $context)
{ {
$event = json_decode(json_encode($event), true); $event = json_decode(json_encode($event), true);
@@ -50,3 +55,56 @@ function main_handler($event, $context)
return main($path); return main($path);
} }
// Aliyun FC
function handler($request, $context)
{
set_error_handler("myErrorHandler");
$event = array(
'method' => $request->getMethod(),
'clientIP' => $request->getAttribute("clientIP"),
'requestURI' => $request->getAttribute("requestURI"),
'path' => spurlencode($request->getAttribute("path"), '/'),
'queryString' => $request->getQueryParams(),
'headers' => $request->getHeaders(),
'body' => $request->getBody()->getContents(),
);
$context = json_decode(json_encode($context), true);
printInput($event, $context);
unset($_POST);
unset($_GET);
unset($_COOKIE);
unset($_SERVER);
GetGlobalVariable($event);
$path = GetPathSetting($event, $context);
$re = main($path);
return new RingCentral\Psr7\Response($re['statusCode'], $re['headers'], $re['body']);
}
// used by Aliyun FC
function myErrorHandler($errno, $errstr, $errfile, $errline) {
if (!(error_reporting() & $errno)) {
return false;
}
switch ($errno) {
case E_USER_ERROR:
$errInfo = array(
"errorMessage" => $errstr,
"errorType" => \ServerlessFC\friendly_error_type($errno),
"stackTrace" => array(
"file" => $errfile,
"line" => $errline,
),
);
throw new \ErrorException($errstr, 0, $errno, $errfile, $errline);
break;
default: // E_USER_WARNING | E_USER_NOTICE
break;
}
/* Don't execute PHP internal error handler */
return true;
}
+397
View File
@@ -0,0 +1,397 @@
<?php
// https://help.aliyun.com/document_detail/53252.html
// https://github.com/aliyun/fc-php-sdk/blob/master/src/AliyunFC/Client.php
use AliyunFC\Client;
function printInput($event, $context)
{
if (strlen(json_encode($event['body']))>500) $event['body']=substr($event['body'],0,strpos($event['body'],'base64')+30) . '...Too Long!...' . substr($event['body'],-50);
echo urldecode(json_encode($event, JSON_PRETTY_PRINT)) . '
' . urldecode(json_encode($context, JSON_PRETTY_PRINT)) . '
';
}
function GetGlobalVariable($event)
{
$_GET = $event['queryString'];
foreach ($_GET as $k => $v) {
if ($v=='') $_GET[$k] = true;
}
$postbody = explode("&",$event['body']);
foreach ($postbody as $postvalues) {
$pos = strpos($postvalues,"=");
$_POST[urldecode(substr($postvalues,0,$pos))]=urldecode(substr($postvalues,$pos+1));
}
$cookiebody = explode("; ",$event['headers']['Cookie'][0]);
foreach ($cookiebody as $cookievalues) {
$pos = strpos($cookievalues,"=");
$_COOKIE[urldecode(substr($cookievalues,0,$pos))]=urldecode(substr($cookievalues,$pos+1));
}
$_SERVER['FC_SERVER_PATH'] = '/var/fc/runtime/php7.2';
}
function GetPathSetting($event, $context)
{
$_SERVER['firstacceptlanguage'] = strtolower(splitfirst(splitfirst($event['headers']['Accept-Language'][0],';')[0],',')[0]);
$_SERVER['accountId'] = $context['accountId'];
$_SERVER['region'] = $context['region'];
$_SERVER['service_name'] = $context['service']['name'];
$_SERVER['function_name'] = $context['function']['name'];
$_SERVER['base_path'] = '/';
$path = $event['path'];
//$path = spurlencode($path, '/');
if (substr($path,-1)=='/') $path=substr($path,0,-1);
$_SERVER['is_guestup_path'] = is_guestup_path($path);
$_SERVER['PHP_SELF'] = path_format($_SERVER['base_path'] . $path);
$_SERVER['REMOTE_ADDR'] = $event['clientIP'];
$_SERVER['HTTP_X_REQUESTED_WITH'] = $event['headers']['X-Requested-With'][0];
return $path;
}
function getConfig($str, $disktag = '')
{
global $InnerEnv;
global $Base64Env;
if (in_array($str, $InnerEnv)) {
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];
}
} else {
if (in_array($str, $Base64Env)) return equal_replace(getenv($str),1);
else return getenv($str);
}
return '';
}
function setConfig($arr, $disktag = '')
{
global $InnerEnv;
global $Base64Env;
if ($disktag=='') $disktag = $_SERVER['disktag'];
$disktags = explode("|",getConfig('disktag'));
$diskconfig = json_decode(getenv($disktag), true);
$tmp = [];
$indisk = 0;
$oparetdisk = 0;
foreach ($arr as $k => $v) {
if (in_array($k, $InnerEnv)) {
if (in_array($k, $Base64Env)) $diskconfig[$k] = equal_replace($v);
else $diskconfig[$k] = $v;
$indisk = 1;
} elseif ($k=='disktag_add') {
array_push($disktags, $v);
$oparetdisk = 1;
} elseif ($k=='disktag_del') {
$disktags = array_diff($disktags, [ $v ]);
$tmp[$v] = '';
$oparetdisk = 1;
} else {
if (in_array($k, $Base64Env)) $tmp[$k] = equal_replace($v);
else $tmp[$k] = $v;
}
}
if ($indisk) {
$diskconfig = array_filter($diskconfig, 'array_value_isnot_null');
ksort($diskconfig);
$tmp[$disktag] = json_encode($diskconfig);
}
if ($oparetdisk) {
$disktags = array_unique($disktags);
foreach ($disktags as $disktag) if ($disktag!='') $disktag_s .= $disktag . '|';
if ($disktag_s!='') $tmp['disktag'] = substr($disktag_s, 0, -1);
else $tmp['disktag'] = '';
}
// echo '正式设置:'.json_encode($tmp,JSON_PRETTY_PRINT).'
//';
$response = updateEnvironment($tmp, $_SERVER['accountId'], $_SERVER['region'], $_SERVER['service_name'], $_SERVER['function_name'], getConfig('AccessKeyID'), getConfig('AccessKeySecret'));
//WaitSCFStat();
return $response;
}
function install()
{
global $constStr;
if ($_GET['install2']) {
$tmp['admin'] = $_POST['admin'];
setConfig($tmp);
if (needUpdate()) {
OnekeyUpate();
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['timezone'] = $_COOKIE['timezone'];
$AccessKeyID = getConfig('AccessKeyID');
if ($AccessKeyID=='') {
$AccessKeyID = $_POST['AccessKeyID'];
$tmp['AccessKeyID'] = $AccessKeyID;
}
$AccessKeySecret = getConfig('AccessKeySecret');
if ($AccessKeySecret=='') {
$AccessKeySecret = $_POST['AccessKeySecret'];
$tmp['AccessKeySecret'] = $AccessKeySecret;
}
$response = SetbaseConfig($tmp, $_SERVER['accountId'], $_SERVER['region'], $_SERVER['service_name'], $_SERVER['function_name'], $AccessKeyID, $AccessKeySecret);
if (api_error($response)) {
$html = api_error_msg($response);
$title = 'Error';
return message($html, $title, 201);
} else {
$html .= '
<form action="?install2" method="post" onsubmit="return notnull(this);">
<label>'.getconstStr('SetAdminPassword').':<input name="admin" type="password" placeholder="' . getconstStr('EnvironmentsDescription')['admin'] . '" size="' . strlen(getconstStr('EnvironmentsDescription')['admin']) . '"></label><br>
<input type="submit" value="'.getconstStr('Submit').'">
</form>
<script>
function notnull(t)
{
if (t.admin.value==\'\') {
alert(\''.getconstStr('SetAdminPassword').'\');
return false;
}
return true;
}
</script>';
$title = getconstStr('SetAdminPassword');
return message($html, $title, 201);
}
//}
}
if ($_GET['install0']) {
$html .= '
<form action="?install1" method="post" onsubmit="return notnull(this);">
language:<br>';
foreach ($constStr['languages'] as $key1 => $value1) {
$html .= '
<label><input type="radio" name="language" value="'.$key1.'" '.($key1==$constStr['language']?'checked':'').' onclick="changelanguage(\''.$key1.'\')">'.$value1.'</label><br>';
}
if (getConfig('AccessKeyID')==''||getConfig('AccessKeySecret')=='') $html .= '
<a href="https://usercenter.console.aliyun.com/?#/manage/ak" target="_blank">'.getconstStr('Create').' AccessKeyID & AccessKeySecret</a><br>
<label>AccessKeyID:<input name="AccessKeyID" type="text" placeholder="" size=""></label><br>
<label>AccessKeySecret:<input name="AccessKeySecret" type="text" placeholder="" size=""></label><br>';
$html .= '
<input type="submit" value="'.getconstStr('Submit').'">
</form>
<script>
var nowtime= new Date();
var timezone = 0-nowtime.getTimezoneOffset()/60;
var expd = new Date();
expd.setTime(expd.getTime()+(2*60*60*1000));
var expires = "expires="+expd.toGMTString();
document.cookie="timezone="+timezone+"; path=/; "+expires;
function changelanguage(str)
{
document.cookie=\'language=\'+str+\'; path=/\';
location.href = location.href;
}
function notnull(t)
{';
if (getConfig('AccessKeyID')==''||getConfig('AccessKeySecret')=='') $html .= '
if (t.AccessKeyID.value==\'\') {
alert(\'input AccessKeyID\');
return false;
}
if (t.AccessKeySecret.value==\'\') {
alert(\'input SecretKey\');
return false;
}';
$html .= '
return true;
}
</script>';
$title = getconstStr('SelectLanguage');
return message($html, $title, 201);
}
$html .= '<a href="?install0">'.getconstStr('ClickInstall').'</a>, '.getconstStr('LogintoBind');
$title = 'Error';
return message($html, $title, 201);
}
function getfunctioninfo($accountId, $region, $service_name, $function_name, $AccessKeyID, $AccessKeySecret)
{
$fcClient = new Client([
"endpoint" => 'https://'.$accountId.'.'.$region.'.fc.aliyuncs.com',
"accessKeyID" => $AccessKeyID,
"accessKeySecret" => $AccessKeySecret
]);
return $fcClient->getFunction($service_name, $function_name);
}
function updateEnvironment($Envs, $accountId, $region, $service_name, $function_name, $AccessKeyID, $AccessKeySecret)
{
//print_r($Envs);
$fcClient = new Client([
"endpoint" => 'https://'.$accountId.'.'.$region.'.fc.aliyuncs.com',
"accessKeyID" => $AccessKeyID,
"accessKeySecret" => $AccessKeySecret
]);
$tmp = $fcClient->getFunction($service_name, $function_name)['data'];
//$tmp = getfunctioninfo($accountId, $region, $service_name, $function_name, $AccessKeyID, $AccessKeySecret)['data'];
foreach ($tmp['environmentVariables'] as $key => $value ) {
$tmp_env[$key] = $value;
}
foreach ($Envs as $key1 => $value1) {
$tmp_env[$key1] = $value1;
}
$tmp_env = array_filter($tmp_env, 'array_value_isnot_null'); // remove null. 清除空值
ksort($tmp_env);
$tmpdata['functionName'] = $tmp['functionName'];
$tmpdata['description'] = $tmp['description'];
$tmpdata['memorySize'] = $tmp['memorySize'];
$tmpdata['timeout'] = $tmp['timeout'];
$tmpdata['runtime'] = $tmp['runtime'];
$tmpdata['handler'] = $tmp['handler'];
$tmpdata['environmentVariables'] = $tmp_env;
$tmpdata['code']['zipFile'] = base64_encode( file_get_contents($fcClient->getFunctionCode($service_name, $function_name)['data']['url']) );
return $fcClient->updateFunction($service_name, $function_name, $tmpdata);
}
function SetbaseConfig($Envs, $accountId, $region, $service_name, $function_name, $AccessKeyID, $AccessKeySecret)
{
//echo json_encode($Envs,JSON_PRETTY_PRINT);
$fcClient = new Client([
"endpoint" => 'https://'.$accountId.'.'.$region.'.fc.aliyuncs.com',
"accessKeyID" => $AccessKeyID,
"accessKeySecret" => $AccessKeySecret
]);
$tmp = $fcClient->getFunction($service_name, $function_name)['data'];
// $tmp = getfunctioninfo($accountId, $region, $service_name, $function_name, $AccessKeyID, $AccessKeySecret)['data'];
foreach ($tmp['environmentVariables'] as $key => $value ) {
$tmp_env[$key] = $value;
}
foreach ($Envs as $key1 => $value1) {
$tmp_env[$key1] = $value1;
}
$tmp_env = array_filter($tmp_env, 'array_value_isnot_null'); // remove null. 清除空值
ksort($tmp_env);
$tmpdata['functionName'] = $function_name;
$tmpdata['description'] = 'Onedrive index and manager in Ali FC.';
$tmpdata['memorySize'] = 128;
$tmpdata['timeout'] = 30;
$tmpdata['runtime'] = 'php7.2';
$tmpdata['handler'] = 'index.handler';
$tmpdata['environmentVariables'] = $tmp_env;
$tmpdata['code']['zipFile'] = base64_encode( file_get_contents($fcClient->getFunctionCode($service_name, $function_name)['data']['url']) );
return $fcClient->updateFunction($service_name, $function_name, $tmpdata);
}
function updateProgram($accountId, $region, $service_name, $function_name, $AccessKeyID, $AccessKeySecret, $source)
{
//WaitSCFStat();
$fcClient = new Client([
"endpoint" => 'https://'.$accountId.'.'.$region.'.fc.aliyuncs.com',
"accessKeyID" => $AccessKeyID,
"accessKeySecret" => $AccessKeySecret
]);
$tmp = $fcClient->getFunction($service_name, $function_name)['data'];
//$tmp = getfunctioninfo($accountId, $region, $service_name, $function_name, $AccessKeyID, $AccessKeySecret)['data'];
$tmpdata['functionName'] = $tmp['functionName'];
$tmpdata['description'] = $tmp['description'];
$tmpdata['memorySize'] = $tmp['memorySize'];
$tmpdata['timeout'] = $tmp['timeout'];
$tmpdata['runtime'] = $tmp['runtime'];
$tmpdata['handler'] = $tmp['handler'];
$tmpdata['environmentVariables'] = $tmp['environmentVariables'];
$tmpdata['code']['zipFile'] = base64_encode( file_get_contents($source) );
return $fcClient->updateFunction($service_name, $function_name, $tmpdata);
}
function api_error($response)
{
return !isset($response['data']);
}
function api_error_msg($response)
{
return json_encode( $response, JSON_PRETTY_PRINT );
return $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('Refresh').'</button>';
}
function setConfigResponse($response)
{
return $response;
}
function OnekeyUpate($auth = 'qkqpttgf', $project = 'OneManager-php', $branch = 'master')
{
$source = '/tmp/code.zip';
$outPath = '/tmp/';
// 从github下载对应tar.gz,并解压
$url = 'https://github.com/' . $auth . '/' . $project . '/tarball/' . $branch . '/';
$tarfile = '/tmp/github.tar.gz';
file_put_contents($tarfile, file_get_contents($url));
$phar = new PharData($tarfile);
$html = $phar->extractTo($outPath, null, true);//路径 要解压的文件 是否覆盖
// 获取解压出的目录名
/*
@ob_start();
passthru('ls /tmp | grep '.$auth.'-'.$project.'',$stat);
$html.='状态:' . $stat . '
结果:
';
$archivefolder = ob_get_clean();
if (substr($archivefolder,-1)==PHP_EOL) $archivefolder = substr($archivefolder, 0, -1);
$outPath .= $archivefolder;
$html.=htmlspecialchars($archivefolder);
//return $html;
*/
$tmp = scandir($outPath);
$name = $auth.'-'.$project;
foreach ($tmp as $f) {
if ( substr($f, 0, strlen($name)) == $name) {
$outPath .= $f;
break;
}
}
// 将目录中文件打包成zip
$zip=new ZipArchive();
if($zip->open($source, ZipArchive::CREATE)){
addFileToZip($zip, $outPath); //调用方法,对要打包的根目录进行操作,并将ZipArchive的对象传递给方法
$zip->close(); //关闭处理的zip文件
}
return updateProgram($_SERVER['accountId'], $_SERVER['region'], $_SERVER['service_name'], $_SERVER['function_name'], getConfig('AccessKeyID'), getConfig('AccessKeySecret'), $source);
}
function addFileToZip($zip, $rootpath, $path = '')
{
if (substr($rootpath,-1)=='/') $rootpath = substr($rootpath, 0, -1);
if (substr($path,0,1)=='/') $path = substr($path, 1);
$handler=opendir(path_format($rootpath.'/'.$path)); //打开当前文件夹由$path指定。
while($filename=readdir($handler)){
if($filename != "." && $filename != ".."){//文件夹文件名字为'.'和‘..’,不要对他们进行操作
$nowname = path_format($rootpath.'/'.$path."/".$filename);
if(is_dir($nowname)){// 如果读取的某个对象是文件夹,则递归
addFileToZip($zip, $rootpath, $path."/".$filename);
}else{ //将文件加入zip对象
$zip->addFile($nowname);
$newname = $path."/".$filename;
if (substr($newname,0,1)=='/') $newname = substr($newname, 1);
$zip->renameName($nowname, $newname);
}
}
}
@closedir($path);
}
+15 -5
View File
@@ -2,6 +2,7 @@
function getpath() function getpath()
{ {
$_SERVER['firstacceptlanguage'] = strtolower(splitfirst(splitfirst($_SERVER['HTTP_ACCEPT_LANGUAGE'],';')[0],',')[0]);
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR']; $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR'];
$_SERVER['base_path'] = path_format(substr($_SERVER['SCRIPT_NAME'], 0, -10) . '/'); $_SERVER['base_path'] = path_format(substr($_SERVER['SCRIPT_NAME'], 0, -10) . '/');
$p = strpos($_SERVER['REQUEST_URI'],'?'); $p = strpos($_SERVER['REQUEST_URI'],'?');
@@ -105,7 +106,8 @@ function install()
if ($_GET['install1']) { if ($_GET['install1']) {
if ($_POST['admin']!='') { if ($_POST['admin']!='') {
$tmp['admin'] = $_POST['admin']; $tmp['admin'] = $_POST['admin'];
$tmp['language'] = $_POST['language']; //$tmp['language'] = $_POST['language'];
$tmp['timezone'] = $_COOKIE['timezone'];
$APIKey = getConfig('APIKey'); $APIKey = getConfig('APIKey');
if ($APIKey=='') { if ($APIKey=='') {
$APIKey = $_POST['APIKey']; $APIKey = $_POST['APIKey'];
@@ -146,6 +148,12 @@ language:<br>';
<input type="submit" value="'.getconstStr('Submit').'"> <input type="submit" value="'.getconstStr('Submit').'">
</form> </form>
<script> <script>
var nowtime= new Date();
var timezone = 0-nowtime.getTimezoneOffset()/60;
var expd = new Date();
expd.setTime(expd.getTime()+(2*60*60*1000));
var expires = "expires="+expd.toGMTString();
document.cookie="timezone="+timezone+"; path=/; "+expires;
function changelanguage(str) function changelanguage(str)
{ {
document.cookie=\'language=\'+str+\'; path=/\'; document.cookie=\'language=\'+str+\'; path=/\';
@@ -219,9 +227,9 @@ function setHerokuConfig($env, $function_name, $apikey)
return HerokuAPI('PATCH', 'https://api.heroku.com/apps/' . $function_name . '/config-vars', $data, $apikey); return HerokuAPI('PATCH', 'https://api.heroku.com/apps/' . $function_name . '/config-vars', $data, $apikey);
} }
function updateHerokuapp($function_name, $apikey) function updateHerokuapp($function_name, $apikey, $source)
{ {
$tmp['source_blob']['url'] = 'https://github.com/qkqpttgf/OneManager-php/tarball/master/'; $tmp['source_blob']['url'] = $source;
$data = json_encode($tmp); $data = json_encode($tmp);
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);
} }
@@ -239,9 +247,11 @@ function_name:' . $_SERVER['function_name'] . '<br>
<button onclick="location.href = location.href;">'.getconstStr('Refresh').'</button>'; <button onclick="location.href = location.href;">'.getconstStr('Refresh').'</button>';
} }
function OnekeyUpate() function OnekeyUpate($auth = 'qkqpttgf', $project = 'OneManager-php', $branch = 'master')
{ {
return json_decode(updateHerokuapp(getConfig('function_name'), getConfig('APIKey'))['body'], true); //'https://github.com/qkqpttgf/OneManager-php/tarball/master/';
$source = 'https://github.com/' . $auth . '/' . $project . '/tarball/' . $branch . '/';
return json_decode(updateHerokuapp(getConfig('function_name'), getConfig('APIKey'), $source)['body'], true);
} }
function setConfigResponse($response) function setConfigResponse($response)
+79 -12
View File
@@ -2,6 +2,8 @@
function getpath() function getpath()
{ {
$_SERVER['firstacceptlanguage'] = strtolower(splitfirst(splitfirst($_SERVER['HTTP_ACCEPT_LANGUAGE'],';')[0],',')[0]);
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR'];
$_SERVER['base_path'] = path_format(substr($_SERVER['SCRIPT_NAME'], 0, -10) . '/'); $_SERVER['base_path'] = path_format(substr($_SERVER['SCRIPT_NAME'], 0, -10) . '/');
$p = strpos($_SERVER['REQUEST_URI'],'?'); $p = strpos($_SERVER['REQUEST_URI'],'?');
if ($p>0) $path = substr($_SERVER['REQUEST_URI'], 0, $p); if ($p>0) $path = substr($_SERVER['REQUEST_URI'], 0, $p);
@@ -71,14 +73,13 @@ function setConfig($arr, $disktag = '')
$configs = substr($s, 18, -2); $configs = substr($s, 18, -2);
if ($configs!='') $envs = json_decode($configs, true); if ($configs!='') $envs = json_decode($configs, true);
$disktags = explode("|",getConfig('disktag')); $disktags = explode("|",getConfig('disktag'));
//$indisk = 0; $indisk = 0;
$operatedisk = 0; $operatedisk = 0;
foreach ($arr as $k => $v) { foreach ($arr as $k => $v) {
if (in_array($k, $InnerEnv)) { if (in_array($k, $InnerEnv)) {
if (in_array($k, $Base64Env)) $envs[$disktag][$k] = equal_replace($v); if (in_array($k, $Base64Env)) $envs[$disktag][$k] = equal_replace($v);
else $envs[$disktag][$k] = $v; else $envs[$disktag][$k] = $v;
/*$diskconfig[$k] = $v; $indisk = 1;
$indisk = 1;*/
} elseif ($k=='disktag_add') { } elseif ($k=='disktag_add') {
array_push($disktags, $v); array_push($disktags, $v);
$operatedisk = 1; $operatedisk = 1;
@@ -91,11 +92,12 @@ function setConfig($arr, $disktag = '')
else $envs[$k] = $v; else $envs[$k] = $v;
} }
} }
/*if ($indisk) { if ($indisk) {
$diskconfig = $envs[$disktag];
$diskconfig = array_filter($diskconfig, 'array_value_isnot_null'); $diskconfig = array_filter($diskconfig, 'array_value_isnot_null');
ksort($diskconfig); ksort($diskconfig);
$tmp[$disktag] = json_encode($diskconfig); $envs[$disktag] = $diskconfig;
}*/ }
if ($operatedisk) { if ($operatedisk) {
$disktags = array_unique($disktags); $disktags = array_unique($disktags);
foreach ($disktags as $disktag) if ($disktag!='') $disktag_s .= $disktag . '|'; foreach ($disktags as $disktag) if ($disktag!='') $disktag_s .= $disktag . '|';
@@ -118,7 +120,8 @@ function install()
if ($_GET['install2']) { if ($_GET['install2']) {
if ($_POST['admin']!='') { if ($_POST['admin']!='') {
$tmp['admin'] = $_POST['admin']; $tmp['admin'] = $_POST['admin'];
$tmp['language'] = $_COOKIE['language']; //$tmp['language'] = $_COOKIE['language'];
$tmp['timezone'] = $_COOKIE['timezone'];
$response = setConfig($tmp); $response = setConfig($tmp);
if (api_error($response)) { if (api_error($response)) {
$html = api_error_msg($response); $html = api_error_msg($response);
@@ -148,6 +151,12 @@ function install()
</form> </form>
</div> </div>
<script> <script>
var nowtime= new Date();
var timezone = 0-nowtime.getTimezoneOffset()/60;
var expd = new Date();
expd.setTime(expd.getTime()+(2*60*60*1000));
var expires = "expires="+expd.toGMTString();
document.cookie="timezone="+timezone+"; path=/; "+expires;
function notnull(t) function notnull(t)
{ {
if (t.admin.value==\'\') { if (t.admin.value==\'\') {
@@ -243,12 +252,70 @@ Can not write config to file.<br>
<button onclick="location.href = location.href;">'.getconstStr('Refresh').'</button>'; <button onclick="location.href = location.href;">'.getconstStr('Refresh').'</button>';
} }
function OnekeyUpate()
{
return json_decode(updateHerokuapp(getConfig('function_name'), getConfig('APIKey'))['body'], true);
}
function setConfigResponse($response) function setConfigResponse($response)
{ {
return $response; return $response;
} }
function OnekeyUpate($auth = 'qkqpttgf', $project = 'OneManager-php', $branch = 'master')
{
// __DIR__ is xxx/platform
$projectPath = splitlast(__DIR__, '/')[0];
// 从github下载对应tar.gz,并解压
$url = 'https://github.com/' . $auth . '/' . $project . '/tarball/' . $branch . '/';
$tarfile = $projectPath.'/github.tar.gz';
$githubfile = file_get_contents($url);
if (!$githubfile) return 0;
file_put_contents($tarfile, $githubfile);
if (splitfirst(PHP_VERSION, '.')[0] == '7') {
$phar = new PharData($tarfile); // need php7
$phar->extractTo($projectPath, null, true);//路径 要解压的文件 是否覆盖
} else {
ob_start();
passthru('tar -xzvf '.$tarfile,$stat);
ob_get_clean();
}
unlink($tarfile);
$outPath = '';
$tmp = scandir($projectPath);
$name = $auth.'-'.$project;
foreach ($tmp as $f) {
if ( substr($f, 0, strlen($name)) == $name) {
$outPath = $projectPath . '/' . $f;
break;
}
}
//error_log($outPath);
if ($outPath=='') return 0;
//unlink($outPath.'/config.php');
rename($projectPath.'/config.php', $outPath.'/config.php');
return moveFolder($outPath, $projectPath);
}
function moveFolder($from, $to)
{
if (substr($from, -1)=='/') $from = substr($from, 0, -1);
if (substr($to, -1)=='/') $to = substr($to, 0, -1);
if (!file_exists($to)) mkdir($to, 0777);
$handler=opendir($from);
while($filename=readdir($handler)) {
if($filename != '.' && $filename != '..'){
$fromfile = $from.'/'.$filename;
$tofile = $to.'/'.$filename;
if(is_dir($fromfile)){// 如果读取的某个对象是文件夹,则递归
moveFolder($fromfile, $tofile);
}else{
//if (file_exists($tofile)) unlink($tofile);
rename($fromfile, $tofile);
if (file_exists($fromfile)) unlink($fromfile);
}
}
}
closedir($handler);
rmdir($from);
return 1;
}
+19 -6
View File
@@ -23,11 +23,14 @@ function GetGlobalVariable($event)
$pos = strpos($cookievalues,"="); $pos = strpos($cookievalues,"=");
$_COOKIE[urldecode(substr($cookievalues,0,$pos))]=urldecode(substr($cookievalues,$pos+1)); $_COOKIE[urldecode(substr($cookievalues,0,$pos))]=urldecode(substr($cookievalues,$pos+1));
} }
$_SERVER['HTTP_USER_AGENT'] = $event['headers']['user-agent'];
$_SERVER['HTTP_TRANSLATE']==$event['headers']['translate'];//'f'
$_SERVER['USER'] = 'qcloud'; $_SERVER['USER'] = 'qcloud';
} }
function GetPathSetting($event, $context) function GetPathSetting($event, $context)
{ {
$_SERVER['firstacceptlanguage'] = strtolower(splitfirst(splitfirst($event['headers']['accept-language'],';')[0],',')[0]);
$_SERVER['function_name'] = $context['function_name']; $_SERVER['function_name'] = $context['function_name'];
$_SERVER['namespace'] = $context['namespace']; $_SERVER['namespace'] = $context['namespace'];
$host_name = $event['headers']['host']; $host_name = $event['headers']['host'];
@@ -131,15 +134,16 @@ function install()
$tmp['admin'] = $_POST['admin']; $tmp['admin'] = $_POST['admin'];
setConfig($tmp); setConfig($tmp);
if (needUpdate()) { if (needUpdate()) {
updateProgram($_SERVER['function_name'], $_SERVER['Region'], $_SERVER['namespace'], $SecretId, $SecretKey); OnekeyUpate();
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 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); 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 ($_GET['install1']) {
//if ($_POST['admin']!='') { //if ($_POST['admin']!='') {
$tmp['language'] = $_POST['language']; //$tmp['language'] = $_POST['language'];
$tmp['Region'] = $_POST['Region']; $tmp['Region'] = $_POST['Region'];
$tmp['timezone'] = $_COOKIE['timezone'];
$SecretId = getConfig('SecretId'); $SecretId = getConfig('SecretId');
if ($SecretId=='') { if ($SecretId=='') {
$SecretId = $_POST['SecretId']; $SecretId = $_POST['SecretId'];
@@ -207,6 +211,12 @@ language:<br>';
<input type="submit" value="'.getconstStr('Submit').'"> <input type="submit" value="'.getconstStr('Submit').'">
</form> </form>
<script> <script>
var nowtime= new Date();
var timezone = 0-nowtime.getTimezoneOffset()/60;
var expd = new Date();
expd.setTime(expd.getTime()+(2*60*60*1000));
var expires = "expires="+expd.toGMTString();
document.cookie="timezone="+timezone+"; path=/; "+expires;
function changelanguage(str) function changelanguage(str)
{ {
document.cookie=\'language=\'+str+\'; path=/\'; document.cookie=\'language=\'+str+\'; path=/\';
@@ -369,13 +379,14 @@ function SetbaseConfig($Envs, $function_name, $Region, $Namespace, $SecretId, $S
return post2url('https://'.$host, $data.'&Signature='.urlencode($signStr)); return post2url('https://'.$host, $data.'&Signature='.urlencode($signStr));
} }
function updateProgram($function_name, $Region, $Namespace, $SecretId, $SecretKey) function updateProgram($function_name, $Region, $Namespace, $SecretId, $SecretKey, $source)
{ {
WaitSCFStat(); WaitSCFStat();
$meth = 'POST'; $meth = 'POST';
$host = 'scf.tencentcloudapi.com'; $host = 'scf.tencentcloudapi.com';
$tmpdata['Action'] = 'UpdateFunctionCode'; $tmpdata['Action'] = 'UpdateFunctionCode';
$tmpdata['Code.GitUrl'] = 'https://github.com/qkqpttgf/OneManager-php'; $tmpdata['Code.GitUrl'] = $source['url'];
$tmpdata['Code.GitBranch'] = $source['branch'];
$tmpdata['CodeSource'] = 'Git'; $tmpdata['CodeSource'] = 'Git';
$tmpdata['FunctionName'] = $function_name; $tmpdata['FunctionName'] = $function_name;
$tmpdata['Handler'] = 'index.main_handler'; $tmpdata['Handler'] = 'index.main_handler';
@@ -407,9 +418,11 @@ namespace:' . $_SERVER['namespace'] . '<br>
<button onclick="location.href = location.href;">'.getconstStr('Refresh').'</button>'; <button onclick="location.href = location.href;">'.getconstStr('Refresh').'</button>';
} }
function OnekeyUpate() function OnekeyUpate($auth = 'qkqpttgf', $project = 'OneManager-php', $branch = 'master')
{ {
return json_decode(updateProgram($_SERVER['function_name'], $_SERVER['Region'], $_SERVER['namespace'], getConfig('SecretId'), getConfig('SecretKey')), true)['Response']; $source['url'] = 'https://github.com/' . $auth . '/' . $project;
$source['branch'] = $branch;
return json_decode(updateProgram($_SERVER['function_name'], $_SERVER['Region'], $_SERVER['namespace'], getConfig('SecretId'), getConfig('SecretKey'), $source), true)['Response'];
} }
function setConfigResponse($response) function setConfigResponse($response)
+24 -8
View File
@@ -4,10 +4,21 @@ Install program first, then add onedrive in setup after login.
# Deploy to heroku # Deploy to heroku
Official: https://heroku.com Official: https://heroku.com
How to Install: Click the button [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy) to Deploy a new app, or create an app then deploy via connect to your github fork. How to Install: Click the button [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/qkqpttgf/OneManager-php) to Deploy a new app, or create an app then deploy via connect to your github fork.
DEMO: https://herooneindex.herokuapp.com/ DEMO: https://herooneindex.herokuapp.com/
# Deploy to Tencent Serverless Cloud Function (腾讯无服务器云函数 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~~
添加网盘时,SCF反应不过来,会添加失败,请不要删除,再添加一次相同的就可以了。
DEMO: https://service-pgxgvop2-1258064400.ap-hongkong.apigateway.myqcloud.com/test/abcdef/
# Deploy to VPS(Virtual Private Server) 部署到VPS或空间 # Deploy to VPS(Virtual Private Server) 部署到VPS或空间
How to Install: 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.
@@ -21,15 +32,20 @@ How to Install:
5.View the website in chrome or other. 5.View the website in chrome or other.
在浏览器中访问。 在浏览器中访问。
# Deploy to 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~~ # Deploy to Aliyun Function Compute (阿里函数计算 FC)
Official: https://fc.console.aliyun.com/
先手动在环境变量添加Regionap-hongkong或ap-guangzhou之类,具体看 https://cloud.tencent.com/document/api/583/17238 最底下,然后再安装。 How to Install:
添加网盘时,SCF反应不过来,会添加失败,请不要删除,再添加一次相同的就可以了。 1,新建函数 -- HTTP函数
2,运行环境选择php7.2
3,触发器认证方式选择anonymous,请求方式里面,点一下GET,再点一下POST,最终框框里面有这2个
4,上传代码
5,触发器中点进去,找到配置自定义域名,点击前往,创建,路径中填 /* ,其它下拉选择。
6,访问你的域名,开始安装
DEMO: 无
DEMO: https://service-pgxgvop2-1258064400.ap-hongkong.apigateway.myqcloud.com/test/abcdef/
# Features 特性 # Features 特性
When downloading files, the program produce a direct url, visitor download files from MS OFFICE via the direct url, the server expend a few bandwidth in produce. When downloading files, the program produce a direct url, visitor download files from MS OFFICE via the direct url, the server expend a few bandwidth in produce.
@@ -49,5 +65,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 QQ Group: 943919989 (请看完上面的中英双语再加群,谢谢!)
Telegram Group: https://t.me/joinchat/I_RVc0bqxuxlT-d0cO7ozw Telegram Group: https://t.me/joinchat/I_RVc0bqxuxlT-d0cO7ozw
+1219
View File
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -71,7 +71,7 @@
<li class="operate"><ion-icon name="construct"></ion-icon><?php echo getconstStr('Operate'); ?><ul> <li class="operate"><ion-icon name="construct"></ion-icon><?php echo getconstStr('Operate'); ?><ul>
<?php if (isset($files['folder'])) { ?> <?php if (isset($files['folder'])) { ?>
<li><a onclick="showdiv(event,'create','');"><ion-icon name="add-circle"></ion-icon><?php echo getconstStr('Create'); ?></a></li> <li><a onclick="showdiv(event,'create','');"><ion-icon name="add-circle"></ion-icon><?php echo getconstStr('Create'); ?></a></li>
<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 isset($_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>
@@ -239,7 +239,7 @@
<?php if ($_SERVER['admin']) { ?> <?php if ($_SERVER['admin']) { ?>
<li class="operate"><ion-icon name="construct"></ion-icon><a><?php echo getconstStr('Operate'); ?></a> <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>
<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>
@@ -428,7 +428,7 @@
<input id="encrypt_sid" name="encrypt_sid" type="hidden" value=""> <input id="encrypt_sid" name="encrypt_sid" type="hidden" value="">
<input id="encrypt_hidden" name="encrypt_folder" type="hidden" value=""> <input id="encrypt_hidden" name="encrypt_folder" type="hidden" value="">
<input id="encrypt_input" name="encrypt_newpass" type="text" value="" placeholder="<?php echo getconstStr('InputPasswordUWant'); ?>"> <input id="encrypt_input" name="encrypt_newpass" type="text" value="" placeholder="<?php echo getconstStr('InputPasswordUWant'); ?>">
<?php if (getConfig('passfile')!='') {?><input name="operate_action" type="submit" value="<?php echo getconstStr('encrypt'); ?>"><?php } else { ?><br><label><?php echo getconstStr('SetpassfileBfEncrypt'); ?></label><?php } ?> <?php if (getConfig('passfile')!='') {?><input name="operate_action" type="submit" value="<?php echo getconstStr('Encrypt'); ?>"><?php } else { ?><br><label><?php echo getconstStr('SetpassfileBfEncrypt'); ?></label><?php } ?>
</form> </form>
</div> </div>
</div> </div>
@@ -911,7 +911,7 @@ echo 'IPv4: ' ,$ip, "\n";
return; return;
} }
var xhr1 = new XMLHttpRequest(); var xhr1 = new XMLHttpRequest();
xhr1.open("GET", '?action=upbigfile&upbigfilename='+ encodeURIComponent(file.name) +'&filesize='+ file.size +'&lastModified='+ file.lastModified); xhr1.open("GET", '?action=upbigfile&upbigfilename='+ encodeURIComponent((file.webkitRelativePath||file.name)) +'&filesize='+ file.size +'&lastModified='+ file.lastModified);
xhr1.setRequestHeader('x-requested-with','XMLHttpRequest'); xhr1.setRequestHeader('x-requested-with','XMLHttpRequest');
xhr1.send(null); xhr1.send(null);
xhr1.onload = function(e){ xhr1.onload = function(e){
@@ -1022,7 +1022,7 @@ echo 'IPv4: ' ,$ip, "\n";
if (response['size']>0) { if (response['size']>0) {
// contain size, upload finish. 有size说明是最终返回,上传结束 // contain size, upload finish. 有size说明是最终返回,上传结束
var xhr3 = new XMLHttpRequest(); var xhr3 = new XMLHttpRequest();
xhr3.open("GET", '?action=del_upload_cache&filename=.'+file.lastModified+ '_' +file.size+ '_' +encodeURIComponent(file.name)+'.tmp'); xhr3.open("GET", '?action=del_upload_cache&filelastModified='+file.lastModified+'&filesize='+file.size+'&filename='+encodeURIComponent((file.webkitRelativePath||file.name)));
xhr3.setRequestHeader('x-requested-with','XMLHttpRequest'); xhr3.setRequestHeader('x-requested-with','XMLHttpRequest');
xhr3.send(null); xhr3.send(null);
xhr3.onload = function(e){ xhr3.onload = function(e){
@@ -1031,7 +1031,7 @@ echo 'IPv4: ' ,$ip, "\n";
<?php if (!$_SERVER['admin']) { ?> <?php if (!$_SERVER['admin']) { ?>
var filemd5 = spark.end(); var filemd5 = spark.end();
var xhr4 = new XMLHttpRequest(); var xhr4 = new XMLHttpRequest();
xhr4.open("GET", '?action=uploaded_rename&filename='+encodeURIComponent(file.name)+'&filemd5='+filemd5); xhr4.open("GET", '?action=uploaded_rename&filename='+encodeURIComponent((file.webkitRelativePath||file.name))+'&filemd5='+filemd5);
xhr4.setRequestHeader('x-requested-with','XMLHttpRequest'); xhr4.setRequestHeader('x-requested-with','XMLHttpRequest');
xhr4.send(null); xhr4.send(null);
xhr4.onload = function(e){ xhr4.onload = function(e){
+6 -6
View File
@@ -74,7 +74,7 @@
<li class="operate"><ion-icon name="construct"></ion-icon><?php echo getconstStr('Operate'); ?><ul> <li class="operate"><ion-icon name="construct"></ion-icon><?php echo getconstStr('Operate'); ?><ul>
<?php if (isset($files['folder'])) { ?> <?php if (isset($files['folder'])) { ?>
<li><a onclick="showdiv(event,'create','');"><ion-icon name="add-circle"></ion-icon><?php echo getconstStr('Create'); ?></a></li> <li><a onclick="showdiv(event,'create','');"><ion-icon name="add-circle"></ion-icon><?php echo getconstStr('Create'); ?></a></li>
<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 $_GET['preview']?'?preview&':'?';?>setup"><ion-icon name="settings"></ion-icon><?php echo getconstStr('Setup'); ?></a></li>
@@ -229,7 +229,7 @@
<?php if ($_SERVER['admin']) { ?> <?php if ($_SERVER['admin']) { ?>
<li class="operate"><ion-icon name="construct"></ion-icon><a><?php echo getconstStr('Operate'); ?></a> <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>
<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>
@@ -445,7 +445,7 @@
<input id="encrypt_sid" name="encrypt_sid" type="hidden" value=""> <input id="encrypt_sid" name="encrypt_sid" type="hidden" value="">
<input id="encrypt_hidden" name="encrypt_folder" type="hidden" value=""> <input id="encrypt_hidden" name="encrypt_folder" type="hidden" value="">
<input id="encrypt_input" name="encrypt_newpass" type="text" value="" placeholder="<?php echo getconstStr('InputPasswordUWant'); ?>"> <input id="encrypt_input" name="encrypt_newpass" type="text" value="" placeholder="<?php echo getconstStr('InputPasswordUWant'); ?>">
<?php if (getConfig('passfile')!='') {?><input name="operate_action" type="submit" value="<?php echo getconstStr('encrypt'); ?>"><?php } else { ?><br><label><?php echo getconstStr('SetpassfileBfEncrypt'); ?></label><?php } ?> <?php if (getConfig('passfile')!='') {?><input name="operate_action" type="submit" value="<?php echo getconstStr('Encrypt'); ?>"><?php } else { ?><br><label><?php echo getconstStr('SetpassfileBfEncrypt'); ?></label><?php } ?>
</form> </form>
</div> </div>
</div> </div>
@@ -908,7 +908,7 @@ echo 'IPv4: ' ,$ip, "\n";
return; return;
} }
var xhr1 = new XMLHttpRequest(); var xhr1 = new XMLHttpRequest();
xhr1.open("GET", '?action=upbigfile&upbigfilename='+ encodeURIComponent(file.name) +'&filesize='+ file.size +'&lastModified='+ file.lastModified); xhr1.open("GET", '?action=upbigfile&upbigfilename='+ encodeURIComponent((file.webkitRelativePath||file.name)) +'&filesize='+ file.size +'&lastModified='+ file.lastModified);
xhr1.setRequestHeader('x-requested-with','XMLHttpRequest'); xhr1.setRequestHeader('x-requested-with','XMLHttpRequest');
xhr1.send(null); xhr1.send(null);
xhr1.onload = function(e){ xhr1.onload = function(e){
@@ -1019,7 +1019,7 @@ echo 'IPv4: ' ,$ip, "\n";
if (response['size']>0) { if (response['size']>0) {
// contain size, upload finish. 有size说明是最终返回,上传结束 // contain size, upload finish. 有size说明是最终返回,上传结束
var xhr3 = new XMLHttpRequest(); var xhr3 = new XMLHttpRequest();
xhr3.open("GET", '?action=del_upload_cache&filename=.'+file.lastModified+ '_' +file.size+ '_' +encodeURIComponent(file.name)+'.tmp'); xhr3.open("GET", '?action=del_upload_cache&filelastModified='+file.lastModified+'&filesize='+file.size+'&filename='+encodeURIComponent((file.webkitRelativePath||file.name)));
xhr3.setRequestHeader('x-requested-with','XMLHttpRequest'); xhr3.setRequestHeader('x-requested-with','XMLHttpRequest');
xhr3.send(null); xhr3.send(null);
xhr3.onload = function(e){ xhr3.onload = function(e){
@@ -1028,7 +1028,7 @@ echo 'IPv4: ' ,$ip, "\n";
<?php if (!$_SERVER['admin']) { ?> <?php if (!$_SERVER['admin']) { ?>
var filemd5 = spark.end(); var filemd5 = spark.end();
var xhr4 = new XMLHttpRequest(); var xhr4 = new XMLHttpRequest();
xhr4.open("GET", '?action=uploaded_rename&filename='+encodeURIComponent(file.name)+'&filemd5='+filemd5); xhr4.open("GET", '?action=uploaded_rename&filename='+encodeURIComponent((file.webkitRelativePath||file.name))+'&filemd5='+filemd5);
xhr4.setRequestHeader('x-requested-with','XMLHttpRequest'); xhr4.setRequestHeader('x-requested-with','XMLHttpRequest');
xhr4.send(null); xhr4.send(null);
xhr4.onload = function(e){ xhr4.onload = function(e){
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+395
View File
@@ -0,0 +1,395 @@
<!--IconValuesStart-->
{
"music":"audiotrack",
"video":"ondemand_video",
"img":"image",
"default":"insert_drive_file"
}
<!--IconValuesEnd-->
<!DOCTYPE html>
<html lang="<!--constStr@language-->">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/>
<title><!--Title--></title>
<link rel="icon" href="<!--base_path-->favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="<!--base_path-->favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="//cdnjs.loli.net/ajax/libs/mdui/0.4.1/css/mdui.css">
<style>
body{background-color:#f2f5fa;padding-bottom:60px;<!--BackgroundStart-->background-position:center bottom;background-repeat:no-repeat;background-size:cover;background-attachment:fixed;background-image:url("<!--BackgroundUrl-->");<!--BackgroundEnd-->}
.nexmoe-item{margin:20px -8px 0!important;padding:15px!important;border-radius:5px;background-color:#fff;-webkit-box-shadow:0 .5em 3em rgba(161,177,204,.4);box-shadow:0 .5em 3em rgba(161,177,204,.4);background-color:#fff}
.mdui-img-fluid,.mdui-video-fluid{border-radius:5px;border:1px solid #eee}
.mdui-list{padding:0}
.mdui-list-item{margin:0!important;border-radius:5px;padding:0 10px 0 5px!important;border:1px solid #eee;margin-bottom:10px!important}
.mdui-list-item:last-child{margin-bottom:0!important}
.mdui-list-item:first-child{border:none}
.mdui-toolbar{width:auto;margin-top:60px!important}
.mdui-appbar .mdui-toolbar{height:56px;font-size:16px}
.mdui-toolbar>*{padding:0 6px;margin:0 2px;}
.mdui-toolbar>.mdui-typo-headline{padding:0 16px 0 0}
.mdui-toolbar>i{padding:0}
.mdui-toolbar>a{padding:0 16px;line-height:30px;border-radius:30px;border:1px solid #eee;opacity:.87}
.mdui-toolbar>a:hover,a.mdui-typo-headline,a.active{opacity:1}
.mdui-container{max-width:980px}
.mdui-list>.th{background-color:initial}
.mdui-list-item>a{width:100%;line-height:48px}
.mdui-toolbar>a:last-child{opacity:1;background-color:#1e89f2;color:#ffff}
.more-disk{display: inline-block;max-width: 100px;}
.more-disk div{
list-style:none;
position:absolute;display:none;background:#ffffff;border-radius:5px;margin:0 0 0 -10px;/*padding:0 7px;*/color:#205D67;z-index:1;
box-shadow: 0 0.5em 3em rgba(161,177,204,.4);
}
.more-disk:hover div{display:block}
.more-disk div li{line-height:normal;padding: 3px 10px;}
.more-disk div li a{text-decoration: none; color:rgba(0,0,0,.3);}
.more-disk div li a:hover{color:rgba(0,0,0,.87);}
.more-disk div li a[now]{color:rgba(0,0,0,1);}
@media screen and (max-width:980px){
.mdui-list-item .mdui-text-right{display:none}
.mdui-container{width:100%!important;margin:0}
/*.mdui-toolbar>*{display:none}*/
.mdui-toolbar>a:last-child,.mdui-toolbar>.mdui-typo-headline,.mdui-toolbar>i:first-child{display:block}
}
</style>
<script src="//cdnjs.loli.net/ajax/libs/mdui/0.4.1/js/mdui.min.js"></script>
</head>
<body class="mdui-theme-primary-blue-grey mdui-theme-accent-blue">
<div class="mdui-container">
<div class="mdui-container-fluid">
<div class="mdui-toolbar nexmoe-item" id="toolbar">
<a href="<!--base_path-->"><!--Sitename--></a>
<!--MultiDiskAreaStart-->
<i class="mdui-icon material-icons mdui-icon-dark" style="margin:0;">chevron_right</i>
<div class="more-disk">
<span><!--DiskNameNow--></span>
<div>
<!--MultiDisksStart-->
<li><a href="<!--MultiDisksUrl-->" <!--MultiDisksNow-->><!--MultiDisksName--></a></li>
<!--MultiDisksEnd-->
</div>
</div>
<!--MultiDiskAreaEnd-->
<!--PathArrayStart-->
<i class="mdui-icon material-icons mdui-icon-dark" style="margin:0;">chevron_right</i>
<a href="<!--PathArrayLink-->"><!--PathArrayName--></a>
<!--PathArrayEnd-->
</div>
</div>
<!--ListStart-->
<div class="mdui-container-fluid">
<!--EncryptedStart-->
<div class="mdui-col-md-6 mdui-col-offset-md-3">
<!--<center><h1 class="mdui-typo-display-2-opacity">这是一个受保护的文件夹,您需要提供访问密码才能查看。</h1></center>-->
<form action="" method="post">
<div class="mdui-textfield mdui-textfield-floating-label">
<i class="mdui-icon material-icons">https</i>
<label class="mdui-textfield-label"><!--constStr@InputPassword--></label>
<input name="password1" class="mdui-textfield-input" type="password"/>
</div>
<br>
<button type="submit" class="mdui-center mdui-btn mdui-btn-raised mdui-ripple mdui-color-theme">
<i class="mdui-icon material-icons">fingerprint</i>
<!--constStr@Submit-->
</button>
</form>
</div>
<!--EncryptedEnd-->
<!--GuestUploadStart-->
<!--
<div class="nexmoe-item" style="padding: 100px!important;">
<div class="mdui-typo-display-3-opacity" style="text-align:center;">OneImages</div>
<form action="" method="post" enctype="multipart/form-data">
<input class="mdui-center" type="file" style="margin: 50px 0;" name="file" />
<div class="mdui-row-xs-3">
<div class="mdui-col"></div>
<div class="mdui-col">
<button class="mdui-btn mdui-btn-block mdui-color-theme-accent mdui-ripple"><!--constStr@Upload--></button>
</div>
</div>
</form>
</div>
-->
<!--GuestUploadEnd-->
<!--HeadomfStart-->
<div class="mdui-typo mdui-shadow-3" style="padding: 20px;margin: 20px 0">
<!--HeadomfContent-->
</div>
<!--HeadomfEnd-->
<!--HeadmdStart-->
<div class="mdui-typo mdui-shadow-3" style="padding: 20px;margin: 20px 0">
<!--<div class="mdui-chip">
<span class="mdui-chip-icon"><i class="mdui-icon material-icons">face</i></span>
<span class="mdui-chip-title">HEAD.md</span>
</div>-->
<!--HeadmdContent-->
</div>
<!--HeadmdEnd-->
<!--IsFileStart-->
<!--IsimgFileStart-->
<div class="nexmoe-item">
<img class="mdui-img-fluid mdui-center" src="<!--FileDownUrl-->"/>
</div>
<!--IsimgFileEnd-->
<!--IstxtFileStart-->
<div class="nexmoe-item">
<pre id="editor" style="white-space: pre-wrap;"><!--TxtContent--></pre>
</div>
<!--IstxtFileEnd-->
<!--IsmusicFileStart-->
<div class="nexmoe-item">
<audio class="mdui-center" src="<!--FileDownUrl-->" controls autoplay style="width: 100%;" ></audio>
</div>
<!--IsmusicFileEnd-->
<!--IsofficeFileStart-->
<div class="nexmoe-item">
<iframe id="office-a" src="https://view.officeapps.live.com/op/view.aspx?src=<!--FileEncodeDownUrl-->" style="width: 100%;height: 800px" frameborder="0"></iframe>
</div>
<!--IsofficeFileEnd-->
<!--IsvideoFileStart-->
<link class="dplayer-css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dplayer/dist/DPlayer.min.css">
<script src="https://cdn.jsdelivr.net/npm/dplayer/dist/DPlayer.min.js"></script>
<div class="nexmoe-item">
<div class="mdui-center" id="dplayer"></div>
</div>
<script>
const dp = new DPlayer({
container: document.getElementById('dplayer'),
lang:'zh-cn',
video: {
url: '<!--FileDownUrl-->',
type: 'auto'
}
});
</script>
<!--IsvideoFileEnd-->
<!--IsOtherFileStart-->
<div class="nexmoe-item"><!--constStr@FileNotSupport--></div>
<!--IsOtherFileEnd-->
<a href="<!--FileEncodeReplaceUrl-->" class="mdui-fab mdui-fab-fixed mdui-ripple mdui-color-theme-accent"><i class="mdui-icon material-icons">file_download</i></a>
<!--IsFileEnd-->
<!--IsFolderStart-->
<style>
.thumb .th{
display: none;
}
.thumb .mdui-text-right{
display: none;
}
.thumb .mdui-list-item a ,.thumb .mdui-list-item {
width:217px;
height: 230px;
float: left;
margin: 10px 10px !important;
}
.thumb .mdui-col-xs-12,.thumb .mdui-col-sm-7{
width:100% !important;
height:230px;
}
.thumb .mdui-list-item .mdui-icon{
font-size:100px;
display: block;
margin-top: 40px;
color: #7ab5ef;
}
.thumb .mdui-list-item span{
float: left;
display: block;
text-align: center;
width:100%;
position: absolute;
top: 180px;
}
</style>
<div class="nexmoe-item">
<div class="mdui-row">
<ul class="mdui-list">
<li class="mdui-list-item th">
<div class="mdui-col-xs-12 mdui-col-sm-7"><!--constStr@File--> <i class="mdui-icon material-icons icon-sort" data-sort="name" data-order="downward">expand_more</i></div>
<div class="mdui-col-sm-3 mdui-text-right"><!--constStr@EditTime--> <i class="mdui-icon material-icons icon-sort" data-sort="date" data-order="downward">expand_more</i></div>
<div class="mdui-col-sm-2 mdui-text-right"><!--constStr@Size--> <i class="mdui-icon material-icons icon-sort" data-sort="size" data-order="downward">expand_more</i></div>
</li>
<!--BackArrowStart-->
<li class="mdui-list-item mdui-ripple">
<a href="<!--BackArrowUrl-->">
<div class="mdui-col-xs-12 mdui-col-sm-7">
<i class="mdui-icon material-icons">arrow_upward</i>
..
</div>
<div class="mdui-col-sm-3 mdui-text-right"></div>
<div class="mdui-col-sm-2 mdui-text-right"></div>
</a>
</li>
<!--BackArrowEnd-->
<!--FolderListStart-->
<li class="mdui-list-item mdui-ripple">
<a href="<!--FileEncodeReplaceUrl-->/">
<div class="mdui-col-xs-12 mdui-col-sm-7 mdui-text-truncate">
<i class="mdui-icon material-icons">folder_open</i>
<span><!--FileEncodeReplaceName--></span>
</div>
<div class="mdui-col-sm-3 mdui-text-right"><!--lastModifiedDateTime--></div>
<div class="mdui-col-sm-2 mdui-text-right"><!--size--></div>
</a>
</li>
<!--FolderListEnd-->
<!--FileListStart-->
<li class="mdui-list-item file mdui-ripple">
<a href="<!--FileEncodeReplaceUrl-->?preview" target="_blank">
<div class="mdui-col-xs-12 mdui-col-sm-7 mdui-text-truncate">
<i class="mdui-icon material-icons"><!--IconValue--></i>
<span><!--FileEncodeReplaceName--></span>
</div>
<div class="mdui-col-sm-3 mdui-text-right"><!--lastModifiedDateTime--></div>
<div class="mdui-col-sm-2 mdui-text-right"><!--size--></div>
</a>
</li>
<!--FileListEnd-->
<!--MorePageStart-->
<form action="" method="POST" id="nextpageform">
<input type="hidden" id="pagenum" name="pagenum" value="">
<li class="mdui-list-item th">
<div class="mdui-col-sm-6 mdui-left mdui-text-left">
<!--PrePageStart-->
<a onclick="nextpage(<!--PrePageNum-->);" class="mdui-btn mdui-btn-raised"><!--constStr@PrePage--></a>
<!--PrePageEnd-->
<!--NextPageStart-->
<a onclick="nextpage(<!--NextPageNum-->);" class="mdui-btn mdui-btn-raised"><!--constStr@NextPage--></a>
<!--NextPageEnd-->
</div>
<div class="mdui-col-sm-6 mdui-right mdui-text-right">
<div class="mdui-right mdui-text-right"><span class="mdui-chip-title">Page: <!--MorePageListStart--><!--MorePageListEnd--><!--MorePageListNowStart--><!--PageNum--><!--MorePageListNowEnd-->/<!--MaxPageNum--></span></div>
</div>
</li>
</form>
<!--MorePageEnd-->
</ul>
</div>
</div>
<!--ReadmemdStart-->
<div class="mdui-typo mdui-shadow-3" style="padding: 20px;margin: 20px 0">
<!--<div class="mdui-chip">
<span class="mdui-chip-icon"><i class="mdui-icon material-icons">face</i></span>
<span class="mdui-chip-title">README.md</span>
</div>-->
<!--ReadmemdContent-->
</div>
<!--ReadmemdEnd-->
<!--FootomfStart-->
<div class="mdui-typo mdui-shadow-3" style="padding: 20px;margin: 20px 0">
<!--FootomfContent-->
</div>
<!--FootomfEnd-->
</div>
<!--ShowThumbnailsStart-->
<a href="javascript:thumb();" class="mdui-fab mdui-fab-fixed mdui-ripple mdui-color-theme-accent"><i class="mdui-icon material-icons">format_list_bulleted</i></a>
<!--ShowThumbnailsEnd-->
<!--IsFolderEnd-->
<!--ListEnd-->
<script>
<!--MorePageStart-->
function nextpage(num) {
document.getElementById('pagenum').value=num;
document.getElementById('nextpageform').submit();
}
<!--MorePageEnd-->
$ = mdui.JQ;
$.fn.extend({
sortElements: function (comparator, getSortable) {
getSortable = getSortable || function () { return this; };
var placements = this.map(function () {
var sortElement = getSortable.call(this),
parentNode = sortElement.parentNode,
nextSibling = parentNode.insertBefore(
document.createTextNode(''),
sortElement.nextSibling
);
return function () {
parentNode.insertBefore(this, nextSibling);
parentNode.removeChild(nextSibling);
};
});
return [].sort.call(this, comparator).each(function (i) {
placements[i].call(getSortable.call(this));
});
}
});
function downall() {
let dl_link_list = Array.from(document.querySelectorAll("li a"))
.map(x => x.href) // 所有list中的链接
.filter(x => x.slice(-1) != "/"); // 筛选出非文件夹的文件下载链接
let blob = new Blob([dl_link_list.join("\r\n")], {
type: 'text/plain'
}); // 构造Blog对象
let a = document.createElement('a'); // 伪造一个a对象
a.href = window.URL.createObjectURL(blob); // 构造href属性为Blob对象生成的链接
a.download = "folder_download_link.txt"; // 文件名称,你可以根据你的需要构造
a.click() // 模拟点击
a.remove();
}
<!--ShowThumbnailsStart-->
function thumb(){
if($('.mdui-fab i').text() == "apps"){
$('.mdui-fab i').text("format_list_bulleted");
$('.nexmoe-item').removeClass('thumb');
$('.nexmoe-item .mdui-icon').show();
$('.nexmoe-item .mdui-list-item').css("background","");
}else{
$('.mdui-fab i').text("apps");
$('.nexmoe-item').addClass('thumb');
$('.mdui-col-xs-12 i.mdui-icon').each(function(){
if($(this).text() == "image"){
var thumbnails = $(this).parent().parent().attr('href');
thumbnails = thumbnails.substr(0, thumbnails.length-8)+'?thumbnails&location';
$(this).hide();
$(this).parent().parent().parent().css("background","url("+thumbnails+") no-repeat center top");
}
});
}
}
<!--ShowThumbnailsEnd-->
$(function(){
$('.file a').each(function(){
$(this).on('click', function () {
var form = $('<form target=_blank method=post></form>').attr('action', $(this).attr('href')).get(0);
$(document.body).append(form);
form.submit();
$(form).remove();
return false;
});
});
$('.icon-sort').on('click', function () {
let sort_type = $(this).attr("data-sort"), sort_order = $(this).attr("data-order");
let sort_order_to = (sort_order === "less") ? "more" : "less";
$('li[data-sort]').sortElements(function (a, b) {
let data_a = $(a).attr("data-sort-" + sort_type), data_b = $(b).attr("data-sort-" + sort_type);
let rt = data_a.localeCompare(data_b, undefined, {numeric: true});
return (sort_order === "more") ? 0-rt : rt;
});
$(this).attr("data-order", sort_order_to).text("expand_" + sort_order_to);
});
});
</script>
</body>
</html>
+589
View File
@@ -0,0 +1,589 @@
<!--IconValuesStart-->
{
"music":"audiotrack",
"video":"ondemand_video",
"img":"image",
"default":"insert_drive_file"
}
<!--IconValuesEnd-->
<!DOCTYPE html>
<html lang="<!--constStr@language-->">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/>
<title><!--Title--></title>
<link rel="stylesheet" href="//cdnjs.loli.net/ajax/libs/mdui/0.4.1/css/mdui.css">
<script src="//cdnjs.loli.net/ajax/libs/mdui/0.4.1/js/mdui.min.js"></script>
<script src="//cdn.bootcss.com/jquery/1.12.3/jquery.min.js"></script>
<script src="//cdn.staticfile.org/layer/2.3/layer.js"></script>
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/glightbox/dist/css/glightbox.min.css">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css">
<link rel="icon" href="<!--base_path-->favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="<!--base_path-->favicon.ico" type="image/x-icon">
<style>
body{<!--BackgroundStart-->background-repeat:no-repeat;background-size:cover;background-attachment:fixed;background-image:url("<!--BackgroundUrl-->");<!--BackgroundEnd-->}
.mdui-appbar .mdui-toolbar{
height:64px;
font-size: 15px;
}
.mdui-toolbar>*{
padding: 0 6px;
margin: 0 2px;
opacity:0.5;
}
.mdui-toolbar>.mdui-typo-headline{
padding: 0 1px 0 0;
}
.mdui-toolbar>i{
padding: 0;
}
.mdui-toolbar>a:hover,a.mdui-typo-headline,a.active{
opacity:1;
}
.mdui-container{
max-width:950px;
}
.mdui-list-item{
-webkit-transition:none;
transition:none;
}
.mdui-list>.th{
background-color:initial;
}
.mdui-list-item>a{
width:100%;
line-height: 48px
}
.mdui-list-item{
margin: 2px 0px;
padding:0;
}
.mdui-toolbar>a:last-child{
opacity:1;
}
#instantclick-bar {
background: white;
}
.mdui-video-fluid {
height: -webkit-fill-available;
}
.dplayer-video-wrap .dplayer-video {
height: -webkit-fill-available !important;
}
.gslide iframe, .gslide video {
height: -webkit-fill-available;
}
@media screen and (max-width:950px) {
.mdui-list-item .mdui-text-right{
display: none;
}
.mdui-container{
width:100% !important;
margin:0px;
}
.mdui-toolbar>*{
display: none;
}
.mdui-toolbar>a:last-child,.mdui-toolbar>a:nth-last-of-type(2),.mdui-toolbar>.mdui-typo-headline,.mdui-toolbar>i:first-child,.mdui-toolbar-spacer{
display: block;
}
}
.spec-col{padding:.9em;display:flex;align-items:center;white-space:nowrap;flex:1 50%;min-width:225px}
.spec-type{font-size:1.35em}
.spec-value{font-size:1.25em}
.spec-text{float:left}
.device-section{padding-top:30px}
.spec-device-img{height:auto;height:340px;padding-bottom:30px}
#dl-header{margin:0}
#dl-section{padding-top:10px}
#dl-latest{position:relative;top:50%;transform:translateY(-50%)}
</style>
</head>
<body class=" mdui-appbar-with-toolbar mdui-theme-primary-indigo mdui-theme-accent-pink">
<header class="mdui-appbar mdui-appbar-fixed mdui-color-theme mdui-appbar-inset">
<div class="mdui-toolbar mdui-color-theme">
<span class="mdui-btn mdui-typo-headline mdui-btn-icon mdui-ripple mdui-ripple-white" mdui-drawer="{target: '#main-drawer', swipe: true}" mdui-tooltip="{content: '菜单'}"><i class="mdui-icon material-icons">menu</i></span>
<a href="<!--base_path-->" class="mdui-typo-headline"><!--Sitename--></a>
<!--PathArrayStart-->
<i class="mdui-icon material-icons mdui-icon-dark" style="margin:0;">chevron_right</i>
<a href="<!--PathArrayLink-->"><!--PathArrayName--></a>
<!--PathArrayEnd-->
<div class="mdui-toolbar-spacer"></div>
<!--ShowThumbnailsStart-->
<a href="javascript:thumb();" id="thumb" class="mdui-btn mdui-btn-icon" mdui-tooltip="{content: '切换显示'}"><i class="mdui-icon material-icons">format_list_bulleted</i></a>
<!--ShowThumbnailsEnd-->
</div>
</header>
<div class="mdui-drawer mdui-drawer-close mdui-color-indigo-50" id="main-drawer">
<div class="mdui-grid-tile">
<!--<a><img src="//image.suning.cn/uimg/ZR/share_order/158562104413864293.jpg"/></a>-->
<div class="mdui-grid-tile-actions mdui-grid-tile-actions-gradient">
<div class="mdui-grid-tile-text">
<div class="mdui-grid-tile-title"><!--Title--></div>
<div class="mdui-grid-tile-subtitle">OneManager</div>
</div>
</div>
</div>
<div class="mdui-list" mdui-collapse="{accordion: true}">
<a href="<!--base_path-->" class="mdui-list-item mdui-ripple">
<i class="mdui-list-item-icon mdui-icon material-icons">home</i>
<div class="mdui-list-item-content"><!--constStr@Home--></div>
</a>
<!--MultiDiskAreaStart-->
<!--MultiDisksStart-->
<a href="<!--MultiDisksUrl-->" class="mdui-list-item mdui-ripple" <!--MultiDisksNow-->>
<i class="mdui-list-item-icon mdui-icon material-icons">cloud</i>
<div class="mdui-list-item-content"><!--MultiDisksName--></div>
</a>
<!--MultiDisksEnd-->
<!--MultiDiskAreaEnd-->
<a href="https://github.com/qkqpttgf/OneManager-php" class="mdui-list-item mdui-ripple">
<i class="mdui-list-item-icon mdui-icon material-icons">code</i>
<div class="mdui-list-item-content">Github</div>
</a>
</div>
</div>
<!--ListStart-->
<!--EncryptedStart-->
<div class="mdui-col-md-6 mdui-col-offset-md-3">
<!--<center><h1 class="mdui-typo-display-2-opacity">这是一个受保护的文件夹,您需要提供访问密码才能查看。</h1></center>-->
<form action="" method="post">
<div class="mdui-textfield mdui-textfield-floating-label">
<i class="mdui-icon material-icons">https</i>
<label class="mdui-textfield-label"><!--constStr@InputPassword--></label>
<input name="password1" class="mdui-textfield-input" type="password"/>
</div>
<br>
<button type="submit" class="mdui-center mdui-btn mdui-btn-raised mdui-ripple mdui-color-theme">
<i class="mdui-icon material-icons">fingerprint</i>
<!--constStr@Submit-->
</button>
</form>
</div>
<!--EncryptedEnd-->
<!--GuestUploadStart-->
<!--
<div class="nexmoe-item" style="padding: 100px!important;">
<div class="mdui-typo-display-3-opacity" style="text-align:center;">OneImages</div>
<form action="" method="post" enctype="multipart/form-data">
<input class="mdui-center" type="file" style="margin: 50px 0;" name="file" />
<div class="mdui-row-xs-3">
<div class="mdui-col"></div>
<div class="mdui-col">
<button class="mdui-btn mdui-btn-block mdui-color-theme-accent mdui-ripple"><!--constStr@Upload--></button>
</div>
</div>
</form>
</div>
-->
<!--GuestUploadEnd-->
<!--IsFileStart-->
<div class="mdui-container-fluid">
<!--IsimgFileStart-->
<div class="nexmoe-item">
<img class="mdui-img-fluid mdui-center" src="<!--FileDownUrl-->"/>
</div>
<!--IsimgFileEnd-->
<!--IstxtFileStart-->
<div class="nexmoe-item">
<pre id="editor" style="white-space: pre-wrap;"><!--TxtContent--></pre>
</div>
<!--IstxtFileEnd-->
<!--IsmusicFileStart-->
<div class="nexmoe-item">
<audio class="mdui-center" src="<!--FileDownUrl-->" controls autoplay style="width: 100%;" ></audio>
</div>
<!--IsmusicFileEnd-->
<!--IsofficeFileStart-->
<div class="nexmoe-item">
<iframe id="office-a" src="https://view.officeapps.live.com/op/view.aspx?src=<!--FileEncodeDownUrl-->" style="width: 100%;height: 800px" frameborder="0"></iframe>
</div>
<!--IsofficeFileEnd-->
<!--IsvideoFileStart-->
<link class="dplayer-css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dplayer/dist/DPlayer.min.css">
<script src="https://cdn.jsdelivr.net/npm/dplayer/dist/DPlayer.min.js"></script>
<div class="nexmoe-item">
<div class="mdui-center" id="dplayer"></div>
</div>
<script>
const dp = new DPlayer({
container: document.getElementById('dplayer'),
lang:'zh-cn',
video: {
url: '<!--FileDownUrl-->',
type: 'auto'
}
});
</script>
<!--IsvideoFileEnd-->
<!--IsOtherFileStart-->
<div class="nexmoe-item"><!--constStr@FileNotSupport--></div>
<!--IsOtherFileEnd-->
</div>
<a href="<!--FileEncodeReplaceUrl-->" class="mdui-fab mdui-fab-fixed mdui-ripple mdui-color-theme-accent"><i class="mdui-icon material-icons">file_download</i></a>
<!--IsFileEnd-->
<!--IsFolderStart-->
<div class="mdui-container">
<div class="mdui-container-fluid"></div>
<div class="mdui-container-fluid">
<!--HeadomfStart-->
<div class="mdui-typo mdui-shadow-3" style="padding: 20px;margin: 20px 0">
<!--HeadomfContent-->
</div>
<!--HeadomfEnd-->
<!--HeadmdStart-->
<div class="mdui-typo mdui-shadow-3" style="padding: 20px;margin: 20px 0">
<!--<div class="mdui-chip">
<span class="mdui-chip-icon"><i class="mdui-icon material-icons">face</i></span>
<span class="mdui-chip-title">HEAD.md</span>
</div>-->
<!--HeadmdContent-->
</div>
<!--HeadmdEnd-->
<style>
.thumb .th{
display: none;
}
.thumb .mdui-text-right{
display: none;
}
.thumb .mdui-list-item a ,.thumb .mdui-list-item {
width:213px;
height: 230px;
float: left;
margin: 10px 10px !important;
}
.thumb .mdui-col-xs-12,.thumb .mdui-col-sm-7{
width:100% !important;
height:230px;
}
.thumb .mdui-list-item .mdui-icon{
font-size:100px;
display: block;
margin-top: 40px;
color: #7ab5ef;
}
.thumb .mdui-list-item span{
float: left;
display: block;
text-align: center;
width:100%;
position: absolute;
top: 180px;
}
.thumb .forcedownload {
display: none;
}
</style>
<div class="nexmoe-item">
<div class="mdui-row">
<ul class="mdui-list">
<li class="mdui-list-item th" style="padding-right:36px;">
<div class="mdui-col-xs-12 mdui-col-sm-7"><!--constStr@File--> <i class="mdui-icon material-icons icon-sort" data-sort="name" data-order="downward">expand_more</i></div>
<div class="mdui-col-sm-3 mdui-text-right"><!--constStr@EditTime--> <i class="mdui-icon material-icons icon-sort" data-sort="date" data-order="downward">expand_more</i></div>
<div class="mdui-col-sm-2 mdui-text-right"><!--constStr@Size--> <i class="mdui-icon material-icons icon-sort" data-sort="size" data-order="downward">expand_more</i></div>
</li>
<!--BackArrowStart-->
<li class="mdui-list-item mdui-ripple">
<a href="<!--BackArrowUrl-->">
<div class="mdui-col-xs-12 mdui-col-sm-7">
<i class="mdui-icon material-icons">arrow_upward</i>
..
</div>
<div class="mdui-col-sm-3 mdui-text-right"></div>
<div class="mdui-col-sm-2 mdui-text-right"></div>
</a>
</li>
<!--BackArrowEnd-->
<!--FolderListStart-->
<li class="mdui-list-item mdui-ripple" data-sort data-sort-name="<!--FileEncodeReplaceName-->" data-sort-date="<!--lastModifiedDateTime-->" data-sort-size="<!--size-->" style="padding-right:36px;">
<a href="<!--FileEncodeReplaceUrl-->/">
<div class="mdui-col-xs-12 mdui-col-sm-7 mdui-text-truncate">
<i class="mdui-icon material-icons">folder_open</i>
<span><!--FileEncodeReplaceName--></span>
</div>
<div class="mdui-col-sm-3 mdui-text-right"><!--lastModifiedDateTime--></div>
<div class="mdui-col-sm-2 mdui-text-right"><!--size--></div>
</a>
</li>
<!--FolderListEnd-->
<!--FileListStart-->
<li class="mdui-list-item file mdui-ripple" data-sort data-sort-name="<!--FileEncodeReplaceName-->" data-sort-date="<!--lastModifiedDateTime-->" data-sort-size="<!--size-->" data-readypreview="<!--FileExt-->">
<a class="<!--FileExtType-->" data-name="<!--FileEncodeReplaceName-->" href="<!--FileEncodeReplaceUrl-->?preview" target="_blank">
<!--<?php if(isImage($item['name']) and $_COOKIE["image_mode"] == "1"):?>
<img class="mdui-img-fluid" src="<?php echo get_absolute_path($root.$path).rawurlencode($item['name']); ?>">
<?php else:?>-->
<div class="mdui-col-xs-12 mdui-col-sm-7 mdui-text-truncate">
<i class="mdui-icon material-icons"><!--IconValue--></i>
<span><!--FileEncodeReplaceName--></span>
</div>
<div class="mdui-col-sm-3 mdui-text-right"><!--lastModifiedDateTime--></div>
<div class="mdui-col-sm-2 mdui-text-right"><!--size--></div>
</a>
<div class="forcedownload " >
<a title="<!--constStr@Download-->" href="<!--FileEncodeReplaceUrl-->">
<button class="mdui-btn mdui-ripple mdui-btn-icon"><i class="mdui-icon material-icons">file_download</i></button>
</a>
</div>
</li>
<!--FileListEnd-->
<!--MorePageStart-->
<form action="" method="POST" id="nextpageform">
<input type="hidden" id="pagenum" name="pagenum" value="">
<li class="mdui-list-item th">
<div class="mdui-col-sm-6 mdui-left mdui-text-left">
<!--PrePageStart-->
<a onclick="nextpage(<!--PrePageNum-->);" class="mdui-btn mdui-btn-raised"><!--constStr@PrePage--></a>
<!--PrePageEnd-->
<!--NextPageStart-->
<a onclick="nextpage(<!--NextPageNum-->);" class="mdui-btn mdui-btn-raised"><!--constStr@NextPage--></a>
<!--NextPageEnd-->
</div>
<div class="mdui-col-sm-6 mdui-right mdui-text-right">
<div class="mdui-right mdui-text-right"><span class="mdui-chip-title">Page: <!--MorePageListStart--><!--MorePageListEnd--><!--MorePageListNowStart--><!--PageNum--><!--MorePageListNowEnd-->/<!--MaxPageNum--></span></div>
</div>
</li>
</form>
<!--MorePageEnd-->
</ul>
</div>
</div>
<!--ReadmemdStart-->
<div class="mdui-typo mdui-shadow-3" style="padding: 20px;margin: 20px 0">
<!--<div class="mdui-chip">
<span class="mdui-chip-icon"><i class="mdui-icon material-icons">face</i></span>
<span class="mdui-chip-title">README.md</span>
</div>-->
<!--ReadmemdContent-->
</div>
<!--ReadmemdEnd-->
<!--FootomfStart-->
<div class="mdui-typo mdui-shadow-3" style="padding: 20px;margin: 20px 0">
<!--FootomfContent-->
</div>
<!--FootomfEnd-->
</div>
</div>
<!--IsFolderEnd-->
<!--ListEnd-->
<script src="//cdn.jsdelivr.net/gh/mcstudios/glightbox/dist/js/glightbox.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js"></script>
<script>
<!--MorePageStart-->
function nextpage(num) {
document.getElementById('pagenum').value=num;
document.getElementById('nextpageform').submit();
}
<!--MorePageEnd-->
var $$ = mdui.JQ;
$$(function() {
$$('.file .iframe').each(function() {
$$(this).on('click', function() {
url=$$(this).attr('href');
//url=url.substr(0,url.length-8);
layer.open({
type: 2,
title: '<a target="_blank" href="'+url+'">'+ $$(this).find('span').text()+'(点击新窗口打开)</a>', //jia,
//shadeClose: true,
move: false,
shade: false,
maxmin: true,
area: ['100%', '100%'],
content: url //le
,min: function(layero){
//zi;
layero.css({top: '90%'})
}
});
return false;
});
});
$('.file .dl').each(function () {
$(this).on('click', function () {
var form = $('<form target=_blank method=post></form>').attr('action', $(this).attr('href')).get(0);
$(document.body).append(form);
form.submit();
$(form).remove();
return false;
});
});
});
window.TC=window.TC||{};
jQuery(".file .audio").click(function(e){
e.preventDefault();
TC.preview_audio(this);
});
TC.preview_audio = function(aud){
if(!TC.aplayer){
TC.aplayerList=[];
jQuery(".file .audio").each(function(){
var ext = jQuery(this).data("readypreview");
var n = jQuery(this).find("span").text();
var l = n.replace("."+ext,".lrc");
var la = jQuery('a[data-name="'+l+'"]');
var lrc = undefined;
if(la.length>0){
lrc = la[0].href+"?s";
}
TC.aplayerList.push({
name:n,
url:this.href.substr(0,this.href.length-8),
artist:" ",
lrc:lrc
});
})
jQuery('<div id="aplayer">').appendTo("body");
TC.aplayer = new APlayer({
container: document.getElementById('aplayer'),
fixed: true,
audio: TC.aplayerList,
lrcType: 3
});
}
var k=-1;
for(var i in TC.aplayerList){
if(TC.aplayerList[i].name==jQuery(aud).data("name")){
k=i;
break;
}
}
if(k>=0){
TC.aplayer.list.switch(k);
TC.aplayer.play();
TC.aplayer.setMode("normal");
}
}
$ = mdui.JQ;
$.fn.extend({
sortElements: function (comparator, getSortable) {
getSortable = getSortable || function () { return this; };
var placements = this.map(function () {
var sortElement = getSortable.call(this),
parentNode = sortElement.parentNode,
nextSibling = parentNode.insertBefore(
document.createTextNode(''),
sortElement.nextSibling
);
return function () {
parentNode.insertBefore(this, nextSibling);
parentNode.removeChild(nextSibling);
};
});
return [].sort.call(this, comparator).each(function (i) {
placements[i].call(getSortable.call(this));
});
}
});
var lightbox = GLightbox();
function downall() {
let dl_link_list = Array.from(document.querySelectorAll("li a"))
.map(x => x.href) // 所有list中的链接
.filter(x => x.slice(-1) != "/"); // 筛选出非文件夹的文件下载链接
let blob = new Blob([dl_link_list.join("\r\n")], {
type: 'text/plain'
}); // 构造Blog对象
let a = document.createElement('a'); // 伪造一个a对象
a.href = window.URL.createObjectURL(blob); // 构造href属性为Blob对象生成的链接
a.download = "folder_download_link.txt"; // 文件名称,你可以根据你的需要构造
a.click() // 模拟点击
a.remove();
}
<!--ShowThumbnailsStart-->
function thumb(){
if($('#thumb i').text() == "apps"){
$('#thumb i').text("format_list_bulleted");
$('.nexmoe-item').removeClass('thumb');
$('.nexmoe-item .mdui-icon').show();
$('.nexmoe-item .mdui-list-item').css("background","");
}else{
$('#thumb i').text("apps");
$('.nexmoe-item').addClass('thumb');
$('.mdui-col-xs-12 i.mdui-icon').each(function(){
//if($(this).text() == "image" || $(this).text() == "ondemand_video"){
if($(this).text() == "image"){
var thumbnails = $(this).parent().parent().attr('href');
//var thumb =(href.indexOf('?') == -1)?'?t=220':'&t=220';
thumbnails = thumbnails.substr(0, thumbnails.length-8)+'?thumbnails&location';
$(this).hide();
//$(this).parent().parent().parent().css("background","url("+href+thumb+") no-repeat center top");
$(this).parent().parent().parent().css("background","url("+thumbnails+") no-repeat center top");
}
});
}
}
<!--ShowThumbnailsEnd-->
$(function(){
$('.icon-sort').on('click', function () {
let sort_type = $(this).attr("data-sort"), sort_order = $(this).attr("data-order");
let sort_order_to = (sort_order === "less") ? "more" : "less";
$('li[data-sort]').sortElements(function (a, b) {
let data_a = $(a).attr("data-sort-" + sort_type), data_b = $(b).attr("data-sort-" + sort_type);
let rt = data_a.localeCompare(data_b, undefined, {numeric: true});
return (sort_order === "more") ? 0-rt : rt;
});
$(this).attr("data-order", sort_order_to).text("expand_" + sort_order_to);
});
});
var ckname='image_mode';
function getCookie(name)
{
var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
if(arr=document.cookie.match(reg))
return unescape(arr[2]);
else
return null;
}
function setCookie(key,value,day){
var exp = new Date();
exp.setTime(exp.getTime() - 1);
var cval=getCookie(key);
if(cval!=null)
document.cookie= key + "="+cval+";expires="+exp.toGMTString();
var date = new Date();
var nowDate = date.getDate();
date.setDate(nowDate + day);
var cookie = key+"="+value+"; expires="+date;
document.cookie = cookie;
return cookie;
}
$('#image_view').on('click', function () {
if($(this).prop('checked') == true){
setCookie(ckname,1,1);
window.location.href=window.location.href;
}else{
setCookie(ckname,0,1);
window.location.href=window.location.href;
}
});
</script>
</body>
</html>
+1185
View File
File diff suppressed because it is too large Load Diff
+84 -48
View File
@@ -1,4 +1,5 @@
<!-- theme purenice designed & coded by wendale v1.1 Responsive fixed on May 1st-->
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<?php echo $constStr['language']; ?>"> <html lang="<?php echo $constStr['language']; ?>">
<head> <head>
@@ -10,54 +11,91 @@
<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;<?php if (getConfig('background')) { ?>background-repeat:no-repeat;background-size:cover;background-attachment:fixed;background-image:url("<?php echo getConfig('background'); ?>");<?php } ?>} body{margin:0;padding:0;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:14px;line-height:1em;color:#000;background-color:#F9FAFB;}
a{color:#24292e;cursor:pointer;text-decoration:none} .topbar{width:100%;height:40px;background-color:#463C6A;}
ion-icon{font-size:15px;vertical-align:bottom} .topbar .login{display:block;line-height:40px;color:#ffffff;margin-left:10%;float:left;}
.changelanguage{position:absolute;right:5px;} .topbar .login ion-icon{display:block;height:40px;line-height:40px;margin-right:5px;float:left;}
.title{text-align:center;margin-top:1rem;letter-spacing:2px;margin-bottom:2rem} .topbar .operate{display:block;line-height:40px;color:#ffffff;margin-left:10%;float:left;}
.title a{color:#333;text-decoration:none} .topbar .operate ul{}
.list-wrapper{width:80%;margin:0 auto 30px;position:relative;box-shadow:0 0 32px 0 rgb(128,128,128);border-radius:15px;} .topbar .operate ion-icon{display:block;height:40px;line-height:40px;margin-right:5px;float:left;}
.list-container{position:relative;overflow:hidden;border-radius:15px;} a{color:#171D33;cursor:pointer;text-decoration:none;}
.list-header-container{position:relative} ion-icon{font-size:15px;vertical-align:middle;}
.list-header-container a.back-link{color:#000;display:inline-block;position:absolute;font-size:16px;margin:20px 10px;padding:10px 10px;vertical-align:middle;text-decoration:none} .changelanguage{display:block;height:30px;line-height:30px;float:right;margin-right:10%;margin-top:5px;}
.title{text-align:center;margin-top:1rem;letter-spacing:2px;margin-bottom:2rem;}
.title a{color:#171D33;line-height:42px;font-size:32px;text-decoration:none}
.list-wrapper{width:80%;margin:0 auto;position:relative;}
.list-container{position:relative;}
.list-header-container{position:relative;width:100%;}
.list-header-container a.back-link{position:absolute;float:left;color:#ffffff;display:inline-block;margin:10px;height:40px;width:40px;background:#613EEA;line-height:40px;text-decoration:none;text-align:center;border-radius:20px;box-shadow: 0px 4px 12px rgba(97, 62, 234, 0.5);}
.list-header-container a.back-link ion-icon{font-size:20px;}
.list-header-container a.back-link:hover{color:white}
.list-container,.list-header-container,.list-wrapper,a.back-link:hover,body{color:#24292e} .list-container,.list-header-container,.list-wrapper,a.back-link:hover,body{color:#24292e}
.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{display:block;float:left;margin:10px 0 0 60px;height:40px;line-height:40px;text-align:left;font-weight:400;color:#A0A4B0;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)} .fix{height:60px;}
.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;} .list-body-container{position:relative;left:0;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;}
.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{border-bottom:1px solid #E8E9EC;height:40px;white-space:nowrap;overflow:auto;}
.more-disk a:hover, .more-disk a[now]{ background-color: rgba(85,85,85,0.7); color: white; } .more-disk a{display:block;float:left;width:30%;height:38px;text-align:center;font-weight: bold;font-size: 18px;line-height:38px;color:#A6AAB4; }
.list-table{width:100%;padding:0 20px 20px 20px;border-spacing:0} .more-disk a:hover, .more-disk a[now]{ color: #3B414B;border-bottom:2px solid #FF7D00;}
.list-table tr{height:40px} .list-table{width:100%;border-spacing:0;margin-bottom:20px;}
.list-table tr[data-to]:hover{background:rgba(85,85,85,0.7);color:white;} .list-table tr{display:block;margin:10px 10px;width:96%;float:left;background:#ffffff;box-shadow: 0px 4px 26px rgba(0, 0, 0, 0.06);border-radius: 6px;}
.list-table tr[data-to]:hover{background:#10C971;color:white;}
.list-table tr[data-to]:hover a{color:white} .list-table tr[data-to]:hover a{color:white}
.list-table tr:first-child{background:rgba(245,245,245,0)} .list-table td,.list-table th{display:block;float:left;line-height:60px;text-align:left;}
.list-table td,.list-table th{padding:0 10px;text-align:left} .list-table td button,.list-table th button{cursor:pointer;color:#ffffff;height:30px;background:#FF7D00;padding:0 20px;border-width:0;border-radius:6px;box-shadow: 0px 4px 12px rgba(255, 125, 0, 0.5);}
.list-table td.file,.list-table th.file{width:60%;color:#171D33;padding-left:20px;}
.list-table td.file ion-icon{float:left;margin-top:22px;margin-right:5px;}
.list-table td.file:hover>ion-icon,.list-table td.file:hover .operate>ion-icon{color:#fff;}
.list-table td.file a[name="filelist"]{float:left;}
.list-table td.file a[name="filelist"] img{border-radius:6px;margin-top:20px;}
.list-table td.updated_at,.list-table th.updated_at{width:25%;}
.list-table td.size,.list-table th.size{width:10%;}
.list-table .size,.list-table .updated_at{text-align:right} .list-table .size,.list-table .updated_at{text-align:right}
.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;margin-right:5px;list-style:none} .operate{display:inline-table;margin:0;margin-right:5px;list-style:none;float:left;}
.operate ul{position:absolute;display:none;background:#fffaaa;border:0px #f7f7f7 solid;border-radius:5px;margin:-7px 0 0 0;padding:0 7px;color:#205D67;z-index:1;} .operate ul{position:absolute;display:none;background:#fffaaa;border:0;border-radius:5px;margin:0;padding:0 7px;color:#205D67;z-index:1;box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);}
.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:block;} .operate ul li{list-style:none;display:block;line-height:40px;}
.list-table tr[data-to]:hover .operate ul li a{color:black} .list-table tr[data-to]:hover .operate ul li a{color:black}
.list-table tr[data-to]:hover .operate ul li a ion-icon{margin-top:12px;}
<?php } ?> <?php } ?>
.operatediv{position:absolute;border:1px #CCCCCC;background-color:#FFFFCC;z-index:2;} .operatediv{position:absolute;background-color:#ffffff;z-index:2;border-radius:10px;background-color:#F9FAFB;}
.operatediv div{margin:16px} .loginstyle{width:250px;height:124px;}
.operatediv_close{position:absolute;right:3px;top:3px;} .loginstyle input[type="password"]{width:244px;height:40px;margin-top:30px;border-radius:6px;outline:none;border: 2px solid #E8E9EC;text-indent:10px}
.loginstyle input[type="password"]::-webkit-input-placeholder { color: #A6AAB4;font-size: 16px;}
.loginstyle input[type="submit"]{color:#fff;font-size:16px;width:250px;height:40px;margin-top:5px;border-radius:6px;padding:0;cursor:pointer;background:#FF7D00;border-width:0;box-shadow: 0px 4px 12px rgba(255, 125, 0, 0.5);}
.operatediv div{margin:16px;}
.operatediv_close{position:absolute;right:15px;top:15px;}
.readme{padding:8px;background-color:rgba(245,245,245,0.5);} .readme{padding:8px;background-color:rgba(245,245,245,0.5);}
.markdown-body{padding:20px;text-align:left} .markdown-body{padding:20px;text-align:left}
.update_notice{position:absolute;color:#A6AAB4;left:10%;margin-top:10px;}
.upload_style{height:60px;width:96%;margin:10px;background:#ffffff;box-shadow: 0px 4px 26px rgba(0, 0, 0, 0.06);border-radius: 6px;}
.upload_style input[type="file"]{display:block;color:#A6AAB4;float:left;height:38px;margin:20px 0 0 20px;outline:none;font-size:14px;text-align:center;}
.upload_style input[type="button"]{display:block;color:#fff;float:right;height:60px;width:160px;outline:none;font-size:16px;background:#613EEA;border-radius:6px;border:0;}
.upload_style .list-table tr td{line-height:30px;margin:10px 20px;}
.upload_style .list-table tr td button{margin-left:10px;}
@media only screen and (max-width:480px){ @media only screen and (max-width:480px){
.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}
.list-table td, .list-table th{white-space:nowrap;overflow:auto;max-width:80px} .list-table td button,.list-table th button{cursor:pointer;color:#ffffff;height:24px;background:#FF7D00;padding:0 8px;border-width:0;border-radius:6px;box-shadow: 0px 2px 6px rgba(255, 125, 0, 0.5);}
.list-table td, .list-table th{white-space:nowrap;overflow:auto;line-height:40px;}
.list-table td.file,.list-table th.file{padding-left: 10px;width: 96%;}
.size, .updated_at{display:none} .size, .updated_at{display:none}
.changelanguage{color:#fff;}
.list-table td.updated_at,.list-table th.updated_at{width:50%;text-align:left;margin-left:10px;}
.list-table td.size,.list-table th.size{width:30%;text-align:left;}
.list-table td.file ion-icon{float:left;margin-top:13px;margin-right:5px;}
.upload_style input[type="file"]{display:block;color:#A6AAB4;float:left;height:38px;margin:18px 0 0 10px;outline:none;font-size:14px;text-align:center;width:70%;}
.upload_style input[type="button"]{display:block;color:#fff;float:right;height:60px;width:25%;outline:none;font-size:16px;background:#613EEA;border-radius:6px;border:0;}
} }
</style> </style>
</head> </head>
<body> <body>
<div style="padding:1px"> <div class="topbar">
<?php <?php
if (getConfig('admin')!='') if (!$_SERVER['admin']) { if (getConfig('admin')!='') if (!$_SERVER['admin']) {
if (getConfig('adminloginpage')=='') { ?> if (getConfig('adminloginpage')=='') { ?>
@@ -67,7 +105,7 @@
<li class="operate"><ion-icon name="construct"></ion-icon><?php echo getconstStr('Operate'); ?><ul> <li class="operate"><ion-icon name="construct"></ion-icon><?php echo getconstStr('Operate'); ?><ul>
<?php if (isset($files['folder'])) { ?> <?php if (isset($files['folder'])) { ?>
<li><a onclick="showdiv(event,'create','');"><ion-icon name="add-circle"></ion-icon><?php echo getconstStr('Create'); ?></a></li> <li><a onclick="showdiv(event,'create','');"><ion-icon name="add-circle"></ion-icon><?php echo getconstStr('Create'); ?></a></li>
<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 isset($_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>
@@ -85,9 +123,10 @@
} ?> } ?>
</select> </select>
</div> </div>
<?php <?php
if (isset($_SERVER['needUpdate'])&&$_SERVER['needUpdate']) { ?> if (isset($_SERVER['needUpdate'])&&$_SERVER['needUpdate']) { ?>
<div style='position:absolute;'><font color='red'><?php echo getconstStr('NeedUpdate'); ?></font></div> <div class="update_notice" style='position:absolute;'><?php echo getconstStr('NeedUpdate'); ?></div>
<?php } ?> <?php } ?>
<h1 class="title"> <h1 class="title">
<a href="<?php echo $_SERVER['base_path']; ?>"><?php echo $_SERVER['sitename']; ?></a> <a href="<?php echo $_SERVER['base_path']; ?>"><?php echo $_SERVER['sitename']; ?></a>
@@ -125,7 +164,7 @@
<?php } ?> <?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 fix">
<?php <?php
if ($path !== '/') { if ($path !== '/') {
$current_url = $_SERVER['PHP_SELF']; $current_url = $_SERVER['PHP_SELF'];
@@ -149,11 +188,9 @@
$pdfurl = false; $pdfurl = false;
$DPvideo = 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" class="upload_style">
<center> <input id="upload_file" type="file" name="upload_filename" value="<?php echo getconstStr('FileSelected'); ?>">
<input id="upload_file" type="file" name="upload_filename">
<input id="upload_submit" onclick="preup();" value="<?php echo getconstStr('Upload'); ?>" type="button"> <input id="upload_submit" onclick="preup();" value="<?php echo getconstStr('Upload'); ?>" type="button">
<center>
</div> </div>
<?php } else { <?php } else {
if ($_SERVER['ishidden']<4) { if ($_SERVER['ishidden']<4) {
@@ -221,8 +258,8 @@
<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 (!(isset($_SERVER['USER'])&&$_SERVER['USER']=='qcloud')) { ?>&nbsp;&nbsp;&nbsp;<button onclick="showthumbnails(this);"><?php echo getconstStr('ShowThumbnails'); ?></button><?php } ?>&nbsp;<button onclick="CopyAllDownloadUrl('.download');"><?php echo getconstStr('CopyAllDownloadUrl'); ?></button></th> <th class="file"><a onclick="sortby('a');"><?php echo getconstStr('File'); ?></a><?php if (!(isset($_SERVER['USER'])&&$_SERVER['USER']=='qcloud')) { ?>&nbsp;&nbsp;&nbsp;<button onclick="showthumbnails(this);"><?php echo getconstStr('ShowThumbnails'); ?></button><?php } ?>&nbsp;<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"><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"><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);
@@ -235,7 +272,7 @@
<?php if ($_SERVER['admin']) { ?> <?php if ($_SERVER['admin']) { ?>
<li class="operate"><ion-icon name="construct"></ion-icon><a><?php echo getconstStr('Operate'); ?></a> <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>
<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>
@@ -344,11 +381,10 @@
echo $prepagenext; echo $prepagenext;
} }
if ($_SERVER['admin']) { ?> if ($_SERVER['admin']) { ?>
<div id="upload_div" style="margin:0 0 16px 0"> <div id="upload_div" class="upload_style">
<center> <input id="upload_file" type="file" name="upload_filename" value="<?php echo getconstStr('FileSelected'); ?>" multiple="multiple">
<input id="upload_file" type="file" name="upload_filename" multiple="multiple">
<input id="upload_submit" onclick="preup();" value="<?php echo getconstStr('Upload'); ?>" type="button"> <input id="upload_submit" onclick="preup();" value="<?php echo getconstStr('Upload'); ?>" type="button">
</center>
</div> </div>
<?php } <?php }
} else { } else {
@@ -424,7 +460,7 @@
<input id="encrypt_sid" name="encrypt_sid" type="hidden" value=""> <input id="encrypt_sid" name="encrypt_sid" type="hidden" value="">
<input id="encrypt_hidden" name="encrypt_folder" type="hidden" value=""> <input id="encrypt_hidden" name="encrypt_folder" type="hidden" value="">
<input id="encrypt_input" name="encrypt_newpass" type="text" value="" placeholder="<?php echo getconstStr('InputPasswordUWant'); ?>"> <input id="encrypt_input" name="encrypt_newpass" type="text" value="" placeholder="<?php echo getconstStr('InputPasswordUWant'); ?>">
<?php if (getConfig('passfile')!='') {?><input name="operate_action" type="submit" value="<?php echo getconstStr('encrypt'); ?>"><?php } else { ?><br><label><?php echo getconstStr('SetpassfileBfEncrypt'); ?></label><?php } ?> <?php if (getConfig('passfile')!='') {?><input name="operate_action" type="submit" value="<?php echo getconstStr('Encrypt'); ?>"><?php } else { ?><br><label><?php echo getconstStr('SetpassfileBfEncrypt'); ?></label><?php } ?>
</form> </form>
</div> </div>
</div> </div>
@@ -498,7 +534,7 @@
} else { } else {
if (getConfig('admin')!='') if (getConfig('adminloginpage')=='') { ?> if (getConfig('admin')!='') if (getConfig('adminloginpage')=='') { ?>
<div id="login_div" class="operatediv" style="display:none"> <div id="login_div" class="operatediv" style="display:none">
<div style="margin:50px"> <div class="loginstyle">
<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 isset($_GET['preview'])?'?preview&':'?';?>admin" method="post"> <form action="<?php echo isset($_GET['preview'])?'?preview&':'?';?>admin" method="post">
@@ -541,7 +577,7 @@
e.innerHTML = '/ '; e.innerHTML = '/ ';
for (var i = 1; i < paths.length - 1; i++) { for (var i = 1; i < paths.length - 1; i++) {
var to = path_format(root + paths.slice(0, i + 1).join('/')); var to = path_format(root + paths.slice(0, i + 1).join('/'));
e.innerHTML += '<a href="' + to + '">' + paths[i] + '</a> / ' e.innerHTML += paths[i] + ' / '
} }
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$/, '')
@@ -858,7 +894,7 @@
return; return;
} }
var xhr1 = new XMLHttpRequest(); var xhr1 = new XMLHttpRequest();
xhr1.open("GET", '?action=upbigfile&upbigfilename='+ encodeURIComponent(file.name) +'&filesize='+ file.size +'&lastModified='+ file.lastModified); xhr1.open("GET", '?action=upbigfile&upbigfilename='+ encodeURIComponent((file.webkitRelativePath||file.name)) +'&filesize='+ file.size +'&lastModified='+ file.lastModified);
xhr1.setRequestHeader('x-requested-with','XMLHttpRequest'); xhr1.setRequestHeader('x-requested-with','XMLHttpRequest');
xhr1.send(null); xhr1.send(null);
xhr1.onload = function(e){ xhr1.onload = function(e){
@@ -969,7 +1005,7 @@
if (response['size']>0) { if (response['size']>0) {
// contain size, upload finish. 有size说明是最终返回,上传结束 // contain size, upload finish. 有size说明是最终返回,上传结束
var xhr3 = new XMLHttpRequest(); var xhr3 = new XMLHttpRequest();
xhr3.open("GET", '?action=del_upload_cache&filename=.'+file.lastModified+ '_' +file.size+ '_' +encodeURIComponent(file.name)+'.tmp'); xhr3.open("GET", '?action=del_upload_cache&filelastModified='+file.lastModified+'&filesize='+file.size+'&filename='+encodeURIComponent((file.webkitRelativePath||file.name)));
xhr3.setRequestHeader('x-requested-with','XMLHttpRequest'); xhr3.setRequestHeader('x-requested-with','XMLHttpRequest');
xhr3.send(null); xhr3.send(null);
xhr3.onload = function(e){ xhr3.onload = function(e){
@@ -978,7 +1014,7 @@
<?php if (!$_SERVER['admin']) { ?> <?php if (!$_SERVER['admin']) { ?>
var filemd5 = spark.end(); var filemd5 = spark.end();
var xhr4 = new XMLHttpRequest(); var xhr4 = new XMLHttpRequest();
xhr4.open("GET", '?action=uploaded_rename&filename='+encodeURIComponent(file.name)+'&filemd5='+filemd5); xhr4.open("GET", '?action=uploaded_rename&filename='+encodeURIComponent((file.webkitRelativePath||file.name))+'&filemd5='+filemd5);
xhr4.setRequestHeader('x-requested-with','XMLHttpRequest'); xhr4.setRequestHeader('x-requested-with','XMLHttpRequest');
xhr4.send(null); xhr4.send(null);
xhr4.onload = function(e){ xhr4.onload = function(e){
+602
View File
@@ -0,0 +1,602 @@
<!--IconValuesStart-->
{
"music":"audiotrack",
"video":"ondemand_video",
"img":"image",
"default":"insert_drive_file"
}
<!--IconValuesEnd-->
<script>
var primary_color = "orange";
var accent_color = "deep-orange";
var bug = 0;
</script>
<!DOCTYPE html>
<html lang="<!--constStr@language-->">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/>
<title><!--Title--></title>
<link rel="stylesheet" href="//cdnjs.loli.net/ajax/libs/mdui/0.4.1/css/mdui.css">
<script src="//cdnjs.loli.net/ajax/libs/mdui/0.4.1/js/mdui.min.js"></script>
<script src="https://cdn.my-file.cn/mduilw/MDUILW/jquery.min.js"></script>
<!--<script src="https://cdn.my-file.cn/mduilw/MDUILW/jquery.pjax.js"></script>-->
<script src="//cdn.staticfile.org/layer/2.3/layer.js"></script>
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/glightbox/dist/css/glightbox.min.css">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css">
<link rel="icon" href="<!--base_path-->favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="<!--base_path-->favicon.ico" type="image/x-icon">
<style>
body{
<!--BackgroundStart-->
background-repeat:no-repeat;
background-size:cover;
background-attachment:fixed;
background-image:url("<!--BackgroundUrl-->");
<!--BackgroundEnd-->
}
.mdui-appbar .mdui-toolbar{
height:64px;
font-size: 15px;
}
.mdui-toolbar>*{
padding: 0 6px;
margin: 0 2px;
opacity:0.5;
}
.mdui-toolbar>.mdui-typo-headline{
padding: 0 1px 0 0;
}
.mdui-toolbar>i{
padding: 0;
}
.mdui-toolbar>a:hover,a.mdui-typo-headline,a.active{
opacity:1;
}
.mdui-container{
max-width:950px;
}
.mdui-list-item{
-webkit-transition:none;
transition:none;
}
.mdui-toolbar>a:last-child{
opacity:1;
}
#instantclick-bar {
background: white;
}
.mdui-video-fluid {
height: -webkit-fill-available;
}
.dplayer-video-wrap .dplayer-video {
height: -webkit-fill-available !important;
}
.gslide iframe, .gslide video {
height: -webkit-fill-available;
}
@media screen and (max-width:950px) {
.mdui-list-item .mdui-text-right{
display: none;
}
.mdui-container{
width:100% !important;
margin:0px;
}
.mdui-toolbar>*{
display: none;
}
.mdui-toolbar>a:last-child,.mdui-toolbar>a:nth-last-of-type(2),.mdui-toolbar>.mdui-typo-headline,.mdui-toolbar>i:first-child,.mdui-toolbar-spacer{
display: block;
}
}
.spec-col{padding:.9em;display:flex;align-items:center;white-space:nowrap;flex:1 50%;min-width:225px}
.spec-type{font-size:1.35em}
.spec-value{font-size:1.25em}
.spec-text{float:left}
.device-section{padding-top:30px}
.spec-device-img{height:auto;height:340px;padding-bottom:30px}
#dl-header{margin:0}
#dl-section{padding-top:10px}
#dl-latest{position:relative;top:50%;transform:translateY(-50%)}
</style>
</head>
<body id="main-body">
<header class="mdui-appbar">
<div class="mdui-toolbar mdui-color-theme mdui-appbar-inset">
<span class="mdui-btn mdui-typo-headline mdui-btn-icon mdui-ripple" mdui-drawer="{target: '#main-drawer', swipe: true}" mdui-tooltip="{content: '菜单'}"><i class="mdui-icon material-icons mdui-text-color-white-icon">menu</i></span>
<a href="<!--base_path-->" class="mdui-typo-headline"><!--Sitename--></a>
<!--PathArrayStart-->
<i class="mdui-icon material-icons mdui-icon-dark" style="margin:0;">chevron_right</i>
<a href="<!--PathArrayLink-->"><!--PathArrayName--></a>
<!--PathArrayEnd-->
<div class="mdui-toolbar-spacer"></div>
<!--ShowThumbnailsStart-->
<a href="javascript:thumb();" id="thumb" class="mdui-btn mdui-btn-icon mdui-ripple" mdui-tooltip="{content: '切换显示'}"><i class="mdui-icon material-icons">format_list_bulleted</i></a>
<!--ShowThumbnailsEnd-->
</div>
</header>
<div class="mdui-drawer mdui-drawer-close" id="main-drawer">
<div class="mdui-list" mdui-collapse="{accordion: true}">
<li class="mdui-list-item mdui-ripple" href="javascript:void(0);" onclick="darkmod_use()">
<a class="mdui-list-item-icon mdui-icon material-icons">brightness_4</a>
<a class="mdui-list-item-content">深色模式</a>
</li>
<li class="mdui-list-item mdui-ripple">
<a href="<!--base_path-->" class="mdui-list-item-icon mdui-icon material-icons">home</a>
<a href="<!--base_path-->" class="mdui-list-item-content"><!--constStr@Home--></a>
</li>
<!--MultiDiskAreaStart-->
<!--MultiDisksStart-->
<a href="<!--MultiDisksUrl-->" class="mdui-list-item mdui-ripple" <!--MultiDisksNow-->>
<i class="mdui-list-item-icon mdui-icon material-icons">cloud</i>
<div class="mdui-list-item-content"><!--MultiDisksName--></div>
</a>
<!--MultiDisksEnd-->
<!--MultiDiskAreaEnd-->
<a href="https://github.com/qkqpttgf/OneManager-php" class="mdui-list-item mdui-ripple">
<i class="mdui-list-item-icon mdui-icon material-icons">code</i>
<div class="mdui-list-item-content">Github</div>
</a>
</div>
</div>
<!--ListStart-->
<!--EncryptedStart-->
<div class="mdui-col-md-6 mdui-col-offset-md-3" id="pjax-main">
<!--<center><h1 class="mdui-typo-display-2-opacity">这是一个受保护的文件夹,您需要提供访问密码才能查看。</h1></center>-->
<form action="" method="post">
<div class="mdui-textfield mdui-textfield-floating-label">
<i class="mdui-icon material-icons">https</i>
<label class="mdui-textfield-label"><!--constStr@InputPassword--></label>
<input name="password1" class="mdui-textfield-input" type="password"/>
</div>
<br>
<button type="submit" class="mdui-center mdui-btn mdui-btn-raised mdui-ripple mdui-color-theme">
<i class="mdui-icon material-icons">fingerprint</i>
<!--constStr@Submit-->
</button>
</form>
</div>
<!--EncryptedEnd-->
<!--GuestUploadStart-->
<!--
<div class="nexmoe-item" style="padding: 100px!important;" id="pjax-main">
<div class="mdui-typo-display-3-opacity" style="text-align:center;">OneImages</div>
<form action="" method="post" enctype="multipart/form-data">
<input class="mdui-center" type="file" style="margin: 50px 0;" name="file" />
<div class="mdui-row-xs-3">
<div class="mdui-col"></div>
<div class="mdui-col">
<button class="mdui-btn mdui-btn-block mdui-color-theme-accent mdui-ripple"><!--constStr@Upload--></button>
</div>
</div>
</form>
</div>
-->
<!--GuestUploadEnd-->
<!--IsFileStart-->
<div class="mdui-container-fluid" id="pjax-main">
<!--IsimgFileStart-->
<div class="nexmoe-item">
<img class="mdui-img-fluid mdui-center mdui-m-t-5 "src="<!--FileDownUrl-->"/>
</div>
<!--IsimgFileEnd-->
<!--IstxtFileStart-->
<div class="nexmoe-item">
<pre id="editor" style="white-space: pre-wrap;"><!--TxtContent--></pre>
</div>
<!--IstxtFileEnd-->
<!--IsmusicFileStart-->
<div class="nexmoe-item">
<audio class="mdui-center" src="<!--FileDownUrl-->" controls autoplay style="width: 100%;" ></audio>
</div>
<!--IsmusicFileEnd-->
<!--IsofficeFileStart-->
<div class="nexmoe-item">
<iframe id="office-a" src="https://view.officeapps.live.com/op/view.aspx?src=<!--FileEncodeDownUrl-->" style="width: 100%;height: 800px" frameborder="0"></iframe>
</div>
<!--IsofficeFileEnd-->
<!--IsvideoFileStart-->
<link class="dplayer-css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dplayer/dist/DPlayer.min.css">
<script src="https://cdn.jsdelivr.net/npm/dplayer/dist/DPlayer.min.js"></script>
<div class="nexmoe-item mdui-center" style="width: 70%;height:90%;" >
<div id="dplayer"></div>
</div>
<script>
const dp = new DPlayer({
container: document.getElementById('dplayer'),
lang:'zh-cn',
video: {
url: '<!--FileDownUrl-->',
type: 'auto'
}
});
</script>
<!--IsvideoFileEnd-->
<!--IsOtherFileStart-->
<div class="nexmoe-item"><!--constStr@FileNotSupport--></div>
<!--IsOtherFileEnd-->
</div>
<a href="<!--FileEncodeReplaceUrl-->" class="mdui-fab mdui-fab-fixed mdui-ripple mdui-color-theme-accent"><i class="mdui-icon material-icons">file_download</i></a>
<!--IsFileEnd-->
<!--IsFolderStart-->
<div class="mdui-container">
<div class="mdui-container-fluid"></div>
<div class="mdui-container-fluid">
<!--HeadomfStart-->
<div class="mdui-typo mdui-shadow-3" style="padding: 20px;margin: 20px 0">
<!--HeadomfContent-->
</div>
<!--HeadomfEnd-->
<!--HeadmdStart-->
<div class="mdui-typo mdui-shadow-3" style="padding: 20px;margin: 20px 0">
<!--<div class="mdui-chip">
<span class="mdui-chip-icon"><i class="mdui-icon material-icons">face</i></span>
<span class="mdui-chip-title">HEAD.md</span>
</div>-->
<!--HeadmdContent-->
</div>
<!--HeadmdEnd-->
<style>
.thumb .th{
display: none;
}
.thumb .mdui-text-right{
display: none;
}
.thumb .mdui-list-item a ,.thumb .mdui-list-item {
width:213px;
height: 230px;
float: left;
margin: 10px 10px !important;
}
.thumb .mdui-col-xs-12,.thumb .mdui-col-sm-7{
width:100% !important;
height:230px;
}
.thumb .mdui-list-item .mdui-icon{
font-size:100px;
display: block;
margin-top: 40px;
color: #7ab5ef;
}
.thumb .mdui-list-item span{
float: left;
display: block;
text-align: center;
width:100%;
position: absolute;
top: 180px;
}
.thumb .forcedownload {
display: none;
}
</style>
<div class="nexmoe-item">
<div class="mdui-row">
<ul class="mdui-list">
<li class="mdui-list-item th mdui-ripple" style="padding-right:36px;">
<div class="mdui-col-xs-12 mdui-col-sm-7"><!--constStr@File--> <i class="mdui-icon material-icons icon-sort" data-sort="name" data-order="downward">expand_more</i></div>
<div class="mdui-col-sm-3 mdui-text-right"><!--constStr@EditTime--> <i class="mdui-icon material-icons icon-sort" data-sort="date" data-order="downward">expand_more</i></div>
<div class="mdui-col-sm-2 mdui-text-right"><!--constStr@Size--> <i class="mdui-icon material-icons icon-sort" data-sort="size" data-order="downward">expand_more</i></div>
</li>
<!--BackArrowStart-->
<li class="mdui-list-item mdui-ripple">
<a href="<!--BackArrowUrl-->">
<div class="mdui-col-xs-7">
<i class="mdui-icon material-icons">arrow_upward</i>
..
</div>
<div class="mdui-col-xs-3 mdui-text-right"></div>
<div class="mdui-col-xs-2 mdui-text-right"></div>
</a>
</li>
<!--BackArrowEnd-->
<!--FolderListStart-->
<li class="mdui-list-item mdui-ripple" data-sort data-sort-name="<!--FileEncodeReplaceName-->" data-sort-date="<!--lastModifiedDateTime-->" data-sort-size="<!--size-->" style="padding-right:36px;">
<a href="<!--FileEncodeReplaceUrl-->/">
<div class="mdui-col-xs-7 mdui-text-truncate">
<i class="mdui-icon material-icons">folder_open</i>
<span><!--FileEncodeReplaceName--></span>
</div>
<div class="mdui-col-xs-3 mdui-text-right"><!--lastModifiedDateTime--></div>
<div class="mdui-col-xs-2 mdui-text-right"><!--size--></div>
</a>
</li>
<!--FolderListEnd-->
<!--FileListStart-->
<li class="mdui-list-item file mdui-ripple" data-sort data-sort-name="<!--FileEncodeReplaceName-->" data-sort-date="<!--lastModifiedDateTime-->" data-sort-size="<!--size-->" data-readypreview="<!--FileExt-->">
<a class="<!--FileExtType-->" data-name="<!--FileEncodeReplaceName-->" href="<!--FileEncodeReplaceUrl-->?preview" target="_blank">
<!--<?php if(isImage($item['name']) and $_COOKIE["image_mode"] == "1"):?>
<img class="mdui-img-fluid" src="<?php echo get_absolute_path($root.$path).rawurlencode($item['name']); ?>">
<?php else:?>-->
<div class="mdui-row mdui-col-sm-12">
<div class="mdui-col-xs-7 mdui-text-truncate">
<i class="mdui-icon material-icons"><!--IconValue--></i>
<span><!--FileEncodeReplaceName--></span>
</div>
<div class="mdui-col-xs-3 mdui-text-right"><!--lastModifiedDateTime--></div>
<div class="mdui-col-xs-2 mdui-text-right"><!--size--></div>
</a>
</div>
<div class="forcedownload " >
<a title="<!--constStr@Download-->" href="<!--FileEncodeReplaceUrl-->">
<button class="mdui-btn mdui-ripple mdui-btn-icon"><i class="mdui-icon material-icons">file_download</i></button>
</a>
</div>
</li>
<!--FileListEnd-->
<!--MorePageStart-->
<form action="" method="POST" id="nextpageform">
<input type="hidden" id="pagenum" name="pagenum" value="">
<li class="mdui-list-item th">
<div class="mdui-col-sm-6 mdui-left mdui-text-left">
<!--PrePageStart-->
<a onclick="nextpage(<!--PrePageNum-->);" class="mdui-btn mdui-btn-raised"><!--constStr@PrePage--></a>
<!--PrePageEnd-->
<!--NextPageStart-->
<a onclick="nextpage(<!--NextPageNum-->);" class="mdui-btn mdui-btn-raised"><!--constStr@NextPage--></a>
<!--NextPageEnd-->
</div>
<div class="mdui-col-sm-6 mdui-right mdui-text-right">
<div class="mdui-right mdui-text-right"><span class="mdui-chip-title">Page: <!--MorePageListStart--><!--MorePageListEnd--><!--MorePageListNowStart--><!--PageNum--><!--MorePageListNowEnd-->/<!--MaxPageNum--></span></div>
</div>
</li>
</form>
<!--MorePageEnd-->
</ul>
</div>
</div>
<!--ReadmemdStart-->
<div class="mdui-typo mdui-shadow-3" style="padding: 20px;margin: 20px 0">
<!--<div class="mdui-chip">
<span class="mdui-chip-icon"><i class="mdui-icon material-icons">face</i></span>
<span class="mdui-chip-title">README.md</span>
</div>-->
<!--ReadmemdContent-->
</div>
<!--ReadmemdEnd-->
<!--FootomfStart-->
<div class="mdui-typo mdui-shadow-3" style="padding: 20px;margin: 20px 0">
<!--FootomfContent-->
</div>
<!--FootomfEnd-->
</div>
</div>
<!--IsFolderEnd-->
<!--ListEnd-->
<script src="//cdn.jsdelivr.net/gh/mcstudios/glightbox/dist/js/glightbox.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js"></script>
<script>
<!--MorePageStart-->
function nextpage(num) {
document.getElementById('pagenum').value=num;
document.getElementById('nextpageform').submit();
}
<!--MorePageEnd-->
var $$ = mdui.JQ;
$$(function() {
$$('.file .iframe').each(function() {
$$(this).on('click', function() {
url=$$(this).attr('href');
//url=url.substr(0,url.length-8);
layer.open({
type: 2,
title: '<a target="_blank" href="'+url+'">'+ $$(this).find('span').text()+'(点击新窗口打开)</a>', //jia,
//shadeClose: true,
move: false,
shade: false,
maxmin: true,
area: ['100%', '100%'],
content: url //le
,min: function(layero){
//zi;
layero.css({top: '90%'})
}
});
return false;
});
});
$('.file .dl').each(function () {
$(this).on('click', function () {
var form = $('<form target=_blank method=post></form>').attr('action', $(this).attr('href')).get(0);
$(document.body).append(form);
form.submit();
$(form).remove();
return false;
});
});
});
window.TC=window.TC||{};
jQuery(".file .audio").click(function(e){
e.preventDefault();
TC.preview_audio(this);
});
TC.preview_audio = function(aud){
if(!TC.aplayer){
TC.aplayerList=[];
jQuery(".file .audio").each(function(){
var ext = jQuery(this).data("readypreview");
var n = jQuery(this).find("span").text();
var l = n.replace("."+ext,".lrc");
var la = jQuery('a[data-name="'+l+'"]');
var lrc = undefined;
if(la.length>0){
lrc = la[0].href+"?s";
}
TC.aplayerList.push({
name:n,
url:this.href.substr(0,this.href.length-8),
artist:" ",
lrc:lrc
});
})
jQuery('<div id="aplayer">').appendTo("body");
TC.aplayer = new APlayer({
container: document.getElementById('aplayer'),
fixed: true,
audio: TC.aplayerList,
lrcType: 3
});
}
var k=-1;
for(var i in TC.aplayerList){
if(TC.aplayerList[i].name==jQuery(aud).data("name")){
k=i;
break;
}
}
if(k>=0){
TC.aplayer.list.switch(k);
TC.aplayer.play();
TC.aplayer.setMode("normal");
}
}
$ = mdui.JQ;
$.fn.extend({
sortElements: function (comparator, getSortable) {
getSortable = getSortable || function () { return this; };
var placements = this.map(function () {
var sortElement = getSortable.call(this),
parentNode = sortElement.parentNode,
nextSibling = parentNode.insertBefore(
document.createTextNode(''),
sortElement.nextSibling
);
return function () {
parentNode.insertBefore(this, nextSibling);
parentNode.removeChild(nextSibling);
};
});
return [].sort.call(this, comparator).each(function (i) {
placements[i].call(getSortable.call(this));
});
}
});
var lightbox = GLightbox();
function downall() {
let dl_link_list = Array.from(document.querySelectorAll("li a"))
.map(x => x.href) // 所有list中的链接
.filter(x => x.slice(-1) != "/"); // 筛选出非文件夹的文件下载链接
let blob = new Blob([dl_link_list.join("\r\n")], {
type: 'text/plain'
}); // 构造Blog对象
let a = document.createElement('a'); // 伪造一个a对象
a.href = window.URL.createObjectURL(blob); // 构造href属性为Blob对象生成的链接
a.download = "folder_download_link.txt"; // 文件名称,你可以根据你的需要构造
a.click() // 模拟点击
a.remove();
}
<!--ShowThumbnailsStart-->
function thumb(){
if($('#thumb i').text() == "apps"){
$('#thumb i').text("format_list_bulleted");
$('.nexmoe-item').removeClass('thumb');
$('.nexmoe-item .mdui-icon').show();
$('.nexmoe-item .mdui-list-item').css("background","");
}else{
$('#thumb i').text("apps");
$('.nexmoe-item').addClass('thumb');
$('.mdui-col-xs-12 i.mdui-icon').each(function(){
//if($(this).text() == "image" || $(this).text() == "ondemand_video"){
if($(this).text() == "image"){
var thumbnails = $(this).parent().parent().attr('href');
//var thumb =(href.indexOf('?') == -1)?'?t=220':'&t=220';
thumbnails = thumbnails.substr(0, thumbnails.length-8)+'?thumbnails&location';
$(this).hide();
//$(this).parent().parent().parent().css("background","url("+href+thumb+") no-repeat center top");
$(this).parent().parent().parent().css("background","url("+thumbnails+") no-repeat center top");
}
});
}
}
<!--ShowThumbnailsEnd-->
$(function(){
$('.icon-sort').on('click', function () {
let sort_type = $(this).attr("data-sort"), sort_order = $(this).attr("data-order");
let sort_order_to = (sort_order === "less") ? "more" : "less";
$('li[data-sort]').sortElements(function (a, b) {
let data_a = $(a).attr("data-sort-" + sort_type), data_b = $(b).attr("data-sort-" + sort_type);
let rt = data_a.localeCompare(data_b, undefined, {numeric: true});
return (sort_order === "more") ? 0-rt : rt;
});
$(this).attr("data-order", sort_order_to).text("expand_" + sort_order_to);
});
});
var ckname='image_mode';
function getCookie(name)
{
var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
if(arr=document.cookie.match(reg))
return unescape(arr[2]);
else
return null;
}
function setCookie(key,value,day){
var exp = new Date();
exp.setTime(exp.getTime() - 1);
var cval=getCookie(key);
if(cval!=null)
document.cookie= key + "="+cval+";expires="+exp.toGMTString();
var date = new Date();
var nowDate = date.getDate();
date.setDate(nowDate + day);
var cookie = key+"="+value+"; expires="+date;
document.cookie = cookie;
return cookie;
}
$('#image_view').on('click', function () {
if($(this).prop('checked') == true){
setCookie(ckname,1,1);
window.location.href=window.location.href;
}else{
setCookie(ckname,0,1);
window.location.href=window.location.href;
}
});
var mainbody = document.getElementById("main-body");
var darkmod = 0;
var pri_class = "mdui-theme-primary-"+primary_color;
var acc_class = "mdui-theme-accent-"+accent_color;
mainbody.classList.add(acc_class);
mainbody.classList.add(pri_class);
if (window.matchMedia('(prefers-color-scheme: dark)').matches)
{mainbody.classList.add("mdui-theme-layout-dark");darkmod = 1}
function darkmod_use(){
if (darkmod == 1){
mainbody.classList.remove("mdui-theme-layout-dark");darkmod = 0;
} else {
mainbody.classList.add("mdui-theme-layout-dark");darkmod = 1;
}};
//$(document).pjax('a', '#pjax-main' , {fragment:'#pjax-main', timeout:8000});
</script>
</body>
</html>
+1 -1
View File
@@ -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:16px;line-height:1em;color:#1E90FF;background:url("http://www.qqzzz.net/www/images/bj.png")} body{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:16px;line-height:1em;color:#1E90FF;background:url("//www.qqzzz.net/www/images/bj.png")}
a{color:#1E90FF;cursor:pointer;text-decoration:none} a{color:#1E90FF;cursor:pointer;text-decoration:none}
a:hover{color:#1E90FF} a:hover{color:#1E90FF}
.login ion-icon{vertical-align:bottom} .login ion-icon{vertical-align:bottom}
+1296
View File
File diff suppressed because it is too large Load Diff
+1296
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+58 -2
View File
@@ -1,12 +1,68 @@
#!bash #!bash
if [ $# -eq 0 ]; then
echo "
"$0" -i|u [-b branch]
i a new install with empty config.
u update use exist config.
b install the branch after parameter b, default master
example:
"$0" -i
"$0" -u
"$0" -b master
"$0" -u -b master
"$0" -ib test
"
# exit
echo "###############
0, new install
1, update"
read -p "Input:" c
[ g"$c" == g"0" ] && install=1
[ g"$c" == g"1" ] && update=1
fi
i=0
para[$i]=$0
for av in "$@"
do
#echo $av
((i++))
para[$i]=$av
if [ g"${av:0:1}" == g"-" ]; then
while [ g"$av" != g"" ]
do
ag=${av:0:1}
av=${av:1}
[ g"$ag" == g"b" ] && isbranch=1
[ g"$ag" == g"i" ] && install=1
[ g"$ag" == g"u" ] && update=1
done
else
if [ g"$isbranch" == g"1" ]; then
branch="-b $av"
isbranch=0
fi
fi
done
if [ g"$install" == g"1" -a g"$update" == g"1" ]; then
echo "Both install & update, exit"
exit
fi
if [ g"$install" != g"1" -a g"$update" != g"1" ]; then
echo "Not install & Not update, exit"
exit
fi
gitsource='https://github.com/qkqpttgf/OneManager-php' gitsource='https://github.com/qkqpttgf/OneManager-php'
OneManagerPath=`cd $(dirname $0);pwd -P` OneManagerPath=`cd $(dirname $0);pwd -P`
cd ${OneManagerPath} cd ${OneManagerPath}
git clone ${gitsource} git clone ${branch} ${gitsource}
\mv -b config.php OneManager-php/ [ g"$install" == g"1" ] || \mv -b config.php OneManager-php/
\mv -b OneManager-php/* ./ \mv -b OneManager-php/* ./
\mv -b OneManager-php/.[^.]* ./ \mv -b OneManager-php/.[^.]* ./
rm -rf *~ rm -rf *~
+10 -1
View File
@@ -1,7 +1,16 @@
20200607-1856.19
add platform: Aliyun Function Compute. add setting: replace sharepoint.com to a proxy server name. add setting: disableShowThumb,customTheme. add function: php hosting website can update by a click
现在可以安装到阿里函数计算FC了。php空间可以一键更新了。可以设置某个盘替换sharpoint.com域名为你的反代域名。新增disableShowThumb,customTheme。
20200503-1848.18
Rebuild theme. Add custom Css & custom Script, add FunctionalityFile: head.omf & foot.omf.
重建主题文件结构。增加自定义css与自定义script。增加2个功能文件:head.omf、foot.omf。
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 20200326-0001.16
You can add sharepoint site drive as a disk, <font color=red>you must reinstall after update</font>. You can add sharepoint site drive as a disk, <font color=red>you must reinstall after update</font>.
可以将sharepoint网站添加成一个盘,<font color=red>由于结构改变,升级后只能重装</font>。 可以将sharepoint网站添加成一个盘,<font color=red>由于结构改变,升级后只能重装</font>。
20200321-1830.15 20200321-1830.15
本次更新后,'index.html'功能在其它主题会导致bug。 本次更新后,'index.html'功能在其它主题会导致bug。
文本类文件将缓存;添加hideFunctionalityFile开关;在添加网盘时会显示已经在用的标签。 文本类文件将缓存;添加hideFunctionalityFile开关;在添加网盘时会显示已经在用的标签。