Finish login
This commit is contained in:
@@ -51,6 +51,10 @@ a {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.message_red {
|
||||
color: red;
|
||||
}
|
||||
|
||||
input {
|
||||
border: 1px solid #e0e0e0;
|
||||
width: 200px;
|
||||
|
||||
@@ -20,8 +20,8 @@ if (!$mcServ->checkConf()) {
|
||||
}
|
||||
|
||||
if (!$mcServ->checkLogin()) {
|
||||
/*header("Location: /login.php");
|
||||
exit;*/
|
||||
header("Location: /login.php");
|
||||
exit;
|
||||
}else{
|
||||
echo "angemeldet";
|
||||
}
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
<?php
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
if (!isset($_POST["username"]) || !isset($_GET["passwd"])) {
|
||||
die("Username or Password are missing");
|
||||
require "../main.php";
|
||||
|
||||
$mcServ = new mcServ();
|
||||
|
||||
if (isset($_GET["action"])) {
|
||||
if ($_GET["action"] == "logout") {
|
||||
setcookie("username", "", time() - 3600, "/");
|
||||
setcookie("session_id", "", time() - 3600, "/");
|
||||
setcookie("device_id", "", time() - 3600, "/");
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -20,10 +26,16 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
<h2>Login</h2>
|
||||
</div>
|
||||
<div class="content">
|
||||
<form action="/api/setup/setup.php" method="post">
|
||||
<div id="admin_user" class="page">
|
||||
<form action="/api/login/getcookies.php" method="post">
|
||||
<div class="page">
|
||||
<a href="/resetpasswd.php">Forget Passwort?</a>
|
||||
|
||||
<?php
|
||||
if (isset($_GET["passwdIsFalse"])) {
|
||||
echo '<p class="message_red">Invalid username or password</p>';
|
||||
}
|
||||
?>
|
||||
|
||||
<input type="text" name="username" placeholder="Username" id="user" required><br><br>
|
||||
<input type="password" name="passwd" placeholder="Password" id="passwd" required><br><br>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user