Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e4693b29ed | ||
|
|
a1268da0fe |
+73
-42
@@ -1995,47 +1995,6 @@ function render_list($path = '', $files = '')
|
||||
while (strpos($html, '<!--GuestEnd-->')) $html = str_replace('<!--GuestEnd-->', '', $html);
|
||||
}
|
||||
|
||||
if ($_SERVER['is_guestup_path']&&!$_SERVER['admin']) {
|
||||
$tmp[1] = 'a';
|
||||
while ($tmp[1]!='') {
|
||||
$tmp = splitfirst($html, '<!--IsFileStart-->');
|
||||
$html = $tmp[0];
|
||||
$tmp = splitfirst($tmp[1], '<!--IsFileEnd-->');
|
||||
$html .= $tmp[1];
|
||||
}
|
||||
$tmp[1] = 'a';
|
||||
while ($tmp[1]!='') {
|
||||
$tmp = splitfirst($html, '<!--IsFolderStart-->');
|
||||
$html = $tmp[0];
|
||||
$tmp = splitfirst($tmp[1], '<!--IsFolderEnd-->');
|
||||
$html .= $tmp[1];
|
||||
}
|
||||
while (strpos($html, '<!--EncryptedStart-->')) {
|
||||
$tmp = splitfirst($html, '<!--EncryptedStart-->');
|
||||
$html = $tmp[0];
|
||||
$tmp = splitfirst($tmp[1], '<!--EncryptedEnd-->');
|
||||
$html .= $tmp[1];
|
||||
}
|
||||
while (strpos($html, '<!--GuestUploadStart-->')) {
|
||||
$html = str_replace('<!--GuestUploadStart-->', '', $html);
|
||||
$html = str_replace('<!--GuestUploadEnd-->', '', $html);
|
||||
}
|
||||
}
|
||||
if ($_SERVER['is_guestup_path']||( $_SERVER['admin']&&isset($files['folder'])&&$_SERVER['ishidden']<4 )) {
|
||||
while (strpos($html, '<!--UploadJsStart-->')) {
|
||||
while (strpos($html, '<!--UploadJsStart-->')) $html = str_replace('<!--UploadJsStart-->', '', $html);
|
||||
while (strpos($html, '<!--UploadJsEnd-->')) $html = str_replace('<!--UploadJsEnd-->', '', $html);
|
||||
while (strpos($html, '<!--constStr@Calculate-->')) $html = str_replace('<!--constStr@Calculate-->', getconstStr('Calculate'), $html);
|
||||
}
|
||||
} else {
|
||||
$tmp[1] = 'a';
|
||||
while ($tmp[1]!='') {
|
||||
$tmp = splitfirst($html, '<!--UploadJsStart-->');
|
||||
$html = $tmp[0];
|
||||
$tmp = splitfirst($tmp[1], '<!--UploadJsEnd-->');
|
||||
$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], '<!--GuestUploadEnd-->');
|
||||
$html .= $tmp[1];
|
||||
}
|
||||
while (strpos($html, '<!--IsNotHiddenStart-->')) {
|
||||
$tmp = splitfirst($html, '<!--IsNotHiddenStart-->');
|
||||
$html = $tmp[0];
|
||||
$tmp = splitfirst($tmp[1], '<!--IsNotHiddenEnd-->');
|
||||
$html .= $tmp[1];
|
||||
}
|
||||
} else {
|
||||
while (strpos($html, '<!--EncryptedStart-->')) {
|
||||
$tmp = splitfirst($html, '<!--EncryptedStart-->');
|
||||
$html = $tmp[0];
|
||||
$tmp = splitfirst($tmp[1], '<!--EncryptedEnd-->');
|
||||
$html .= $tmp[1];
|
||||
}
|
||||
while (strpos($html, '<!--IsNotHiddenStart-->')) {
|
||||
$html = str_replace('<!--IsNotHiddenStart-->', '', $html);
|
||||
$html = str_replace('<!--IsNotHiddenEnd-->', '', $html);
|
||||
}
|
||||
}
|
||||
while (strpos($html, '<!--constStr@Download-->')) $html = str_replace('<!--constStr@Download-->', getconstStr('Download'), $html);
|
||||
|
||||
if ($_SERVER['is_guestup_path']&&!$_SERVER['admin']) {
|
||||
$tmp[1] = 'a';
|
||||
while ($tmp[1]!='') {
|
||||
$tmp = splitfirst($html, '<!--IsFileStart-->');
|
||||
$html = $tmp[0];
|
||||
$tmp = splitfirst($tmp[1], '<!--IsFileEnd-->');
|
||||
$html .= $tmp[1];
|
||||
}
|
||||
$tmp[1] = 'a';
|
||||
while ($tmp[1]!='') {
|
||||
$tmp = splitfirst($html, '<!--IsFolderStart-->');
|
||||
$html = $tmp[0];
|
||||
$tmp = splitfirst($tmp[1], '<!--IsFolderEnd-->');
|
||||
$html .= $tmp[1];
|
||||
}
|
||||
while (strpos($html, '<!--GuestUploadStart-->')) {
|
||||
$html = str_replace('<!--GuestUploadStart-->', '', $html);
|
||||
$html = str_replace('<!--GuestUploadEnd-->', '', $html);
|
||||
}
|
||||
while (strpos($html, '<!--IsNotHiddenStart-->')) {
|
||||
$tmp = splitfirst($html, '<!--IsNotHiddenStart-->');
|
||||
$html = $tmp[0];
|
||||
$tmp = splitfirst($tmp[1], '<!--IsNotHiddenEnd-->');
|
||||
$html .= $tmp[1];
|
||||
}
|
||||
} else {
|
||||
while (strpos($html, '<!--GuestUploadStart-->')) {
|
||||
$tmp = splitfirst($html, '<!--GuestUploadStart-->');
|
||||
$html = $tmp[0];
|
||||
$tmp = splitfirst($tmp[1], '<!--GuestUploadEnd-->');
|
||||
$html .= $tmp[1];
|
||||
}
|
||||
while (strpos($html, '<!--IsNotHiddenStart-->')) {
|
||||
$html = str_replace('<!--IsNotHiddenStart-->', '', $html);
|
||||
$html = str_replace('<!--IsNotHiddenEnd-->', '', $html);
|
||||
}
|
||||
}
|
||||
if ($_SERVER['is_guestup_path']||( $_SERVER['admin']&&isset($files['folder'])&&$_SERVER['ishidden']<4 )) {
|
||||
while (strpos($html, '<!--UploadJsStart-->')) {
|
||||
while (strpos($html, '<!--UploadJsStart-->')) $html = str_replace('<!--UploadJsStart-->', '', $html);
|
||||
while (strpos($html, '<!--UploadJsEnd-->')) $html = str_replace('<!--UploadJsEnd-->', '', $html);
|
||||
while (strpos($html, '<!--constStr@Calculate-->')) $html = str_replace('<!--constStr@Calculate-->', getconstStr('Calculate'), $html);
|
||||
}
|
||||
} else {
|
||||
$tmp[1] = 'a';
|
||||
while ($tmp[1]!='') {
|
||||
$tmp = splitfirst($html, '<!--UploadJsStart-->');
|
||||
$html = $tmp[0];
|
||||
$tmp = splitfirst($tmp[1], '<!--UploadJsEnd-->');
|
||||
$html .= $tmp[1];
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($files['children'])) {
|
||||
while (strpos($html, '<!--GuestUploadStart-->')) {
|
||||
$tmp = splitfirst($html, '<!--GuestUploadStart-->');
|
||||
@@ -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('<!--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 = 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');
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
$exts['img'] = ['ico', 'bmp', 'gif', 'jpg', 'jpeg', 'jpe', 'jfif', 'tif', 'tiff', 'png', 'heic', 'webp'];
|
||||
$exts['music'] = ['mp3', 'wma', 'flac', 'wav', 'ogg', 'm4a'];
|
||||
$exts['music'] = ['mp3', 'wma', 'flac', 'ape', 'wav', 'ogg', 'm4a'];
|
||||
$exts['office'] = ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx'];
|
||||
$exts['txt'] = ['txt', 'bat', 'sh', 'php', 'asp', 'js', 'json', 'html', 'c', 'md', 'py', 'omf'];
|
||||
$exts['txt'] = ['txt', 'bat', 'sh', 'php', 'asp', 'js', 'css', 'json', 'html', 'c', 'cpp', 'md', 'py', 'omf'];
|
||||
$exts['video'] = ['mp4', 'webm', 'mkv', 'mov', 'flv', 'blv', 'avi', 'wmv', 'm3u8', 'rm', 'rmvb'];
|
||||
$exts['zip'] = ['zip', 'rar', '7z', 'gz', 'tar'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user