-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchange_mob.php
203 lines (189 loc) · 8.61 KB
/
change_mob.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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<!DOCTYPE html>
<!--[if lt IE 7]> <html lang="en" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html lang="en" class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html lang="en" class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html lang="en" class="no-js"> <!--<![endif]-->
<head>
<!-- meta character set -->
<meta charset="utf-8">
<!-- Always force latest IE rendering engine or request Chrome Frame -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Hesta job Bidder</title>
<!-- Meta Description -->
<meta name="description" content="Blue One Page Creative HTML5 Template">
<meta name="keywords" content="one page, single page, onepage, responsive, parallax, creative, business, html5, css3, css3 animation">
<meta name="author" content="Muhammad Morshed">
<!-- Mobile Specific Meta -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- CSS
================================================== -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,700' rel='stylesheet' type='text/css'>
<link href="css/post.css" rel='stylesheet' type='text/css'/>
<!-- Fontawesome Icon font -->
<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- bootstrap.min -->
<link rel="stylesheet" href="css/jquery.fancybox.css">
<!-- bootstrap.min -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- bootstrap.min -->
<link rel="stylesheet" href="css/owl.carousel.css">
<!-- bootstrap.min -->
<link rel="stylesheet" href="css/slit-slider.css">
<!-- bootstrap.min -->
<link rel="stylesheet" href="css/animate.css">
<!-- Main Stylesheet -->
<link rel="stylesheet" href="css/main.css">
<!-- Modernizer Script for old Browsers -->
<script src="js/modernizr-2.6.2.min.js"></script>
<script src='https://www.google.com/recaptcha/api.js'></script>
</head>
<body id="body">
<!-- preloader -->
<div id="preloader">
<div class="loder-box">
<div class="battery"></div>
</div>
</div>
<!-- end preloader -->
<?php include('header/header1.php');?>
<main class="site-content" role="main">
<!-- Contact section -->
<section id="contact">
<div class="container">
<div class="row">
<div class="sec-title text-center wow animated fadeInDown">
<h2>Change Password</h2>
</div>
<div class="col-md-3 contact-form wow animated fadeInLeft"></div>
<div class="col-md-6 contact-form wow animated fadeInLeft" id="bdy">
<form action="change_mob_db.php" method="post">
<div class="input-field">
<input type="password" name="pwd" id="pwd" class="form-control" placeholder="Your Email...">
</div>
<div class="input-field">
<input type="password" name="pwd" id="pwd" class="form-control" placeholder="password">
</div>
<div class="forgot">
<div class="g-recaptcha" id="cap" data-sitekey="6Lf6QlkUAAAAAETWbPN0Z6fBYmlZhE2tJu4FG2e7" style="width: 40%;">
</div>
</div>
<h4><a href="#" data-toggle="modal" data-target="#myModal" style="color: #fff;">Forget Password</a></h4>
<button type="submit" id="click-btn" name="submit" class="btn btn-blue btn-effect" onclick="validateLogin(event);">Login</button>
<h4 style="color: #fff;">Don,t have an Account!<a href="register.php"> Register Now!</a></h4>
</form>
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog modal-md">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<form id="reg-form" action="password_db.php" method="post">
<div class="form-group">
<div class="modal-body">
<input type="hidden" class="form-control" value="<?php session_start();
echo $_SESSION['login_id']?>" name="uid"/>
<input type="number" name="mob" class="form-control" id="mob" placeholder="Please Enter Your Ragister Mobile no."/>
</div>
<div class="modal-footer">
<div class="btn btn-sbm" data-toggle="collapse" data-target="#demo">
<input type="submit" class="btn btn-blue btn-effect" name="submit" value="Next"/>
</div>
</div>
</div>
</form>
<div id="demo" class="collapse">
<form action="change_mob.php" method="post" onsubmit="return checkOtp(event);">
<div class="input-field">
<input type="text" hidden="u_id" name="u_id">
<input type="number" name="varify" id="varify" class="form-control" placeholder="Enter OTP" required id="varify"/>
</div>
<button type="submit" name="submit" id="submit-data" class="btn btn-blue btn-effect" onsubmit="num();">Submit</button>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-3 wow animated fadeInRight"></div>
</div>
</div>
</section>
<!-- end Contact section -->
</main>
<!-- <?php include('recaptcha.php');?> -->
<?php include('footer/footer.php');?>
<!-- Essential jQuery Plugins
================================================== -->
<!-- Main jQuery -->
<script src="js/jquery-1.11.1.min.js"></script>
<!-- Twitter Bootstrap -->
<script src="js/bootstrap.min.js"></script>
<!-- Single Page Nav -->
<script src="js/jquery.singlePageNav.min.js"></script>
<!-- jquery.fancybox.pack -->
<script src="js/jquery.fancybox.pack.js"></script>
<!-- Google Map API -->
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
<!-- Owl Carousel -->
<script src="js/owl.carousel.min.js"></script>
<!-- jquery easing -->
<script src="js/jquery.easing.min.js"></script>
<!-- Fullscreen slider -->
<script src="js/jquery.slitslider.js"></script>
<script src="js/jquery.ba-cond.min.js"></script>
<!-- onscroll animation -->
<script src="js/wow.min.js"></script>
<!-- Custom Functions -->
<script src="js/main.js"></script>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<script type="text/javascript">
function validateLogin(event) {
var e = document.getElementById("email").value;
var p = document.getElementById("pwd").value;
if(e == "" || p == "" && e == "email" || p == "pwd"){
event.preventDefault();
swal("All fields are Requierd!", "You clicked the button!", "info");
} else {
swal("Login successfull", "You clicked the button!", "success");
}
}
</script>
<script>
var glb_otp;
$('#reg-form').submit(function(e) {
e.preventDefault();
var form = new FormData($(this)[0]);
$.ajax({
url: 'handlerreg.php',
method: 'post',
processData: false,
data: $(this).serialize(),
success: function(res) {
// console.log("res",res);
var urOtp = res;
setValue(urOtp);
}
});
});
function setValue(val) {
glb_otp = val;
go=glb_otp.trim();
console.log(go);
}
function checkOtp(event) {
var otp = document.getElementById('varify').value;
console.log("value", otp);
if(go == otp) {
swal("Ragistration successfull", "You clicked the button!", "success");
window.location.replace("localhost/php/bidd_system/login.php");
// console.log("user verified");
} else {
event.preventDefault();
swal("OTP Invalid", "You clicked the button!", "warning");
// console.log("user not valid");
}
}
</script>
</body>
</html>