Added support for Streamdeck Pedal and updated UI to better fit the Packed UI style
This commit is contained in:
42
pirp/public/login.php
Normal file
42
pirp/public/login.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/../src/config.php';
|
||||
require_once __DIR__ . '/../src/auth.php';
|
||||
|
||||
$error = '';
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$user = $_POST['username'] ?? '';
|
||||
$pass = $_POST['password'] ?? '';
|
||||
if (login($user, $pass)) {
|
||||
header('Location: ' . url_for('index.php'));
|
||||
exit;
|
||||
} else {
|
||||
$error = 'Login fehlgeschlagen.';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>PIRP Login</title>
|
||||
<link rel="stylesheet" href="assets/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="login-wrap">
|
||||
<div class="login-box">
|
||||
<h1>PIRP</h1>
|
||||
<?php if ($error): ?><p class="error"><?= htmlspecialchars($error) ?></p><?php endif; ?>
|
||||
<form method="post">
|
||||
<label>Benutzer:
|
||||
<input type="text" name="username" required autofocus>
|
||||
</label>
|
||||
<label>Passwort:
|
||||
<input type="password" name="password" required>
|
||||
</label>
|
||||
<button type="submit" style="width:100%;margin-top:4px;">Login</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user