From 0794b18efc21cf0fec2e2a37964b5fa42ce28e74 Mon Sep 17 00:00:00 2001 From: KasuganoSoras Date: Sun, 7 Oct 2018 14:31:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=8B=E6=AE=8Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 不小心误删了保存设置的代码233 --- content/PHPMC7/setting.html | 21 +++++++++++++++++++++ include/core/PHPMC/Main.php | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/content/PHPMC7/setting.html b/content/PHPMC7/setting.html index e080a9a..c0f4a17 100644 --- a/content/PHPMC7/setting.html +++ b/content/PHPMC7/setting.html @@ -102,6 +102,27 @@ } }); } + function saveConfig() { + var htmlobj = $.ajax({ + url: "/?action=saveconfig", + async:true, + timeout:5000, + data: { + SiteName: $("#SiteName").val(), + Description: $("#Description").val(), + Theme: $("#Theme").val() + }, + error: function() { + window.parent.frames.showmsg(htmlobj.responseText); + }, + success: function() { + console.log(htmlobj.responseText); + window.parent.frames.showmsg(htmlobj.responseText); + location = '?page=setting' + return; + } + }); + } window.onload = function() { checkUpdate(); } diff --git a/include/core/PHPMC/Main.php b/include/core/PHPMC/Main.php index 7e7e580..d234c90 100644 --- a/include/core/PHPMC/Main.php +++ b/include/core/PHPMC/Main.php @@ -1,7 +1,7 @@