diff --git a/common.php b/common.php index de54a53..401a165 100644 --- a/common.php +++ b/common.php @@ -1995,47 +1995,6 @@ function render_list($path = '', $files = '') while (strpos($html, '')) $html = str_replace('', '', $html); } - if ($_SERVER['is_guestup_path']&&!$_SERVER['admin']) { - $tmp[1] = 'a'; - while ($tmp[1]!='') { - $tmp = splitfirst($html, ''); - $html = $tmp[0]; - $tmp = splitfirst($tmp[1], ''); - $html .= $tmp[1]; - } - $tmp[1] = 'a'; - while ($tmp[1]!='') { - $tmp = splitfirst($html, ''); - $html = $tmp[0]; - $tmp = splitfirst($tmp[1], ''); - $html .= $tmp[1]; - } - while (strpos($html, '')) { - $tmp = splitfirst($html, ''); - $html = $tmp[0]; - $tmp = splitfirst($tmp[1], ''); - $html .= $tmp[1]; - } - while (strpos($html, '')) { - $html = str_replace('', '', $html); - $html = str_replace('', '', $html); - } - } - if ($_SERVER['is_guestup_path']||( $_SERVER['admin']&&isset($files['folder'])&&$_SERVER['ishidden']<4 )) { - while (strpos($html, '')) { - while (strpos($html, '')) $html = str_replace('', '', $html); - while (strpos($html, '')) $html = str_replace('', '', $html); - while (strpos($html, '')) $html = str_replace('', getconstStr('Calculate'), $html); - } - } else { - $tmp[1] = 'a'; - while ($tmp[1]!='') { - $tmp = splitfirst($html, ''); - $html = $tmp[0]; - $tmp = splitfirst($tmp[1], ''); - $html .= $tmp[1]; - } - } if ($_SERVER['ishidden']==4) { $tmp[1] = 'a'; while ($tmp[1]!='') { @@ -2076,9 +2035,79 @@ function render_list($path = '', $files = '') $tmp = splitfirst($tmp[1], ''); $html .= $tmp[1]; } + while (strpos($html, '')) { + $tmp = splitfirst($html, ''); + $html = $tmp[0]; + $tmp = splitfirst($tmp[1], ''); + $html .= $tmp[1]; + } + } else { + while (strpos($html, '')) { + $tmp = splitfirst($html, ''); + $html = $tmp[0]; + $tmp = splitfirst($tmp[1], ''); + $html .= $tmp[1]; + } + while (strpos($html, '')) { + $html = str_replace('', '', $html); + $html = str_replace('', '', $html); + } } while (strpos($html, '')) $html = str_replace('', getconstStr('Download'), $html); + if ($_SERVER['is_guestup_path']&&!$_SERVER['admin']) { + $tmp[1] = 'a'; + while ($tmp[1]!='') { + $tmp = splitfirst($html, ''); + $html = $tmp[0]; + $tmp = splitfirst($tmp[1], ''); + $html .= $tmp[1]; + } + $tmp[1] = 'a'; + while ($tmp[1]!='') { + $tmp = splitfirst($html, ''); + $html = $tmp[0]; + $tmp = splitfirst($tmp[1], ''); + $html .= $tmp[1]; + } + while (strpos($html, '')) { + $html = str_replace('', '', $html); + $html = str_replace('', '', $html); + } + while (strpos($html, '')) { + $tmp = splitfirst($html, ''); + $html = $tmp[0]; + $tmp = splitfirst($tmp[1], ''); + $html .= $tmp[1]; + } + } else { + while (strpos($html, '')) { + $tmp = splitfirst($html, ''); + $html = $tmp[0]; + $tmp = splitfirst($tmp[1], ''); + $html .= $tmp[1]; + } + while (strpos($html, '')) { + $html = str_replace('', '', $html); + $html = str_replace('', '', $html); + } + } + if ($_SERVER['is_guestup_path']||( $_SERVER['admin']&&isset($files['folder'])&&$_SERVER['ishidden']<4 )) { + while (strpos($html, '')) { + while (strpos($html, '')) $html = str_replace('', '', $html); + while (strpos($html, '')) $html = str_replace('', '', $html); + while (strpos($html, '')) $html = str_replace('', getconstStr('Calculate'), $html); + } + } else { + $tmp[1] = 'a'; + while ($tmp[1]!='') { + $tmp = splitfirst($html, ''); + $html = $tmp[0]; + $tmp = splitfirst($tmp[1], ''); + $html .= $tmp[1]; + } + } + if (isset($files['children'])) { while (strpos($html, '')) { $tmp = splitfirst($html, ''); @@ -2613,10 +2642,12 @@ function render_list($path = '', $files = '') // 最后清除换行 while (strpos($html, "\r\n\r\n")) $html = str_replace("\r\n\r\n", "\r\n", $html); + //while (strpos($html, "\r\r")) $html = str_replace("\r\r", "\r", $html); + while (strpos($html, "\n\n")) $html = str_replace("\n\n", "\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('', 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 = str_replace('', 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'); @@ -2632,7 +2663,7 @@ function render_list($path = '', $files = '') //if ($tmp!='') $html .= ' // '; $html .= ' - +