-
Notifications
You must be signed in to change notification settings - Fork 0
/
passEmail.php
95 lines (82 loc) · 3.59 KB
/
passEmail.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
require ("php/passEmail.php");
require ("php/login.php");
emailPass($_POST['username']);
?>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Subject Support</title>
<link rel="stylesheet" href="login.css"></link>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(window, document, undefined).ready(function() {
$('input').blur(function() {
var $this = $(this);
if ($this.val())
$this.addClass('used');
else
$this.removeClass('used');
});
var $ripples = $('.ripples');
$ripples.on('click.Ripples', function(e) {
var $this = $(this);
var $offset = $this.parent().offset();
var $circle = $this.find('.ripplesCircle');
var x = e.pageX - $offset.left;
var y = e.pageY - $offset.top;
$circle.css({
top: y + 'px',
left: x + 'px'
});
$this.addClass('is-active');
});
$ripples.on('animationend webkitAnimationEnd mozAnimationEnd oanimationend MSAnimationEnd', function(e) {
$(this).removeClass('is-active');
});
});
$(document).ready(function() {
$(window).keydown(function(event){
if(event.keyCode == 13) {
event.preventDefault();
checkPass();
return false;
}
});
});
function checkPass() {
var passw = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,20}$/;
if (document.getElementById("password").value.match(passw) && document.getElementById("password").value == document.getElementById("passConf").value) {
document.getElementById("passForm").submit();
} else {
alert("Password does not match or meet the requirements");
}
}
</script>
</head>
<body>
<hgroup>
<h1><br></h1>
</hgroup>
<form id="passForm" action="./requests/passEmail.php" method="post">
<div class="group">
<input type="text" name="code"><span class="highlight"></span><span class="bar"></span>
<label class="text">Code</label>
</div>
<div class="group">
<input id="password" type="password" name="newPass"><span class="highlight"></span><span class="bar"></span>
<label class="text">New Password</label>
</div>
<div class="group">
<input id="passConf" type="password" name="newPassConf"><span class="highlight"></span><span class="bar"></span>
<label class="text">Confirm Password</label>
</div>
<button type="submit" class="button buttonBlue">Change Password
<div class="ripples buttonRipples"><span class="ripplesCircle"></span></div>
</button>
</form>
<footer>
<img src="./res/logo.png">
</footer>
</body>
</html>