<?php
session_start();
require_once '../config.php';
load('middleware', 'guest');
require_once '../lynchstore/auth/auth-login.php';
require_once '../layouts/header.php';
?>
	    <div class="row justify-content-center mb-5">
            <div class="col-12 col-md-5">
                <div class="card bg-dark shadow">
                    <div class="card-body">
                        <div class="header-title text-center">
                            <h2><img src="<?= opt_get('aWNvbi13ZWI=') ?>" height="50">
                        <?= config('web','title_web');?></h2>
                        </div>
                        
                        <hr>
                        <form method="POST" class="form form-vertical">
                                    <div class="mb-3">
                                        <label for="username" class="form-label">Username</label>
                                        <div class="input-group mb-3">
                                            <span class="input-group-text" id="username"><i class="far fa-user"></i></span>
                                            <input type="text" class="form-control" placeholder="Username" id="username" name="user">
                                        </div>
                                    </div>
                                    <div class="mb-3">
                                        <label for="password" class="form-label">Password</label>
                                        <div class="input-group mb-3">
                                            <span class="input-group-text" id="password"><i class="fas fa-lock"></i></span>
                                            <input type="password" class="form-control" placeholder="password" id="password" name="pass">
                                            <span class="input-group-text">
                                            <i class="far fa-eye-slash" id="togglePassword" style="cursor: pointer" onclick="pwEye(this);"></i>
                                            </span>
                                        </div>
                                    </div>
                                                Belum Mempunyai Akun?<a href="/auth/register"> Klik Disini</a>
                                                <br>
                                                <br>
                                                <button style="background-color:#0D47A1;color:white;" type="submit" name="login" class="btn btn-block btn-inline">Masuk</button>
                                        <div class="col-12">
                                        </div>
                                    </div>
                                    <div class="login-footer">
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
<?php require '../layouts/footer.php';?>
<script>
    function show() {
        var x = document.getElementById("password");
        if (x.type === "password") {
            x.type = "text";
        } else {
            x.type = "password";
        }
    }
</script>