<?php 

header('Location: login.php');

?>

<!DOCTYPE html>
<html>
<head>
	<title>Login | e FX Market</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap" rel="stylesheet">
	
	<style type="text/css">
		body{
			background-color: #121d33;
			background-image: url('img/bg2.jpg');
			font-family: 'Inter', sans-serif;
			background-size: cover;
			background-repeat: no-repeat;
			
		}

		#logolog{
			margin: 40px auto;
			height: 50px;
			width: 400px;
		}

		#formarea{
			width: 500px;
			border-radius: 10px;
			height: 400px;
			background-color: white;
			margin: 30px auto;
			clear: both;
			display: table;
			padding: 30px;
			box-sizing: border-box;
		}

		.input{
			width: 100%;
			height: 50px;
			border-radius: 5px;
			background-color: #e8f0fe;
			box-sizing: border-box;
			border: 0.5px solid grey;
			padding-right: 10px;
		}

		#btn{
			width: 100%;
			height: 50px;
			margin-top: 20px;
			color: white;
			background-color: #ffc31a;
			border: 0px;
			cursor: pointer;
			font-size: 18px;
			border-radius: 5px;
			font-weight: bold;
			box-sizing: border-box;

		}

		#forget{
			width: 400px;
			height: 50px;
			margin: 5px auto;
			text-align: center;
			color: white;
		}

		@media only screen and (max-width: 600px) {
		  #formarea{
		  	max-width: 90% !important;
		  	max-height: auto !important;
		  	padding: 10px;
		  }
		  
		  #forget{
		      max-width: 90%;
		  }
		  
		  #logolog{
		      max-width: 300px;
		  }

		}
	</style>
</head>


<body>
	
	<div id="logolog">
		<center><img src="img/logo.png"></center>
	</div>

	<div id="formarea">
		

<?php

					require 'core.php';
					require 'db_conn.php';
					include 'login2.php';

					if (loggedin()) {
						header('Location: dashboard.php');
					}

					
		?>
		
	</div>

	<div id="forget">
		<a href="register.php" style="color: white; text-decoration: none;">Don't have an account? Sign Up</a>
	</div>
	

</body>


</html>