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

<head>

    <title>Login Sistem - Webgis</title>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />

    <!-- Favicon -->
    <link rel="icon" href="<?= base_url('assets/images/favicon.ico') ?>" type="image/x-icon">

    <!-- Fontawesome -->
    <link rel="stylesheet" href="<?= base_url('assets/fonts/fontawesome/css/fontawesome-all.min.css') ?>">

    <!-- Animation -->
    <link rel="stylesheet" href="<?= base_url('assets/plugins/animation/css/animate.min.css') ?>">

    <!-- Vendor CSS -->
    <link rel="stylesheet" href="<?= base_url('assets/css/style.css') ?>">

</head>

<body>

    <!-- [ auth-signin ] start -->
    <div class="auth-wrapper">
        <div class="auth-content container">
            <div class="card">
                <div class="row align-items-center">

                    <div class="col-md-6">

                        <div class="card-body">

                            <img src="<?= base_url('assets/images/logo-dark.png') ?>" alt="" class="img-fluid mb-4">

                            <h4 class="mb-3 f-w-400">
                                Login Sistem
                            </h4>

                            <?php if (session()->getFlashdata('error')) : ?>
                                <div class="alert alert-danger">
                                    <?= session()->getFlashdata('error') ?>
                                </div>
                            <?php endif; ?>

                            <?php if (session()->getFlashdata('success')) : ?>
                                <div class="alert alert-success">
                                    <?= session()->getFlashdata('success') ?>
                                </div>
                            <?php endif; ?>

                            <form action="<?= base_url('login') ?>" method="post">

                                <?= csrf_field() ?>

                                <div class="input-group mb-3">

                                    <div class="input-group-prepend">
                                        <span class="input-group-text">
                                            <i class="feather icon-user"></i>
                                        </span>
                                    </div>

                                    <input
                                        type="text"
                                        name="username"
                                        class="form-control"
                                        placeholder="Username"
                                        required>

                                </div>

                                <div class="input-group mb-3">

                                    <div class="input-group-prepend">
                                        <span class="input-group-text">
                                            <i class="feather icon-lock"></i>
                                        </span>
                                    </div>

                                    <input
                                        type="password"
                                        name="password"
                                        class="form-control"
                                        placeholder="Password"
                                        required>

                                </div>

                                <div class="text-center mt-2 mb-3">
                                    <a href="<?= base_url('/') ?>" class="f-w-600">
                                        Kembali ke Beranda
                                    </a>
                                </div>



                                <button
                                    type="submit"
                                    class="btn btn-primary btn-block mb-4">

                                    Login

                                </button>

                            </form>


                        </div>

                    </div>

                    <div class="col-md-6 d-none d-md-block">

                        <img
                            src="<?= base_url('assets/images/auth-bg.jpg') ?>"
                            alt=""
                            class="img-fluid">

                    </div>

                </div>
            </div>
        </div>
    </div>
    <!-- [ auth-signin ] end -->

    <!-- Required Js -->
    <script src="<?= base_url('assets/js/vendor-all.min.js') ?>"></script>
    <script src="<?= base_url('assets/plugins/bootstrap/js/bootstrap.min.js') ?>"></script>

</body>

</html>