akf-forum/views/admin.ejs

29 lines
750 B
Text
Raw Normal View History

2022-03-13 16:16:46 +03:00
<!DOCTYPE html>
<html lang="en">
2022-03-26 23:28:10 +03:00
<%- include("extra/header", {title: "Admin panel!" }) %>
2022-03-13 16:16:46 +03:00
2022-03-26 23:28:10 +03:00
<body>
2022-03-13 16:16:46 +03:00
2022-03-26 23:28:10 +03:00
<%- include("extra/navbar", {user}) %>
2022-03-13 16:16:46 +03:00
2022-03-26 23:28:10 +03:00
<h1>Welcome to the admin panel of the forum, <%= user.name %>!</h1>
2022-03-22 21:25:09 +03:00
2022-03-26 23:28:10 +03:00
<form action="/admin/" method="POST">
2022-04-06 22:49:16 +03:00
<h2>Write an ID to give someone admin permissions:</h2>
2022-03-26 23:28:10 +03:00
<input name="userid"></input>
<hr>
2022-04-06 22:49:16 +03:00
<button class="buyuk" type="submit">Give admin permissions!</button>
2022-03-26 23:28:10 +03:00
</form>
2022-03-22 21:25:09 +03:00
2022-03-26 23:28:10 +03:00
<script>
if (<%= user2.admin %>)
alert("Making admin of '<%= user2.name %>' is success");
</script>
2022-03-22 21:25:09 +03:00
2022-03-26 23:28:10 +03:00
<%- include("extra/footer") %>
2022-03-22 21:25:09 +03:00
2022-03-26 23:28:10 +03:00
</body>
2022-03-13 16:16:46 +03:00
2022-04-06 22:49:16 +03:00
</html>