2025-05-20 12:21:13 +02:00
|
|
|
<?php
|
2025-07-19 15:57:10 +02:00
|
|
|
require_once("/var/www/furatalog/data/script/furatalog.sessions.php");
|
|
|
|
|
$fs = new furatalogSessions();
|
2025-05-20 12:21:13 +02:00
|
|
|
|
|
|
|
|
if (isset($_GET["ref"])) {
|
2025-07-19 16:14:26 +02:00
|
|
|
//$_SESSION["ref"] = $_GET["ref"];
|
|
|
|
|
$fs->setSessionData("ref", $_GET["ref"]);
|
2025-05-20 12:21:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isset($_POST["username"]) && isset($_POST["password"])) {
|
|
|
|
|
if ($_POST["username"] == "SiskelDev" && password_verify($_POST["password"], "\$2y\$10\$uhkbDXtndzyDKsJh7d14HOBE7JoWiqYQPx3r88xDhWHnL9W4t4OJa")) {
|
2025-07-19 15:57:10 +02:00
|
|
|
//$_SESSION["login"] = "true-as-hell";
|
|
|
|
|
$fs->setSessionData("login", "true-as-hell");
|
|
|
|
|
//$redirect = isset($_SESSION["ref"]) ? $_SESSION["ref"] : "index";
|
2025-07-19 16:25:27 +02:00
|
|
|
$redirect = $fs->issetSessionData("ref") ? $fs->getSessionData("ref") : "index";
|
2025-07-19 15:57:10 +02:00
|
|
|
//unset($_SESSION["ref"]);
|
|
|
|
|
$fs->unsetSessionData("ref");
|
2025-05-20 12:21:13 +02:00
|
|
|
header("Location: " . $redirect . ".php");
|
|
|
|
|
die();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-07-19 15:57:10 +02:00
|
|
|
/*if (isset($_SESSION["login"]) && $_SESSION["login"] == "true-as-hell") {
|
2025-05-20 12:21:13 +02:00
|
|
|
header("Location: index.php");
|
|
|
|
|
die();
|
2025-07-19 15:57:10 +02:00
|
|
|
}*/
|
|
|
|
|
|
2025-07-19 16:23:56 +02:00
|
|
|
if ($fs->issetSessionData("login") && ($fs->getSessionData("login") == "true-as-hell")) {
|
2025-07-19 16:08:42 +02:00
|
|
|
header("Location: index.php");
|
2025-07-19 15:57:10 +02:00
|
|
|
die();
|
2025-05-20 12:21:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!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>
|