<?php 
require_once("../app/config.php");
session_start();
$id=$_SESSION['offshore_2fa'];
$row=mysqli_fetch_array(mysqli_query($dbc, "SELECT * FROM users WHERE id='$id'"));
$title='2fa verification';
require_once("include/user_header.php");
?>
	<div class="page-content bg-white">

		<!-- Main content -->
		<div class="content-wrapper">
			<!-- Content area -->
			<div class="content d-flex justify-content-center align-items-center">
				<!-- Login form -->
				<form class="login-form" action="app/user/verify2fa" method="post">
<?php
if(!empty($_SESSION['offshore_failed'])){?>
            <div class="col-lg-12">
              <div class="alert bg-danger text-white alert-styled-left alert-dismissible">
                <button type="button" class="close" data-dismiss="alert"><span>&times;</span></button>
					Wrong code               
                </div>
              </div>
<?php }
unset($_SESSION['offshore_failed']);?>
					<div class=" mb-0">
						<div class="card-body">
							<div class="text-center mb-3">
								<a href="./"><img src="asset/<?php echo $logo['image_link']; ?>" style="max-width:20%; height:auto;" class=""></a>
								<h5 class="mb-0">2fa security</h5>
								<span class="d-block">Enter verification code</span>
							</div>

							<div class="form-group form-group-feedback form-group-feedback-right">
								<input type="number" class="form-control" placeholder="2fa Code" name="answer" required>
								<input type="hidden" name="user_id" value="<?php echo $row['id'];?>">
							</div>
							<div class="form-group text-center">
								<button type="submit" class="btn text-green-800 bg-green-800 rounded-round">Verify</button>
							</div>
						</div>
					</div>
				</form>
				<!-- /login form -->

			</div>
			<!-- /content area -->


			<!-- Footer -->

			<!-- /footer -->

		</div>
		<!-- /main content -->

	</div>
<?php require_once("include/user_footer.php"); ?>