<?php

if ($_GET['module'] == '') {
    
    //halaman utama admin
    if ($_SESSION['leveluser'] == 'admin'){
        include 'component/home_admin1.php';
    }else{
        include 'component/com_perencanaan/lap_realisasi_perencanaan.php';   
    }
        
} elseif ($_GET['module'] == 'pegawai') {
	if ($_SESSION['leveluser'] == 'admin') {
		include 'component/com_pegawai/pegawai.php';
	} else {
		echo '<meta http-equiv="refresh" content="0; url=index.php">';
	}
	//untuk backup database
} elseif ($_GET['module'] == 'databasesikeung') {
	include 'component/com_database/database.php';
	//untuk transaksi harian
} elseif ($_GET['module'] == 'transaksiharian') {
	include 'component/com_transaksi/transaksi_harian.php';
	//untuk transaksi hanya input
} elseif ($_GET['module'] == 'transaksiharianinput') {
	include 'component/com_transaksi/transaksi_harian_input.php';
} //uangawal
elseif ($_GET['module'] == 'lap-uangawal') {
	include 'component/com_transaksi/uangawal.php';
	//untuk transaksi harian
} elseif ($_GET['module'] == 'lap-transaksiharian') {
	include 'component/com_transaksi/lap_transaksi_harian.php';
} elseif ($_GET['module'] == 'cetak') {
	include 'component/com_pembayaran/cetak.php';
}//untuk penyesuaian harian
elseif ($_GET['module'] == 'penyesuaianharian') {
	include 'component/com_penyesuaianharian/penyesuaianharian.php';
}//untuk penyesuaian harian real
elseif ($_GET['module'] == 'penyesuaianharianreal') {
	include 'component/com_penyesuaianharian/penyesuaianharian_real.php';
} elseif ($_GET['module'] == 'data_anonim') {
	include 'component/com_pengaturan/data_anonim.php';
} elseif ($_GET['module'] == 'log_detail') {
	include 'component/com_pengaturan/log_activity.php';
} elseif ($_GET['module'] == 'history_login') {
	include 'component/com_pengaturan/history_login.php';
} elseif ($_GET['module'] == 'perkas') {
	include 'component/tampil_data.php';
} elseif ($_GET['module'] == 'perbln') {
	include 'component/tampil_data_bln.php';
} elseif ($_GET['module'] == 'perhari') {
	include 'component/tampil_data_hari.php';
} elseif ($_GET['module'] == 'kelas') {
	include 'component/com_kelas/kelas.php';
} elseif ($_GET['module'] == 'akses_edit') {
	include 'component/com_pengaturan/akses_edit.php';
} elseif ($_GET['module'] == 'mac') {
	include 'component/com_pengaturan/akses_mac.php';
} elseif ($_GET['module'] == 'galeri') {
	include 'component/com_pengaturan/galeri.php';
} elseif ($_GET['module'] == 'jenis-rt') {
	include 'component/com_santri_rt/jenis_rt.php';
}elseif ($_GET['module'] == 'sub-kategori') {
	include 'component/com_subkategori/subkategori.php';
	// jenis transaksi
}elseif ($_GET['module'] == 'type-transaksi') {
	include 'component/com_subkategori/jenis_transaksi.php';
} elseif ($_GET['module'] == 'infaq-harian-rt') {
	include 'component/com_santri_rt/infaq_harian.php';
} elseif ($_GET['module'] == 'lap-spp-rt-sore') {
	include 'component/com_pembayaran/lap_spp_rt_sore.php';
} elseif ($_GET['module'] == 'pembayaran-spp-rt-sore') {
	include 'component/com_pembayaran/pilih_santri_rt_sore.php';
} elseif ($_GET['module'] == 'lap-spp-rt-pagi') {
	include 'component/com_pembayaran/lap_spp_rt_pagi.php';
} elseif ($_GET['module'] == 'pembayaran-spp-rt-pagi') {
	include 'component/com_pembayaran/pilih_santri_rt_pagi.php';
} elseif ($_GET['module'] == 'santri-rt') {
	include 'component/com_santri_rt/santri.php';
} elseif ($_GET['module'] == 'jenis-donasi') {
	include 'component/com_pembayaran_donatur/jenis_donasi.php';
} elseif ($_GET['module'] == 'pembayaran-donatur-tetap') {
	include 'component/com_pembayaran_donatur/lap_donatur.php';
} elseif ($_GET['module'] == 'pilih-donatur') {
	include 'component/com_pembayaran_donatur/pilih_donatur.php';
} elseif ($_GET['module'] == 'pembayaran-donatur-tdk-tetap') {
	include 'component/com_pembayaran_donatur/donatur_tidak_tetap.php';
} elseif ($_GET['module'] == 'donatur') {
	include 'component/com_donatur/donatur.php';
} elseif ($_GET['module'] == 'backup') {
	include 'component/com_pengaturan/backup.php';
} elseif ($_GET['module'] == 'pembayaran-dam') {
	include 'component/com_pembayaran/pilih_santri_dam.php';
} elseif ($_GET['module'] == 'lap-dam') {
	include 'component/com_pembayaran/lap_dam.php';
} elseif ($_GET['module'] == 'lap-spp') {
	include 'component/com_pembayaran/lap_spp.php';
} elseif ($_GET['module'] == 'lap-dut') {
	include 'component/com_pembayaran/lap_dut.php';
	// transaksi pemb SD UMUM
}	elseif ($_GET['module'] == 'lap-dam-sd') {
	include 'component/com_pembayaran_sd/lap_dam.php';
} elseif ($_GET['module'] == 'lap-spp-sd') {
	include 'component/com_pembayaran_sd/lap_spp.php';
} elseif ($_GET['module'] == 'lap-dut-sd') {
	include 'component/com_pembayaran_sd/lap_dut.php';
} elseif ($_GET['module'] == 'pembayaran-dam-sd') {
	include 'component/com_pembayaran_sd/pilih_santri_dam.php';
} elseif ($_GET['module'] == 'santri_sd') {
	include 'component/com_santri_sd/santri.php';
} elseif ($_GET['module'] == 'pembayaran-spp-sd') {
    

  if ($_SESSION['id_divisi']=="3") {
     include 'component/home_lain.php';   
            }elseif($_SESSION['id_divisi']=="2"){
       include 'component/home_lain.php';   
            }else{
        	include 'component/com_pembayaran_sd/pilih_santri.php';
            }
    
} elseif ($_GET['module'] == 'buku_besar_lain') {
	include 'component/com_pembayaran_sd/buku_besar_lain.php';
} elseif ($_GET['module'] == 'transaksiharianlain') {
	include 'component/com_transaksi/transaksi_harian_lain.php';

	//transaksi emoney santri
} elseif ($_GET['module'] == 'transaksi-santri') {
	include 'component/com_pembayaran/pilih_santri_emoney.php';
	//proses transaksi
} elseif ($_GET['module'] == 'proses-transaksi') {
	include 'component/com_transaksi_ewallet/proses-transaksi.php';
	//pegawai
} elseif ($_GET['module'] == 'pekerja') {
	include 'component/com_pekerja/pekerja.php';
	//anggaran
} elseif ($_GET['module'] == 'perencanaan') {
	include 'component/com_perencanaan/data_perencanaan_anggaran.php';
//detail anggaran
} elseif ($_GET['module'] == 'detail_perencanaan') {
	include 'component/com_perencanaan/detail_data_perencanaan_anggaran.php';
//lap realisasi anggaran
} elseif ($_GET['module'] == 'realisasi-anggaran') {
	include 'component/com_perencanaan/lap_realisasi_perencanaan.php';
}elseif ($_GET['module'] == 'cek-detail-realisasi') {
	include 'component/com_perencanaan/cek_transaksi.php';
}elseif ($_GET['module'] == 'cek-detail-tag-hut') {
	include 'component/com_hutang_tagihan/cek_transaksi.php';
} elseif ($_GET['module'] == 'pembayaran-dut') {
	include 'component/com_pembayaran/pilih_santri_dut.php';
	//piutang
} elseif ($_GET['module'] == 'transaksi-piutang') {
	include 'component/com_piutang/pilih_pekerja_piutang.php';
}elseif ($_GET['module'] == 'proses-piutang') {
	include 'component/com_piutang/proses_piutang.php';
}

elseif ($_GET['module'] == 'transaksi') {
	//mencegah kehilangan jenis transaksi
	if (!isset($_GET['type'])) {
	} else {
		if ($_GET['type'] == '') {
			echo '<meta http-equiv="refresh" content="0; url=index.php">';
		}
	}
	include 'component/com_transaksi/transaksi.php';
} elseif ($_GET['module'] == 'laporan-transaksi') {
	include 'component/com_laporan/laporan-transaksi.php';
} elseif ($_GET['module'] == 'cetak-rekening') {
	include 'component/com_rekening/rekening.php';
}elseif ($_GET['module'] == 'santri') {
	include 'component/com_santri/santri.php';
	//cek kelengkapan data santri
}elseif ($_GET['module'] == 'cek-data-santri') {
	include 'component/com_santri/cek_kelengkapan_data.php';
	//data kelas santri
} elseif ($_GET['module'] == 'data-kelas-santri') {
	include 'component/com_santri/data_kelas_santri.php';
//cetak kartu santri
} elseif ($_GET['module'] == 'cetak-kartu') {
	include 'kartu/data_cetak_kartu.php';
	//export data tagihan santri junio
} elseif ($_GET['module'] == 'santri-junio') {
	include 'component/com_santri/data_santri_junio.php';
} elseif ($_GET['module'] == 'buku_besar') {
	include 'component/com_transaksi/buku_besar.php';
} // buku besar tahunan
 elseif ($_GET['module'] == 'buku_besar_tahunan') {
	include 'component/com_transaksi/buku_besar_tahunan.php';
} elseif ($_GET['module'] == 'per_jen_pem') {
	include 'component/com_transaksi/per_jen_pem.php';
} elseif ($_GET['module'] == 'export') {
	include 'component/com_transaksi/export.php';
} elseif ($_GET['module'] == 'pembayaran-spp') {
	include 'component/com_pembayaran/pilih_santri.php';
} elseif ($_GET['module'] == 'lap-dam-rt-pagi') {
	include 'component/com_pembayaran/lap_dam_rt_pagi.php';
} elseif ($_GET['module'] == 'pembayaran-dam-rt-pagi') {
	include 'component/com_pembayaran/pilih_santri_dam_rt_pagi.php';
	//laporan kas
} elseif ($_GET['module'] == 'laporankas') {
	include 'component/com_laporankas/laporankas-v3.php';
//laporan bawa uang
} elseif ($_GET['module'] == 'lap-bawauang') {
	include 'component/com_transaksi/transaksi_bawauang.php';
}elseif ($_GET['module'] == 'laporankasnew') {
	include 'component/com_laporankas/laporankasnew.php';
} elseif ($_GET['module'] == 'akun') {
	include 'component/com_pengaturan/akun.php';
//ubah status santri serentak
} elseif ($_GET['module'] == 'confirm-data-ubah') {
	include 'component/com_santri/confirm_ubahstatusserentak.php';
	//ubah kelas santri serentak
} elseif ($_GET['module'] == 'confirm-data-ubah-kelas') {
	include 'component/com_santri/confirm_ubahkelasserentak.php';
//DATA TAGIHAN HUTANG
} elseif ($_GET['module'] == 'hutang-tagihan') {
	include 'component/com_hutang_tagihan/data_tagihan_hutang.php';
}//untuk transaksi harian
elseif ($_GET['module'] == 'rekap-lap-transaksiharian') {
	include 'component/com_transaksi/rekap_lap_transaksi_harian.php';
}//untuk export data santri
elseif ($_GET['module'] == 'export-form') {
	include 'component/com_santri/export_form.php';
} elseif ($_GET['module'] == 'aksespengguna') {

		if ($_SESSION['leveluser'] == 'admin') {
			include 'component/com_pengaturan/akses_pengguna.php';
	} else{
	    echo '<meta http-equiv="refresh" content="0; url=index.php">';
	}
	
	
	
} elseif ($_GET['module'] == 'pengaturan') {
	if ($_SESSION['leveluser'] == 'admin') {
		include 'component/com_pengaturan/pengaturan.php';
	} else {
		echo '<meta http-equiv="refresh" content="0; url=index.php">';
	}
} else {
	echo '<meta http-equiv="refresh" content="0; url=index.php">';
}
