"; echo "

🏛 Database Jeroan Inspector — Folder 02 (UAS)

"; echo "

Host Target: $host | Active Database: $db


"; // 1. Ambil daftar tabel $result_tables = mysqli_query($conn, "SHOW TABLES"); if (mysqli_num_rows($result_tables) == 0) { echo "

❌ Database masih kosong melompong! Jalankan file import_db.php dulu.

"; } else { while ($table_row = mysqli_fetch_row($result_tables)) { $table_name = $table_row[0]; echo "
"; echo "

📁 Tabel: $table_name

"; // 2. Tampilkan isi baris data tabel $data_result = mysqli_query($conn, "SELECT * FROM $table_name LIMIT 10"); if (mysqli_num_rows($data_result) == 0) { echo "

Tabel ini sudah terbuat, tapi datanya masih kosong.

"; } else { echo "
"; echo ""; // Header Kolom echo ""; $fields = mysqli_fetch_fields($data_result); foreach ($fields as $field) { echo ""; } echo ""; // Isi Data Pengguna / Warga while ($row = mysqli_fetch_assoc($data_result)) { echo ""; foreach ($row as $key => $cell) { // Beri highlight khusus kolom password agar kita tahu isinya di-enkripsi atau tidak if ($key == 'password') { echo ""; } else { echo ""; } } echo ""; } echo "
{$field->name}
" . htmlspecialchars($cell) . "" . htmlspecialchars($cell ?? 'NULL') . "
"; echo "
"; } echo "
"; } } echo "
← Kembali ke Login"; echo ""; ?>