akf-forum/views/admin.ejs

28 lines
718 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">
<h2>Write an ID for make admin:</h2>
<input name="userid"></input>
<hr>
<button class="buyuk" type="submit">Make admin!</button>
</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-03-13 16:06:25 +03:00
</html>