diff --git a/res/forum/admin/admin.html b/res/forum/admin/admin.html
index 3a532c1..9e41652 100644
--- a/res/forum/admin/admin.html
+++ b/res/forum/admin/admin.html
@@ -35,7 +35,7 @@
username = event.target.innerHTML;
- inject_info("#right_panel", username);
+ inject_info("#right_panel", username, right_panel_buffer);
});
function remove_user()
@@ -84,26 +84,4 @@
})
});
}
-
- function inject_info(id, username)
- {
- $.ajax
- ({
- url: "./res/forum/api/user_info.php?username=" + username,
- success: async function(result)
- {
- let admin_select = await selection("admin", result.admin);
- let sex_select = await selection("sex", result.sex);
-
- let output =
- `Uživatelské jméno:
- Přezdívka:
- Admin: ${admin_select}
- Pohlaví: ${sex_select}
- Bio:
`;
-
- $(id).html(output + right_panel_buffer);
- }
- });
- }
\ No newline at end of file
diff --git a/res/forum/script.js b/res/forum/script.js
index 4633980..3809daf 100644
--- a/res/forum/script.js
+++ b/res/forum/script.js
@@ -13,4 +13,26 @@ function show(file)
$("#main_panel").html(main_panel_buffer + data);
}
});
+}
+
+function inject_info(id, username, postfix)
+{
+ $.ajax
+ ({
+ url: "./res/forum/api/user_info.php?username=" + username,
+ success: async function(result)
+ {
+ let admin_select = await selection("admin", result.admin);
+ let sex_select = await selection("sex", result.sex);
+
+ let output =
+ `Uživatelské jméno:
+ Přezdívka:
+ Admin: ${admin_select}
+ Pohlaví: ${sex_select}
+ Bio:
`;
+
+ $(id).html(output + postfix);
+ }
+ });
}
\ No newline at end of file