v1.2 initial commit

This commit is contained in:
2026-05-10 21:40:25 +02:00
commit 1a5dfda288
995 changed files with 242075 additions and 0 deletions

View File

@@ -0,0 +1,120 @@
<?php
session_start();
if (isset($_SESSION['user']['user_uuid'])) {
header('Location: /');
exit;
}
include_once $_SERVER['DOCUMENT_ROOT'] . '/login/php/authFunctions.php';
$loginAttempts = checkLoginAttempts();
?>
<!DOCTYPE html>
<html data-coreui-theme="dark" lang="en">
<head>
<base href="./">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<meta name="description" content="Sentri - Configure phone configs">
<meta name="author" content="Marco Mooij">
<meta name="keyword" content="sentri">
<title>Sentri | Login</title>
<!-- favicon -->
<link rel="icon" type="image/png" href="/src/images/favicon/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/svg+xml" href="/src/images/favicon/favicon-96x96.png">
<link rel="shortcut icon" href="/src/images/favicon/favicon.ico">
<link rel="apple-touch-icon" sizes="180x180" href="/src/images/favicon/apple-touch-icon.png">
<link rel="manifest" href="/src/images/favicon/site.webmanifest">
<style>
body {
font-family: Arial, sans-serif;
background-color: #1d222b;
}
.portal-image {
width: 100%;
height: auto;
aspect-ratio: 3 / 1;
object-fit: contain;
display: block;
min-height: 200px; /* Prevent layout shift during image load */
}
#code-container {
display: flex;
justify-content: center;
gap: 10px;
}
.code-input {
width: 40px;
height: 40px;
font-size: 24px;
text-align: center;
margin: 5px;
}
</style>
<link rel="stylesheet" href="css/style.full.css" as="style">
</head>
<body>
<div class="bg-body-tertiary min-vh-100 d-flex flex-row align-items-center">
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-8 col-md-10 col-12 d-flex align-items-center justify-content-center">
<div class="card-group d-block d-md-flex row">
<div class="card col-md-7 mb-0">
<div class="card-body p-3">
<div class="card-body justify-content-center align-items-center">
<?php if (isset($_GET['result'])) {
if ($_GET['result'] == "success") { ?>
<h1 class="">Request sent!</h1>
<p class="">If an account with that email address exists, weve sent a password reset link to your inbox. Please check your email.</p>
<hr>
<a href="/login/" class="btn btn-primary px-4">
<i class="fa-solid fa-check"></i> Go to login
</a>
<?php } elseif ($_GET['result'] == "failed") { ?>
<h1 class="text-center">Something went wrong :(</h1>
<p class="text-center">Something went wrong in requesting your forgotten password. Please contact support!</p>
<?php } elseif ($_GET['result'] == "blocked") { ?>
<h1 class="text-center">Blocked</h1>
<p class="text-center">Youve been temporarily blocked after multiple failed login attempts. Please try again later or contact support.</p>
<?php } ?>
<?php } else { ?>
<h1>Forgot password</h1>
<p>Enter your email and well send you a reset link.</p>
<hr>
<form method="post" action="/login/php/forgotPasswordRequest.php">
<div class="mb-3 text-reset">
<label for="email" class="form-label">Email</label>
<input type="email" class="form-control" name="user_email" id="email" placeholder="somebody@somewhere.what" required>
</div>
<button type="submit" class="btn btn-primary w-100" id="submitBtn">
<i class="fa-solid fa-envelope"></i> Request email
</button>
</form>
<?php } ?>
</div>
</div>
</div>
<div class="card col-md-5 text-white bg-transparent py-5">
<div class="card-body text-center pt-5">
<div>
<img class="pt-3 w-100 portal-image" alt="portal-image" src="/src/images/logo-login-dark.webp" width="500" height="265" style="height: auto;">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
</body>
</html>