<? ob_start(); ?>
<?php
require_once("login.php");
require_once("functions.php");

?>

<?php
if(isset($_POST['user_login_btn'])){
$username = inject_checker($connection, $_POST['username']);
$password = inject_checker($connection, $_POST['password']);
        
if(empty($username)){
$error_msg = "Username Field Can not be empty";
}
elseif(empty($password)){
$error_msg = "Password Field Can not be empty";
}else{
$query = " SELECT * FROM `tbl_users` WHERE `username` = '{$username}' AND `password` = '{$password}' ";
$run_query = mysqli_query($connection, $query);
            
if(mysqli_num_rows($run_query) == 1){
session_start();
                
while($result = mysqli_fetch_assoc($run_query)){
$user_id = $result['id'];
$_SESSION['user'] = $user_id;
                    
header("Location:dashboard.php");
}
}else{
$error_msg = "Login Failed";
}
}
}
?>

<!DOCTYPE html PUBLIC "">
<html xmlns="">
	
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<head>
    <title>Login Account - Formidable Swiss Finance Bank </title>
    <link rel="icon" href="assets/img/favicon.ico" type="image/x-icon">
		
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<meta content="initial-scale=1.0, width=device-width" name="viewport"/>

<link rel="icon" type="image/png" sizes="32x32" href="online/sites/default/files/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="online/sites/default/files/favicons/favicon-16x16.png">
<link rel="shortcut icon" href="online/sites/default/files/favicons/apple-touch-icon.png">
<link href="css/afpaas-iam.css" type="text/css" rel="stylesheet">

		
	</head>
	<body>
	<!-- ------  CUSTOM IMPORT  -------  -->
	<link type="text/css" href="css/userAgent.css"  rel="stylesheet">
	<!-- ------  END CUSTOM IMPORT  -------  -->
	


  <div class="static-content">
    <!-- The header block (horizontal on top) -->
    <header>
        <a class="logo-link" href="https://formidablebank.com/swiss/en/secured/online/index.html" target="_blank">
            <div class="logo-image logo-image--axion"></div>
        </a>
        <div class="menu">
            <div class="menu-entry menu-entry--languages">
                <i class="fa fa-flag-o"></i>
                <span class="menu-title">Location</span>
            </div>
            <a class="menu-entry menu-entry--help" href="online/contactandsupport.html">
                <i class="fa fa-life-ring menu-icon" aria-hidden="true"></i>
                <span class="menu-title">Help</span>
            </a>
        </div>

    </header>
 
  </div>


  <!-- This script fires logout event to Orchestrator in order to avoid Login iFrame -->
 


	<!-- ------  CUSTOM HTML  -------  -->
	<div id="extPopup" style ="display:none">
		<div id="extStruct">
			<h2>Minimum requirements</h2>
			<p>Dear customer,<br><br>we kindly inform you that your internet browser does not meet the necessary minimum requirements to safely access to the e-banking of Formidable Bank PLC.</p>
			<p>We invite you to update your reference software. You can find below the minimum supported versions:</p><br>
			<div class="browsers">
				<b>Microsoft Edge</b> 44.17763 or higher (EdgeHTML 18.17763 or higher)<br><b>Chrome</b> 72.0.3626 or higher<br><b>Safari</b> 12.0.02 or higher<br><b>Firefox</b> 65.0 or higher<br>
			</div>
			<p>Please note that the Internet Explorer browser is no longer supported as it is replaced by the Microsoft Edge browser.</p>
			<!-- <div class="extButton"><a id="extButton" onclick="displayLogin()">Continue</a></div> -->
		</div>
	</div>
	<!-- ------  END CUSTOM HTML  -------  -->
	<div id="content">
		<h1>E-banking access <BR> <div style= "font-size: 10pt; color: #000"; >Insert your credentials</div></h1>

		<div id="uppermessage">
			
			
			
			
			<div id="maintenancemessage">
				<p>Dear Customer,<br />
for security reasons, <strong>from mid-March</strong> the e-banking access will be allowed only through the browsers updated at least to the minimum recommended versions (available by <a href="online/protecting-what-matters.html">clicking here</a>).<br />
</p>
			</div>
			
		</div>

		

		<!-- The login form -->
		<form name="LOGINFORM" method="POST" action=""	id="mainform" enctype="multipart/form-data" >
			
			<input type="hidden" name="FORM_TOKEN" value="97398ca464157b29"></input>
			<div id="inputline">User Name  <input name="username" value="" type="text" maxlength="50" tabindex="1"/></div>
			
				<div id="inputline">Password<input name="password" value="" type="password" size="20" maxlength="50" tabindex="2"/></div>
				
			
			
			
				
			

			

			
			<div id="submitbuttons">
				<div id="submitbutton"><input id ="loginButton" type="submit" name="user_login_btn" value="LOGIN" tabindex="5"/></div>
				
				
			</div>
	

<div class="password-forgotten-link">
    <a href="#" onClick="togglePasswordChange();" >Access problems?</a>
</div>
		</form>

		
		<div id="lowermessage">
		</div>
	



<div id="disclaimer">
    <span class="whitehat-badge"><img src="images/whitehat_logo.gif"alt="Whitehat Security Logo"></span>
    <div class="bsct-custom-footer">
        <p><br/>©2024 Formidable Bank Online Acess. All rights reserved</p>
    </div>
</div>

	</div>
	<script type="text/javascript" src="js/afpaas.js"></script>
	<div id="afpaas-modal-container--password-forgotten"
     class="afpaas-modal-container afpaas-modal-container--hidden afpaas-modal-container--password-forgotten">
    <div class="afpaas-modal">
        <div class="afpaas-modal-header">
            <div>Access problems</div>
            <i class="fa fa-times afpaas-modal-close" aria-hidden="true" onClick="togglePasswordChange();"></i>
        </div>
        <div class="afpaas-modal-content">
            <p class="description">
                You can contact our e-banking support Monday to Friday, from 8 a.m. to 6 p.m.
            </p>

            
        </div>
    </div>
</div>

	</body>


</html>
<? ob_flush(); ?>