ENGO150 69824f6886
sending only needed request
(implemented is_admin from 1/2)
2024-05-22 21:20:26 +02:00

27 lines
774 B
HTML

<div id="info_pane">
<button onclick="update()" id="save_btn" class="btn">Uložit Změny</button>
</div>
<script>
var button_buffer = document.getElementById("info_pane").innerHTML;
$.ajax
({
url: "./res/forum/api/get_username.php",
success: function(result)
{
inject_info("#info_pane", result.username, button_buffer);
}
})
function update()
{
$.ajax
({
url: "./res/forum/api/get_username.php",
success: function(result)
{
update_user(result.username, null, document.getElementById("nickname").value, null, document.getElementById("sex").value,document.getElementById("bio").value, "user");
}
})
}
</script>