using the user_info json output
This commit is contained in:
parent
08d67f19a2
commit
859b3d5f07
@ -42,7 +42,25 @@
|
|||||||
url: "./res/forum/api/user_info.php?username=" + event.target.innerHTML,
|
url: "./res/forum/api/user_info.php?username=" + event.target.innerHTML,
|
||||||
success: function(result)
|
success: function(result)
|
||||||
{
|
{
|
||||||
$("#right_panel").html(result + right_panel_buffer);
|
var sex_codes =
|
||||||
|
{
|
||||||
|
0: "Nespecifikováno",
|
||||||
|
1: "Muž",
|
||||||
|
2: "Žena",
|
||||||
|
9: "Jiné",
|
||||||
|
default: "???"
|
||||||
|
};
|
||||||
|
|
||||||
|
let sex = sex_codes[result.sex] || sex_codes.default;
|
||||||
|
|
||||||
|
let output =
|
||||||
|
`Uživatelské jméno: ${result.username}<br>
|
||||||
|
Přezdívka: ${result.nickname}<br>
|
||||||
|
Admin: ${result.admin}<br>
|
||||||
|
Pohlaví: ${sex}<br>
|
||||||
|
Bio: ${result.bio}<br>`;
|
||||||
|
|
||||||
|
$("#right_panel").html(output + right_panel_buffer);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user