venom/tpl/admin/base.php

20 lines
558 B
PHP
Raw Normal View History

2020-09-25 21:33:54 +02:00
<?php
use Venom\Models\User;
use \Venom\Security\Security;
if (!Security::get()->hasRole(User::ADMIN_ROLE)) {
2020-09-25 22:33:35 +02:00
?>
<form method="post" action="/admin/api/login">
<input type="text" name="USERNAME" placeholder="Username">
<input type="password" name="PASSWORD" placeholder="Password">
<input type="hidden" name="REDIRECT_TO" value="/admin/">
<input type="submit" value="Login">
</form>
<?php
2020-09-25 21:33:54 +02:00
echo 'Login!';
} else {
echo 'Admin Interface!';
2020-09-25 22:33:35 +02:00
echo '<a href="/admin/api/login/logout">Ausloggen</a>';
2020-09-25 21:33:54 +02:00
}