<?= $this->include('Views/auth/header');?>
<div class="container">
    <div class="row align-items-center">
        <div class="col-md-12 mb-3 text-center">
            <a href="<?= base_url();?>"><img src="<?= base_url()?>assets/images/bakla-logo.png" height="40px" class="text-center"></a>            
        </div><!-- logo !-->
        <div class="col-md-12 mb-3 mt-3">
            <div class="card card-body shadow-sm mx-auto p-4 rounded-0">
                <h5 class="display-6 fs-6 mb-3"><span class="d-flex fw-bold fs-3">Administrator</span>
                <small>Bakla Marketplace Login</small></h5>
                <div class="col-md-12 mb-2">
                    <small>
                    <?php if(session()->getTempdata('success')): ?>
                        <div class="alert alert-success" role="alert">
                        <?= session()->getTempdata('success');?>
                        </div>
                    <?php endif;?>
                    <?php if(session()->getTempdata('info')): ?>
                        <div class="alert alert-info" role="alert">
                        <?= session()->getTempdata('info');?>
                        </div>
                    <?php endif;?>
                    <?php if(session()->getTempdata('warning')): ?>
                        <div class="alert alert-warning" role="alert">
                        <?= session()->getTempdata('warning');?>
                        </div>
                    <?php endif;?>
                    <?php if(session()->getTempdata('error')): ?>
                        <div class="alert alert-danger" role="alert">
                        <?= session()->getTempdata('error');?>
                        </div>
                    <?php endif ?>
                    <?php if (!empty($errors)): ?>
                        <div class="alert alert-danger" role="alert">
                        <ul>
                            <?php foreach ($errors as $error): ?>
                            <li><?= esc($error) ?></li>
                            <?php endforeach ?>
                        </ul>
                        </div>
                    <?php endif ?></small>
                </div><!-- error print !-->
                <form method="POST" action="<?= base_url('administrator/check-login');?>">
                <?= csrf_field();?>
                <div class="d-grid">
                    <div class="form-floating mb-2">
                        <input type="email" name="email" class="form-control" id="floatingInput" placeholder="Email Address" required>
                        <label for="floatingInput">Email Address</label>
                    </div>
                    <div class="form-floating mb-2">
                        <input type="password" name="password" class="form-control" id="floatingInput1" placeholder="Email Password" autocomplete="new-password" required>
                        <label for="floatingInput1">Password</label>
                    </div>
                    <button type="submit" class="btn btn-danger d-block">Login</button>
                </div>
                </form>
                <div class="row mt-3">
                    <div class="col-sm-6 mb-2"><a href="<?= base_url('/');?>"><small>Website</small></a></div>
                    <div class="col-sm-6 mb-2"><a href="<?= base_url('forgot-password');?>"><small> Forgot Password</small></a></div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">

    </div>
</div>

    <?= $this->include('Views/auth/footer');?>