-
Notifications
You must be signed in to change notification settings - Fork 0
/
unlock_complete.php
65 lines (62 loc) · 2.9 KB
/
unlock_complete.php
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
53
54
55
56
57
58
59
60
61
62
63
64
65
<html>
<head>
<title>Unlocked</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="animate.min.css">
<script src="js\[email protected]"></script>
<script src="js\promise-polyfill.js"></script>
<meta charset="UTF-8">
</head>
<body class="body-style-9">
<h1>Unlock Your Account</h1>
<h2>Your Unlock was processed:</h2>
<form class="form-style-9">
<ul>
<li>
<div class="field-style field-full align-none">
<?php
if (isset($_POST['DBANS'])) {
//check Query Sting for Value
if ($_POST['DBANS']==""){
//no value exit
$MSG = "User Name Not Found";
echo "<script>Swal.fire({
type: 'error',
})
</script>" ;
}else{
if ($_POST['DBANS'] == (md5($_POST['ANS']))){
$adname = substr($_POST['User'],11);
//echo $adname;
$op = shell_exec("powershell .\ADUnlock.ps1 $adname 2>&1");
//echo $op;
$MSG= ($_POST['User'])."'s Account has been unlocked";
echo "<script>Swal.fire({
type: 'success',
})
</script>" ;
}else{
//echo ($_POST['DBANS']." ". (md5($_POST['ANS'])));
$MSG= "Your answer did not match the anser on the server";
echo "<script>Swal.fire({
type: 'error',
})
</script>" ;
}
}
}
echo $MSG;
?>
</div>
</li>
<li>
<input type="button" value="HOME" class="field-style field-full align-none"
onclick="location.href = 'index.php';" />
</li>
</ul>
</form>
<?php
//echo $op; //FOR DEV ONLY !!
?>
</body>
</html>