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 .= ' +
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 @@