<?php
session_start();

if (isset($_SESSION['adm_accountId']) && isset($_SESSION['adm_accessToken'])) {
    header('Location: admin/home');
    exit();
} else if (isset($_SESSION['usr_email']) && isset($_SESSION['usr_accessToken']) && isset($_SESSION['usr_accountId']) && (!empty($_SESSION['usr_accountId']))) {
    header('Location: user/account');
    exit();
}
?>
<!DOCTYPE html>
<html lang="zxx" dir="ltr">

<head>
    <!-- Standard Meta -->
    <meta charset="utf-8">
    <title>Forgot Password</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?php require_once("header2.php"); ?>
    <main>
        <!-- section content begin -->
        <div class="uk-section uk-padding-remove-vertical" style="background-color: #f7f7f7;">
            <div class="uk-container uk-container-expand">
                <div class="uk-width-expand@m uk-flex-middle">
                    <div class="uk-grid uk-flex-center">
                        <div class="uk-text-center"
                            style="margin: 40px auto 0px;position: relative;box-sizing: border-box;padding-bottom: 50px;">
                            <div style="top: 120px;">
                                <div
                                    style="max-width: 450px;border-radius: 40px;box-shadow: rgb(0 128 143 / 25%) 0px 8px 12px 0px;background-color: rgb(255, 255, 255);padding-left: 24px;padding-right: 24px;padding-top: 32px;padding-bottom: 32px;">

                                    <!-- logo begin -->
                                    <a class="uk-logo" href="index">
                                        <h4>Forgot your
                                            password?</h4>
                                    </a>
                                    <!-- logo end -->
                                    <p class="uk-text-lead uk-margin-small-top"></p>
                                    <p class="uk-margin-top uk-text-small uk-margin-medium-bottom grey">Enter your email
                                        address below to reset your password.</p>
                                    <div style="display: none;" id="feedbackPrompt"></div>
                                    <!-- login form begin -->
                                    <div class="uk-grid uk-form">
                                        <div class="uk-margin-small uk-width-1-1 uk-inline">
                                            <span class="uk-form-icon uk-form-icon-flip fas fa-envelope fa-sm"></span>
                                            <input class="uk-input uk-border-rounded" id="email" value="" type="email"
                                                placeholder="Email">
                                            <div class="invalid-feedback email_feedback">Email is required</div>
                                        </div>
                                        <div class="uk-margin-small uk-width-1-1">
                                            <button id="reset-password-btn"
                                                class="uk-button uk-width-1-1 uk-button-primary uk-border-rounded uk-float-left"
                                                type="submit" name="submit">Reset Password
                                                <span style="display: none;"
                                                    class="button_spinner spinner-border spinner-border-sm"
                                                    role="status" aria-hidden="false"></button>
                                        </div>
                                    </div>
                                    <span class="uk-text-small">Don't have an account? <a
                                            class="uk-button uk-button-text" href="create-account">Register
                                            here</a></span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        </div>
        </div>
        <!-- section content end -->
    </main>
    <?php require_once("footer.php"); ?>
    <!-- javascript -->
    <script src="js/vendors/uikit.min.js"></script>
    <script src="js/vendors/utilities.min.js"></script>
    <script src="js/config-theme.js"></script>
    <script src="js/forgot-password.js"></script>
    </body>

</html>