From 2f41e4f7b34d86fc41130a3e6352f8c3df7493b7 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Sat, 16 May 2020 13:03:56 +0800 Subject: [PATCH 01/19] use local url link instead of MS long url in privew --- common.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common.php b/common.php index c9d7944..0d81feb 100644 --- a/common.php +++ b/common.php @@ -2137,7 +2137,8 @@ function render_list($path = '', $files = '') $html = str_replace('', '', $html); $html = str_replace('', '', $html); } - while (strpos($html, '')) $html = str_replace('', $files[$_SERVER['DownurlStrName']], $html); + //while (strpos($html, '')) $html = str_replace('', $files[$_SERVER['DownurlStrName']], $html); + while (strpos($html, '')) $html = str_replace('', path_format($_SERVER['base_disk_path'] . '/' . $path), $html); while (strpos($html, '')) $html = str_replace('', path_format($_SERVER['base_disk_path'] . '/' . $path), $html); while (strpos($html, '')) $html = str_replace('', $files['name'], $html); $html = str_replace('', urlencode($files[$_SERVER['DownurlStrName']]), $html); @@ -2295,6 +2296,7 @@ function render_list($path = '', $files = '') $tmp[1] = $tmp1; } $html .= $MultiDiskArea . $tmp[1]; + while (strpos($html, '')) $html = str_replace('', $_SERVER['disktag'], $html); $tmp = splitfirst($html, ''); $html = $tmp[0]; From 72bcd304bf4ffb495d020c2acf0bd951e451427d Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Sat, 16 May 2020 13:06:02 +0800 Subject: [PATCH 02/19] add multidisk (has bug) --- theme/nexmoe.html | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/theme/nexmoe.html b/theme/nexmoe.html index 10e58aa..2051f30 100644 --- a/theme/nexmoe.html +++ b/theme/nexmoe.html @@ -146,6 +146,16 @@ position: absolute; top: 180px; } + .more-disk{ + display: inline-block; + } + .more-disk div{ + list-style:none; + 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; + } + .more-disk:hover div{display:block} + .more-disk div li{line-height:normal;} + .more-disk div li a[now]{background:#11faaa;}
@@ -223,7 +233,11 @@ var path = e.innerText; if (path.substr(path.length-1)=='/') path = path.substr(0, path.length-1); var paths = path.split('/'); + //e.innerHTML = 'chevron_right'; e.innerHTML = 'chevron_right'; + + e.innerHTML += 'chevron_right'; + if (paths <= 2) return; for (var i = 1; i < paths.length - 1; i++) { var to = path_format(root + paths.slice(0, i + 1).join('/')); @@ -321,6 +335,7 @@ }); - + + From 45205ff34744f7e97d2d42d2b67ad6170573b97d Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Wed, 20 May 2020 17:20:10 +0800 Subject: [PATCH 03/19] Update common.php --- common.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common.php b/common.php index 0d81feb..36f9053 100644 --- a/common.php +++ b/common.php @@ -2211,6 +2211,7 @@ function render_list($path = '', $files = '') while (strpos($html, '')) $html = str_replace('', getconstStr('GetFileNameFail'), $html); while (strpos($html, '')) $html = str_replace('', getconstStr('UploadFile'), $html); while (strpos($html, '')) $html = str_replace('', getconstStr('UploadFolder'), $html); + while (strpos($html, '')) $html = str_replace('', getconstStr('FileSelected'), $html); while (strpos($html, '')) $html = str_replace('', (isset($_GET['preview'])?'?preview&':'?'), $html); $tmp = splitfirst($html, ''); @@ -2296,7 +2297,10 @@ function render_list($path = '', $files = '') $tmp[1] = $tmp1; } $html .= $MultiDiskArea . $tmp[1]; - while (strpos($html, '')) $html = str_replace('', $_SERVER['disktag'], $html); + $diskname = getConfig('diskname'); + if ($diskname=='') $diskname = $_SERVER['disktag']; + if (strlen($diskname)>10) $diskname = substr($diskname, 0, 7).'...'; + while (strpos($html, '')) $html = str_replace('', $diskname, $html); $tmp = splitfirst($html, ''); $html = $tmp[0]; From bd568a56307fdf4516076c8400320b3205947600 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Wed, 20 May 2020 17:21:10 +0800 Subject: [PATCH 04/19] Update classic.html --- theme/classic.html | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/theme/classic.html b/theme/classic.html index 066d8d4..75a023e 100644 --- a/theme/classic.html +++ b/theme/classic.html @@ -21,8 +21,8 @@ - - + + + + + + +
+
+   +
+ +
+ +

+ +

+
+
+
+
+
+ + + > + + + + + + + + + + +
+
+
+
+ + + + +
+
+
+
+ +
+
+
+
+ + + + +
+
+
+ +
+
+
+ + + +
+
+
+ + + +
+ +
+ +
+
+
+ + +
+
+
+ + + +
+
+ +
+
+ + +
+
+ +
+
+
+ + + + + +
+
+ +   +
+
+ + <!--FileName--> + + +
+ + + + + +
+ + + + + +
+ +
+ +     + + + + +
+ +
+ + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +     + + +   + +
+ + + + + + +
+ + + + + + +
+ +
+ + + + + + + +
+ + + + + + + + + + + + + + +
+
+ + + + + + + +
+
+ +
+
+ + +
+
+ +
+
+
+ + + + + +
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ + +
+
+
+
+
+ +
+
+
+
+
+ + + + + +
+
+
+ +
+ + + + + + + + +
+
+
+ + + + +
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+ + + +
+ +
+ + +
+ + + + + +

OneManager By 逸笙 Theme By Nchyn

+

+ + + + + + + + + + + + + + + + From 08f177bca55c501e9beb8ae0f3c867b66074d24c Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Wed, 20 May 2020 17:24:09 +0800 Subject: [PATCH 06/19] Update nexmoe.html --- theme/nexmoe.html | 75 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 56 insertions(+), 19 deletions(-) diff --git a/theme/nexmoe.html b/theme/nexmoe.html index 2051f30..07213bf 100644 --- a/theme/nexmoe.html +++ b/theme/nexmoe.html @@ -14,7 +14,42 @@ <!--Title--> @@ -61,14 +96,19 @@
--> + +
+ +
+ -
- - -
+
+ + +
@@ -146,18 +186,10 @@ position: absolute; top: 180px; } - .more-disk{ - display: inline-block; - } - .more-disk div{ - list-style:none; - 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; - } - .more-disk:hover div{display:block} - .more-disk div li{line-height:normal;} - .more-disk div li a[now]{background:#11faaa;} +
+
  • @@ -216,6 +248,11 @@
+ +
+ +
+
format_list_bulleted @@ -236,7 +273,7 @@ //e.innerHTML = 'chevron_right'; e.innerHTML = 'chevron_right'; - e.innerHTML += 'chevron_right'; + e.innerHTML += 'chevron_right'; if (paths <= 2) return; for (var i = 1; i < paths.length - 1; i++) { From adfe133522de9b8cac830e2ef2979d33517b2d66 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Wed, 20 May 2020 19:39:36 +0800 Subject: [PATCH 07/19] Update classic.html --- theme/classic.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theme/classic.html b/theme/classic.html index 75a023e..353acec 100644 --- a/theme/classic.html +++ b/theme/classic.html @@ -222,7 +222,7 @@     - --> +   From 40053a64c523e44f6304d801d2d36863ead43cc7 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Wed, 20 May 2020 20:23:19 +0800 Subject: [PATCH 08/19] original or thumb --- theme/classic.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/theme/classic.html b/theme/classic.html index 353acec..fba1154 100644 --- a/theme/classic.html +++ b/theme/classic.html @@ -222,7 +222,7 @@     - +   @@ -247,7 +247,7 @@ - + @@ -672,7 +672,7 @@ }*/ function get_thumbnails_url(url, name, filea, thumb) { if (!thumb) { - filea.innerHTML=''+name+''; + filea.parentNode.parentNode.innerHTML=''+name+''; return; } var xhr = new XMLHttpRequest(); From cd45927eaa0041c2449e95fe45bad7219770f17d Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Thu, 21 May 2020 11:00:58 +0800 Subject: [PATCH 09/19] fix: original will jump a pic --- theme/classic.html | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/theme/classic.html b/theme/classic.html index fba1154..a9db090 100644 --- a/theme/classic.html +++ b/theme/classic.html @@ -633,48 +633,31 @@ function showthumbnails(obj) { + images = []; var files=document.getElementsByName('filelist'); for ($i=0;$i]; if (images.indexOf(ext)>-1) { if (document.getElementById('originalpic').checked==true) { var url=files[$i].href; url=url.substr(0,url.length-8); - get_thumbnails_url(url, str, files[$i], 0); + files[$i].parentNode.parentNode.innerHTML=''+str+''; + $i--; } else { var nurl=window.location.href; if (nurl.substr(-1)!="/") nurl+="/"; var url=nurl+str+'?thumbnails'; - get_thumbnails_url(url, str, files[$i], 1); + get_thumbnails_url(url, str, files[$i]); } } } obj.disabled='disabled'; } - /*function get_thumbnails_url(str, filea) { - if (!str) return; - var nurl=window.location.href; - if (nurl.substr(-1)!="/") nurl+="/"; - var xhr = new XMLHttpRequest(); - xhr.open("GET", nurl+str+'?thumbnails', true); - //xhr.setRequestHeader('x-requested-with','XMLHttpRequest'); - xhr.send(''); - xhr.onload = function(e){ - if (xhr.status==200) { - if (xhr.responseText!='') filea.innerHTML=''+str+''; - } else console.log(xhr.status+'\n'+xhr.responseText); - } - }*/ - function get_thumbnails_url(url, name, filea, thumb) { - if (!thumb) { - filea.parentNode.parentNode.innerHTML=''+name+''; - return; - } + function get_thumbnails_url(url, name, filea) { var xhr = new XMLHttpRequest(); xhr.open("GET", url, true); xhr.send(''); From e85c6eab0d9e5a4c4b7feeb52fb6add2f2be211f Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Thu, 21 May 2020 17:56:45 +0800 Subject: [PATCH 10/19] try to change theme at front --- common.php | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/common.php b/common.php index 36f9053..38a532a 100644 --- a/common.php +++ b/common.php @@ -175,6 +175,8 @@ function main($path) $_SERVER['timezone'] = getConfig('timezone'); if (isset($_COOKIE['timezone'])&&$_COOKIE['timezone']!='') $_SERVER['timezone'] = $_COOKIE['timezone']; if ($_SERVER['timezone']=='') $_SERVER['timezone'] = 0; + if (isset($_COOKIE['theme'])&&$_COOKIE['theme']!='') $_SERVER['theme'] = $_COOKIE['theme']; + else $_SERVER['theme'] = getConfig('theme'); $_SERVER['PHP_SELF'] = path_format($_SERVER['base_path'] . $path); if (getConfig('admin')=='') return install(); @@ -1748,7 +1750,8 @@ function render_list($path = '', $files = '') Github: https://github.com/qkqpttgf/OneManager-php -->'; - $theme = getConfig('theme'); + //$theme = getConfig('theme'); + $theme = $_SERVER['theme']; if ( $theme=='' || !file_exists('theme/'.$theme) ) $theme = 'classic.html'; if (substr($theme,-4)=='.php') { @ob_start(); @@ -2430,6 +2433,26 @@ function render_list($path = '', $files = '') $html .= $tmp[1]; while (strpos($html, '')) $html = str_replace('', $_SERVER['timezone'], $html); + $theme_arr = scandir('theme'); + $html .= ' +
+ +
+'; + // 最后清除换行 while (strpos($html, "\r\n\r\n")) $html = str_replace("\r\n\r\n", "\r\n", $html); //while (strpos($html, PHP_EOL.PHP_EOL)) $html = str_replace(PHP_EOL.PHP_EOL, PHP_EOL, $html); From 23fa448a2fad953f4255834d648894853419e4e0 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Thu, 21 May 2020 18:01:03 +0800 Subject: [PATCH 11/19] Update conststr.php --- conststr.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/conststr.php b/conststr.php index 135a4fa..9be638a 100644 --- a/conststr.php +++ b/conststr.php @@ -224,6 +224,10 @@ $constStr = [ 'ko-kr' => '돌아 가기', 'fa' => 'بازگشت', ], + 'Theme' => [ + 'en-us' => 'Theme', + 'zh-cn' => '主题', + ], 'NotNeedUpdate' => [ 'en-us' => 'Not Need Update', 'zh-cn' => '不需要更新', From 133990ceff28b11186097532d248d30529dc4815 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Thu, 21 May 2020 18:05:18 +0800 Subject: [PATCH 12/19] theme change move out --- common.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/common.php b/common.php index 38a532a..2979a66 100644 --- a/common.php +++ b/common.php @@ -2433,7 +2433,15 @@ function render_list($path = '', $files = '') $html .= $tmp[1]; while (strpos($html, '')) $html = str_replace('', $_SERVER['timezone'], $html); - $theme_arr = scandir('theme'); + // 最后清除换行 + while (strpos($html, "\r\n\r\n")) $html = str_replace("\r\n\r\n", "\r\n", $html); + //while (strpos($html, PHP_EOL.PHP_EOL)) $html = str_replace(PHP_EOL.PHP_EOL, PHP_EOL, $html); + + $exetime = round(microtime(true)-$_SERVER['php_starttime'],3); + $html = str_replace('', date("Y-m-d H:i:s")." ".getconstStr('Week')[date("w")]." ".$_SERVER['REMOTE_ADDR'].' Runtime:'.$exetime.'s Mem:'.size_format(memory_get_usage()), $html); + } + + $theme_arr = scandir('theme'); $html .= '
'; - foreach ($theme_arr as $v1) { - if ($v1!='.' && $v1!='..') $html .= ' + foreach ($theme_arr as $v1) { + if ($v1!='.' && $v1!='..') $html .= ' '; - } - $html .= ' + } + $html .= '
+ + + + + + + + + + +
+
+ menu + + + chevron_right + + +
+ format_list_bulleted +
+
+ +
+
+ +
+
+
+
OneManager
+
+
+
+ +
+ + + + +
+ +
+
+ https + + +
+
+ +
+
+ + + +
+
+ +
+--> + + + +
+ +
+ +
+ + +
+
+
+ + +
+ +
+ + +
+ +
+ + + + +
+
+
+ + + +
+ +
+file_download + + + + +
+
+
+ +
+ +
+ + +
+ + +
+ + + +
+ +
+ +
+ + +
+ + +
+ +
+ +
+
+ + + + + + + From 5edd249144cafde77c136ca07fe3c22f43cd4f11 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Fri, 22 May 2020 16:18:26 +0800 Subject: [PATCH 17/19] add github link --- theme/nexmoe2.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/theme/nexmoe2.html b/theme/nexmoe2.html index 952a7dc..080c8d0 100644 --- a/theme/nexmoe2.html +++ b/theme/nexmoe2.html @@ -136,6 +136,10 @@ + + code +
Github
+
From 1929c650117b88cce2e63abe2e48272b7d9ce45f Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Fri, 22 May 2020 18:49:56 +0800 Subject: [PATCH 18/19] add background img --- theme/nexmoe1.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/theme/nexmoe1.html b/theme/nexmoe1.html index b653fa6..7660340 100644 --- a/theme/nexmoe1.html +++ b/theme/nexmoe1.html @@ -11,12 +11,12 @@ - <!--Title--> - - + <!--Title--> + +