From dd54c94d54fe895b6f4c7b3d9c20c26835393921 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Sun, 22 Mar 2020 10:19:59 +0800 Subject: [PATCH 1/5] change install in vps --- function/normal.php | 63 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 14 deletions(-) diff --git a/function/normal.php b/function/normal.php index e6bf1e8..e970fe0 100644 --- a/function/normal.php +++ b/function/normal.php @@ -115,7 +115,7 @@ function setConfig($arr, $disktag = '') function install() { global $constStr; - if ($_GET['install1']) { + if ($_GET['install2']) { if ($_POST['admin']!='') { $tmp['admin'] = $_POST['admin']; $tmp['language'] = $_POST['language']; @@ -129,27 +129,70 @@ function install() } } } - if ($_GET['install0']) { + if ($_GET['install1']) { if (!ConfigWriteable()) { $html .= getconstStr('MakesuerWriteable'); $title = 'Error'; return message($html, $title, 201); } - if (!RewriteEngineOn()) { + /*if (!RewriteEngineOn()) { $html .= getconstStr('MakesuerRewriteOn'); $title = 'Error'; return message($html, $title, 201); + }*/ + $html .= ' +
+ '; + $title = getconstStr('SetAdminPassword'); + return message($html, $title, 201); + } + if ($_GET['install0']) { $html .= ' - '; $title = getconstStr('SelectLanguage'); return message($html, $title, 201); From 4b177b1a65bc3450f1aa800f049c8244537ab23f Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Sun, 22 Mar 2020 10:28:20 +0800 Subject: [PATCH 2/5] Update normal.php --- function/normal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/function/normal.php b/function/normal.php index e970fe0..f8770ab 100644 --- a/function/normal.php +++ b/function/normal.php @@ -125,7 +125,7 @@ function install() $title = 'Error'; return message($html, $title, 201); } else { - return output('Jump', 302); + return output('Jump', 302); } } } From 9f604f047ee8a6a6d047c9e375f805401808d6ee Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Sun, 22 Mar 2020 10:30:18 +0800 Subject: [PATCH 3/5] Update scf.php --- function/scf.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/function/scf.php b/function/scf.php index 978eaac..7aaa711 100644 --- a/function/scf.php +++ b/function/scf.php @@ -132,9 +132,9 @@ function install() setConfig($tmp); if (needUpdate()) { updateProgram($_SERVER['function_name'], $_SERVER['Region'], $_SERVER['namespace'], $SecretId, $SecretKey); - return message('update to github version, reinstall.', 'Program updating', 201); + return message('update to github version, reinstall.', 'Program updating', 201); } - return output('Jump', 302); + return output('Jump', 302); } if ($_GET['install1']) { //if ($_POST['admin']!='') { @@ -166,7 +166,7 @@ function install() function notnull(t) { if (t.admin.value==\'\') { - alert(\'Input admin\'); + alert(\''.getconstStr('SetAdminPassword').'\'); return false; } return true; From be2b52f98b31953a951f6cad8a8ada906c23a6f1 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Sun, 22 Mar 2020 10:47:43 +0800 Subject: [PATCH 4/5] fix bug --- theme/classic.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/theme/classic.php b/theme/classic.php index 7f266b5..1f84ab6 100644 --- a/theme/classic.php +++ b/theme/classic.php @@ -705,8 +705,8 @@ tmptextarea.select(); tmptextarea.setSelectionRange(0, tmptextarea.value.length); document.execCommand("copy"); - alert(tmptextarea.innerHTML); - //alert('Success'); + //alert(tmptextarea.innerHTML); + alert('Success'); } var sort=0; function sortby(string) { @@ -999,6 +999,7 @@ //window.open(lasturl); document.getElementById('upfile_a_'+tdnum).href = lasturl; document.getElementById('upfile_a1_'+tdnum).href = filename; + document.getElementById('upfile_cpbt_'+tdnum).style.display = ""; } EndTime=new Date(); @@ -1008,7 +1009,7 @@ } else { MiddleStr += ':'+size_format((totalsize-newstartsize)*1000/(EndTime.getTime()-StartTime.getTime()))+'/s