moved update_user fn to forum script
This commit is contained in:
parent
c96b0efceb
commit
b302d50a4e
@ -4,7 +4,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="right_panel">
|
<div id="right_panel">
|
||||||
<div id="buttons">
|
<div id="buttons">
|
||||||
<button onclick="update_user()" class="btn">Uložit Změny</button>
|
<button onclick="update()" class="btn">Uložit Změny</button>
|
||||||
<button onclick="remove_user()" class="btn">Odstranit Uživatele</button>
|
<button onclick="remove_user()" class="btn">Odstranit Uživatele</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -51,21 +51,8 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_user()
|
function update()
|
||||||
{
|
{
|
||||||
$.ajax
|
update_user(username, document.getElementById("username").value, document.getElementById("nickname").value, document.getElementById("admin").value, document.getElementById("sex").value,document.getElementById("bio").value, "admin");
|
||||||
({
|
|
||||||
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");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
@ -52,3 +52,21 @@ function inject_info(id, username, postfix)
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function update_user(old_username, username, nickname, admin, sex, bio, refresh)
|
||||||
|
{
|
||||||
|
$.ajax
|
||||||
|
({
|
||||||
|
url: "./res/forum/api/update_user.php" +
|
||||||
|
"?old_username=" + old_username +
|
||||||
|
"&username=" + username +
|
||||||
|
"&nickname=" + nickname +
|
||||||
|
"&admin=" + admin +
|
||||||
|
"&sex=" + sex +
|
||||||
|
"&bio=" + bio,
|
||||||
|
success: function(result)
|
||||||
|
{
|
||||||
|
show(refresh);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user