www_archline_hu/cadline/docroot/iskolak/login.php
LÁZÁR Imre AI Agent 82dd7d89d8 feat(cadline): add Cadline docroot apps + root PHPs
Docroot sub-apps beiratkozas/, iskolak/, phpext/; root PHPs crashadmin.php, crm_hardlock.class.php, login-external.php, tips.php, recaptchalib.php, configuration.php (74-byte MightySites multi-site stub, legit). public/ excluded (user data, ~219k files).

Signed-off-by: LÁZÁR Imre <imre@illusion.hu>
Assisted-by: claude-code@claude-opus-4-8
2026-07-16 11:34:31 +02:00

93 lines
2.9 KiB
PHP

<?php
if ($_SERVER['HTTP_HOST'] == 'www.archline.hu')
require_once('language/hu-HU.lang.php');
else
require_once('language/en-GB.lang.php');
error_reporting(E_ERROR | E_PARSE);
session_start();
if (isset($_SESSION['username'])) header("location: index");
$error = '';
if (isset($_POST['submit'])) {
if (!class_exists('Login'))
require_once("../common_cadline_libraries/crm_users.class.php");
$login = new Login($_POST["username"], $_POST["password"]);
if ($login->verifyPassword()) {
$_SESSION['username'] = $login->getUsername();
if ($_SERVER['HTTP_HOST'] == 'www.archline.hu')
header("location: https://" . $_SERVER['HTTP_HOST'] . "/iskolak/");
else
header("location: https://" . $_SERVER['HTTP_HOST'] . "/school/");
} else {
$error = $loginPage['login_error'];
}
}
?>
<html>
<head>
<style media="screen">
.col-centered {
float: none;
margin: 0 auto;
}
.alert {
margin-left: 3% !important;
}
</style>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="<?= $home['favicon'] ?>" type="image/vnd.microsoft.icon" />
<link rel="stylesheet" href="public/css/bootstrap.min.css?<?= time() ?>" type="text/css" />
<link rel="stylesheet" href="public/css/main.css" type="text/css" />
<title><?= $loginPage['login'] ?></title>
</head>
<body>
<form action="" method="POST" id="login-form">
<div class="container">
<div class="col-md-6 col-centered">
<?php if ($error != "") : ?>
<div class="alert alert-danger col-md-8" role="alert">
<?= $error ?>
</div>
<?php endif; ?>
<div class="row">
<div id="form-login-username" class="form-group col-md-9">
<input id="modlgn-username" type="text" name="username" class="form-control" tabindex="0" size="18" placeholder="<?= $loginPage['username'] ?>" required />
</div>
</div>
<div class="row">
<div id="form-login-password" class="form-group col-md-9">
<div class="controls">
<input id="modlgn-passwd" type="password" name="password" class="form-control" tabindex="0" size="18" placeholder="<?= $loginPage['password'] ?>" required />
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<input type="submit" value="<?= $loginPage['login'] ?>" class="btn btn-primary" id="loginbtn" name="submit" />
</div>
</div>
</div>
</div>
</form>
<script>
document.getElementById("modlgn-username").focus();
</script>
</body>
</html>