akf-forum/views/admin.ejs

28 lines
No EOL
718 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 for make admin:</h2>
<input name="userid"></input>
<hr>
<button class="buyuk" type="submit">Make admin!</button>
</form>
<script>
if (<%= user2.admin %>)
alert("Making admin of '<%= user2.name %>' is success");
</script>
<%- include("extra/footer") %>
</body>
</html>