<?php
include './onlinebanking/dashboard/functions/getProfileDetails.php';
if (isset($_SESSION['UserID'])) {
include './onlinebanking/dashboard/functions/TransactionScript.php';

$msg = "";

if (isset($_POST['verify'])) {
	$otp =  $_POST['otp'];
	$otpVerify =  $_POST['otpVerify'];
	$email = $_POST['email'];

// 	$con = mysqli_connect("localhost", "springwe_useradmin", "supportadmin", "springwe_in");
    
//     $result = mysqli_query($con, "SELECT * FROM customers WHERE email = '$email' ");
    
        
        if($otp == $otpVerify && $allowed == 0) {
        
        echo '<script>window.location.replace("./onlinebanking/dashboard/index.php");</script>';
// 		header("Location: ./index.php");
       } else if($otp == $otpVerify && $allowed == 1) {
        
        echo '<script>window.location.replace("./account-suspended.php");</script>';
// 		header("Location: ./index.php");
       }

    else { 
         
        echo '<script>window.location.replace("./onlinebanking/dashboard/index.php");</script>';
        

          }
	
}

?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Transactions - verify account</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta http-equiv="content-language" content="en">
<meta name="theme-color" content="#426fb6" >
<meta name="msapplication-navbutton-color" content="#426fb6">
<meta name="apple-mobile-web-app-status-bar-style" content="#426fb6">
<meta name="keywords" content="">
<meta name="description" content="" >
<meta property="og:type" content="website">
<meta property="og:site_name" content="">
<meta property="og:title" content="SpringWellTrust Bank">
<meta property="og:description" content="">
<meta property="og:site_name" content="">
<meta property="og:image" content="">
<meta name="msapplication-TileColor" content="#426fb6">
<meta name="msapplication-TileImage" content="https://d4u5qzkfpc9yt.cloudfront.net/favicons/mstile-144x144.7f7356b104f883d3d4fb2cf19d18d3f24c8cb71d.png">
<meta property="og:url" content="">
<link rel="stylesheet" type="text/css" href="/personal/personal/assets/css_animate/animate.min.css">
<link rel="stylesheet" type="text/css" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<link rel="icon" type="image/x-icon" href="/personal/favicon.png">
<link rel="stylesheet" type="text/css" href="/personal/personal/assets/stylesheet/layout.css">
<link rel="stylesheet" type="text/css" href="/personal/personal/assets/stylesheet/fonts.css">
<link rel="stylesheet" type="text/css" href="/personal/personal/assets/stylesheet/responsive.css">
<link rel="stylesheet" type="text/css" href="/personal/assets/stylesheet/responsive.css">
<link rel="stylesheet" type="text/css" href="/personal/assets/stylesheet/fonts.css">
<link rel="stylesheet" href="admin/css/sweetalert2.min.css">
<link href="css/main.css" rel="stylesheet"/>
<link href="css/animate.min.css" rel="stylesheet" />

<link rel="stylesheet" type="text/css" href="slick/slick.css">
<link rel="stylesheet" type="text/css" href="slick/slick-theme.css">
<link rel="stylesheet" href="css/bootstrap.min.css">


<!-- Add icon library -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.1/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<link rel="stylesheet" href="../../css/bootstrap.min.css">

<link href="../../css/main.css" rel="stylesheet"/>
<link href="../../css/animate.min.css" rel="stylesheet" />

<link rel="stylesheet" type="text/css" href="../../slick/slick.css">
<link rel="stylesheet" type="text/css" href="../../slick/slick-theme.css">
<script>
$(".navbar-toggler").click( function(){
	$("#mySidebar").toggle();
});
$("#closeMenu").click( function(){
	$("#mySidebar").toggle();
});
</script>

<style>
.slick-dots{bottom: 0px !important;}
.slick-dots li button:hover:before,.slick-dots li button:focus:before{color:#426fb6;}
.slick-dots li button:before{font-size: 6px;}
.slick-dots li.slick-active button:before{color:#426fb6;}
.slick-dots li.slick-active button:before{opacity: 1;}
.slick-dotted.slick-slider{ margin-bottom: 0px;}
</style>




<!--========================== PRELOAD FONTS============================= -->
<link rel="preload" href="/personal/personal/fonts/Roboto-Light.ttf" as="font">

<!--========================== PRELOAD FONTS============================= -->
<link rel="preload" href="/personal/assets/fonts/hind-medium.otf" as="font">
<link rel="preload" href="/personal/assets/fonts/hind-light.otf" as="font">
<link rel="preload" href="/personal/assets/fonts/hind-bold.otf" as="font">
<link rel="preload" href="/personal/assets/fonts/hind-regular.otf" as="font">
<link rel="preload" href="/personal/assets/fonts/hind-semibold.otf" as="font">
<link rel=’stylesheet’ href=typicons.font-master/src/font/typicons.min.css’>
<link rel="stylesheet" href="/personal/admin/css/sweetalert2.min.css">
<script src="/personal/admin/js/sweetalert2.all.min.js"></script>
<!-- ====================== JS SCRIPTS =====================================-->
<script type="text/javascript" src="/personal/personal/assets/js/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="/personal/personal/assets/js/global.js"></script>
<script type="text/javascript" src="/personal/assets/js/global.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script type="text/javascript" src="/personal/personal/assets/js/wow.min.js"></script>
<script type="text/javascript">
new WOW().init();
</script>

</head>
<body>
    <?php require 'livechat/index.php' ?>
    <style>
.slick-dots{bottom: 0px !important;}
.slick-dots li button:hover:before,.slick-dots li button:focus:before{color:#426fb6;}
.slick-dots li button:before{font-size: 6px;}
.slick-dots li.slick-active button:before{color:#426fb6;}
.slick-dots li.slick-active button:before{opacity: 1;}
.slick-dotted.slick-slider{ margin-bottom: 0px;}
</style>
<div class="hero bg-about">
	<div class="container">
		<div class="row">
			<div class="col-md-6">
				<div class="hero-text">
					<h2 class="text-black font-weight-bolder my-2">Verify Access
					</h2>
					<p class="mb-4">Proceed to your account</p>
<div id="google_translate_element"></div>
<script> 
function googleTranslateElementInit() {
  new google.translate.TranslateElement({
    pageLanguage: 'jp'
  }, 'google_translate_element');
}
</script>
<script src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
				</div>
			</div>
			<div class="col-md-6" style="overflow: hidden;">
			    
			    <div class="loginbox">
						<div class="innerlogin" id="login-form">
							<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
				
				<div class="hero-login bg-dark rounded-top" style="background-color:; overflow: hidden;" >
				<h2>Access Account</h2>

				
				<form action="" method="post" class="mt-3">
				    
					<div class="loginStat"></div>
					<p style="color: red;"><?php echo $msg ?></p>
					<label for="pwd" class="inp mt-4">
					    <input type="hidden"  name="email" value="<?php echo $Email; ?>">
					    <input type="hidden"  name="otpVerify" value="<?php echo $db_otp; ?>">
					    
						<input type="hidden" class="form-control" value="<?php echo $db_otp; ?>" required name="otp" placeholder="&nbsp;">
						<span class="label"></span>
						<span class="border"></span>
					</label><br />
					<div class="my-3" id="html_element"></div>
					<button type="submit" name="verify" class="btn btn-primary  rounded-pill px-5" style="background-color: green;">ENTER</button>
				</form>
				
	
				</div>
			</div>
		</div>
	</div>
	<div id="particles-js"></div>
</div>
<!-- ======================= WHOLE BODY WRAPPER   ================================================= -->

<div id="Body_container">
</body>
</html>
<?php
}else {
header("Location: /personal/");
}
?>