Initial commit

This commit is contained in:
muthianura
2026-06-11 18:10:22 +07:00
commit f104007f77
30 changed files with 7141 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
<?php
function spbu_stats($conn) {
$total = (int) $conn->query("SELECT COUNT(*) c FROM tempat")->fetch_assoc()['c'];
$jam24 = (int) $conn->query("SELECT COUNT(*) c FROM tempat WHERE status='24 Jam'")->fetch_assoc()['c'];
$tidak24 = $total - $jam24;
$pct24 = $total > 0 ? round($jam24 / $total * 100) : 0;
return compact('total', 'jam24', 'tidak24', 'pct24');
}