Folder reorganize 1
This commit is contained in:
106
index.php
106
index.php
@@ -1,11 +1,97 @@
|
||||
<?php
|
||||
if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
|
||||
$uri = 'https://';
|
||||
} else {
|
||||
$uri = 'http://';
|
||||
}
|
||||
$uri .= $_SERVER['HTTP_HOST'];
|
||||
header('Location: '.$uri.'/controls/');
|
||||
exit;
|
||||
<?php // phpcs:ignoreFile
|
||||
|
||||
$assetVersion = '2025.10.06.3';
|
||||
$errorMessage = null;
|
||||
|
||||
if (!empty($_GET['error'])) {
|
||||
$errorKey = $_GET['error'];
|
||||
|
||||
switch ($errorKey) {
|
||||
case 'pleaselogin':
|
||||
$errorMessage = 'We couldn\'t sign you in. Check your username and password, then try again.';
|
||||
break;
|
||||
case 'noinput':
|
||||
$errorMessage = 'Enter both your username and password before signing in.';
|
||||
break;
|
||||
case 'invalidlogin':
|
||||
$errorMessage = 'Those credentials didn\'t match our records. Double-check your username and password.';
|
||||
break;
|
||||
case 'servererror':
|
||||
$errorMessage = 'We\'re having trouble reaching the login service. Please try again in a moment.';
|
||||
break;
|
||||
default:
|
||||
$errorMessage = 'We couldn\'t sign you in right now. Please try again.';
|
||||
}
|
||||
}
|
||||
?>
|
||||
Something is wrong with the XAMPP installation :-(
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Sign in | LASUCA Controls</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
|
||||
rel="stylesheet"
|
||||
>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="style.css?v=<?php echo rawurlencode($assetVersion); ?>"
|
||||
>
|
||||
</head>
|
||||
<body class="login-body">
|
||||
<div class="login-actions">
|
||||
<?php require __DIR__ . '/darkmode.php'; ?>
|
||||
</div>
|
||||
|
||||
<main class="login-card" aria-labelledby="login-title">
|
||||
<span class="login-card__badge">LASUCA Controls</span>
|
||||
|
||||
<header class="login-card__header">
|
||||
<h1 class="login-card__title" id="login-title">Sign in</h1>
|
||||
<p class="login-card__subtitle">Access live dashboards, historian tools, and production analytics.</p>
|
||||
</header>
|
||||
|
||||
<?php if ($errorMessage) : ?>
|
||||
<div class="login-card__alert" role="alert">
|
||||
<span aria-hidden="true">⚠️</span>
|
||||
<span><?php echo htmlspecialchars($errorMessage); ?></span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form
|
||||
class="login-form"
|
||||
id="loginForm"
|
||||
method="post"
|
||||
action="login/function.php"
|
||||
novalidate
|
||||
>
|
||||
<div class="login-form__field">
|
||||
<label for="login">Username</label>
|
||||
<input
|
||||
type="text"
|
||||
name="login"
|
||||
id="login"
|
||||
autocomplete="username"
|
||||
required
|
||||
>
|
||||
</div>
|
||||
<div class="login-form__field">
|
||||
<label for="password">Password</label>
|
||||
<input
|
||||
type="password"
|
||||
name="password"
|
||||
id="password"
|
||||
autocomplete="current-password"
|
||||
required
|
||||
>
|
||||
</div>
|
||||
<button type="submit" name="submit" class="button button--full">Sign in</button>
|
||||
</form>
|
||||
|
||||
<p class="login-card__footer">Need access? Contact the control room or your shift supervisor.</p>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user