<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>KDMP</title>
  <link href="assets/css/bootstrap.min.css" rel="stylesheet">
  <link href="assets/css/bootstrap-icon.css" rel="stylesheet">
  <link href="assets/css/datatable-bootstrap5.min.css" rel="stylesheet">
  <link rel="shortcut icon" href="https://mitrakoperasi.com/kopdes/gambar/logo_kop_kcl.png" />
</head>
<body class="bg-dark">
 <div class="container">
  <div class="row justify-content-center">
    <div class="col-lg-5">
      <div class="card mt-5">
        <div class="card-body">
          <?php 
            session_start();
            //$_SESSION['xkd_aplikasi'] = '4464123';
            //$kode_apli=$_SESSION['xkd_aplikasi'];
            //$kode_apli='KAPAGUSW';
            
            if (isset($_COOKIE[session_name()])) {
                setcookie(session_name(), '', time() - 42000, '/');
            }
          if(isset($_GET['alert'])){
            if($_GET['alert'] == "gagal"){
              ?>
              <div class="alert alert-danger text-center fw-semibold">
                LOGIN GAGAL
              </div>
              <?php
            }else if($_GET['alert'] == "belum_login"){
              ?>
              <div class="alert alert-warning text-center fw-semibold">
                Silahkan login terlebih dulu
              </div>
              <?php
            }else if($_GET['alert'] == "logout"){
              ?>
              <div class="alert alert-success text-center fw-semibold">
                Anda telah logout
              </div>
              <?php
            }
          }
          
          ?>
        </br>
        </br>
          <center>
          
            <div>
                <h5 class="fw-semibold my-3">RESMI</h5>
               <img src="https://mitrakoperasi.com/kopdes/gambar/logo_koperasi_ku.png" style="width: 500px;height: auto">
            </div>            
          </center>
        </br>
        </br>
          <form method="post" action="periksa_login.php">
             <input type="hidden" name="xkd_aplikasi" value="<?php echo $kode_apli; ?>">
            <div class="form-group mb-2">
              <label class="form-label mb-2 fw-semibold">Username</label>
              <input type="text" required="required" name="usere" class="form-control" placeholder="Username" autocomplete="off">
            </div>
            <div class="form-group mb-2">
              <label class="form-label mb-2 fw-semibold">Password</label>
              <input type="password" required="required" name="passw" class="form-control" placeholder="************">
            </div>
            <div class="d-grid gap-2 my-3">
              <button type="submit" class="btn btn-primary fw-semibold"><i class="bi bi-lock"></i> LOGIN</button>
            </div>
          </form>
            <h6 class="fw-semibold my-3"><font color='#ff0000'>INFO <?php echo $kode_apli ; ?> :</font> untuk level ADM gunakan user : ssa, level SUP gunakan user : sss, dan untuk KAS gunkan user : ssk. Paswordnya semua sama yaitu : <font color='#ff0000'>4464</font></h6>
        </div>
      </div>
    </div>
  </div>
</div>
    <script src="assets/js/jquery.min.js"></script>
    <script src="assets/js/popper.min.js"></script>
    <script src="assets/js/bootstrap.min.js"></script>
    <script src="assets/js/jquery.datatables.min.js"></script>
    <script src="assets/js/datatables-bootstrap5.min.js"></script>
    <script src="assets/js/chart.js"></script>
</body>
<script type="text/javascript">
</script>
</html>