-
Notifications
You must be signed in to change notification settings - Fork 0
/
resetpassword.php
105 lines (81 loc) · 3.53 KB
/
resetpassword.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
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
error_reporting(0);
if(isset($_POST['submit']))
{
$contactno=$_SESSION['contactno'];
$email=$_SESSION['email'];
$password=md5($_POST['newpassword']);
$query=mysqli_query($con,"update tbladmin set Password='$password' where Email='$email' && MobileNumber='$contactno' ");
if($query)
{
echo "<script>alert('Password successfully changed');</script>";
session_destroy();
}
}
?>
<!doctype html>
<html class="no-js" lang="en">
<head>
<title>CCMS Forgot Password</title>
<link rel="apple-touch-icon" href="apple-icon.png">
<link rel="stylesheet" href="vendors/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="vendors/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="vendors/themify-icons/css/themify-icons.css">
<link rel="stylesheet" href="vendors/flag-icon-css/css/flag-icon.min.css">
<link rel="stylesheet" href="vendors/selectFX/css/cs-skin-elastic.css">
<link rel="stylesheet" href="assets/css/style.css">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800' rel='stylesheet' type='text/css'>
<script type="text/javascript">
function checkpass()
{
if(document.changepassword.newpassword.value!=document.changepassword.confirmpassword.value)
{
alert('New Password and Confirm Password field does not match');
document.changepassword.confirmpassword.focus();
return false;
}
return true;
}
</script>
</head>
<body class="bg-dark" style=" background-image: url('images/bg.jpg');">
<div class="sufee-login d-flex align-content-center flex-wrap">
<div class="container">
<div class="login-content">
<div class="login-logo">
<h3 style="color: white">Cyber Cafe Management System - Reset -Password </h3>
<hr color="red"/>
</div>
<div class="login-form">
<form action="" method="post" name="changepassword" onsubmit="return checkpass();">
<p style="font-size:16px; color:red" align="center"> <?php if($msg){
echo $msg;
} ?> </p>
<div class="form-group">
<label>New Password</label>
<input type="password" class="form-control" placeholder="New Password" name="newpassword" required="">
</div>
<div class="form-group">
<label>Confirm Your Password</label>
<input type="password" class="form-control" placeholder="Confirm Your Password" name="confirmpassword" required="">
</div>
<div class="checkbox">
<label class="pull-left">
<a href="index.php">signin</a>
</label>
</div>
<button type="submit" class="btn btn-success btn-flat m-b-30 m-t-30" name="submit">Reset</button>
</form>
</div>
</div>
</div>
</div>
<script src="vendors/jquery/dist/jquery.min.js"></script>
<script src="vendors/popper.js/dist/umd/popper.min.js"></script>
<script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="assets/js/main.js"></script>
</body>
</html>