Files
sidak/admin/kartu/anggota_full.php
wartana 74b8f572a2 Enhancement: Complete overhaul of SIDAK application
- Report: Added printable reports for all categories.
- Dashboard: Fixed broken links and implemented gender balance filtering.
- Logic: Auto-integration of Arrivals and Births into Resident/KK data.
- Fix: Solved deletion popup bug in Birth Data.
- Feature: Added Full KK History view.
- Feature: Implemented Dynamic Village Profile for letter templates.
2026-01-18 16:25:38 +08:00

109 lines
4.2 KiB
PHP

<?php
if(isset($_GET['kode'])){
$sql_cek = "SELECT * FROM tb_kk WHERE id_kk='".$_GET['kode']."'";
$query_cek = mysqli_query($koneksi, $sql_cek);
$data_cek = mysqli_fetch_array($query_cek,MYSQLI_BOTH);
$karkel=$data_cek['id_kk'];
}
?>
<div class="card card-primary">
<div class="card-header">
<h3 class="card-title">
<i class="fa fa-users"></i> Riwayat Anggota KK Lengkap</h3>
</div>
<div class="card-body">
<input type='hidden' class="form-control" id="id_kk" name="id_kk" value="<?php echo $data_cek['id_kk']; ?>"
readonly/>
<div class="form-group row">
<label class="col-sm-2 col-form-label">No KK | KPl Keluarga</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="no_kk" name="no_kk" value="<?php echo $data_cek['no_kk']; ?>"
readonly/>
</div>
<div class="col-sm-4">
<input type="text" class="form-control" id="kepala" name="kepala" value="<?php echo $data_cek['kepala']; ?>"
readonly/>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">Alamat</label>
<div class="col-sm-8">
<input type="text" class="form-control" value="<?php echo $data_cek['desa']; ?>, RT <?php echo $data_cek['rt']; ?> RW <?php echo $data_cek['rw']; ?> (<?php echo $data_cek['kec']; ?> - <?php echo $data_cek['kab']; ?> - <?php echo $data_cek['prov']; ?>)"
readonly/>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>No</th>
<th>NIK</th>
<th>Nama</th>
<th>Jekel</th>
<th>Hub Keluarga</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<?php
$no = 1;
// Query tanpa filter status='Ada' untuk melihat sejarah lengkap
$sql = $koneksi->query("SELECT p.nik, p.nama, p.jekel, p.status, a.hubungan, a.id_anggota
from tb_pdd p inner join tb_anggota a on p.id_pend=a.id_pend where id_kk=$karkel");
while ($data= $sql->fetch_assoc()) {
?>
<tr>
<td>
<?php echo $no++; ?>
</td>
<td>
<?php echo $data['nik']; ?>
</td>
<td>
<?php echo $data['nama']; ?>
</td>
<td>
<?php echo $data['jekel']; ?>
</td>
<td>
<?php echo $data['hubungan']; ?>
</td>
<td>
<?php
if($data['status']=='Ada'){
echo "<span class='badge badge-success'>Ada</span>";
}else if($data['status']=='Meninggal'){
echo "<span class='badge badge-danger'>Meninggal</span>";
}else{
echo "<span class='badge badge-warning'>Pindah</span>";
}
?>
</td>
</tr>
<?php
}
?>
</tbody>
</tfoot>
</table>
</div>
</div>
</div>
<div class="card-footer">
<a href="?page=anggota&kode=<?php echo $data_cek['id_kk']; ?>" title="Kembali" class="btn btn-warning">Kembali</a>
</div>
</div>