Adding all Admin stuff
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
require_once("/var/www/furatalog/data/script/furatalog.sessions.php");
|
||||
$fs = new furatalogSessions();
|
||||
|
||||
if (isset($_GET["ref"])) {
|
||||
$fs->setSessionData("ref", $_GET["ref"]);
|
||||
}
|
||||
|
||||
if (isset($_POST["username"]) && isset($_POST["password"])) {
|
||||
if ($_POST["username"] == "SiskelDev" && password_verify($_POST["password"], "\$2y\$10\$uhkbDXtndzyDKsJh7d14HOBE7JoWiqYQPx3r88xDhWHnL9W4t4OJa")) {
|
||||
$fs->setSessionData("login", "true-as-hell");
|
||||
$redirect = $fs->issetSessionData("ref") ? $fs->getSessionData("ref") : "index";
|
||||
$fs->unsetSessionData("ref");
|
||||
header("Location: " . $redirect . ".php");
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
if ($fs->issetSessionData("login") && ($fs->getSessionData("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>
|
||||
Reference in New Issue
Block a user