<!doctype html>
<html lang="en">

<head>
    <?php
    include "asset/head.php";
    ?>
</head>

<body>
    <div class="container-fluid d-flex justify-content-center align-items-center" style="height: 100vh;background: #2A7B9B;background: linear-gradient(90deg, rgba(42, 123, 155, 1) 0%, rgba(199, 87, 87, 1) 100%, rgba(237, 83, 83, 1) 100%);">
        <div class="kotak" style="width: 350px;border-radius: 10px;background-color: white;">
            <div class="row" style="margin-top: 10px;">
                <center>
                    <h1 style="font-weight: 800;color: #2A7B9B;">Login</h1>
                </center>
                <div class="alert" style="margin-bottom: -20px;">
                    <?php if (isset($_GET['error'])) { ?>
                        <div class="alert alert-danger">
                            <?php
                            if ($_GET['error'] == 'user') {
                                echo "Username tidak ditemukan";
                            } elseif ($_GET['error'] == 'pass') {
                                echo "Password salah";
                            } elseif ($_GET['error'] == 'kosong') {
                                echo "Data harus diisi";
                            } elseif ($_GET['error'] == 'akses') {
                                echo "Anda Tidak Ada Akses";
                            } elseif ($_GET['error'] == 'pilih') {
                                echo "Anda Harus Pilih Raxi / Bisman";
                            }
                            ?>
                        </div>
                    <?php } ?>
                </div>
            </div>
            <form method="post" action="function/function-login.php">
                <div class="row" style="margin-left: 20px;margin-right: 20px;">
                    <div class="mb-3">
                        <label class="form-label">Username</label>
                        <input type="text" class="form-control" name="username" placeholder="Masukkan Username">
                    </div>
                    <div class="mb-3">
                        <label class="form-label">Password</label>
                        <input type="password" class="form-control" name="password" placeholder="Masukkan Username">
                    </div>
                </div>
                <div class="row mb-3 text-center" style="margin-left: 20px;margin-right: 20px;">
                    <!-- KIRI -->
                    <div class="col-6 d-flex justify-content-center">
                        <input type="radio" class="logoe" name="akses" id="raxi" value="Raxi" hidden>
                        <label for="raxi" class="akses-box">
                            <img src="asset/gambar/Logo-Raxi.png">
                        </label>
                    </div>
                    <!-- KANAN -->
                    <div class="col-6 d-flex justify-content-center">
                        <input type="radio" class="logoe" name="akses" id="bisman" value="Bisman" hidden>
                        <label for="bisman" class="akses-box">
                            <img src="asset/gambar/logo-bisman.png">
                        </label>
                    </div>
                </div>
                <br>
                <div class="row" style="margin-left: 30px;margin-right: 30px;margin-bottom: 20px;">
                    <button type="submit" class="btn btn-login" value="Login">Login</button>
                </div>
            </form>
            <p style="text-align: center;">copyright @ ipong</p>
        </div>
    </div>
    <?php
    include "asset/footer.php";
    ?>
</body>

</html>