theme change move out
parent
23fa448a2f
commit
133990ceff
18
common.php
18
common.php
|
@ -2433,7 +2433,15 @@ function render_list($path = '', $files = '')
|
||||||
$html .= $tmp[1];
|
$html .= $tmp[1];
|
||||||
while (strpos($html, '<!--timezone-->')) $html = str_replace('<!--timezone-->', $_SERVER['timezone'], $html);
|
while (strpos($html, '<!--timezone-->')) $html = str_replace('<!--timezone-->', $_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('<!--FootStr-->', 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 .= '
|
||||||
<div style="position: fixed;right: 10px;bottom: 10px;/*color: rgba(247,247,249,0);*/">
|
<div style="position: fixed;right: 10px;bottom: 10px;/*color: rgba(247,247,249,0);*/">
|
||||||
<select name="theme" onchange="changetheme(this.options[this.options.selectedIndex].value)">
|
<select name="theme" onchange="changetheme(this.options[this.options.selectedIndex].value)">
|
||||||
|
@ -2453,14 +2461,6 @@ function render_list($path = '', $files = '')
|
||||||
}
|
}
|
||||||
</script>';
|
</script>';
|
||||||
|
|
||||||
// 最后清除换行
|
|
||||||
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('<!--FootStr-->', date("Y-m-d H:i:s")." ".getconstStr('Week')[date("w")]." ".$_SERVER['REMOTE_ADDR'].' Runtime:'.$exetime.'s Mem:'.size_format(memory_get_usage()), $html);
|
|
||||||
}
|
|
||||||
|
|
||||||
$html = $authinfo . $html;
|
$html = $authinfo . $html;
|
||||||
if (isset($_SERVER['Set-Cookie'])) return output($html, $statusCode, [ 'Set-Cookie' => $_SERVER['Set-Cookie'], 'Content-Type' => 'text/html' ]);
|
if (isset($_SERVER['Set-Cookie'])) return output($html, $statusCode, [ 'Set-Cookie' => $_SERVER['Set-Cookie'], 'Content-Type' => 'text/html' ]);
|
||||||
return output($html,$statusCode);
|
return output($html,$statusCode);
|
||||||
|
|
Loading…
Reference in New Issue