Initial WebGIS portal project
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
require_once 'db_pdo.php';
|
||||
require_once 'auth.php';
|
||||
require_admin_login(true);
|
||||
header('Content-Type: application/json');
|
||||
|
||||
try {
|
||||
$stmt = $pdo->query("SELECT * FROM rumah_ibadah ORDER BY nama ASC");
|
||||
$data = $stmt->fetchAll();
|
||||
|
||||
echo json_encode([
|
||||
'success' => true,
|
||||
'data' => $data
|
||||
]);
|
||||
} catch (Exception $e) {
|
||||
echo json_encode(['success' => false, 'message' => $e->getMessage()]);
|
||||
}
|
||||
Reference in New Issue
Block a user