akf-forum/views/admin.ejs
2022-04-06 22:49:16 +03:00

28 lines
750 B
Text

<!DOCTYPE html>
<html lang="en">
<%- include("extra/header", {title: "Admin panel!" }) %>
<body>
<%- include("extra/navbar", {user}) %>
<h1>Welcome to the admin panel of the forum, <%= user.name %>!</h1>
<form action="/admin/" method="POST">
<h2>Write an ID to give someone admin permissions:</h2>
<input name="userid"></input>
<hr>
<button class="buyuk" type="submit">Give admin permissions!</button>
</form>
<script>
if (<%= user2.admin %>)
alert("Making admin of '<%= user2.name %>' is success");
</script>
<%- include("extra/footer") %>
</body>
</html>