feat: memisahkan monorepo jadi 2 project (Kemiskinan & Publik)

This commit is contained in:
2026-06-11 14:38:22 +07:00
parent 4cbbd3c718
commit d77596f62b
48 changed files with 7277 additions and 36 deletions
+26
View File
@@ -0,0 +1,26 @@
<?php
session_start();
include '../koneksi.php';
if (!isset($_SESSION['user_id'])) {
echo json_encode(['status' => 'error', 'message' => 'Unauthorized']);
exit;
}
$id = $_POST['id'] ?? '';
$latitude = $_POST['latitude'] ?? '';
$longitude = $_POST['longitude'] ?? '';
if (!$id || !$latitude || !$longitude) {
echo json_encode(['status' => 'error', 'message' => 'Data tidak lengkap']);
exit;
}
try {
$stmt = $pdo->prepare("UPDATE points SET latitude = ?, longitude = ? WHERE id = ?");
$stmt->execute([$latitude, $longitude, $id]);
echo json_encode(['status' => 'success']);
} catch (PDOException $e) {
echo json_encode(['status' => 'error', 'message' => 'Database error']);
}