im gonna marry christmas after im done commiting shit

This commit is contained in:
Mario 2023-01-25 22:06:20 +02:00 committed by GitHub
parent 5282fc056c
commit 4a93e2a541
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -1,13 +1,17 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>grublock | login</title>
<?php <?php
if(isset($_SESSION['user'])) {
header("Location: /home");
}
require_once 'core/classes.php'; require_once 'core/classes.php';
require_once 'core/classes/User.php'; require_once 'core/classes/User.php';
require_once 'core/config.php'; require_once 'core/config.php';
$getitstarted = new PartyStarter; $getitstarted = new PartyStarter;
$getitstarted->buildloggedoutheader(); $getitstarted->header();
$passwordiswrong = false; $passwordiswrong = false;
$user = new User($con, 0); $user = new User($con, 0);
if(isset($_POST['submit'])) { if(isset($_POST['submit'])) {
@ -23,7 +27,6 @@ if(isset($_POST['submit'])) {
if ($result > 0) { if ($result > 0) {
if ($password == $user->getPassword($con, $username)) { if ($password == $user->getPassword($con, $username)) {
$_SESSION["user"] = $user->getID($con, $username); $_SESSION["user"] = $user->getID($con, $username);
header("Location: /home");
} else { } else {
$passwordiswrong = true; $passwordiswrong = true;
echo $password." - sex - ".$user->getPassword($con, $username); echo $password." - sex - ".$user->getPassword($con, $username);
@ -63,4 +66,4 @@ echo "form-control form-control-sm";
</div> </div>
</div> </div>
</body> </body>
</html> </html>