<script type="text/javascript">

var emailFilter=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,4}))$/;

function validate_fpassword(){
    
    if($("#forgot_email").val()==''){
        $("#validate_msg").html('Please enter your email address.');
        $("#jmsg").show();
        $("#forgot_email").focus();
        return false;
    
    }else if($("#forgot_email").val()!='' && !(emailFilter.test($("#forgot_email").val())) ){
        $("#validate_msg").html('Please enter valid Email address.');
        $("#jmsg").show();
        $("#forgot_email").focus();
        return false;
    }
    
}
</script>

<div class="auth-layout-wrap" style="background-image: url(./assets/images/photo-wide-4.jpg)">
    <div class="auth-content">
        <div class="card o-hidden">
            <div class="row">
                <div class="col-md-6">
                    <div class="p-4">
                        <div class="auth-logo text-center mb-4">
                            <img src="assets/images/logo.svg" alt="">
                        </div>
                        <h1 class="mb-3 text-18">Forgot Password</h1>

                        <?php if(isset($successMsg) && $successMsg!=''){ ?>
                        <div class="alert alert-success">
                            <?php echo base64_decode($successMsg); ?>
                        </div>
                        <?php } ?>
                                                            
                        <?php if(isset($failedMsg) && $failedMsg!=''){ ?>
                        <div class="alert alert-danger">
                            <?php echo base64_decode($failedMsg); ?>
                        </div>
                        <?php } ?>
                        
                        <div class="alert alert-danger" id="jmsg" style="display:none;">
                            <span id="validate_msg">&nbsp;</span>
                        </div>

                        <form action="" method="post">
                            <div class="form-group">
                                <label for="forgot_email">Email address</label>
                                <input id="forgot_email" name="forgot_email" class="form-control form-control-rounded" type="email">
                            </div>
                            <button class="btn btn-primary btn-block btn-rounded mt-3" id="submit" name="submit">Reset Password</button>

                        </form>
                        <div class="mt-3 text-center">
                            <a class="text-muted" href="admin-login.php"><u>Sign in</u></a>
                        </div>
                    </div>
                </div>
                <div class="col-md-6 text-center " style="background-size: cover;background-image: url(./assets/images/photo-long-3.jpg)">
                    <div class="pr-3 auth-right">
                        <a class="btn btn-outline-primary btn-outline-email btn-block btn-icon-text btn-rounded" href="signup.html">
                            <i class="i-Mail-with-At-Sign"></i> Sign up with Email
                        </a>
                        <a class="btn btn-outline-primary btn-outline-google btn-block btn-icon-text btn-rounded">
                            <i class="i-Google-Plus"></i> Sign in with Google
                        </a>
                        <a class="btn btn-outline-primary btn-outline-facebook btn-block btn-icon-text btn-rounded">
                            <i class="i-Facebook-2"></i> Sign in with Facebook
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
