<?php 
require_once("../app/config.php");
session_start();
if(isset($_SESSION['offshore_userid']) ){
	redirect($url."/user");
}
$title='Recover password';
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/forgot" method="post">
<?php 
if(!empty($_SESSION['offshore_forgoterror'])){?>
      	<div class="row">
            <div class="col-lg-12">
              <div class="alert <?php if($_SESSION['offshore_forgoterror']=='success') {echo 'bg-success';}else{echo 'bg-danger';}?> text-white alert-styled-left alert-dismissible">
                <button type="button" class="close" data-dismiss="alert"><span>&times;</span></button>
				<?php if($_SESSION['offshore_forgoterror']=='eruptx') {
					echo'An error occured, try again later';
				}else if($_SESSION['offshore_forgoterror']=='invaliddetails') {
					echo'No account with this email address was found';
				}else if($_SESSION['offshore_forgoterror']=='success') {
					echo'Password Reset link has been sent to your email';
				}
				unset($_SESSION['offshore_forgoterror']);?>                 
                </div>
              </div>
          </div>
<?php }?>
					<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:25%; height:auto;" class=""></a>
								<h5 class="mb-0 text-default alt-font">Recover your account</h5>
								<span class="d-block text-muted alt-font">Your credentials</span>
							</div>

							<div class="form-group form-group-feedback form-group-feedback-left">
								<input type="email" class="form-control alt-font" placeholder="Email" name="email" required>
								<div class="form-control-feedback">
									<i class="icon-envelop text-muted"></i>
								</div>
							</div>

							<div class="form-group text-center">
								<button type="submit" class="btn text-green-800 bg-green rounded-round alt-font">Proceed</button>
							</div>
						</div>
					</div>
				</form>
				<!-- /login form -->

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


			<!-- Footer -->
			<!-- /footer -->

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

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