diff --git a/common.php b/common.php index f694199..6080a00 100644 --- a/common.php +++ b/common.php @@ -1979,7 +1979,8 @@ function render_list($path = '', $files = '') $html .= $tmp[1]; } } - + while (strpos($html, '')) $html = str_replace('', getconstStr('Download'), $html); + if (isset($files['children'])) { while (strpos($html, '')) { $tmp = splitfirst($html, ''); @@ -2039,6 +2040,10 @@ function render_list($path = '', $files = '') $filenum++; $ext = strtolower(substr($file['name'], strrpos($file['name'], '.') + 1)); $FolderListStr = str_replace('', path_format($_SERVER['base_disk_path'] . '/' . $path . '/' . encode_str_replace($file['name'])), $FolderList); + $FolderListStr = str_replace('', $ext, $FolderListStr); + if (in_array($ext, $exts['music'])) $FolderListStr = str_replace('', 'audio', $FolderListStr); + elseif (in_array($ext, $exts['video'])) $FolderListStr = str_replace('', 'iframe', $FolderListStr); + else $FolderListStr = str_replace('', '', $FolderListStr); $FolderListStr = str_replace('', str_replace('&','&', $file['name']), $FolderListStr); //$FolderListStr = str_replace('', path_format($_SERVER['base_disk_path'] . '/' . $path . '/' . str_replace('&','&', $file['name'])), $FolderListStr); $FolderListStr = str_replace('', time_format($file['lastModifiedDateTime']), $FolderListStr); @@ -2152,7 +2157,6 @@ function render_list($path = '', $files = '') } $html = str_replace('', str_replace('%2523', '%23', str_replace('%26amp%3B','&',spurlencode(path_format($_SERVER['base_disk_path'] . '/' . $path), '/'))), $html); $html = str_replace('', path_format($_SERVER['base_disk_path'] . '/' . $path), $html); - $html = str_replace('', getconstStr('Download'), $html); $ext = strtolower(substr($path, strrpos($path, '.') + 1)); if (in_array($ext, $exts['img'])) $ext = 'img';