This repository was archived by the owner on Apr 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdialog.php
More file actions
executable file
·52 lines (50 loc) · 1.3 KB
/
dialog.php
File metadata and controls
executable file
·52 lines (50 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
require_once('class.tfa.php');
$Auth = new TFA();
$Auth->username = $_SESSION['user'];
?>
<div class="codegit_settings">
<label><span class="icon-key big-icon"></span>TwoFactor</label>
<hr>
<div style="margin-left: 20px;">
<?php
echo '<h4 style="font-size: 15px; font-weight: bold;">';
if ($Auth->IsTFAEnabled()) {
i18n("Disable Two Factor Authentication");
} else {
i18n("Enable Two Factor Authentication");
}
echo "</h4><br>";
i18n("Enter your password and token as confirmation");
?>
<div id="tfa_form" style="margin-top: 20px;">
<div style="width: 50%; float: left;">
<label><span class="icon-lock login-icon"></span> <?php i18n("Password"); ?></label>
<input type="password" class="password" style="width: 200px">
<label><span class="icon-lock login-icon"></span> <?php i18n("Token"); ?></label>
<input type="token" class="token" style="width: 200px">
<button class="button">
<?php
if ($Auth->IsTFAEnabled()) {
i18n("Disable");
} else {
i18n("Enable");
}
?>
</button>
</div>
<div style="width: 50%; float: left;">
<?php
if (!$Auth->IsTFAEnabled()) {
//QR Code
?>
<img src="<?php echo $Auth->GenerateSecret(); ?>">
<?php
}
?>
</div>
</div>
<?php
?>
</div>
</div>