diff --git a/index.php b/index.php index bb459d1..a23f2ab 100644 --- a/index.php +++ b/index.php @@ -24,6 +24,7 @@ function main($path) global $exts; global $constStr; config_oauth(); + if ($_SERVER['base_path']=='') $_SERVER['base_path'] = '/'; $_SERVER['list_path'] = getListpath($_SERVER['HTTP_HOST']); if ($_SERVER['list_path']=='') $_SERVER['list_path'] = '/'; $_SERVER['is_guestup_path'] = is_guestup_path($path); @@ -194,7 +195,7 @@ function EnvOpt($function_name, $needUpdate = 0) global $constStr; $constEnv = [ //'admin', - 'adminloginpage', 'domain_path', 'imgup_path', 'passfile', 'private_path', 'public_path', 'sitename', 'language' + 'adminloginpage', 'domain_path', 'guestup_path', 'passfile', 'private_path', 'public_path', 'sitename', 'language' ]; asort($constEnv); $html = 'Heroku '.$constStr['Setup'][$constStr['language']].''; @@ -728,7 +729,7 @@ function render_list($path, $files)
+ if ($_SERVER['is_guestup_path']&&!$_SERVER['admin']) { ?>
@@ -1340,7 +1341,7 @@ function render_list($path, $files) document.getElementById('mask').style.display='none'; } + if (isset($files['folder']) && ($_SERVER['is_guestup_path'] || $_SERVER['admin'])) { // is folder and is admin or guest upload path. 当前是admin登录或图床目录时 ?> function uploadbuttonhide() { document.getElementById('upload_submit').disabled='disabled'; document.getElementById('upload_file').disabled='disabled';