$incorrect = true; } } echo "<h2>" . $aInt->lang("twofa", "disable") . "</h2>"; if (!$disabled) { echo "<p>" . $aInt->lang("twofa", "disableintro") . "</p>"; if ($incorrect) { echo "<div class=\"errorbox\"><strong>Password Incorrect</strong><br />Please try again...</div>"; } echo "<form onsubmit=\"dialogSubmit();return false\"><input type=\"hidden\" name=\"2fasetup\" value=\"1\" /><p align=\"center\">" . $aInt->lang("fields", "password") . ": <input type=\"password\" name=\"pwverify\" value=\"\" size=\"20\" /><p><p align=\"center\"><input type=\"button\" value=\"" . $aInt->lang("global", "disable") . "\" class=\"btn\" onclick=\"dialogSubmit()\" /></p></form>"; } else { echo "<p>" . $aInt->lang("twofa", "disabledconfirmation") . "</p><p align=\"center\"><input type=\"button\" value=\"" . $aInt->lang("global", "close") . "\" onclick=\"window.location='myaccount.php'\" /></p>"; } echo "<script type=\"text/javascript\">\n\$(\"#admindialogcont input:password:visible:first\").focus();\n</script>\n</div></div>"; } else { $modules = $twofa->getAvailableModules(); if (isset($module) && in_array($module, $modules)) { $output = $twofa->moduleCall("activate", $module); if (is_array($output) && isset($output['completed'])) { $msg = isset($output['msg']) ? $output['msg'] : ""; $settings = isset($output['settings']) ? $output['settings'] : array(); $backupcode = $twofa->activateUser($module, $settings); $output = ""; if ($backupcode) { $output = "<div align=\"center\"><h2>" . $aInt->lang("twofa", "activationcomplete") . "</h2>"; if ($msg) { $output .= "<div style=\"margin:20px;padding:10px;background-color:#f7f7f7;border:1px dashed #cccccc;text-align:center;\">" . $msg . "</div>"; } $output .= "<h2>" . $aInt->lang("twofa", "backupcodeis") . ":</h2><div style=\"margin:20px auto;padding:10px;width:280px;background-color:#F2D4CE;border:1px dashed #AE432E;text-align:center;font-size:20px;\">" . $backupcode . "</div><p>" . $aInt->lang("twofa", "backupcodeexpl") . "</p>"; $output .= "<p><input type=\"button\" value=\"" . $aInt->lang("global", "close") . "\" onclick=\"window.location='myaccount.php'\" /></p></div>"; } else {