From a4c1db6e810c2886c632b1afe37907ceb2a7d907 Mon Sep 17 00:00:00 2001 From: Austin Date: Fri, 5 Nov 2021 10:39:59 -0400 Subject: [PATCH] 2fa prep --- html/login/2fa.php | 68 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 html/login/2fa.php diff --git a/html/login/2fa.php b/html/login/2fa.php new file mode 100644 index 0000000..081a6b8 --- /dev/null +++ b/html/login/2fa.php @@ -0,0 +1,68 @@ +prepare("SELECT * FROM users WHERE email = :e AND username = :u"); + $userdetails->bindParam(":e", $email, PDO::PARAM_STR); + $userdetails->bindParam(":u", $username, PDO::PARAM_STR); + $userdetails->execute(); + + if ($userdetails->rowCount() > 0) + { + $userdetails2 = $userdetails->fetch(PDO::FETCH_OBJ); + $userid = (int)$userdetails2->id; + $resetstatus = sendPasswordReset("info@alphaland.cc", $email, $userid); + + if ($resetstatus == 1) + { + $alert = ""; + } + elseif ($resetstatus == 2) + { + $alert = ""; + } + elseif ($resetstatus == 3) + { + $alert = ""; + } + + } + else + { + $alert = ""; + } +} + +$body = << +{$alert} +
+
+
+
2-Step Verification
+
If you cannot login, please contact an Administrator on Discord
+
+ +
+
+ +
+
+
+
+ +EOT; + +pageHandler(); +$ph->footer = ""; +$ph->pageTitle("2-Step"); +$ph->body = $body; +$ph->output(); \ No newline at end of file