fix: update final code deployment

This commit is contained in:
muthianura
2026-06-15 21:53:17 +07:00
parent 62a5a26fe0
commit 9cc6fcf52d
42 changed files with 177 additions and 23 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');
}