diff --git a/common.php b/common.php index 7e3c1dd..92b0631 100644 --- a/common.php +++ b/common.php @@ -323,7 +323,7 @@ function main($path) $path1 = path_format($_SERVER['list_path'] . path_format($path)); if ($path1!='/'&&substr($path1,-1)=='/') $path1=substr($path1, 0, -1); $files = $drive->list_files($path1); - } + } } else { $path1 = path_format($_SERVER['list_path'] . path_format($path)); if ($path1!='/'&&substr($path1,-1)=='/') $path1=substr($path1, 0, -1); @@ -723,9 +723,13 @@ function gethiddenpass($path,$passfile) if ($arr['stat']==200) { $passwordf=explode("\n",$arr['body']); $password=$passwordf[0]; - if ($password!='') $password=md5($password); - savecache('path_' . $path1 . '/?password', $password, $_SERVER['disktag']); - return $password; + if ($password==='') { + return ''; + } else { + $password=md5($password); + savecache('path_' . $path1 . '/?password', $password, $_SERVER['disktag']); + return $password; + } } else { //return md5('DefaultP@sswordWhenNetworkError'); return md5( md5(time()).rand(1000,9999) ); @@ -1669,6 +1673,30 @@ 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]; + } + while (strpos($html, '')) { + $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, '')) { + $tmp = splitfirst($html, ''); + $html = $tmp[0]; + $tmp = splitfirst($tmp[1], ''); + $html .= $tmp[1]; + } } else { while (strpos($html, '')) { $tmp = splitfirst($html, '');