diff --git a/common.php b/common.php index c9d7944..a8e8f63 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(); @@ -2137,7 +2140,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); @@ -2210,6 +2214,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, ''); @@ -2219,6 +2224,25 @@ function render_list($path = '', $files = '') $background = str_replace('', getConfig('background'), $tmp[0]); } $html .= $background . $tmp[1]; + + $tmp = splitfirst($html, ''); + $html = $tmp[0]; + $tmp = splitfirst($tmp[1], ''); + $PathArrayStr = $tmp[0]; + $tmp_path = str_replace('%23', '#', str_replace('&','&', $path)); + $tmp_url = $_SERVER['base_disk_path']; + while ($tmp_path!='') { + $tmp1 = splitfirst($tmp_path, '/'); + $folder1 = $tmp1[0]; + if ($folder1!='') { + $tmp_url .= $folder1 . '/'; + $PathArrayStr1 = str_replace('', $tmp_url, $PathArrayStr); + $PathArrayStr1 = str_replace('', $folder1, $PathArrayStr1); + $html .= $PathArrayStr1; + } + $tmp_path = $tmp1[1]; + } + $html .= $tmp[1]; $tmp = splitfirst($html, ''); $html = $tmp[0]; @@ -2295,6 +2319,10 @@ function render_list($path = '', $files = '') $tmp[1] = $tmp1; } $html .= $MultiDiskArea . $tmp[1]; + $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]; @@ -2432,6 +2460,26 @@ function render_list($path = '', $files = '') $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 .= ' +
+ +
+'; + $html = $authinfo . $html; if (isset($_SERVER['Set-Cookie'])) return output($html, $statusCode, [ 'Set-Cookie' => $_SERVER['Set-Cookie'], 'Content-Type' => 'text/html' ]); return output($html,$statusCode); 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' => '不需要更新', diff --git a/theme/nchyn_grey.html b/theme/nchyn_grey.html new file mode 100644 index 0000000..99dd479 --- /dev/null +++ b/theme/nchyn_grey.html @@ -0,0 +1,1414 @@ + +{ + "music":"musical-notes", + "video":"logo-youtube", + "img":"image", + "office":"paper", + "txt":"clipboard", + "zip":"filing", + "iso":"disc", + "apk":"logo-android", + "exe":"logo-windows", + "default":"document" +} + + + + + <!--Title--> + + + + + + + + + + + + + + + +
+
+   +
+ +
+ +

+ +

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

OneManager By 逸笙 Theme By Nchyn

+

+ + + + + + + + + + + + + + + + diff --git a/theme/nexmoe.html b/theme/nexmoe1.html similarity index 74% rename from theme/nexmoe.html rename to theme/nexmoe1.html index 10e58aa..7660340 100644 --- a/theme/nexmoe.html +++ b/theme/nexmoe1.html @@ -12,9 +12,46 @@ <!--Title--> + + @@ -22,11 +59,26 @@
- + + + chevron_right +
+ +
+ +
  • >
  • + +
    +
    + + + chevron_right + +
    - +
    @@ -61,14 +113,19 @@
    --> + +
    + +
    + -
    - - -
    +
    + + +
    @@ -146,8 +203,10 @@ position: absolute; top: 180px; } +
    +
    + +
    + +
    +
    format_list_bulleted - - + + - + + diff --git a/theme/nexmoe2.html b/theme/nexmoe2.html new file mode 100644 index 0000000..3e7bb92 --- /dev/null +++ b/theme/nexmoe2.html @@ -0,0 +1,572 @@ + +{ + "music":"audiotrack", + "video":"ondemand_video", + "img":"image", + "default":"insert_drive_file" +} + + + + + + + <!--Title--> + + + + + + + + + + + + +
    +
    + menu + + + chevron_right + + +
    + format_list_bulleted +
    +
    + +
    +
    + +
    +
    +
    +
    OneManager
    +
    +
    +
    + +
    + + + + +
    + +
    +
    + https + + +
    +
    + +
    +
    + + + +
    +
    + +
    +--> + + + +
    + +
    + +
    + + +
    +
    +
    + + +
    + +
    + + +
    + +
    + + + + +
    +
    +
    + + + +
    + +
    +file_download + + + + +
    +
    +
    + +
    + +
    + + +
    + + +
    + + + +
    + +
    + +
    + + +
    + + +
    + +
    + +
    +
    + + + + + + +