

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title> Masjidku </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="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css">
   <link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin=""/>
   <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
   <link rel="shortcut icon" href="https://koperasidesamerahputih.xyz/masjid_001/gambar/masjidku.png" />
  <?php 
  session_start();
  include '../koneksi.php';
  date_default_timezone_set('Asia/Jakarta');
  $edisi='Edisi 06012026@115.15';
  if($_SESSION['status'] != "administrator_logedin"){
    header("location:../index.php?alert=belum_login");
  }
 
// menghapus file error_log
    unlink('error_log');
//echo “error_log sudah dihapus”;
    
    $tgl_d    = $_SESSION['tgl_dr'];
    $tgl_s    = $_SESSION['tgl_sd'];

    $tgl_sd     = $_SESSION['tgl_sd'];
    $tgl_dr     = $_SESSION['tgl_dr'];
    //$milik    = $_SESSION['milik'];
    //echo $lokasi_gambar ;
    $tgl_awal= '2025-01-01' ;
                  
  ?>
</head>
</head>
<body class="bg-light">
  <nav class="navbar navbar-expand-lg bg-dark navbar-dark">
    <div class="container-fluid">
      <a class="navbar-brand" href="index.php">E-<b>MASJIDKU</b></a>
      <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
      </button>
      <div class="collapse navbar-collapse" id="navbarSupportedContent">
          
        <?php if ($_SESSION['level']=='ANGGOTA') { ?>  
                <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                  <li class="nav-item dropdown">
                    <?php 
                    $id_user = $_SESSION['id'];
                    $profil = mysqli_query($koneksi,"select * from anggota where angg_id='$id_user'");
                    $p = mysqli_fetch_assoc($profil);
                    
                    ?>
        
                    <a class="nav-link active dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                            <?php if($p['foto_diri'] == ""){ ?>
                              <img src="../gambar/user.png" style="width: 25px;height: auto">
                            <?php }else{ ?>
                              <img src="../gambar/diri/<?php echo $p['foto_diri'] ?>" style="width: 25px;height: auto">
                            <?php } ?>
                            
                        <i class="bi bi-caret-right-square"></i>
                       <span> Hallo, <?php echo $p['nama']; ?></span>
                    </a>
                    <ul class="dropdown-menu shadow-sm dropdown-menu-end mt-2">
                      <li><a class="dropdown-item" href="#"><img src="../gambar/diri/<?php echo $p['foto_diri'] ?>" style="width: 150px;height: auto"></li>    
                      <li><a class="dropdown-item" href="index.php"><i class="bi bi-award"></i> <?php echo $_SESSION['kdc']; ?>-<?php echo $_SESSION['level']; ?> </a></li>
                      <li><a class="dropdown-item" href="angg_kartu.php?id=<?php echo $id_user ; ?>"><i class="bi bi-person"></i> Profil</a></li>
                      <li><a class="dropdown-item" href="gantipassword_angg.php"><i class="bi bi-lock"></i> Ganti Password</a></li>
                      <li><a class="dropdown-item" href="logout_angg.php"><i class="bi bi-power"></i> Log Out</a></li>
                    </ul>
                  </li>
                </ul>
        <?php } else if ($_SESSION['level']<>'LAP') { ;?> 
        
          <ul class="navbar-nav me-auto mb-2 mb-lg-0">  
          <li class="nav-item dropdown">
            <a class="nav-link active dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
              <i class="bi bi-stickies"></i> <span> Master Data</span>
            </a>

              <ul class="dropdown-menu shadow-sm mt-2">
                  <li><a class="dropdown-item" href="00_nama_koperasi.php"><i class="bi bi-1-square-fill"></i><i class="bi bi-1-square-fill"></i> Data Masjid (Alamat, dll)</a></li>
                  <li><a class="dropdown-item" href="00_baground.php"><i class="bi bi-1-square-fill"></i><i class="bi bi-2-square-fill"></i> Ganti Baground Apl & Logo/Kop Laporan</a></li>
                  <li><a class="dropdown-item" href="b_pengurus.php"><i class="bi bi-1-square-fill"></i><i class="bi bi-3-square-fill"></i> Pengurus & Pengawas</a></li>
                  <li><a class="dropdown-item" href="b_karyawan_top.php"><i class="bi bi-1-square-fill"></i><i class="bi bi-4-square-fill"></i> Karyawan & Manager</a></li>
                  <li><a class="dropdown-item" href="00_ttd_laporan.php"><i class="bi bi-1-square-fill"></i><i class="bi bi-5-square-fill"></i> Penandatangan Laporan</a></li>
                  <li><a class="dropdown-item" href="a_user.php"><i class="bi bi-1-square-fill"></i><i class="bi bi-6-square-fill"></i> Buat Pasword User</a>                  
                  <li><a class="dropdown-item" href="kode_akunt_new.php"><i class="bi bi-2-square-fill"></i><i class="bi bi-1-square-fill"></i> Kode Akunt Buku Besar</a></li>
                  <li><a class="dropdown-item" href="00_warna_background.php"><i class="bi bi-3-square-fill"></i><i class="bi bi-1-square-fill"></i> Jenis Warna Background</a></li>
                  <li><a class="dropdown-item" href="backup.php"><i class="bi bi-4-square-fill"></i><i class="bi bi-1-square-fill"></i> Backup Data</a></li>      
                  <!-- PENTING JANGAN DIHAPUS - DIHIDDEN AGAR TIDAK DIGUNAKAN OLEH USER LAIN 
                  <li><a class="dropdown-item" href="!!!!!!!!!!_hapus_gambar_all.php"><i class="bi bi-9-square-fill"></i><i class="bi bi-2-square-fill"></i> Hapus Gambar</a></li>      
                  --> 
             </ul>
          </li>
          

          <li class="nav-item">
             <a class="nav-link active" href="@_angg_tgl_sd_tgl.php?tanggal_d=<?php echo $tgl_awal ; ?>&tanggal_s=<?php echo $tgl_sd ; ?>">
                 <i class="bi bi-person-lines-fill"></i> <span> Donatur</span>
             </a>
          </li>
          <li class="nav-item">
             <a class="nav-link active" href="tugas_lap_trans_tgl_sd_tgl.php?tanggal_d=<?php echo $tgl_dr ; ?>&tanggal_s=<?php echo $tgl_sd ; ?>">
                 <i class="bi bi-receipt-cutoff"></i> <span> Kolekting</span>
             </a>
          </li>          
          <li class="nav-item">
             <a class="nav-link active" href="@_hutang_trans.php?tanggal_d=<?php echo $tgl_awal ; ?>&tanggal_s=<?php echo $tgl_sd ; ?>">
                 <i class="bi bi-recycle"></i> <span> Hutang </span>
             </a>
          </li>          


          <li class="nav-item dropdown">
              <a class="nav-link active dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                  <i class="bi bi-bicycle"></i> <span> Aset Tetap & Sewa</span>
              </a>
                <ul class="dropdown-menu shadow-sm mt-2">
                    <li><a class="dropdown-item" href="at_kode_jenis.php"><i class="bi bi-1-square-fill"></i><i class="bi bi-1-square-fill"></i> Tambah Jenis Aset Tetap</a></li>
                    <li><a class="dropdown-item" href="at_rekap_daftar.php"><i class="bi bi-1-square-fill"></i><i class="bi bi-2-square-fill"></i> Rekap Daftar Aset Tetap</a></li>

                    <li><a class="dropdown-item" href="at_pembelian.php"><i class="bi bi-2-square-fill"></i><i class="bi bi-1-square-fill"></i> Pembelian Aset Tetap </a></li>
                    <li><a class="dropdown-item" href="at_daftar_barang_all.php"><i class="bi bi-2-square-fill"></i><i class="bi bi-2-square-fill"></i> Penjualan / Biaya / Pendapatan Aset Tetap </a></li>
                    <li><a class="dropdown-item" href="at_penyusutan.php"><i class="bi bi-2-square-fill"></i><i class="bi bi-3-square-fill"></i> Penyusutan Aset Tetap</a></li>
                </ul>
          </li>   

              <li class="nav-item dropdown">
                <a class="nav-link active dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                  <i class="bi bi-file-spreadsheet"></i> <span> Transaksi Kas/Bank</span>
                </a>
                <ul class="dropdown-menu shadow-sm mt-2">
                      <li><a class="dropdown-item" href="!!_kas_akunt_trans.php"><i class="bi bi-1-square-fill"></i><i class="bi bi-1-square-fill"></i> Penerimaan/Pengeluaran Kas/Bank (Lain)</a></li>
                      <li><a class="dropdown-item" href="!!_memmo_trans.php"><i class="bi bi-1-square-fill"></i><i class="bi bi-2-square-fill"></i> Transaksi Memorial</a></li>
                      <li><a class="dropdown-item" href="!!_kas_akunt_bank_trans.php"><i class="bi bi-1-square-fill"></i><i class="bi bi-3-square-fill"></i> Transaksi Setor/Tarik Bank</a></li>
                </ul>
              </li>



              <li class="nav-item dropdown">
                <a class="nav-link active dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                  <i class="bi bi-exclamation-octagon"></i> <span> Laporan </span>
                </a>
                <ul class="dropdown-menu shadow-sm mt-2">
                      <li><a class="dropdown-item" href="lap_a_kas_tgl_sd_tgl_lihat.php?tanggal_d=<?php echo $tgl_dr ; ?>&tanggal_s=<?php echo $tgl_sd ; ?>"><i class="bi bi-1-square-fill"></i><i class="bi bi-1-square-fill"></i> Laporan Transaksi (Semua) Kas/Bank Tgl... s/d Tgl...</a></li>
                      <li><a class="dropdown-item" href="lap_a_kas_tgl_sd_tgl_per_kas_lihat.php?tanggal_d=<?php echo $tgl_dr ; ?>&tanggal_s=<?php echo $tgl_sd ; ?>"><i class="bi bi-1-square-fill"></i><i class="bi bi-2-square-fill"></i> Laporan Transaksi (Satu) Kas/Bank Tgl... s/d Tgl...</a></li>
                      <li><a class="dropdown-item" href="lap_a_kas_tgl_sd_tgl_lihat_unit.php?tanggal_d=<?php echo $tgl_dr ; ?>&tanggal_s=<?php echo $tgl_sd ; ?>"><i class="bi bi-1-square-fill"></i><i class="bi bi-3-square-fill"></i> Laporan Transaksi (Satu) Kas/Bank Tgl... s/d Tgl...</a></li>
                      
                      <li><a class="dropdown-item" href="lap_akunt_nrc_tgl_sd_tgl_lihat.php?ket=tgl_s/d_tgl"><i class="bi bi-2-square-fill"></i><i class="bi bi-1-square-fill"></i> Laporan Neraca & PHU dr tgl ... s/d ....</a></li>
                      <li><a class="dropdown-item" href="lap_akunt_nrc_tgl_sd_tgl_lihat.php?ket=bulan_tahun"><i class="bi bi-2-square-fill"></i><i class="bi bi-2-square-fill"></i> Laporan Neraca & PHU Bulan... Tahun....</a></li>
                      
                      <li><a class="dropdown-item" href="@_angg_lap_rkp_infaq_tgl_sd_tgl_lihat.php?ket=tgl_s/d_tgl"><i class="bi bi-3-square-fill"></i><i class="bi bi-1-square-fill"></i> Laporan Rekap Penerimaan Infaq dr tgl ... s/d ....</a></li>

                      <li><a class="dropdown-item" href="lap_trans_batal.php"><i class="bi bi-9-square-fill"></i><i class="bi bi-1-square-fill"></i> Laporan Pembatalan Transaksi</a></li>
                </ul>
              </li>


                <li class="nav-item">
                  <a class="nav-link active" href="#">
                    <i class="bi bi-award"></i>
                    <span style="color: <?php echo$_SESSION['warna_bag']; ?>; "><?php echo $edisi ?></span>
                  </a>
                </li>
          </li>  

    </ul>
    

         <ul class="navbar-nav ms-auto mb-2 mb-lg-0">
          <li class="nav-item dropdown">
            <?php 
            $id_user = $_SESSION['id'];
            $profil = mysqli_query($koneksi,"select * from user where user_id='$id_user'");
            $p = mysqli_fetch_assoc($profil);
            $foto=$p['user_foto'];
            ?>

            <a class="nav-link active dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                    <?php if($foto == ""){ ?>
                      <img src="../gambar/user.png" style="width: 25px;height: auto">
                    <?php }else{ ?>
                      <img src="../gambar/karyawan/<?php echo $foto ?>" style="width: 25px;height: auto">
                    <?php } ?>
                    
                <i class="bi bi-caret-right-square"></i>
               <span> Halo, <?php echo $p['user_nama']; ?>  <?php echo $_SESSION['nama_singkat'] ; ?></span>
            </a>
            <ul class="dropdown-menu shadow-sm dropdown-menu-end mt-2">
              <li><a class="dropdown-item" href="#"><img src="../gambar/karyawan/<?php echo $foto ?>" style="width: 250px;height: auto"></li>    
              <li><a class="dropdown-item" href="index.php"><i class="bi bi-award"></i> <?php echo $_SESSION['kdc']; ?>-<?php echo $_SESSION['id_kar']; ?>-<?php echo $_SESSION['level']; ?> </a></li>
              <li><a class="dropdown-item" href="a_user_profil_x.php?id=<?php echo $id_user ; ?>"><i class="bi bi-person"></i> Edit Profil</a></li>
              <li><a class="dropdown-item" href="gantipassword.php"><i class="bi bi-lock"></i> Ganti Password</a></li>
              <li><a class="dropdown-item" href="logout.php"><i class="bi bi-power"></i> Log Out</a></li>
            </ul>
          </li>
        </ul>
                
    <?php } ;?>  
            
        <?php if ($_SESSION['level']=='LAP') { ;?>
            <ul class="navbar-nav me-auto mb-2 mb-lg-0">
          <li class="nav-item">
             <a class="nav-link active" href="tugas_donatur.php">
                 <i class="bi bi-person-lines-fill"></i> <span> Donatur</span>
             </a>
          </li>                

            </ul>
            
         <ul class="navbar-nav ms-auto mb-2 mb-lg-0">
          <li class="nav-item dropdown">
            <?php 
            $id_user = $_SESSION['id'];
            $profil = mysqli_query($koneksi,"select * from user where user_id='$id_user'");
            $p = mysqli_fetch_assoc($profil);
            $foto=$p['user_foto'];
            ?>

            <a class="nav-link active dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                    <?php if($foto == ""){ ?>
                      <img src="../gambar/user.png" style="width: 25px;height: auto">
                    <?php }else{ ?>
                      <img src="../gambar/karyawan/<?php echo $foto ?>" style="width: 25px;height: auto">
                    <?php } ?>
                    
                <i class="bi bi-caret-right-square"></i>
               <span> Halo, <?php echo $p['user_nama']; ?>  <?php echo $_SESSION['nama_singkat'] ; ?></span>
            </a>
            <ul class="dropdown-menu shadow-sm dropdown-menu-end mt-2">
              <li><a class="dropdown-item" href="#"><img src="../gambar/karyawan/<?php echo $foto ?>" style="width: 250px;height: auto"></li>    
              <li><a class="dropdown-item" href="index.php"><i class="bi bi-award"></i> <?php echo $_SESSION['kdc']; ?>-<?php echo $_SESSION['id_kar']; ?>-<?php echo $_SESSION['level']; ?> </a></li>
              <li><a class="dropdown-item" href="a_user_profil_x.php?id=<?php echo $id_user ; ?>"><i class="bi bi-person"></i> Edit Profil</a></li>
              <li><a class="dropdown-item" href="gantipassword.php"><i class="bi bi-lock"></i> Ganti Password</a></li>
              <li><a class="dropdown-item" href="logout_tugas.php"><i class="bi bi-power"></i> Log Out</a></li>
            </ul>
          </li>
        </ul> 
        <?php } ;?>            
            
    </div>
  </nav>