-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresetpage.php
58 lines (52 loc) · 1.5 KB
/
resetpage.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
<?php
$timestamp=base64_decode($_REQUEST['t']);
$username = base64_decode($_REQUEST['uname']);
$username2=$_REQUEST['uname'];
echo "$username";
//$decoded = base64_decode( urldecode( $p ) );
echo "<h3>PASSWORD RESET PAGE</h3><br>";
if ((time()-$timestamp)>7200){
echo "LINK EXPIRED<br>";
echo "<a href = 'adminhome.php' target='_self'>BACK TO LOGIN PAGE</a>";
echo "<script>document.getElementById('resetform').innerHTML=' '; </script>";
$disableflag=1;
}
else
{
$disableflag=0;
}
?>
<script>
function passwordcheck(pass2,pass1)
{
if(pass1===pass2){
document.getElementById('mysubmit').disabled = false;
document.getElementById('passworderror').innerHTML="<br>password Match<br>";
}
else{
document.getElementById('mysubmit').disabled = true;
document.getElementById('passworderror').innerHTML="<br>password doesn't Match<br>";
}
}
</script>
<html>
<head>
<title>PASSWORD RESET</title>
</head>
<body>
<div id="error"></div>
<?php
if($disableflag==0){
echo "<div id='resetform_2.php'>
<form method='POST' action='resetpage_2.php'>
<input type='hidden' name='username' value=$username >
New password: <input type='password' name='newpass' ><br><br>
Confirm password:<input type='password' name='newpass2' onkeyup='passwordcheck(this.value,newpass.value)'>
<div id='passworderror'></div>
<input id='mysubmit' type='submit' name='submit' value ='submit'>
</form>
</div>";
}
?>
</body>
</head>