| Server IP : 74.208.236.18 / Your IP : 216.73.216.185 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/client_user_2/ |
Upload File : |
<?php
include("./includes/db_con_get.php");
if(!isset($_GET['registerState']) && @$_GET['registerState'] != 'success1') {
if(!isset($_GET['email']) || !isset($_GET['referrer'])) { die("Sorry, but URL is invalid. Please contact your therapist.");} else {
# check if email already registered.
$get_Ausers = $con->query("SELECT `PasswordHash` FROM `user` WHERE `EmailID` = '".@base64_encode($_GET['email'])."' LIMIT 1");
$userPassCheck = $get_Ausers->fetch_assoc();
if(@$userPassCheck['PasswordHash'] != '') {
die("Sorry, we already have account with email. Please contact your therapist.");
}
}
}
?>
<!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>Register - Reveal Create 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;
font-size: 12px;
}
</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-7">
<div class="card shadow-lg border-0 rounded-lg mt-5">
<div class="card-header"><a href="/dashboard.php"><img style=" display: block; margin-left: auto; margin-right: auto; width: 200px;" src="img/RMW_tree_logo_white_low.png"></a></div>
<div id="error"></div>
<div class="card-body">
<?php if(isset($_REQUEST['otpVerification']) && isset($_REQUEST['registerState']) && @$_REQUEST['registerState'] == 'success1') {?>
<?php //var_dump(empty($_SESSION['CURRENT_THERIPIST']))?>
<form method="post" id="otp-form" class="register-form">
<div class="form-group">
<label for="inputEmail"><strong>Enter OTP</strong></label>
<input class="form-control" id="otp_client_reg" name="otp_client_reg" type="text" placeholder="Check your email for OTP" required />
</div>
<div class="d-flex align-items-center justify-content-between mt-4 mb-0">
<a class="small" href="forgetpassword.php">Forgot Password?</a>
<button type="submit" class="btn btn-primary" name="btn-otp" id="btn-otp" value="submit">Submit</button>
</div>
</form>
<?php } else { ?>
<form method="post" id="register-form" class="register-form">
<input type="hidden" name="referral" value="<?=@base64_decode($_GET['referrer'])?>" />
<div class="row mb-3">
<div class="col-md-6">
<div class="form-group">
<label for="inputFirstName">First Name</label>
<input class="form-control" id="first_name" name="first_name" type="text" placeholder="Enter your first name" />
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="inputLastName">Last Name</label>
<input class="form-control" id="last_name" name="last_name" type="text" placeholder="Enter your last name" />
</div>
</div>
</div>
<div class="row mb-3">
<div class="col-md-6">
<div class="form-group">
<label class="small mb-1">Gender</label> <span style="color:red">*</span>
<select id="selectGender" name="gender" class="form-control">
<option value="">-- Select Gender --</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
<option value="Other">Other</option>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="small mb-1">Age</label><span style="color:red">*</span>
<select id="selectAge" name="age" class="form-control">
<option value="">-- Select Age --</option>
<option value="16 and Under">16 and Under</option>
<option value="17 to 21">17 to 21</option>
<option value="22 to 34">22 to 34</option>
<option value="35 to 44">35 to 44</option>
<option value="45 to 54">45 to 54</option>
<option value="55 to 64">55 to 64</option>
<option value="65 to Over">65 to Over</option>
</select>
</div>
</div>
</div>
<div class="row mb-3">
<div class="form-group">
<label for="inputEmail">Email Address</label>
<input class="form-control" id="email" name="email" type="email" placeholder="name@example.com"
value="<?=(isset($_GET['email'])) ? $_GET['email']: ((isset($_POST['email'])) ? $_POST['email']: "")?>"/>
</div>
</div>
<div class="row mb-3">
<div class="col-md-6">
<div class="form-group">
<label for="inputPassword">Password</label>
<input class="form-control" id="password" name="password" type="password" placeholder="Create a password" />
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="inputPasswordConfirm">Confirm Password</label>
<input class="form-control" id="confirm_password" name="confirm_password" type="password" placeholder="Confirm password" />
</div>
</div>
</div>
<div class="mt-4 mb-0">
<div class="d-grid">
<button type="submit" class="btn btn-primary" name="btn-save" id="btn-save">Create Account</button>
</div>
</form>
<?php } ?>
</div>
<div class="card-footer text-center py-3">
<div class="small"><a href="index.php">Have an account? Go to login</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() {
/* handle form validation */
$("#register-form").validate({
rules:
{
first_name: {
required: true,
minlength: 3
},
last_name: {
required: true,
minlength: 3
},
email: {
required: true,
email: true
},
password: {
required: true,
minlength: 5
},
confirm_password: {
required: true,
equalTo: '#password'
},
},
messages:
{
first_name: {
required:"Please enter first name",
minlength:"First name at least have 3 characters"
},
last_name: {
required:"Please enter last name",
minlength:"Last name at least have 3 characters"
},
email: {
required:"Please enter email address",
email:"Please enter a valid email address"
},
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 = $("#register-form").serialize();
$("#btn-save").html('Creating account ...');
$.ajax({
type : 'POST',
url : 'includes/main.php',
data : data,
beforeSend: function() {
$("#error").fadeOut();
$("#btn-submit").html('<span class="glyphicon glyphicon-transfer"></span> sending ...');
},
success : function(response) {
console.log(response);
$("#error").html('');
if($.trim(response)==1){
$("#error").fadeIn(1000, function(){
$("#error").html('<div class="alert alert-danger"> <span class="glyphicon glyphicon-info-sign"></span> Sorry client doesn\'t exist in our database!</div>');
$("#btn-submit").html('Create Account');
});
// } else if($.trim(response)=="success1"){
// $("#btn-login").html('Sending an OTP ...');
// setTimeout(`window.location.href = "register.php?otpVerification=active®isterState=${$.trim(response)}";`,2000);
// $("#error").fadeIn(1000, function() {
// $("#register-form")[0].reset();
// });
// } else {
// $("#error").fadeIn(1000, function(){
// $("#error").html('<div class="alert alert-danger"><span class="glyphicon glyphicon-info-sign"></span> Fail To Register </div>');
// $("#btn-submit").html('Create Account');
// });
// }
} else if($.trim(response) == 'success2') {
$("#btn-save").html('Create Account');
$("#error").fadeIn(1000, function() {
$("#error").html('<div class="alert alert-success">You have registered successfully! Click here to <a href="index.php">Login</a></div>');
$("#register-form").hide();
//$("#btn-otp").html('Submit');
$("#register-form")[0].reset();
});
} else {
$("#error").fadeIn(1000, function() {
$("#error").html('<div class="alert alert-danger">'+$.trim(response)+'</div>');
$("#btn-save").html('Create Account');
});
}
}
});
return false;
}
$("#otp-form").on("submit", function(){
var data = $("#otp-form").serialize();
$("#btn-otp").html('checking ...');
$.post('includes/main.php', data, function(res) {
$("#error").html('');
if($.trim(res) == 'success2') {
console.log(res);
$("#btn-otp").html('Creating account ...');
$("#error").fadeIn(1000, function() {
$("#error").html('<div class="alert alert-success">You have registered successfully! Click here to <a href="index.php">Login</a></div>');
$("#register-form").hide();
$("#btn-otp").html('Submit');
$("#otp-form")[0].reset();
});
} else {
$("#error").fadeIn(1000, function() {
$("#error").html('<div class="alert alert-danger">'+res+'</div>').show();
$("#btn-otp").html('Submit');
});
}
});
return false;
})
});
</script>
</body>
</html>