52 lines
1.4 KiB
PHP
52 lines
1.4 KiB
PHP
|
|
<?php
|
||
|
|
session_start();
|
||
|
|
|
||
|
|
if (isset($_GET["ref"])) {
|
||
|
|
$_SESSION["ref"] = $_GET["ref"];
|
||
|
|
}
|
||
|
|
|
||
|
|
if (isset($_POST["username"]) && isset($_POST["password"])) {
|
||
|
|
if ($_POST["username"] == "SiskelDev" && password_verify($_POST["password"], "\$2y\$10\$uhkbDXtndzyDKsJh7d14HOBE7JoWiqYQPx3r88xDhWHnL9W4t4OJa")) {
|
||
|
|
$_SESSION["login"] = "true-as-hell";
|
||
|
|
$redirect = isset($_SESSION["ref"]) ? $_SESSION["ref"] : "index";
|
||
|
|
unset($_SESSION["ref"]);
|
||
|
|
header("Location: " . $redirect . ".php");
|
||
|
|
die();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
if (isset($_SESSION["login"]) && $_SESSION["login"] == "true-as-hell") {
|
||
|
|
header("Location: index.php");
|
||
|
|
die();
|
||
|
|
}
|
||
|
|
|
||
|
|
?>
|
||
|
|
|
||
|
|
|
||
|
|
<!DOCTYPE html>
|
||
|
|
<html>
|
||
|
|
<head>
|
||
|
|
<?php echo file_get_contents("/var/www/furatalog-cdn/mainHead.html"); ?>
|
||
|
|
<title>Admin Login</title>
|
||
|
|
<style>
|
||
|
|
html, body {
|
||
|
|
margin: 0;
|
||
|
|
height: 100%;
|
||
|
|
padding: 0;
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<div class="login-container">
|
||
|
|
<a class="backbutton" href="/">← Back to Furatalog</a>
|
||
|
|
<h1>Admin Login</h1>
|
||
|
|
<p>Please login to access the admin panel.</p>
|
||
|
|
<br>
|
||
|
|
<form action="login.php" method="post">
|
||
|
|
<input type="text" name="username" placeholder="Username" autoComplete='off'>
|
||
|
|
<input type="password" name="password" placeholder="Password" autoComplete='off'>
|
||
|
|
<input type="submit" value="Login">
|
||
|
|
</form>
|
||
|
|
</div>
|
||
|
|
</body>
|
||
|
|
</html>
|