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