From edb5c241d973dd6449925e3c3d6831e362a71f59 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Wed, 22 May 2024 17:25:34 +0200 Subject: [PATCH] implemented user update api in admin --- res/forum/admin/admin.html | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/res/forum/admin/admin.html b/res/forum/admin/admin.html index 3eb2cdf..ceea4fe 100644 --- a/res/forum/admin/admin.html +++ b/res/forum/admin/admin.html @@ -4,7 +4,7 @@
- +
@@ -68,6 +68,24 @@ }); } + function update_user() + { + $.ajax + ({ + url: "./res/forum/api/update_user.php" + + "?old_username=" + username + + "&username=" + document.getElementById("username").value + + "&nickname=" + document.getElementById("nickname").value + + "&admin=" + document.getElementById("admin").value + + "&sex=" + document.getElementById("sex").value + + "&bio=" + document.getElementById("bio").value, + success: function(result) + { + show("admin"); + } + }); + } + function selection(type, value) { return new Promise(function(resolve)