implemented user update api in admin
This commit is contained in:
parent
c57a169134
commit
edb5c241d9
@ -4,7 +4,7 @@
|
||||
</div>
|
||||
<div id="right_panel">
|
||||
<div id="buttons">
|
||||
<button class="btn">Uložit Změny</button>
|
||||
<button onclick="update_user()" class="btn">Uložit Změny</button>
|
||||
<button onclick="remove_user()" class="btn">Odstranit Uživatele</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user