<?php
$token=$_REQUEST['id'];
require_once ('../app/config.php');
$ad=mysqli_fetch_array(mysqli_query($dbc, "SELECT * FROM users WHERE token ='$token'"));
session_start();
if(isset($_SESSION['exchange_userid']) ){
	redirect($url."/user");
}
$title='Reset 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/resetpass" method="post">
					<div class="card 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">Recover your account</h5>
								<span class="d-block text-muted">Your credentials</span>
							</div>

							<div class="form-group form-group-feedback form-group-feedback-left">
								<input type="email" class="form-control" value="<?php echo $ad['email'];?>" readonly>
								<input type="hidden" name="token" value="<?php echo $token;?>">
								<div class="form-control-feedback">
									<i class="icon-envelop text-muted"></i>
								</div>
							</div>
                            <div class="form-group form-group-feedback form-group-feedback-right">
                                <div class="badge-indicator-absolute">
                                    <input type="password" class="form-control" placeholder="New password" name="password">
                                    <span class="badge password-indicator-badge-absolute"></span>
                                </div>
                            </div>

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

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


			<!-- Footer -->
			<div class="navbar navbar-expand-lg navbar-light">
				<div class="text-center d-lg-none w-100">
					<button type="button" class="navbar-toggler dropdown-toggle" data-toggle="collapse" data-target="#navbar-footer">
						<i class="icon-unfold mr-2"></i>
						Footer
					</button>
				</div>

				<div class="navbar-collapse collapse" id="navbar-footer">
					<span class="navbar-text">
						&copy; <?php echo date('Y');?> <a href="./"><?php echo $set['site_name'];?></a>
					</span>

					<ul class="navbar-nav ml-lg-auto">
						<li class="nav-item"><a href="./contact" class="navbar-nav-link" target="_blank"><i class="icon-lifebuoy mr-2"></i> Support</a></li>
				</div>
			</div>
			<!-- /footer -->

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

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