Add files via upload

This commit is contained in:
Justin 2022-07-20 09:44:40 -04:00 committed by GitHub
commit d163e1ced8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 2008 additions and 1 deletions

27
settings/2fa_update.php Normal file
View file

@ -0,0 +1,27 @@
<?php
require_once("../inc/conx.php");
if($logged_in == false) {
header("location: /");
exit();
}
// Update Data Saver
$upd_2fa = safe($_POST['toggle2FA']);
$tokenkey = safe($_POST['mdkey']);
if($tokenkey != $u_token) {
header("location: /");
exit();
}
if(isset($upd_2fa)) {
// On
if($upd_2fa == 'on') {
$var_2fa = "enabled";
mysqli_query($conx, "UPDATE accounts SET 2fa='$var_2fa' WHERE uid='$u_uid'");
mysqli_query($conx, "UPDATE accounts SET auth_app='no' WHERE uid='$u_uid'");
}
// Off
if($upd_2fa == 'off') {
$var_2fa = "disabled";
mysqli_query($conx, "UPDATE accounts SET 2fa='$var_2fa' WHERE uid='$u_uid'");
}
}
?>