2017-08-25 13:59:19 +02:00
|
|
|
<?php
|
|
|
|
/* μlogger
|
|
|
|
*
|
|
|
|
* Copyright(C) 2017 Bartek Fabiszewski (www.fabiszewski.net)
|
|
|
|
*
|
|
|
|
* This is free software; you can redistribute it and/or modify it under
|
|
|
|
* the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
require_once("helpers/auth.php");
|
2019-02-25 10:04:09 +01:00
|
|
|
require_once(ROOT_DIR . "/helpers/lang.php");
|
2017-08-25 13:59:19 +02:00
|
|
|
require_once(ROOT_DIR . "/helpers/config.php");
|
|
|
|
|
2019-01-24 19:07:41 +01:00
|
|
|
$auth_error = uUtils::getBool('auth_error', false);
|
2019-02-25 10:04:09 +01:00
|
|
|
|
|
|
|
$lang = (new uLang(uConfig::$lang))->getStrings();
|
2017-08-25 13:59:19 +02:00
|
|
|
|
|
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
2019-05-15 11:32:36 +02:00
|
|
|
<html lang="<?= uConfig::$lang ?>">
|
2017-08-25 13:59:19 +02:00
|
|
|
<head>
|
|
|
|
<title><?= $lang["title"] ?></title>
|
|
|
|
<?php include("meta.php"); ?>
|
|
|
|
<script type="text/javascript">
|
|
|
|
function focus() {
|
|
|
|
document.forms[0].elements[0].focus();
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body onload="focus()">
|
|
|
|
<div id="login">
|
|
|
|
<div id="title"><?= $lang["title"] ?></div>
|
|
|
|
<div id="subtitle"><?= $lang["private"] ?></div>
|
2017-09-07 18:09:36 +02:00
|
|
|
<form action="<?= BASE_URL ?>" method="post">
|
2019-05-15 11:32:36 +02:00
|
|
|
<label for="login-user"><?= $lang["username"] ?></label><br>
|
|
|
|
<input id="login-user" type="text" name="user" required><br>
|
|
|
|
<label for="login-pass"><?= $lang["password"] ?></label><br>
|
|
|
|
<input id="login-pass" type="password" name="pass" required><br>
|
|
|
|
<br>
|
|
|
|
<input type="submit" value="<?= $lang["login"] ?>">
|
|
|
|
<input type="hidden" name="action" value="auth">
|
|
|
|
<?php if (!uConfig::$require_authentication): ?>
|
|
|
|
<div id="cancel"><a href="<?= BASE_URL ?>"><?= $lang["cancel"] ?></a></div>
|
|
|
|
<?php endif; ?>
|
2017-08-25 13:59:19 +02:00
|
|
|
</form>
|
2019-05-15 11:32:36 +02:00
|
|
|
<?php if ($auth_error): ?>
|
|
|
|
<div id="error"><?= $lang["authfail"] ?></div>
|
|
|
|
<?php endif; ?>
|
2017-08-25 13:59:19 +02:00
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|