add a option to display theme selection or not
parent
ac2a9910b0
commit
28e2f7b564
20
common.php
20
common.php
|
@ -12,6 +12,7 @@ $Base64Env = [
|
||||||
'background',
|
'background',
|
||||||
'diskname',
|
'diskname',
|
||||||
//'disableShowThumb',
|
//'disableShowThumb',
|
||||||
|
//'disableChangeTheme',
|
||||||
//'disktag',
|
//'disktag',
|
||||||
//'downloadencrypt',
|
//'downloadencrypt',
|
||||||
//'function_name', // used in heroku.
|
//'function_name', // used in heroku.
|
||||||
|
@ -53,6 +54,7 @@ $CommonEnv = [
|
||||||
'background',
|
'background',
|
||||||
'disktag',
|
'disktag',
|
||||||
'disableShowThumb',
|
'disableShowThumb',
|
||||||
|
'disableChangeTheme',
|
||||||
'function_name', // used in heroku.
|
'function_name', // used in heroku.
|
||||||
'hideFunctionalityFile',
|
'hideFunctionalityFile',
|
||||||
'timezone',
|
'timezone',
|
||||||
|
@ -76,6 +78,7 @@ $ShowedCommonEnv = [
|
||||||
'background',
|
'background',
|
||||||
//'disktag',
|
//'disktag',
|
||||||
'disableShowThumb',
|
'disableShowThumb',
|
||||||
|
'disableChangeTheme',
|
||||||
//'function_name', // used in heroku.
|
//'function_name', // used in heroku.
|
||||||
'hideFunctionalityFile',
|
'hideFunctionalityFile',
|
||||||
'timezone',
|
'timezone',
|
||||||
|
@ -2650,19 +2653,17 @@ function render_list($path = '', $files = '')
|
||||||
$html = str_replace('<!--FootStr-->', date("Y-m-d H:i:s")." ".getconstStr('Week')[date("w")]." ".$_SERVER['REMOTE_ADDR'].' Runningtime:'.$exetime.'s Mem:'.size_format(memory_get_usage()), $html);
|
$html = str_replace('<!--FootStr-->', date("Y-m-d H:i:s")." ".getconstStr('Week')[date("w")]." ".$_SERVER['REMOTE_ADDR'].' Runningtime:'.$exetime.'s Mem:'.size_format(memory_get_usage()), $html);
|
||||||
}
|
}
|
||||||
|
|
||||||
$theme_arr = scandir('theme');
|
if ($_SERVER['admin']||!getConfig('disableChangeTheme')) {
|
||||||
$html .= '
|
$theme_arr = scandir('theme');
|
||||||
|
$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)">
|
||||||
<option value="">'.getconstStr('Theme').'</option>';
|
<option value="">'.getconstStr('Theme').'</option>';
|
||||||
foreach ($theme_arr as $v1) {
|
foreach ($theme_arr as $v1) {
|
||||||
if ($v1!='.' && $v1!='..') $html .= '
|
if ($v1!='.' && $v1!='..') $html .= '
|
||||||
<option value="'.$v1.'" '.($v1==$theme?'selected="selected"':'').'>'.$v1.'</option>';
|
<option value="'.$v1.'" '.($v1==$theme?'selected="selected"':'').'>'.$v1.'</option>';
|
||||||
}
|
}
|
||||||
//$tmp = getConfig('customTheme');
|
$html .= '
|
||||||
//if ($tmp!='') $html .= '
|
|
||||||
// <option value="" '.($tmp==$theme?'selected="selected"':'').'>customTheme</option>';
|
|
||||||
$html .= '
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@ -2675,6 +2676,7 @@ function render_list($path = '', $files = '')
|
||||||
location.href = location.href;
|
location.href = location.href;
|
||||||
}
|
}
|
||||||
</script>';
|
</script>';
|
||||||
|
}
|
||||||
|
|
||||||
$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' ]);
|
||||||
|
|
Loading…
Reference in New Issue