-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathotpverify.php
177 lines (153 loc) · 4.79 KB
/
otpverify.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<title>OTP verification</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="css/util.css">
<link rel="stylesheet" type="text/css" href="css/signup.css">
<link rel="stylesheet" type="text/css" href="css/animate.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="icon" type="image/png" href="images/logoicon.ico"/>
<script src='https://kit.fontawesome.com/a076d05399.js'></script>
<script src="https://smtpjs.com/v3/smtp.js"></script>
<script src="https://smtpjs.com/v3/smtp.js"></script>
<style>
.box {
width:700px;
height:500px;
background: white;
margin: auto;
padding: 20px 50px;
border-radius: 10px;
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
}
.box:hover {
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
animation-name: example;
animation-duration: 0.25s;
border-left: 8px solid red;
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}
@keyframes example {
0% {border-left: 2px solid #ffffff;}
25% {border-left: 3px solid #ffe6e6;}
50% {border-left: 4px solid #ff8080;}
100% {border-left: 5px solid #ff0000;}
}
</style>
<script type="text/javascript">
function checkOTP(){
let otp = localStorage.getItem("name");
let otpinp = document.getElementById("myOTP").value;
if(otp == otpinp){
alert("OTP matched!!");
document.location.href = "signup1.php";
}
else{
alert("OTP mismatched!!");
document.getElementById("ko").action = "otpverify.php";
}
}
$(document).ready(function(){
var current_fs, next_fs, previous_fs; //fieldsets
var opacity;
var current = 1;
var steps = $("fieldset").length;
setProgressBar(current);
$(".next").click(function(){
current_fs = $(this).parent();
next_fs = $(this).parent().next();
//Add Class Active
$("#progressbar li").eq($("fieldset").index(next_fs)).addClass("active");
//show the next fieldset
next_fs.show();
//hide the current fieldset with style
current_fs.animate({opacity: 0}, {
step: function(now) {
// for making fielset appear animation
opacity = 1 - now;
current_fs.css({
'display': 'none',
'position': 'relative'
});
next_fs.css({'opacity': opacity});
},
duration: 500
});
setProgressBar(++current);
});
$(".previous").click(function(){
current_fs = $(this).parent();
previous_fs = $(this).parent().prev();
//Remove class active
$("#progressbar li").eq($("fieldset").index(current_fs)).removeClass("active");
//show the previous fieldset
previous_fs.show();
//hide the current fieldset with style
current_fs.animate({opacity: 0}, {
step: function(now) {
// for making fielset appear animation
opacity = 1 - now;
current_fs.css({
'display': 'none',
'position': 'relative'
});
previous_fs.css({'opacity': opacity});
},
duration: 500
});
setProgressBar(--current);
});
function setProgressBar(curStep){
var percent = parseFloat(100 / steps) * curStep;
percent = percent.toFixed();
$(".progress-bar")
.css("width",percent+"%")
}
$(".submit").click(function(){
return false;
})
});
</script>
</head>
<body>
<div class="limiter">
<div class="container-signup100">
<div class="box">
<form class="signup100-form validate-form" method="post" action="signup1.php" id="ko" autocomplete="off">
<span class="signup100-form-title p-b-70" style="font-family: Georgia, serif; font-weight: bold; font-size: 30px; text-align: center;padding-top: 40px;">
OTP verification
</span>
<ul id="progressbar">
<li class="active" id="account"><strong>Account</strong></li>
<li class="active" id="personal"><strong>Verification</strong></li>
<li id="payment"><strong>Personal</strong></li>
<li id="confirm"><strong>Image</strong></li>
</ul>
<div class="progress">
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<br> <!-- fieldsets -->
<div class="wrap-input100 validate-input" style="width: 500px; margin-top:20px">
<input class="input100" id="myOTP" type="text" name="otp" placeholder="Enter OTP" maxlength="6" minlength="6" >
<span class="focus-input100"></span>
<span class="symbol-input100">
<i class="fa fa-eye"></i>
</span>
</div>
<div class="container-signup100-form-btn">
<button class="signup100-form-btn" onclick="checkOTP()">
CHECK
</button>
</div>
<br>
</form>
</div>
</div>
</div>
</body>
</html>