Add files via upload
This commit is contained in:
parent
7f6bd9e44e
commit
d163e1ced8
22 changed files with 2008 additions and 1 deletions
27
settings/2fa_update.php
Normal file
27
settings/2fa_update.php
Normal 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'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue