-
Notifications
You must be signed in to change notification settings - Fork 1
/
reset.php
459 lines (313 loc) · 13.5 KB
/
reset.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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
<!doctype html>
<html lang="en">
<?php
require 'constants/settings.php';
require 'constants/check-login.php';
if (isset($_GET['token'])) {
$token = $_GET['token'];
}else{
header("location:./");
}
?>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Amployment Jobs - Reset Password</title>
<meta name="description" content="Online Job Management / Job Portal" />
<meta name="keywords" content="job, work, resume, applicants, application, employee, employer, hire, hiring, human resource management, hr, online job management, company, worker, career, recruiting, recruitment" />
<meta name="author" content="BwireSoft">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta property="og:image" content="http://<?php echo "$actual_link"; ?>/images/banner.jpg" />
<meta property="og:image:secure_url" content="https://<?php echo "$actual_link"; ?>/images/banner.jpg" />
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:width" content="500" />
<meta property="og:image:height" content="300" />
<meta property="og:image:alt" content="Bwire Jobs" />
<meta property="og:description" content="Online Job Management / Job Portal" />
<link rel="shortcut icon" href="images/ico/favicon.png">
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css" media="screen">
<link href="css/animate.css" rel="stylesheet">
<link href="css/main.css" rel="stylesheet">
<link href="css/component.css" rel="stylesheet">
<link rel="stylesheet" href="icons/linearicons/style.css">
<link rel="stylesheet" href="icons/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="icons/simple-line-icons/css/simple-line-icons.css">
<link rel="stylesheet" href="icons/ionicons/css/ionicons.css">
<link rel="stylesheet" href="icons/pe-icon-7-stroke/css/pe-icon-7-stroke.css">
<link rel="stylesheet" href="icons/rivolicons/style.css">
<link rel="stylesheet" href="icons/flaticon-line-icon-set/flaticon-line-icon-set.css">
<link rel="stylesheet" href="icons/flaticon-streamline-outline/flaticon-streamline-outline.css">
<link rel="stylesheet" href="icons/flaticon-thick-icons/flaticon-thick.css">
<link rel="stylesheet" href="icons/flaticon-ventures/flaticon-ventures.css">
<link href="css/style.css" rel="stylesheet">
</head>
<body class="not-transparent-header">
<div class="container-wrapper">
<header id="header">
<nav class="navbar navbar-default navbar-fixed-top navbar-sticky-function">
<div class="container">
<div class="logo-wrapper">
<div class="logo">
<a href="./"><img src="images/logo.png" alt="Logo" /></a>
</div>
</div>
<div id="navbar" class="navbar-nav-wrapper navbar-arrow">
<ul class="nav navbar-nav" id="responsive-menu">
<li>
<a href="./">Home</a>
</li>
<li>
<a href="job-list.php">Job List</a>
</li>
<li>
<a href="employers.php">Employers</a>
</li>
<li>
<a href="employees.php">Employees</a>
</li>
<li>
<a href="contact.php">Contact Us</a>
</li>
</ul>
</div>
<div class="nav-mini-wrapper">
<ul class="nav-mini sign-in">
<li><a href="login.php">login</a></li>
<li><a data-toggle="modal" href="#registerModal">register</a></li>
</ul>
</div>
</div>
<div id="slicknav-mobile"></div>
</nav>
<div id="registerModal" class="modal fade login-box-wrapper" tabindex="-1" style="display: none;" data-backdrop="static" data-keyboard="false" data-replace="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title text-center">Create your account for free</h4>
</div>
<div class="modal-body">
<div class="row gap-20">
<div class="col-sm-6 col-md-6">
<a href="register.php?p=Employer" class="btn btn-facebook btn-block mb-5-xs">Register as Employer</a>
</div>
<div class="col-sm-6 col-md-6">
<a href="register.php?p=Employee" class="btn btn-facebook btn-block mb-5-xs">Register as Employee</a>
</div>
</div>
</div>
<div class="modal-footer text-center">
<button type="button" data-dismiss="modal" class="btn btn-primary btn-inverse">Close</button>
</div>
</div>
</header>
<div class="main-wrapper">
<div class="breadcrumb-wrapper">
<div class="container">
<ol class="breadcrumb-list">
<li><a href="./">Home</a></li>
<li><span>Reset Password</span></li>
</ol>
</div>
</div>
<div class="login-container-wrapper">
<div class="container">
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="row">
<div class="col-sm-6 col-sm-offset-3">
<?php
require 'constants/check_reply.php';
?>
<form name="frm" action="app/change-pass.php" method="POST" autocomplete="off">
<div class="login-box-wrapper">
<div class="modal-header">
<h4 class="modal-title text-center">Reset your password</h4>
</div>
<div class="modal-body">
<div class="row gap-20">
<?php
require 'constants/db_config.php';
try {
$conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$stmt = $conn->prepare("SELECT * FROM tbl_tokens WHERE token = :token limit 1");
$stmt->bindParam(':token', $token);
$stmt->execute();
$result = $stmt->fetchAll();
$res = count($result);
if ($res == "0") {
print '
<div class="alert alert-warning">
<strong>Could not use this token because</strong><br>
<li>This token is invalid</li>
<li>This token is already used</li>
</div>
';
$invalid_token = true;
}else{
foreach($result as $row)
{
?>
<div class="col-sm-12 col-md-12">
<div class="form-group">
<label>New password</label>
<input class="form-control" placeholder="Min 8 and Max 20 characters" name="password" required type="password">
</div>
</div>
<div class="col-sm-12 col-md-12">
<div class="form-group">
<label>Confirm New Password</label>
<input class="form-control" placeholder="Min 8 and Max 20 characters" name="confirmpassword" required type="password">
</div>
</div>
<?php
$_SESSION['resetmail'] = $row['email'];
?>
<?php
}
}
}catch(PDOException $e)
{
}
?>
</div>
</div>
<?php
if (isset($invalid_token)) {
}else{
print '
<div class="modal-footer text-center">
<button type="submit" onclick="return val();" class="btn btn-primary">Reset my password</button>
</div>';
}
?>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<footer class="footer-wrapper">
<div class="main-footer">
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-9">
<div class="row">
<div class="col-sm-6 col-md-4">
<div class="footer-about-us">
<h5 class="footer-title">AboutAmployment Jobs</h5>
<p>Nightingale Jobs is a job portal, online job management system developed by Anmol , khushi for his project in february 2018.</p>
</div>
</div>
<div class="col-sm-6 col-md-5 mt-30-xs">
<h5 class="footer-title">Quick Links</h5>
<ul class="footer-menu clearfix">
<li><a href="./">Home</a></li>
<li><a href="job-list.php">Job List</a></li>
<li><a href="employers.php">Employers</a></li>
<li><a href="employees.php">Employees</a></li>
<li><a href="contact.php">Contact Us</a></li>
<li><a href="#">Go to top</a></li>
</ul>
</div>
</div>
</div>
<div class="col-sm-12 col-md-3 mt-30-sm">
<h5 class="footer-title">Nightingale Jobs Contact</h5>
<p>Address : Takoradi, School Junction PO.BOX AX40</p>
<p>Email : <a href="mailto:nightingale.nath2@gmail.com">nightingale.nath2@gmail.com</a></p>
<p>Phone : <a href="tel:+233546607474">+233 546 607 474</a></p>
</div>
</div>
</div>
</div>
<div class="bottom-footer">
<div class="container">
<div class="row">
<div class="col-sm-4 col-md-4">
<p class="copy-right">© Copyright <?php echo date('Y'); ?>Amployment Vision Software</p>
</div>
<div class="col-sm-4 col-md-4">
<ul class="bottom-footer-menu">
<li><a >Developed by Anmol , khushi</a></li>
</ul>
</div>
<div class="col-sm-4 col-md-4">
<ul class="bottom-footer-menu for-social">
<li><a href="<?php echo "$tw"; ?>"><i class="ri ri-twitter" data-toggle="tooltip" data-placement="top" title="twitter"></i></a></li>
<li><a href="<?php echo "$fb"; ?>"><i class="ri ri-facebook" data-toggle="tooltip" data-placement="top" title="facebook"></i></a></li>
<li><a href="<?php echo "$ig"; ?>"><i class="ri ri-instagram" data-toggle="tooltip" data-placement="top" title="instagram"></i></a></li>
</ul>
</div>
</div>
</div>
</div>
</footer>
</div>
</div>
<div id="back-to-top">
<a href="#"><i class="ion-ios-arrow-up"></i></a>
</div>
<script type="text/javascript">
function val(){
if(frm.password.value == "")
{
alert("Enter the Password.");
frm.password.focus();
return false;
}
if((frm.password.value).length < 8)
{
alert("Password should be minimum 8 characters.");
frm.password.focus();
return false;
}
if((frm.password.value).length > 20)
{
alert("Password should be maximum 20 characters.");
frm.password.focus();
return false;
}
if(frm.confirmpassword.value == "")
{
alert("Enter the Confirmation Password.");
return false;
}
if(frm.confirmpassword.value != frm.password.value)
{
alert("Password confirmation does not match.");
return false;
}
return true;
}
</script>
<script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="js/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript" src="bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrap-modalmanager.js"></script>
<script type="text/javascript" src="js/bootstrap-modal.js"></script>
<script type="text/javascript" src="js/smoothscroll.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="js/jquery.waypoints.min.js"></script>
<script type="text/javascript" src="js/wow.min.js"></script>
<script type="text/javascript" src="js/jquery.slicknav.min.js"></script>
<script type="text/javascript" src="js/jquery.placeholder.min.js"></script>
<script type="text/javascript" src="js/bootstrap-tokenfield.js"></script>
<script type="text/javascript" src="js/typeahead.bundle.min.js"></script>
<script type="text/javascript" src="js/bootstrap3-wysihtml5.min.js"></script>
<script type="text/javascript" src="js/bootstrap-select.min.js"></script>
<script type="text/javascript" src="js/jquery-filestyle.min.js"></script>
<script type="text/javascript" src="js/bootstrap-select.js"></script>
<script type="text/javascript" src="js/ion.rangeSlider.min.js"></script>
<script type="text/javascript" src="js/handlebars.min.js"></script>
<script type="text/javascript" src="js/jquery.countimator.js"></script>
<script type="text/javascript" src="js/jquery.countimator.wheel.js"></script>
<script type="text/javascript" src="js/slick.min.js"></script>
<script type="text/javascript" src="js/easy-ticker.js"></script>
<script type="text/javascript" src="js/jquery.introLoader.min.js"></script>
<script type="text/javascript" src="js/jquery.responsivegrid.js"></script>
<script type="text/javascript" src="js/customs.js"></script>
</body>
</html>