/home/techb158/workloadmatch.com/workloadmatch.com/includes
Edit: /home/techb158/workloadmatch.com/workloadmatch.com/includes/process_login.php (2884B)
success){
//$succMsg = 'Your contact request have submitted successfully.';
$ip= get_client_ip();
$getCountryFromIP= getCountryFromIP($ip, " NamE ");
if($getCountryFromIP == "Canada")
{
}else{
//header('Location: ../index.php?err=You need permission to perform this action!'.$getCountryFromIP);
//exit();
}
if (isset($_POST['email'], $_POST['p'])) {
$email = filter_input(INPUT_POST, 'email', FILTER_SANITIZE_EMAIL);
$password = $_POST['p']; // The hashed password.
if (login($email, $password, $mysqli) == true) {
$user_type= $_SESSION['User_type'];
if($user_type == "Client_Profile")
{
header("Location: ../Client/dashboard.php");
exit();
}else if($user_type == "Teacher_Profile")
{
if (isset($_SESSION['Send_Re_ID'])) {
$Send_Re_ID= $_SESSION['Send_Re_ID'];
$Send_number_id= $_SESSION['Send_number_id'];
$Send_Client_ID= $_SESSION['Send_Client_ID'];
$Send_Broker_ID= $_SESSION['Send_Broker_ID'];
$Send_Broker_ID_Receiver= $_SESSION['Send_Broker_ID_Receiver'];
header("Location: ../Teacher/followup.php?var='".$Send_Re_ID."','".$Send_number_id."','".$Send_Client_ID."','".$Send_Broker_ID."','".$Send_Broker_ID_Receiver."'");
exit();
}else{
header("Location: ../Teacher/dashboard.php");
exit();
}
}else if($user_type == "Manager_Profile")
{
header("Location: ../Manager/dashboard.php");
exit();
}else if($user_type == "Master_Profile")
{
header("Location: ../Master/dashboard.php");
exit();
}else if($user_type == "Admin_Profile")
{
header("Location: ../Admin/dashboard.php");
exit();
}else{
header('Location: ../index.php?error=2');
exit();
}
} else {
// Login failed
header('Location: ../index.php?error=1');
exit();
}
} else {
// The correct POST variables were not sent to this page.
header('Location: ../error.php?err=Could not process login');
exit();
}
}else{
header('Location: ../index.php?err=Robot verification failed, please try again');
exit();
}
}else{
header('Location: ../index.php?err=Please click on the reCAPTCHA box.');
exit();
}