| Server IP : 74.208.236.18 / Your IP : 216.73.216.45 Web Server : Apache System : Linux infong654 4.4.400-icpu-108 #2 SMP Wed Feb 11 10:12:42 UTC 2026 x86_64 User : u39365822 ( 135825) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /homepages/7/d147067425/htdocs/ |
Upload File : |
<?php
require "includes/db_con_get.php";
$errorsAndAlerts='';
if(!empty($_GET['token'])){
$query=mysqli_query($con,"select * from `therapist` where `token`='".$_GET['token']."'")or die(mysqli_error($con));
$query_count=mysqli_num_rows($query);
if($query_count>0){
$get_data=mysqli_fetch_array($query);
}else{
$errorsAndAlerts='<h2 style="color:red;">Invalid Link</h2>
<p style="color:red;">The link is invalid/expired. Either you did not copy the correct link from the email, or you have already used the key in which case it is deactivated.</p>
<p style="color:red;"><a href="forgetpassword.php">Click here</a> to reset password.</p>';
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Password Reset - Reveal Therapist Account</title>
<link href="css/styles.css" rel="stylesheet" />
<script src="https://use.fontawesome.com/releases/v6.1.0/js/all.js" crossorigin="anonymous"></script>
<script src="js/jquery.min.js"></script>
<script src="js/jquery.validate.min.js"></script>
<style>
.error {
color: #F00;
}
</style>
</head>
<body class="bg-primary">
<div id="layoutAuthentication">
<div id="layoutAuthentication_content">
<main>
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-5">
<div class="card shadow-lg border-0 rounded-lg mt-5">
<div class="card-header"><h3 class="text-center font-weight-light my-4">Password Recovery</h3></div>
<div id="error"></div>
<p style="color:red"><?= @$errorsAndAlerts ?></p>
<?php if(!empty($_GET['token'])){?>
<div class="card-body">
<div class="small mb-3 text-muted">Enter your email address and we will send you a link to reset your password.</div>
<form method="post" id="reset-form" class="reset-form">
<div class="form-group">
<label for="inputPassword">Password</label>
<input class="form-control" id="password" name="password" type="password" placeholder="Enter New Password" />
</div>
<div class="form-group">
<label for="inputConfirmPassword">Confirm Password</label>
<input class="form-control" id="confirm_password" name="confirm_password" type="password" placeholder="Enter Confirm New Password"/>
</div>
<input type="hidden" name="token" value="<?php echo base64_encode($get_data['id']);?>"/>
<div class="d-flex align-items-center justify-content-between mt-4 mb-0">
<a class="small" href="index.php">Return to login</a>
<button type="submit" class="btn btn-primary" name="btn-reset" id="btn-rest">Reset Password</button>
</div>
</form>
</div>
<?php } else{ ?>
<p style="color:red;"> You Dont have Permission to Access This Page.</p>
<hr>
<?php } ?>
<div class="card-footer text-center py-3">
<div class="small"><a href="register.php">Need an account? Sign up!</a></div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<div id="layoutAuthentication_footer">
<footer class="py-4 bg-light mt-auto">
<div class="container-fluid px-4">
<div class="d-flex align-items-center justify-content-between small">
<div class="text-muted">© 2022 NHDS, Inc.</div>
<div>
<a href="https://www.nhds.com/legal-info">Privacy Policy,Terms & Conditions</a>
</div>
</div>
</div>
</footer>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
<script src="js/scripts.js"></script>
<script>
$('document').ready(function(){
$("#reset-form").validate({
rules:
{
password: {
required: true,
minlength: 5
},
confirm_password: {
required: true,
equalTo: '#password'
},
},
messages:
{
password: {
required: "please provide a password",
minlength: "password at least have 5 characters"
},
confirm_password: {
required: "please retype your password",
equalTo: "password doesn't match !"
}
},
submitHandler: submitForm
});
/* handle form submit */
function submitForm() {
var data = $("#reset-form").serialize();
$.ajax({
type : 'POST',
url : 'includes/main.php',
data : data,
beforeSend: function() {
$("#error").fadeOut();
$("#btn-reset").html('sending...');
},
success : function(response) {
$("#error").html('');
if($.trim(response)=="success"){
$("#error").fadeIn(1000, function(){
$("#reset-form")[0].reset();
$("#error").html('<div class="alert alert-success">Congratulations! Your password has been updated successfully.<a href="index.php">Click here</a> to Login.</div>');
$("#btn-submit").html('Reset Password');
});
} else {
$("#error").fadeIn(1000, function(){
$("#error").html('<div class="alert alert-danger">'+response+'</div>').show();
});
}
}
});
return false;
}
});
</script>
</body>
</html>