<?php

define("PERMISSION_TYPE", 'LOGIN_SECURITY');

require __dir__ . '/init.php';

require _SDIR . '/for-otp_form.php';


template::$BLANK_PAGE = TRUE;

template::get_header(); 
	
?>

	<?php bridge::open(); ?>

		<div class="card mt-5">
			<div class='card-body'>
				
				<div class='text-center mb-3'>
					<img src="<?php echo template::$logo; ?>" alt="" class="logo" height="50">
				</div>
				
				<?php template::alert( $msg ); ?>
				
				<div id="login-container">
				
					<form action="otp_form.php" method="post"  >
					
						<h6 id="otp-code-text" class="login-form-text m-b-2 text-center">
							Please enter the code sent to your email
						</h6>
						
						<div class="mb-2">
							<input name="otp"   tabindex="2" type="text" class='form-control' placeholder="•••••">
						</div>
						
						<div class='mb-2 text-right'>
							<a href='?r=<?php echo $_SESSION['OTP_RK']; ?>'>
								Resend OTP
							</a>
						</div>
						
						<div class="login-button-home">
							<button name="verify"  class="btn btn-success btn-block">
								Submit
							</button>
						</div>

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


	<?php bridge::close(); ?>
	
<?php events::addListener("@footer", function() { ?>
	<script>
		new DoubleClickPreventer().init();
	</script>
<?php }); ?>

<?php template::get_footer(); ?>