        <?php 
            session_start();
            $kode_apli='SIDOSUGIH';
            $lokasi_gambar='https://koperasidesamerahputih.xyz/simpar_bandar/gambar';
            $_SESSION['lokasi_gambar']=$lokasi_gambar;
        ?>     
<!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="<?php echo $lokasi_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 
//// Mendapatkan path direktori saat ini
//$rootDir = __DIR__;

//// Menampilkan path direktori saat ini
//echo "Path direktori saat ini: $rootDir<br>";

//// Mendefinisikan path file koneksi
//$koneksiFile = $rootDir . '/koneksi.php';

//// Menampilkan path file koneksi
//echo "Path file koneksi: $koneksiFile<br>";

//// Mengecek apakah file koneksi ada
//if (file_exists($koneksiFile)) {
//    echo "File koneksi ditemukan!<br>";
//} else {
//    echo "File koneksi tidak ditemukan!<br>";
//} 

//// Menggunakan path direktori untuk mengakses file lain
//$otherFile = $rootDir . '/periksa_login.php';

//if (file_exists($otherFile)) {
//    echo "File other_file.php ditemukan!<br>";
//    include $otherFile;
//} else {
//    echo "File other_file.php tidak ditemukan!<br>";
//}

            
            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 <?php echo $_SESSION['no_angg']; ?>
              </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
            }
          }
          
          ?>
<div style="background-color: #FFF8DC; padding: 15px; border-radius: 15px; box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);">          
        </br>
        </br>
          <center>
          
            <div>
                <h5 class="fw-semibold my-3">ANGGOTA</h5>
               <a href="https://koperasidesamerahputih.xyz/simpar_bandar/index.php"><img src="https://koperasidesamerahputih.xyz/simpar_bandar/gambar/kop_koperasi_mp.png" style="width: 450px;height: auto"></a>
            </div>            
          </center>
        </br>
        </br>
          <form method="post" action="anggota_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="user_angg" 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="pass_angg" 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 ANGGOTA isi user dengan No Angg Anda, dan Paswordnya sesuai yg dikirim <font color='#ff0000'>ke WA anda</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>