From 7fdde82f43705cabeffd339dfc2b44a9c7729e62 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Mon, 17 Feb 2020 03:19:55 -0600 Subject: [PATCH] Add files via upload --- function/common.php | 12 ++++++ function/normal.php | 89 +++++++++++++++++++++++++++++---------------- function/scf.php | 12 +----- 3 files changed, 71 insertions(+), 42 deletions(-) diff --git a/function/common.php b/function/common.php index 12b62d1..8584785 100644 --- a/function/common.php +++ b/function/common.php @@ -1,5 +1,17 @@ '; $html .= '
'; } - if (getConfig('SecretId')==''||getConfig('SecretKey')=='') $html .= ' - '.getconstStr('Create').' SecretId & SecretKey
-
-
'; $html .= '
'; $html .= ' @@ -280,17 +286,7 @@ language:
'; if (t.admin.value==\'\') { alert(\'input admin\'); return false; - }'; - if (getConfig('SecretId')==''||getConfig('SecretKey')=='') $html .= ' - if (t.SecretId.value==\'\') { - alert(\'input SecretId\'); - return false; } - if (t.SecretKey.value==\'\') { - alert(\'input SecretKey\'); - return false; - }'; - $html .= ' return true; } '; @@ -326,13 +322,10 @@ function RewriteEngineOn() function EnvOpt($function_name, $needUpdate = 0) { global $constStr; - $constEnv = [ - //'admin', - 'adminloginpage', 'domain_path', 'guestup_path', 'passfile', - //'private_path', - 'public_path', 'sitename', 'language', 'theme' - ]; - asort($constEnv); + global $commonEnv; + global $innerEnv; + asort($commonEnv); + asort($innerEnv); $html = 'OneManager '.getconstStr('Setup').''; /*if ($_POST['updateProgram']==getconstStr('updateProgram')) { $response = json_decode(updataProgram($function_name, $Region, $namespace), true)['Response']; @@ -352,13 +345,14 @@ namespace:' . $namespace . '
return message($html, $title); }*/ if ($_POST['submit1']) { + $_SERVER['disk_oprating'] = ''; foreach ($_POST as $k => $v) { - if (in_array($k, $constEnv)) { - //if (!(getConfig($k)==''&&$v=='')) + if (in_array($k, $commonEnv)||in_array($k, $innerEnv)||$k=='disktag_del' || $k=='disktag_add') { $tmp[$k] = $v; } + if ($k == 'disk') $_SERVER['disk_oprating'] = $v; } - if ($tmp['domain_path']!='') { + /*if ($tmp['domain_path']!='') { $tmp1 = explode("|",$tmp['domain_path']); $tmparr = []; foreach ($tmp1 as $multidomain_paths){ @@ -366,8 +360,8 @@ namespace:' . $namespace . '
if ($pos>0) $tmparr[substr($multidomain_paths, 0, $pos)] = path_format(substr($multidomain_paths, $pos+1)); } $tmp['domain_path'] = $tmparr; - } - $response = setConfig($tmp); + }*/ + $response = setConfig($tmp, $_SERVER['disk_oprating']); if (!$response) { $html = $response . '
'; @@ -393,9 +387,12 @@ namespace:' . $namespace . '
$html .= getconstStr('NotNeedUpdate'); }*/ $html .= ' -
- '; - foreach ($constEnv as $key) { + +
+ + + '; + foreach ($commonEnv as $key) { if ($key=='language') { $html .= ' @@ -444,8 +441,38 @@ namespace:' . $namespace . '
'; } - $html .= '
平台变量:
- + $html .= ' + +
'; + foreach (explode("|",getConfig('disktag')) as $disktag) { + if ($disktag!='') { + $html .= ' + + + + + + + + '; + foreach ($innerEnv as $key) { + $html .= ' + + + + '; + } + $html .= ' + + +
'.$disktag.': + + +
'; + } + } + $html .= ' + Add Disk'; return message($html, getconstStr('Setup')); } diff --git a/function/scf.php b/function/scf.php index ffaeeb0..2aef9c4 100644 --- a/function/scf.php +++ b/function/scf.php @@ -1,4 +1,5 @@