c7984873c0
added example login
20 lines
558 B
PHP
20 lines
558 B
PHP
<?php
|
|
|
|
use Venom\Models\User;
|
|
use \Venom\Security\Security;
|
|
|
|
if (!Security::get()->hasRole(User::ADMIN_ROLE)) {
|
|
?>
|
|
<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
|
|
echo 'Login!';
|
|
} else {
|
|
echo 'Admin Interface!';
|
|
echo '<a href="/admin/api/login/logout">Ausloggen</a>';
|
|
}
|