Compare commits
6 Commits
main
..
377eb77f8a
| Author | SHA1 | Date | |
|---|---|---|---|
| 377eb77f8a | |||
| d13903bfe3 | |||
| 6acbbb7e0b | |||
| 087fb6fb2f | |||
| 11d736e90c | |||
| c94bc418ef |
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@ session_start();
|
||||
// Tolak akses jika bukan admin
|
||||
if (!isset($_SESSION['role']) || $_SESSION['role'] !== 'admin') {
|
||||
http_response_code(403); // Status Forbidden
|
||||
echo "Akses ditolak! Anda bukan admin.";
|
||||
echo "Akses ditolak! Anda bukan operator.";
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -32,3 +32,4 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
}
|
||||
$conn->close();
|
||||
}
|
||||
?>
|
||||
+7
-183
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
session_start();
|
||||
// Mengecek apakah user yang mengakses adalah admin
|
||||
// Mengecek apakah user yang mengakses adalah admin/operator
|
||||
$isAdmin = isset($_SESSION['role']) && $_SESSION['role'] === 'admin';
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
@@ -12,8 +12,6 @@ $isAdmin = isset($_SESSION['role']) && $_SESSION['role'] === 'admin';
|
||||
<title>Sistem WebGIS Terpadu — Kota Pontianak</title>
|
||||
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.4.1/dist/MarkerCluster.css" />
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet.markercluster@1.4.1/dist/MarkerCluster.Default.css" />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap"
|
||||
rel="stylesheet">
|
||||
@@ -74,7 +72,6 @@ $isAdmin = isset($_SESSION['role']) && $_SESSION['role'] === 'admin';
|
||||
<div class="custom-select-options" id="custom-select-options">
|
||||
<div class="custom-option selected" data-value="Semua">Semua Layer</div>
|
||||
<div class="custom-option" data-value="Rumah Ibadah">Rumah Ibadah</div>
|
||||
<div class="custom-option" data-value="Penduduk Miskin">Penduduk Miskin</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -86,7 +83,7 @@ $isAdmin = isset($_SESSION['role']) && $_SESSION['role'] === 'admin';
|
||||
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
|
||||
</svg>
|
||||
</span>
|
||||
<input type="text" id="search-input" placeholder="Cari nama kepala keluarga atau rumah ibadah..."
|
||||
<input type="text" id="search-input" placeholder="Cari nama lokasi atau rumah ibadah..."
|
||||
onkeyup="jalankanPencarian()" oninput="toggleClearBtn()" autocomplete="off">
|
||||
<button class="search-clear-btn" id="search-clear" onclick="clearSearch()" title="Hapus pencarian">
|
||||
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
|
||||
@@ -115,7 +112,7 @@ $isAdmin = isset($_SESSION['role']) && $_SESSION['role'] === 'admin';
|
||||
<div class="profile-dropdown" id="profile-dropdown">
|
||||
<div class="dropdown-user-info">
|
||||
<div class="dropdown-username"><?php echo htmlspecialchars($_SESSION['username']); ?></div>
|
||||
<div class="dropdown-role">Admin</div>
|
||||
<div class="dropdown-role">Operator Wilayah</div>
|
||||
</div>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a href="logout.php" class="dropdown-item logout-link">
|
||||
@@ -135,76 +132,21 @@ $isAdmin = isset($_SESSION['role']) && $_SESSION['role'] === 'admin';
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<div style="width: 1px; height: 20px; background: rgba(255,255,255,0.1); margin: 0 4px;" class="header-tools-divider"></div>
|
||||
<div style="width: 1px; height: 20px; background: rgba(255,255,255,0.1); margin: 0 4px;"></div>
|
||||
|
||||
<div class="tool-btn" id="connection-status" title="Status Koneksi">
|
||||
<div class="tool-btn" title="Status Koneksi">
|
||||
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M8.111 16.404a5.5 5.5 0 017.778 0M12 20h.01m-7.08-7.071c3.904-3.905 10.236-3.905 14.141 0M1.394 9.393c5.857-5.857 15.355-5.857 21.213 0" />
|
||||
</svg>
|
||||
<div class="status-dot"></div>
|
||||
</div>
|
||||
<div class="tool-btn" id="about-btn" title="Tentang Aplikasi">
|
||||
<div class="tool-btn" title="Tentang Aplikasi">
|
||||
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<!-- Hamburger Menu Button (Mobile Only) -->
|
||||
<button class="hamburger-menu-btn" id="hamburger-menu-btn" onclick="toggleMobileMenu(event)" title="Menu">
|
||||
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M4 6h16M4 12h16M4 18h16" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<!-- Dropdown Menu (Mobile Only) -->
|
||||
<div class="mobile-menu-dropdown" id="mobile-menu-dropdown">
|
||||
<?php if ($isAdmin): ?>
|
||||
<div class="mobile-menu-user">
|
||||
<img src="<?php echo htmlspecialchars($_SESSION['avatar']); ?>" class="mobile-avatar" alt="Avatar">
|
||||
<div>
|
||||
<div class="mobile-username"><?php echo htmlspecialchars($_SESSION['username']); ?></div>
|
||||
<div class="mobile-role">Admin</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mobile-menu-divider"></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($isAdmin): ?>
|
||||
<a href="logout.php" class="mobile-menu-item logout-link">
|
||||
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1" />
|
||||
</svg>
|
||||
<span>Logout</span>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<a href="login.php" class="mobile-menu-item">
|
||||
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H7a3 3 0 01-3-3V7a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1" />
|
||||
</svg>
|
||||
<span>Login Operator</span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="mobile-menu-divider"></div>
|
||||
|
||||
<div class="mobile-menu-item" id="mobile-connection-status">
|
||||
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M8.111 16.404a5.5 5.5 0 017.778 0M12 20h.01m-7.08-7.071c3.904-3.905 10.236-3.905 14.141 0M1.394 9.393c5.857-5.857 15.355-5.857 21.213 0" />
|
||||
</svg>
|
||||
<span><strong id="mobile-connection-text">Online</strong></span>
|
||||
</div>
|
||||
|
||||
<div class="mobile-menu-item" id="mobile-about-btn">
|
||||
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
<span>Tentang Aplikasi</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -325,13 +267,6 @@ $isAdmin = isset($_SESSION['role']) && $_SESSION['role'] === 'admin';
|
||||
<label class="sfield-label">Nama Kepala Keluarga <span class="required">*</span></label>
|
||||
<input type="text" id="sb_nama_penduduk" class="sinput" placeholder="Contoh: Siti Rahayu">
|
||||
</div>
|
||||
<div class="sfield">
|
||||
<label class="sfield-label">Status Bantuan <span class="required">*</span></label>
|
||||
<select id="sb_status_bantuan" class="sselect">
|
||||
<option value="Belum Menerima">Belum Menerima Bantuan</option>
|
||||
<option value="Sudah Menerima">Sudah Menerima Bantuan</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<button class="btn-save-sidebar btn-red-solid" onclick="savePendudukSidebar()">
|
||||
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
|
||||
@@ -344,65 +279,6 @@ $isAdmin = isset($_SESSION['role']) && $_SESSION['role'] === 'admin';
|
||||
</div><!-- end sidebar-body -->
|
||||
</div><!-- end input-sidebar -->
|
||||
|
||||
<!-- ==============================
|
||||
DASHBOARD STATISTIK (RIGHT SIDEBAR)
|
||||
============================== -->
|
||||
<div class="dashboard-sidebar" id="dashboard-sidebar">
|
||||
<div class="dashboard-header">
|
||||
<div class="dashboard-title">
|
||||
<div class="dashboard-title-icon">
|
||||
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M11 3.055A9.003 9.003 0 1020.945 13H11V3.055z" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z" />
|
||||
</svg>
|
||||
</div>
|
||||
<div>
|
||||
<div class="dashboard-title-text">Dashboard Analisis</div>
|
||||
<div class="dashboard-title-sub" id="dashboard-target-name">Rumah Ibadah</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="dashboard-close" id="dashboard-close-btn" onclick="closeDashboard()" title="Tutup">
|
||||
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="dashboard-body">
|
||||
<!-- Stats Summary Cards -->
|
||||
<div class="stats-grid">
|
||||
<div class="stat-card">
|
||||
<div class="stat-num" id="stat-total-kk">0</div>
|
||||
<div class="stat-label">Total KK Miskin</div>
|
||||
</div>
|
||||
<div class="stat-card stat-success">
|
||||
<div class="stat-num" id="stat-sudah-bantuan">0</div>
|
||||
<div class="stat-label">Sudah Menerima</div>
|
||||
</div>
|
||||
<div class="stat-card stat-danger">
|
||||
<div class="stat-num" id="stat-belum-bantuan">0</div>
|
||||
<div class="stat-label">Belum Menerima</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Chart Section -->
|
||||
<div class="chart-section">
|
||||
<div class="chart-title">Distribusi Penerima Bantuan</div>
|
||||
<div class="chart-container" style="position: relative; height: 180px; width: 100%;">
|
||||
<canvas id="povertyChart"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- List of Families inside Radius -->
|
||||
<div class="families-section">
|
||||
<div class="families-title">Daftar KK Miskin Terdekat</div>
|
||||
<div class="families-list" id="dashboard-families-list">
|
||||
<!-- Dynamic List Items -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Overlay saat mode pilih lokasi aktif -->
|
||||
<div class="pick-mode-overlay" id="pick-overlay">
|
||||
<div class="pick-mode-banner">
|
||||
@@ -418,9 +294,7 @@ $isAdmin = isset($_SESSION['role']) && $_SESSION['role'] === 'admin';
|
||||
<div id="map" style="padding-top: 56px; height: 100vh; box-sizing: border-box;"></div>
|
||||
|
||||
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
|
||||
<script src="https://unpkg.com/leaflet.markercluster@1.4.1/dist/leaflet.markercluster.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/leaflet.heat@0.2.0/dist/leaflet-heat.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
|
||||
<script>
|
||||
// Variabel global untuk mendeteksi status admin di script.js
|
||||
@@ -433,63 +307,13 @@ $isAdmin = isset($_SESSION['role']) && $_SESSION['role'] === 'admin';
|
||||
if (dropdown) dropdown.classList.toggle('active');
|
||||
}
|
||||
|
||||
// Toggle mobile hamburger menu
|
||||
function toggleMobileMenu(e) {
|
||||
e.stopPropagation();
|
||||
var menu = document.getElementById('mobile-menu-dropdown');
|
||||
if (menu) menu.classList.toggle('active');
|
||||
}
|
||||
|
||||
// Tutup dropdown saat klik di luar area profil / menu mobile
|
||||
// Tutup dropdown saat klik di luar area profil
|
||||
document.addEventListener('click', function() {
|
||||
var dropdown = document.getElementById('profile-dropdown');
|
||||
if (dropdown) dropdown.classList.remove('active');
|
||||
|
||||
var menu = document.getElementById('mobile-menu-dropdown');
|
||||
if (menu) menu.classList.remove('active');
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- Modal Tentang Aplikasi -->
|
||||
<div id="about-modal" class="modal-overlay">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3>Tentang Aplikasi</h3>
|
||||
<button class="modal-close-btn" id="about-close-btn" title="Tutup">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-logo">
|
||||
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" width="48" height="48">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
d="M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7" />
|
||||
</svg>
|
||||
</div>
|
||||
<h4 class="app-title">WebGIS Poverty Map</h4>
|
||||
<p class="app-desc">Sistem Pemetaan Penduduk Miskin Kota Pontianak. Aplikasi ini dirancang untuk memetakan penyebaran penduduk miskin serta mempermudah analisis spasial sebaran bantuan sosial di sekitar rumah ibadah secara dinamis.</p>
|
||||
|
||||
<div class="modal-divider"></div>
|
||||
|
||||
<div class="credits-section">
|
||||
<div class="credit-row">
|
||||
<span class="credit-label">Pengembang:</span>
|
||||
<span class="credit-value">Aleksander William</span>
|
||||
</div>
|
||||
<div class="credit-row">
|
||||
<span class="credit-label">NIM:</span>
|
||||
<span class="credit-value">D1041231003</span>
|
||||
</div>
|
||||
<div class="credit-row">
|
||||
<span class="credit-label">Versi Aplikasi:</span>
|
||||
<span class="credit-value">v1.1.0</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-save" id="about-ok-btn">Selesai</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
|
||||
|
||||
@@ -1,19 +1,8 @@
|
||||
<?php
|
||||
$host_sekarang = $_SERVER['HTTP_HOST'];
|
||||
|
||||
// Cek apakah URL yang sedang diakses mengandung kata 'localhost' atau '127.0.0.1'
|
||||
if (strpos($host_sekarang, 'localhost') !== false || strpos($host_sekarang, '127.0.0.1') !== false) {
|
||||
$host = "localhost";
|
||||
$user = "root";
|
||||
$pass = "";
|
||||
$db = "webgis_db";
|
||||
} else {
|
||||
// Gunakan Kredensial Normal User dari Coolify
|
||||
$host = "b84c4osgw4kcw0wc8o8cg8cg";
|
||||
$user = "mysql"; // Menggunakan normal user
|
||||
$pass = "YN54ned6j7P6K7c76sLqh9ERUbm8xvhPFj31Mnt0yKPXxqrIhWICWlbJbJjUCfn7"; // Normal User Password
|
||||
$db = "webgis_db";
|
||||
}
|
||||
$host = "localhost";
|
||||
$user = "root";
|
||||
$pass = "";
|
||||
$db = "webgis_db";
|
||||
|
||||
// Connect to MySQL server first
|
||||
$conn = new mysqli($host, $user, $pass);
|
||||
@@ -50,9 +39,10 @@ if ($row['count'] == 0) {
|
||||
$default_pass = password_hash('admin123', PASSWORD_BCRYPT);
|
||||
$default_avatar = 'https://ui-avatars.com/api/?name=Admin+Operator&background=1e40af&color=fff&bold=true&size=128';
|
||||
$default_role = 'admin';
|
||||
|
||||
|
||||
$stmt = $conn->prepare("INSERT INTO users (username, password, avatar, role) VALUES (?, ?, ?, ?)");
|
||||
$stmt->bind_param("ssss", $default_user, $default_pass, $default_avatar, $default_role);
|
||||
$stmt->execute();
|
||||
$stmt->close();
|
||||
}
|
||||
?>
|
||||
@@ -30,7 +30,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$error = "Username atau password salah!";
|
||||
}
|
||||
?>
|
||||
@@ -40,7 +40,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Login Admin - WebGIS Pontianak</title>
|
||||
<title>Login Operator - WebGIS Pontianak</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
@@ -53,7 +53,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7" />
|
||||
</svg>
|
||||
</div>
|
||||
<h2>Login Admin</h2>
|
||||
<h2>Login Operator</h2>
|
||||
<p>Masuk untuk mengelola data WebGIS</p>
|
||||
|
||||
<?php if (isset($error)): ?>
|
||||
@@ -73,37 +73,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
</form>
|
||||
|
||||
<a href="index.php" class="back-link">← Kembali ke Peta</a>
|
||||
|
||||
<div style="margin-top: 30px; padding: 16px; background-color: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px; text-align: left;">
|
||||
|
||||
<p style="margin: 0 0 12px 0; font-size: 12px; color: #94a3b8; font-weight: 600; text-align: center; letter-spacing: 1px;">
|
||||
Akun Admin
|
||||
</p>
|
||||
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 13px;">
|
||||
<span style="color: #cbd5e1;"><span style="opacity: 0.7;">Admin</span></span>
|
||||
<span style="color: #3b82f6; background-color: rgba(59, 130, 246, 0.1); padding: 3px 8px; border-radius: 4px; font-weight: 600;">admin</span>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 13px;">
|
||||
<span style="color: #cbd5e1;"><span style="opacity: 0.7;">Admin Tingkat Provinsi</span></span>
|
||||
<span style="color: #3b82f6; background-color: rgba(59, 130, 246, 0.1); padding: 3px 8px; border-radius: 4px; font-weight: 600;">adminProvinsi</span>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 13px;">
|
||||
<span style="color: #cbd5e1;"> <span style="opacity: 0.7;">Admin Tingkat Kota</span></span>
|
||||
<span style="color: #3b82f6; background-color: rgba(59, 130, 246, 0.1); padding: 3px 8px; border-radius: 4px; font-weight: 600;">adminKota</span>
|
||||
</div>
|
||||
|
||||
<div style="border-top: 1px dashed rgba(255, 255, 255, 0.1); padding-top: 10px; text-align: center; font-size: 12px; color: #64748b;">
|
||||
Password semua akun: <code style="color: #f87171; font-family: monospace; font-size: 13px;">password</code>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -15,11 +15,10 @@ $nama = $_POST['nama'];
|
||||
$alamat = $_POST['alamat'];
|
||||
$latitude = $_POST['latitude'];
|
||||
$longitude = $_POST['longitude'];
|
||||
$bantuan = isset($_POST['bantuan']) ? $_POST['bantuan'] : 'Belum Menerima';
|
||||
|
||||
// Gunakan Prepared Statement untuk mencegah SQL Injection
|
||||
$query = $conn->prepare("INSERT INTO penduduk_miskin (nama_kk, alamat, lat, lng, bantuan) VALUES (?, ?, ?, ?, ?)");
|
||||
$query->bind_param("ssdds", $nama, $alamat, $latitude, $longitude, $bantuan);
|
||||
$query = $conn->prepare("INSERT INTO penduduk_miskin (nama_kk, alamat, lat, lng) VALUES (?, ?, ?, ?)");
|
||||
$query->bind_param("ssdd", $nama, $alamat, $latitude, $longitude);
|
||||
|
||||
// Eksekusi dan kirim respon ke Javascript
|
||||
if ($query->execute()) {
|
||||
|
||||
+273
-393
@@ -1,43 +1,11 @@
|
||||
// ==========================================
|
||||
// 1. INISIALISASI PETA & LAYER
|
||||
// ==========================================
|
||||
// 1. Definisikan Pilihan Basemap (Tile Layers)
|
||||
var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
});
|
||||
|
||||
var googleSatellite = L.tileLayer('http://{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}', {
|
||||
maxZoom: 20,
|
||||
subdomains: ['mt0', 'mt1', 'mt2', 'mt3'],
|
||||
attribution: 'Map data © Google'
|
||||
});
|
||||
|
||||
var darkMap = L.tileLayer('https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>'
|
||||
});
|
||||
|
||||
// 2. Inisialisasi Peta
|
||||
// Pastikan id 'map' sesuai dengan id div pada file index.php Anda
|
||||
var map = L.map('map', {
|
||||
center: [-0.0227, 109.3340], // Titik tengah peta (Pontianak)
|
||||
zoom: 13,
|
||||
layers: [osm], // Basemap default yang langsung aktif saat web dibuka
|
||||
zoomControl: false
|
||||
});
|
||||
|
||||
// 3. Gabungkan Basemap ke dalam satu Grup Objek
|
||||
var baseMaps = {
|
||||
"Peta Standar (OSM)": osm,
|
||||
"Satelit (Google)": googleSatellite,
|
||||
"Mode Gelap (Dark)": darkMap
|
||||
};
|
||||
var map = L.map('map', { zoomControl: false }).setView([-0.0227, 109.3425], 14);
|
||||
|
||||
// Zoom control di kanan bawah (lebih bersih)
|
||||
L.control.zoom({ position: 'bottomright' }).addTo(map);
|
||||
|
||||
// Tambahkan Tombol Kontrol Layer ke Bawah Kanan Peta
|
||||
L.control.layers(baseMaps, null, { position: 'bottomright' }).addTo(map);
|
||||
|
||||
// Custom pane initialization removed
|
||||
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
@@ -51,11 +19,6 @@ var drawnItems = new L.FeatureGroup().addTo(map);
|
||||
var rumahIbadahLayer = L.layerGroup().addTo(map);
|
||||
var radiusLayer = L.layerGroup().addTo(map);
|
||||
var pendudukMiskinLayer = L.layerGroup().addTo(map);
|
||||
var pendudukMiskinCluster = L.markerClusterGroup({
|
||||
showCoverageOnHover: false,
|
||||
zoomToBoundsOnClick: true,
|
||||
maxClusterRadius: 50
|
||||
}).addTo(map);
|
||||
|
||||
// Inisialisasi Heatmap kosong (akan diisi datanya saat load data)
|
||||
var povertyHeatLayer = L.heatLayer([], { radius: 22, blur: 18, maxZoom: 17 }).addTo(map);
|
||||
@@ -64,7 +27,7 @@ var povertyHeatLayer = L.heatLayer([], { radius: 22, blur: 18, maxZoom: 17 }).ad
|
||||
var overlayMaps = {
|
||||
"🕌 Rumah Ibadah": rumahIbadahLayer,
|
||||
"🔥 Kepadatan Kemiskinan (Heatmap)": povertyHeatLayer,
|
||||
"👥 Semua Penduduk Miskin": pendudukMiskinCluster
|
||||
"👥 Penduduk Terdekat (Analisis)": pendudukMiskinLayer
|
||||
};
|
||||
L.control.layers(null, overlayMaps, { collapsed: true, position: 'bottomleft' }).addTo(map);
|
||||
|
||||
@@ -92,11 +55,82 @@ var rumahIbadahIcon = L.divIcon({
|
||||
popupAnchor: [0, -38]
|
||||
});
|
||||
|
||||
// Leaflet Draw toolbar removed
|
||||
|
||||
// ==========================================
|
||||
// 3. FUNGSI LOAD DATA DARI DATABASE
|
||||
// ==========================================
|
||||
|
||||
/*
|
||||
function loadBatasKota() {
|
||||
batasKotaLayer.clearLayers();
|
||||
var grupKecamatan = {};
|
||||
fetch('adminKecamatan.json')
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
L.geoJSON(data, {
|
||||
style: function () {
|
||||
return { color: "#00FF00", weight: 2, opacity: 1, fillOpacity: 0.1 };
|
||||
},
|
||||
onEachFeature: function (feature, layer) {
|
||||
var namaKec = feature.properties.Ket;
|
||||
var popupHTML = `
|
||||
<div class="popup-container">
|
||||
<div class="popup-header" style="background: linear-gradient(135deg, #1e3a5f, #2563eb);">
|
||||
<h4>${namaKec}</h4>
|
||||
<span class="popup-type-badge">📍 Batas Kecamatan</span>
|
||||
</div>
|
||||
<div class="popup-body">
|
||||
<div class="info-row">
|
||||
<span class="info-label">Wilayah</span>
|
||||
<span class="info-value">Kota Pontianak</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
layer.bindPopup(popupHTML);
|
||||
if (!grupKecamatan[namaKec]) grupKecamatan[namaKec] = L.featureGroup();
|
||||
grupKecamatan[namaKec].addLayer(layer);
|
||||
}
|
||||
}).addTo(batasKotaLayer);
|
||||
})
|
||||
.catch(e => console.log('Gagal memuat adminKecamatan.json', e));
|
||||
}
|
||||
|
||||
function loadSungai() {
|
||||
sungaiLayer.clearLayers();
|
||||
fetch('sungai.json')
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
L.geoJSON(data, {
|
||||
style: function () {
|
||||
return { color: "#0ea5e9", weight: 2, opacity: 1, fillOpacity: 0.1 };
|
||||
},
|
||||
onEachFeature: function (feature, layer) {
|
||||
var namaSung = feature.properties.Ket;
|
||||
var popupHTML = `
|
||||
<div class="popup-container">
|
||||
<div class="popup-header" style="background: linear-gradient(135deg, #0c4a6e, #0ea5e9);">
|
||||
<h4>${namaSung}</h4>
|
||||
<span class="popup-type-badge">🌊 Sungai</span>
|
||||
</div>
|
||||
<div class="popup-body">
|
||||
<div class="info-row">
|
||||
<span class="info-label">Wilayah</span>
|
||||
<span class="info-value">Kota Pontianak</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
layer.bindPopup(popupHTML);
|
||||
}
|
||||
}).addTo(sungaiLayer);
|
||||
})
|
||||
.catch(e => console.log('Gagal memuat sungai.json', e));
|
||||
}
|
||||
*/
|
||||
var databasePendudukMiskin = [];
|
||||
|
||||
function loadRumahIbadah() {
|
||||
rumahIbadahLayer.clearLayers();
|
||||
databasePencarian = []; // Reset database pencarian untuk mencegah duplikat
|
||||
|
||||
fetch('load.php?jenis=rumah_ibadah')
|
||||
.then(res => res.json())
|
||||
@@ -114,73 +148,6 @@ function loadRumahIbadah() {
|
||||
]);
|
||||
povertyHeatLayer.setLatLngs(heatPoints);
|
||||
|
||||
// Marker Clustering untuk semua penduduk miskin
|
||||
pendudukMiskinCluster.clearLayers();
|
||||
dataPendudukMiskin.forEach(penduduk => {
|
||||
var latPenduduk = parseFloat(penduduk.lat || penduduk.latitude);
|
||||
var lngPenduduk = parseFloat(penduduk.lng || penduduk.longitude);
|
||||
var statusBantuan = penduduk.bantuan || 'Belum Menerima';
|
||||
|
||||
var poorFamilyIcon = L.divIcon({
|
||||
className: '',
|
||||
html: `<div style="
|
||||
width:14px; height:14px;
|
||||
background: ${statusBantuan === 'Sudah Menerima' ? '#10b981' : '#ef4444'};
|
||||
border-radius: 50%;
|
||||
border: 2px solid white;
|
||||
box-shadow: 0 0 6px rgba(0,0,0,0.5);
|
||||
"></div>`,
|
||||
iconSize: [14, 14],
|
||||
iconAnchor: [7, 7],
|
||||
popupAnchor: [0, -7]
|
||||
});
|
||||
|
||||
var actionButtons = '';
|
||||
if (IS_ADMIN) {
|
||||
actionButtons = `
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-edit" onclick="formEditPenduduk('${penduduk.id}', '${penduduk.nama_kk}', '${penduduk.alamat}', '${statusBantuan}', ${latPenduduk}, ${lngPenduduk})">✏️ Edit</button>
|
||||
<button class="btn btn-delete" onclick="deleteData('penduduk_miskin', '${penduduk.id}')">🗑️ Hapus</button>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
var htmlIsi = `
|
||||
<div class="popup-container" id="popup-penduduk-${penduduk.id}">
|
||||
<div class="popup-header" style="background: linear-gradient(135deg, ${statusBantuan === 'Sudah Menerima' ? '#065f46, #10b981' : '#7f1d1d, #ef4444'});">
|
||||
<h4>${penduduk.nama_kk}</h4>
|
||||
<span class="popup-type-badge">👥 Data Sosial</span>
|
||||
</div>
|
||||
<div class="popup-body">
|
||||
<div class="info-row">
|
||||
<span class="info-label">Alamat Lengkap</span>
|
||||
<span class="info-value" style="font-size:11.5px; line-height:1.4;">${penduduk.alamat}</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="info-label">Status Bantuan</span>
|
||||
<span class="info-value" style="color: ${statusBantuan === 'Sudah Menerima' ? '#34d399' : '#f87171'}; font-weight: 600;">${statusBantuan}</span>
|
||||
</div>
|
||||
${actionButtons}
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
var marker = L.marker([latPenduduk, lngPenduduk], { icon: poorFamilyIcon })
|
||||
.bindPopup(htmlIsi);
|
||||
|
||||
pendudukMiskinCluster.addLayer(marker);
|
||||
|
||||
var namaKK = penduduk.nama_kk || 'Tanpa Nama';
|
||||
databasePencarian.push({
|
||||
namaLower: namaKK.toLowerCase(),
|
||||
namaAsli: namaKK,
|
||||
kategori: 'Penduduk Miskin',
|
||||
bantuan: statusBantuan,
|
||||
ikon: '👥',
|
||||
tipe: 'titik',
|
||||
layer: marker
|
||||
});
|
||||
});
|
||||
|
||||
dataRumahIbadah.forEach(ibadah => {
|
||||
var latIbadah = ibadah.lat || ibadah.latitude;
|
||||
var lngIbadah = ibadah.lng || ibadah.longitude;
|
||||
@@ -267,11 +234,6 @@ function updatePopupRadius(ibadahId, lat, lng) {
|
||||
|
||||
areaRadius.on('click', function (evt) { L.DomEvent.stopPropagation(evt); });
|
||||
|
||||
var totalKK = 0;
|
||||
var sudahBantuan = 0;
|
||||
var belumBantuan = 0;
|
||||
var familiesInRadius = [];
|
||||
|
||||
// Saring dan tampilkan penduduk miskin yang berada dalam radius baru
|
||||
databasePendudukMiskin.forEach(penduduk => {
|
||||
var latPenduduk = penduduk.lat || penduduk.latitude;
|
||||
@@ -280,23 +242,12 @@ function updatePopupRadius(ibadahId, lat, lng) {
|
||||
var jarak = centerPoint.distanceTo(pendudukLatLng);
|
||||
|
||||
if (jarak <= newRadius) {
|
||||
totalKK++;
|
||||
var statusBantuan = penduduk.bantuan || 'Belum Menerima';
|
||||
if (statusBantuan === 'Sudah Menerima') {
|
||||
sudahBantuan++;
|
||||
} else {
|
||||
belumBantuan++;
|
||||
}
|
||||
familiesInRadius.push(penduduk);
|
||||
|
||||
var warnaDot = statusBantuan === 'Sudah Menerima' ? '#10b981' : '#ef4444';
|
||||
|
||||
var redDot = L.circleMarker(pendudukLatLng, {
|
||||
radius: 7,
|
||||
color: '#ffffff',
|
||||
fillColor: warnaDot,
|
||||
radius: 6,
|
||||
color: '#dc2626',
|
||||
fillColor: '#ef4444',
|
||||
fillOpacity: 1,
|
||||
weight: 1.5
|
||||
weight: 2
|
||||
}).addTo(pendudukMiskinLayer);
|
||||
|
||||
redDot.on('click', function (e) {
|
||||
@@ -312,18 +263,15 @@ function updatePopupRadius(ibadahId, lat, lng) {
|
||||
if (IS_ADMIN) {
|
||||
actionButtons = `
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-edit" onclick="formEditPenduduk('${penduid}', '${namaKeluarga}', '${alamatLengkap}', '${statusBantuan}', ${latAngka}, ${lngAngka})">✏️ Edit</button>
|
||||
<button class="btn btn-edit" onclick="formEditPenduduk('${pendudukId}', '${namaKeluarga}', '${alamatLengkap}', ${latAngka}, ${lngAngka})">✏️ Edit</button>
|
||||
<button class="btn btn-delete" onclick="deleteData('penduduk_miskin', '${pendudukId}')">🗑️ Hapus</button>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
// Typo fix: penduid -> pendudukId
|
||||
actionButtons = actionButtons.replace('\'${penduid}\'', `'${pendudukId}'`);
|
||||
|
||||
var htmlIsi = `
|
||||
<div class="popup-container" id="popup-penduduk-${pendudukId}">
|
||||
<div class="popup-header" style="background: linear-gradient(135deg, ${statusBantuan === 'Sudah Menerima' ? '#065f46, #10b981' : '#7f1d1d, #ef4444'});">
|
||||
<div class="popup-header" style="background: linear-gradient(135deg, #7f1d1d, #ef4444);">
|
||||
<h4>${namaKeluarga}</h4>
|
||||
<span class="popup-type-badge">👥 Data Sosial</span>
|
||||
</div>
|
||||
@@ -332,10 +280,6 @@ function updatePopupRadius(ibadahId, lat, lng) {
|
||||
<span class="info-label">Alamat Lengkap</span>
|
||||
<span class="info-value" style="font-size:11.5px; line-height:1.4;">${alamatLengkap}</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="info-label">Status Bantuan</span>
|
||||
<span class="info-value" style="color: ${statusBantuan === 'Sudah Menerima' ? '#34d399' : '#f87171'}; font-weight: 600;">${statusBantuan}</span>
|
||||
</div>
|
||||
${actionButtons}
|
||||
</div>
|
||||
</div>`;
|
||||
@@ -344,24 +288,184 @@ function updatePopupRadius(ibadahId, lat, lng) {
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Cari nama rumah ibadah dari databasePencarian
|
||||
var ibadahObj = databasePencarian.find(item => item.layer && item.layer._popup && item.layer._popup.getContent().includes('popup-ibadah-' + ibadahId));
|
||||
var ibadahName = ibadahObj ? ibadahObj.namaAsli : "Rumah Ibadah";
|
||||
|
||||
showDashboard(ibadahName, totalKK, sudahBantuan, belumBantuan, familiesInRadius);
|
||||
}
|
||||
|
||||
map.on('click', function () {
|
||||
if (sidebarPickMode) return; // Ditangani oleh listener sidebar
|
||||
radiusLayer.clearLayers();
|
||||
pendudukMiskinLayer.clearLayers();
|
||||
closeDashboard();
|
||||
});
|
||||
|
||||
loadRumahIbadah();
|
||||
|
||||
// SPBU & draw-related globals removed
|
||||
|
||||
// ==========================================
|
||||
// 4. EVENT SAAT MENGGAMBAR SELESAI
|
||||
// ==========================================
|
||||
/*
|
||||
map.on(L.Draw.Event.CREATED, function (e) {
|
||||
var type = e.layerType, layer = e.layer;
|
||||
var geojson = layer.toGeoJSON();
|
||||
koordinatSementara = JSON.stringify(geojson.geometry);
|
||||
var popupContent = "";
|
||||
|
||||
if (type === 'polyline') {
|
||||
var panjangMeter = turf.length(geojson, { units: 'meters' }).toFixed(2);
|
||||
popupContent = `
|
||||
<div class="popup-container">
|
||||
<div class="popup-header" style="background: linear-gradient(135deg, #134e4a, #0f766e);">
|
||||
<h4>Input Data Jalan</h4>
|
||||
<span class="popup-type-badge">🛣️ Polyline Baru</span>
|
||||
</div>
|
||||
<div class="popup-body">
|
||||
<form onsubmit="saveJalan(event)">
|
||||
<input type="text" id="j_nama" placeholder="Nama Jalan" required>
|
||||
<select id="j_status">
|
||||
<option value="Jalan Nasional">Jalan Nasional</option>
|
||||
<option value="Jalan Provinsi">Jalan Provinsi</option>
|
||||
<option value="Jalan Kabupaten">Jalan Kabupaten</option>
|
||||
</select>
|
||||
<span class="info-label">Panjang Terukur</span>
|
||||
<input type="text" id="j_panjang" value="${panjangMeter} m" readonly>
|
||||
<button type="submit" class="btn btn-save" style="width:100%; margin-top:4px;">💾 Simpan Jalan</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>`;
|
||||
} else if (type === 'polygon') {
|
||||
var luasMeter = turf.area(geojson).toFixed(2);
|
||||
popupContent = `
|
||||
<div class="popup-container">
|
||||
<div class="popup-header" style="background: linear-gradient(135deg, #4a1d96, #7c3aed);">
|
||||
<h4>Input Data Parsil</h4>
|
||||
<span class="popup-type-badge">🏘️ Polygon Baru</span>
|
||||
</div>
|
||||
<div class="popup-body">
|
||||
<form onsubmit="saveParsil(event)">
|
||||
<input type="text" id="p_nama" placeholder="Nama Pemilik" required>
|
||||
<select id="p_status">
|
||||
<option value="SHM">SHM (Hak Milik)</option>
|
||||
<option value="HGB">HGB (Guna Bangunan)</option>
|
||||
<option value="HGU">HGU (Guna Usaha)</option>
|
||||
<option value="HP">HP (Hak Pakai)</option>
|
||||
</select>
|
||||
<span class="info-label">Luas Terukur</span>
|
||||
<input type="text" id="p_luas" value="${luasMeter} m²" readonly>
|
||||
<button type="submit" class="btn btn-save" style="width:100%; margin-top:4px;">💾 Simpan Parsil</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>`;
|
||||
} else if (type === 'marker') {
|
||||
tempLat = layer.getLatLng().lat;
|
||||
tempLng = layer.getLatLng().lng;
|
||||
popupContent = `
|
||||
<div class="popup-container">
|
||||
<div class="popup-header">
|
||||
<h4>Tambah Titik Baru</h4>
|
||||
<span class="popup-type-badge">📍 Marker Baru</span>
|
||||
</div>
|
||||
<div class="popup-body">
|
||||
<select id="kategori_marker" onchange="toggleFormMarker()" style="margin-bottom:12px; border-color:#3b82f6;">
|
||||
<option value="spbu">⛽ Stasiun SPBU</option>
|
||||
<option value="rumah_ibadah">🕌 Rumah Ibadah</option>
|
||||
<option value="penduduk">👥 Penduduk Miskin</option>
|
||||
</select>
|
||||
<form id="form_spbu" onsubmit="saveSPBU(event)">
|
||||
<input type="text" id="new_nama" placeholder="Nama SPBU" required>
|
||||
<input type="text" id="new_nohp" placeholder="No HP">
|
||||
<select id="new_kategori">
|
||||
<option value="Ya">Buka 24 Jam</option>
|
||||
<option value="Tidak">Reguler</option>
|
||||
</select>
|
||||
<button type="submit" class="btn btn-save" style="width:100%;">💾 Simpan SPBU</button>
|
||||
</form>
|
||||
<form id="form_rumah_ibadah" onsubmit="saveRumahIbadah(event)" style="display:none;">
|
||||
<input type="text" id="ri_nama" placeholder="Nama Rumah Ibadah" required>
|
||||
<button type="submit" class="btn btn-save" style="width:100%;">💾 Simpan Rumah Ibadah</button>
|
||||
</form>
|
||||
<form id="form_penduduk" onsubmit="savePenduduk(event)" style="display:none;">
|
||||
<input type="text" id="pm_nama" placeholder="Nama Kepala Keluarga" required>
|
||||
<button type="submit" class="btn btn-save" style="width:100%; background:#ef4444;">💾 Simpan Penduduk</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
layer.bindPopup(popupContent).openPopup();
|
||||
drawnItems.addLayer(layer);
|
||||
});
|
||||
*/
|
||||
|
||||
/*
|
||||
// ==========================================
|
||||
// 6. FUNGSI SIMPAN DATA
|
||||
// ==========================================
|
||||
function saveSPBU(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData();
|
||||
formData.append('nama_spbu', document.getElementById('new_nama').value);
|
||||
formData.append('no_hp', document.getElementById('new_nohp').value);
|
||||
formData.append('kategori', document.getElementById('new_kategori').value);
|
||||
formData.append('latitude', tempLat);
|
||||
formData.append('longitude', tempLng);
|
||||
fetch('save.php', { method: 'POST', body: formData })
|
||||
.then(r => r.text()).then(res => { alert(res); map.closePopup(); drawnItems.clearLayers(); loadSPBU(); })
|
||||
.catch(error => console.error('Error:', error));
|
||||
}
|
||||
|
||||
function saveJalan(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData();
|
||||
formData.append('nama_jalan', document.getElementById('j_nama').value);
|
||||
formData.append('status', document.getElementById('j_status').value);
|
||||
formData.append('panjang', document.getElementById('j_panjang').value);
|
||||
formData.append('koordinat', koordinatSementara);
|
||||
fetch('save_jalan.php', { method: 'POST', body: formData })
|
||||
.then(r => r.text()).then(res => { alert(res); map.closePopup(); drawnItems.clearLayers(); loadJalan(); })
|
||||
.catch(error => console.error('Error:', error));
|
||||
}
|
||||
|
||||
function saveParsil(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData();
|
||||
formData.append('nama_pemilik', document.getElementById('p_nama').value);
|
||||
formData.append('status', document.getElementById('p_status').value);
|
||||
formData.append('luas', document.getElementById('p_luas').value);
|
||||
formData.append('koordinat', koordinatSementara);
|
||||
fetch('save_parsil.php', { method: 'POST', body: formData })
|
||||
.then(r => r.text()).then(res => { alert(res); map.closePopup(); drawnItems.clearLayers(); loadParsil(); })
|
||||
.catch(error => console.error('Error:', error));
|
||||
}
|
||||
|
||||
function toggleFormMarker() {
|
||||
var pilihan = document.getElementById('kategori_marker').value;
|
||||
document.getElementById('form_spbu').style.display = pilihan === 'spbu' ? 'block' : 'none';
|
||||
document.getElementById('form_rumah_ibadah').style.display = pilihan === 'rumah_ibadah' ? 'block' : 'none';
|
||||
document.getElementById('form_penduduk').style.display = pilihan === 'penduduk' ? 'block' : 'none';
|
||||
}
|
||||
|
||||
function saveRumahIbadah(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData();
|
||||
formData.append('nama', document.getElementById('ri_nama').value);
|
||||
formData.append('latitude', tempLat);
|
||||
formData.append('longitude', tempLng);
|
||||
fetch('save_rumah_ibadah.php', { method: 'POST', body: formData })
|
||||
.then(r => r.text()).then(res => { alert(res); map.closePopup(); drawnItems.clearLayers(); loadRumahIbadah(); })
|
||||
.catch(error => console.error('Error:', error));
|
||||
}
|
||||
|
||||
function savePenduduk(e) {
|
||||
e.preventDefault();
|
||||
var formData = new FormData();
|
||||
formData.append('nama', document.getElementById('pm_nama').value);
|
||||
formData.append('latitude', tempLat);
|
||||
formData.append('longitude', tempLng);
|
||||
fetch('save_penduduk_miskin.php', { method: 'POST', body: formData })
|
||||
.then(r => r.text()).then(res => { alert(res); map.closePopup(); drawnItems.clearLayers(); loadRumahIbadah(); })
|
||||
.catch(error => console.error('Error:', error));
|
||||
}
|
||||
*/
|
||||
|
||||
// ==========================================
|
||||
// 7. HAPUS DATA
|
||||
@@ -405,7 +509,7 @@ function formEditRumahIbadah(id, nama, lat, lng) {
|
||||
}, 50);
|
||||
}
|
||||
|
||||
function formEditPenduduk(id, nama, alamat, statusBantuan, lat, lng) {
|
||||
function formEditPenduduk(id, nama, alamat, lat, lng) {
|
||||
setTimeout(function () {
|
||||
document.getElementById(`popup-penduduk-${id}`).innerHTML = `
|
||||
<div class="popup-header" style="background: linear-gradient(135deg, #7f1d1d, #ef4444); padding:14px 16px 12px; border-radius: 0;">
|
||||
@@ -413,16 +517,10 @@ function formEditPenduduk(id, nama, alamat, statusBantuan, lat, lng) {
|
||||
</div>
|
||||
<div class="popup-body" style="padding:14px 16px;">
|
||||
<form onsubmit="updateData(event, 'penduduk_miskin', '${id}')">
|
||||
<span class="info-label">NAMA KEPALA KELUARGA</span>
|
||||
<input type="text" style="margin-bottom:12px; width:100%; padding:8px 10px; background-color:#0f172a; border:1px solid rgba(255,255,255,0.2); border-radius:6px; color:#f8fafc;" id="edit_nama_penduduk" value="${nama}" required>
|
||||
<span class="info-label">ALAMAT LENGKAP</span>
|
||||
<textarea id="edit_alamat_penduduk" style="margin-bottom:12px; width:100%; padding:8px 10px; background-color:#0f172a; border:1px solid rgba(255,255,255,0.2); border-radius:6px; color:#f8fafc;" rows="2" required>${alamat}</textarea>
|
||||
<input type="text" id="edit_nama_penduduk" value="${nama}" required>
|
||||
|
||||
<span class="info-label">STATUS BANTUAN</span>
|
||||
<select id="edit_status_bantuan" style="margin-bottom:12px; width:100%; padding:8px 10px; background-color:#0f172a; border:1px solid rgba(255,255,255,0.2); border-radius:6px; color:#f8fafc; font-size:13px; cursor:pointer;">
|
||||
<option value="Belum Menerima" style="background-color:#1e293b; color:#f8fafc;" ${statusBantuan === 'Belum Menerima' ? 'selected' : ''}>Belum Menerima</option>
|
||||
<option value="Sudah Menerima" style="background-color:#1e293b; color:#f8fafc;" ${statusBantuan === 'Sudah Menerima' ? 'selected' : ''}>Sudah Menerima</option>
|
||||
</select>
|
||||
|
||||
<textarea id="edit_alamat_penduduk" rows="3" required>${alamat}</textarea>
|
||||
|
||||
<input type="hidden" id="edit_lat_penduduk" value="${lat}">
|
||||
<input type="hidden" id="edit_lng_penduduk" value="${lng}">
|
||||
@@ -451,7 +549,6 @@ function updateData(e, tabel, id) {
|
||||
} else if (tabel === 'penduduk_miskin') {
|
||||
formData.append('nama', document.getElementById('edit_nama_penduduk').value);
|
||||
formData.append('alamat', document.getElementById('edit_alamat_penduduk').value);
|
||||
formData.append('bantuan', document.getElementById('edit_status_bantuan').value);
|
||||
formData.append('latitude', document.getElementById('edit_lat_penduduk').value);
|
||||
formData.append('longitude', document.getElementById('edit_lng_penduduk').value);
|
||||
}
|
||||
@@ -489,8 +586,7 @@ legend.onAdd = function (map) {
|
||||
</div>
|
||||
Rumah Ibadah
|
||||
</div>
|
||||
<div class="legend-item"><span class="legend-color" style="background:#34d399; border-color:#34d399; border-radius:50%; height:10px; width:10px; margin-left:2px;"></span> Penduduk Miskin (Sudah Menerima)</div>
|
||||
<div class="legend-item"><span class="legend-color" style="background:#ef4444; border-color:#dc2626; border-radius:50%; height:10px; width:10px; margin-left:2px;"></span> Penduduk Miskin (Belum Menerima)</div>
|
||||
<div class="legend-item"><span class="legend-color" style="background:#ef4444; border-color:#dc2626; border-radius:50%; height:10px; width:10px; margin-left:2px;"></span> Penduduk Miskin</div>
|
||||
</div>`;
|
||||
return div;
|
||||
};
|
||||
@@ -503,11 +599,10 @@ var databasePencarian = [];
|
||||
|
||||
var ikonKategori = {
|
||||
'Rumah Ibadah': '🕌',
|
||||
'Penduduk Miskin': '👥'
|
||||
};
|
||||
|
||||
var warnaBadge = {
|
||||
'Rumah Ibadah': 'badge-Rumah-Ibadah'
|
||||
'Rumah Ibadah': 'badge-Rumah-Ibadah',
|
||||
};
|
||||
|
||||
function jalankanPencarian() {
|
||||
@@ -534,28 +629,11 @@ function jalankanPencarian() {
|
||||
|
||||
hasil.forEach(function (item) {
|
||||
var badgeClass = warnaBadge[item.kategori] || 'badge-default';
|
||||
var kategoriText = item.kategori;
|
||||
var ikon = item.ikon || '📍';
|
||||
var ikon = ikonKategori[item.kategori] || '📍';
|
||||
var bgColors = {
|
||||
'Rumah Ibadah': 'rgba(59,130,246,0.12)',
|
||||
'Penduduk Miskin': item.bantuan === 'Sudah Menerima' ? 'rgba(16,185,129,0.12)' : 'rgba(239,68,68,0.12)'
|
||||
'Rumah Ibadah': 'rgba(59,130,246,0.12)'
|
||||
};
|
||||
|
||||
if (item.kategori === 'Penduduk Miskin') {
|
||||
if (item.bantuan === 'Sudah Menerima') {
|
||||
badgeClass = 'badge-penduduk-sudah';
|
||||
kategoriText = 'Sudah Menerima';
|
||||
} else {
|
||||
badgeClass = 'badge-penduduk-belum';
|
||||
kategoriText = 'Belum Menerima';
|
||||
}
|
||||
}
|
||||
|
||||
var subText = 'Klik untuk zoom ke lokasi';
|
||||
if (item.kategori === 'Penduduk Miskin') {
|
||||
subText = 'Penduduk Miskin • ' + subText;
|
||||
}
|
||||
|
||||
var div = document.createElement('div');
|
||||
div.className = 'result-item';
|
||||
div.innerHTML = `
|
||||
@@ -564,24 +642,17 @@ function jalankanPencarian() {
|
||||
</div>
|
||||
<div class="result-item-text">
|
||||
<div class="result-item-name">${item.namaAsli}</div>
|
||||
<div class="result-item-sub">${subText}</div>
|
||||
<div class="result-item-sub">Klik untuk zoom ke lokasi</div>
|
||||
</div>
|
||||
<span class="badge-kategori ${badgeClass}">${kategoriText}</span>`;
|
||||
<span class="badge-kategori ${badgeClass}">${item.kategori}</span>`;
|
||||
|
||||
div.onclick = function () {
|
||||
if (item.tipe === 'titik') {
|
||||
if (item.kategori === 'Penduduk Miskin') {
|
||||
// For markers in markerClusterGroup, use zoomToShowLayer to expand clusters
|
||||
pendudukMiskinCluster.zoomToShowLayer(item.layer, function () {
|
||||
item.layer.openPopup();
|
||||
});
|
||||
} else {
|
||||
map.flyTo(item.layer.getLatLng(), 17, { animate: true, duration: 1.5 });
|
||||
item.layer.openPopup();
|
||||
}
|
||||
map.flyTo(item.layer.getLatLng(), 17, { animate: true, duration: 1.5 });
|
||||
} else {
|
||||
map.fitBounds(item.layer.getBounds());
|
||||
}
|
||||
item.layer.openPopup();
|
||||
wadahHasil.style.display = 'none';
|
||||
document.getElementById('search-input').value = item.namaAsli;
|
||||
toggleClearBtn();
|
||||
@@ -640,25 +711,15 @@ var sidebarPickMode = null; // 'ibadah' | 'penduduk'
|
||||
var sidebarTempLat = 0, sidebarTempLng = 0;
|
||||
|
||||
// Buka/Tutup Sidebar
|
||||
var sidebarToggle = document.getElementById('sidebar-toggle');
|
||||
if (sidebarToggle) {
|
||||
sidebarToggle.addEventListener('click', function () {
|
||||
var sidebar = document.getElementById('input-sidebar');
|
||||
if (sidebar) sidebar.classList.toggle('open');
|
||||
this.classList.toggle('open');
|
||||
});
|
||||
}
|
||||
|
||||
var sidebarClose = document.getElementById('sidebar-close');
|
||||
if (sidebarClose) {
|
||||
sidebarClose.addEventListener('click', function () {
|
||||
var sidebar = document.getElementById('input-sidebar');
|
||||
if (sidebar) sidebar.classList.remove('open');
|
||||
|
||||
var sidebarToggle = document.getElementById('sidebar-toggle');
|
||||
if (sidebarToggle) sidebarToggle.classList.remove('open');
|
||||
});
|
||||
}
|
||||
document.getElementById('sidebar-toggle').addEventListener('click', function () {
|
||||
var sidebar = document.getElementById('input-sidebar');
|
||||
sidebar.classList.toggle('open');
|
||||
this.classList.toggle('open');
|
||||
});
|
||||
document.getElementById('sidebar-close').addEventListener('click', function () {
|
||||
document.getElementById('input-sidebar').classList.remove('open');
|
||||
document.getElementById('sidebar-toggle').classList.remove('open');
|
||||
});
|
||||
|
||||
// Ganti Tab
|
||||
function switchSidebarTab(tabName) {
|
||||
@@ -757,16 +818,14 @@ function savePendudukSidebar() {
|
||||
if (coords === 'Belum dipilih') { alert('Pilih lokasi di peta terlebih dahulu!'); return; }
|
||||
|
||||
var nama = document.getElementById('sb_nama_penduduk').value.trim();
|
||||
var alamat = document.getElementById('sb_alamat_penduduk').value.trim();
|
||||
var statusBantuan = document.getElementById('sb_status_bantuan').value;
|
||||
var alamat = document.getElementById('sb_alamat_penduduk').value.trim(); // Ambil nilai alamat
|
||||
|
||||
if (!nama) { alert('Nama kepala keluarga wajib diisi!'); return; }
|
||||
if (!alamat) { alert('Alamat wajib diisi!'); return; }
|
||||
if (!alamat) { alert('Alamat wajib diisi!'); return; } // Validasi alamat
|
||||
|
||||
var formData = new FormData();
|
||||
formData.append('nama', nama);
|
||||
formData.append('alamat', alamat);
|
||||
formData.append('bantuan', statusBantuan);
|
||||
formData.append('alamat', alamat); // Masukkan ke dalam data form
|
||||
formData.append('latitude', sidebarTempLat);
|
||||
formData.append('longitude', sidebarTempLng);
|
||||
|
||||
@@ -774,8 +833,7 @@ function savePendudukSidebar() {
|
||||
.then(r => r.text()).then(res => {
|
||||
alert(res);
|
||||
document.getElementById('sb_nama_penduduk').value = '';
|
||||
document.getElementById('sb_alamat_penduduk').value = '';
|
||||
document.getElementById('sb_status_bantuan').value = 'Belum Menerima';
|
||||
document.getElementById('sb_alamat_penduduk').value = ''; // Hanya kosongkan value
|
||||
document.getElementById('coords-penduduk-val').textContent = 'Belum dipilih';
|
||||
document.getElementById('coords-penduduk-val').classList.remove('has-coords');
|
||||
sidebarTempLat = 0; sidebarTempLng = 0;
|
||||
@@ -824,182 +882,4 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
document.addEventListener('click', function () {
|
||||
options.classList.remove('show');
|
||||
});
|
||||
});
|
||||
|
||||
// ==========================================
|
||||
// 15. DYNAMIC STATS DASHBOARD SIDEBAR (CHART.JS)
|
||||
// ==========================================
|
||||
var myPovertyChart = null;
|
||||
|
||||
function showDashboard(ibadahName, totalKK, sudahBantuan, belumBantuan, familiesInRadius) {
|
||||
document.getElementById('dashboard-target-name').textContent = ibadahName;
|
||||
document.getElementById('stat-total-kk').textContent = totalKK;
|
||||
document.getElementById('stat-sudah-bantuan').textContent = sudahBantuan;
|
||||
document.getElementById('stat-belum-bantuan').textContent = belumBantuan;
|
||||
|
||||
// Tampilkan sidebar kanan
|
||||
document.getElementById('dashboard-sidebar').classList.add('open');
|
||||
|
||||
// Buat daftar KK miskin dalam radius
|
||||
var listContainer = document.getElementById('dashboard-families-list');
|
||||
listContainer.innerHTML = '';
|
||||
|
||||
if (familiesInRadius.length === 0) {
|
||||
listContainer.innerHTML = '<div class="families-empty">Tidak ada KK Miskin dalam radius ini</div>';
|
||||
} else {
|
||||
familiesInRadius.forEach(f => {
|
||||
var item = document.createElement('div');
|
||||
item.className = 'family-item';
|
||||
|
||||
var statusClass = f.bantuan === 'Sudah Menerima' ? 'badge-success' : 'badge-danger';
|
||||
var statusText = f.bantuan === 'Sudah Menerima' ? 'Sudah' : 'Belum';
|
||||
|
||||
item.innerHTML = `
|
||||
<div class="family-details">
|
||||
<div class="family-name">${f.nama_kk}</div>
|
||||
<div class="family-address">${f.alamat || 'Alamat tidak diisi'}</div>
|
||||
</div>
|
||||
<span class="family-badge ${statusClass}">${statusText}</span>
|
||||
`;
|
||||
|
||||
// Klik untuk zoom/fly ke marker
|
||||
item.onclick = function () {
|
||||
var lat = parseFloat(f.lat || f.latitude);
|
||||
var lng = parseFloat(f.lng || f.longitude);
|
||||
map.flyTo([lat, lng], 18, { animate: true });
|
||||
};
|
||||
|
||||
listContainer.appendChild(item);
|
||||
});
|
||||
}
|
||||
|
||||
// Gambar Chart.js
|
||||
var ctx = document.getElementById('povertyChart').getContext('2d');
|
||||
|
||||
if (myPovertyChart) {
|
||||
myPovertyChart.destroy();
|
||||
}
|
||||
|
||||
var chartLabels = ['Sudah Menerima', 'Belum Menerima'];
|
||||
var chartData = [sudahBantuan, belumBantuan];
|
||||
var bgColors = ['#10b981', '#ef4444'];
|
||||
|
||||
if (totalKK === 0) {
|
||||
chartLabels = ['Tidak Ada Data'];
|
||||
chartData = [1];
|
||||
bgColors = ['#475569'];
|
||||
}
|
||||
|
||||
myPovertyChart = new Chart(ctx, {
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
labels: chartLabels,
|
||||
datasets: [{
|
||||
data: chartData,
|
||||
backgroundColor: bgColors,
|
||||
borderWidth: 0
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
plugins: {
|
||||
legend: {
|
||||
position: 'bottom',
|
||||
labels: {
|
||||
color: '#cbd5e1',
|
||||
font: {
|
||||
family: 'Plus Jakarta Sans',
|
||||
size: 10
|
||||
},
|
||||
boxWidth: 12
|
||||
}
|
||||
}
|
||||
},
|
||||
cutout: '65%'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function closeDashboard() {
|
||||
document.getElementById('dashboard-sidebar').classList.remove('open');
|
||||
}
|
||||
|
||||
// ==========================================
|
||||
// 16. SISTEM MONITORING KONEKSI DINAMIS
|
||||
// ==========================================
|
||||
function updateConnectionStatus() {
|
||||
var statusEl = document.getElementById('connection-status');
|
||||
var mobileStatusEl = document.getElementById('mobile-connection-status');
|
||||
var mobileStatusText = document.getElementById('mobile-connection-text');
|
||||
|
||||
if (navigator.onLine) {
|
||||
if (statusEl) {
|
||||
statusEl.classList.remove('offline');
|
||||
statusEl.classList.add('online');
|
||||
statusEl.setAttribute('title', 'Koneksi Stabil');
|
||||
}
|
||||
if (mobileStatusEl) {
|
||||
mobileStatusEl.style.color = '#10b981';
|
||||
}
|
||||
if (mobileStatusText) {
|
||||
mobileStatusText.textContent = 'Online';
|
||||
}
|
||||
} else {
|
||||
if (statusEl) {
|
||||
statusEl.classList.remove('online');
|
||||
statusEl.classList.add('offline');
|
||||
statusEl.setAttribute('title', 'Koneksi Terputus - Peta mungkin tidak dimuat sempurna');
|
||||
}
|
||||
if (mobileStatusEl) {
|
||||
mobileStatusEl.style.color = '#ef4444';
|
||||
}
|
||||
if (mobileStatusText) {
|
||||
mobileStatusText.textContent = 'Offline';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Event listeners untuk mendeteksi perubahan status koneksi
|
||||
window.addEventListener('online', updateConnectionStatus);
|
||||
window.addEventListener('offline', updateConnectionStatus);
|
||||
|
||||
// Jalankan saat pertama kali dimuat
|
||||
document.addEventListener('DOMContentLoaded', updateConnectionStatus);
|
||||
updateConnectionStatus();
|
||||
|
||||
// ==========================================
|
||||
// 17. MODAL TENTANG APLIKASI
|
||||
// ==========================================
|
||||
var aboutBtn = document.getElementById('about-btn');
|
||||
var mobileAboutBtn = document.getElementById('mobile-about-btn');
|
||||
var aboutModal = document.getElementById('about-modal');
|
||||
var aboutCloseBtn = document.getElementById('about-close-btn');
|
||||
var aboutOkBtn = document.getElementById('about-ok-btn');
|
||||
|
||||
var openAboutModal = function (e) {
|
||||
e.preventDefault();
|
||||
aboutModal.classList.add('active');
|
||||
// Tutup menu mobile jika sedang terbuka
|
||||
var menu = document.getElementById('mobile-menu-dropdown');
|
||||
if (menu) menu.classList.remove('active');
|
||||
};
|
||||
|
||||
if (aboutModal) {
|
||||
if (aboutBtn) aboutBtn.addEventListener('click', openAboutModal);
|
||||
if (mobileAboutBtn) mobileAboutBtn.addEventListener('click', openAboutModal);
|
||||
|
||||
var closeModal = function () {
|
||||
aboutModal.classList.remove('active');
|
||||
};
|
||||
|
||||
if (aboutCloseBtn) aboutCloseBtn.addEventListener('click', closeModal);
|
||||
if (aboutOkBtn) aboutOkBtn.addEventListener('click', closeModal);
|
||||
|
||||
// Tutup modal jika klik area luar modal-content
|
||||
aboutModal.addEventListener('click', function (e) {
|
||||
if (e.target === aboutModal) {
|
||||
closeModal();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
+10
-754
@@ -430,16 +430,6 @@ body {
|
||||
color: #60a5fa;
|
||||
}
|
||||
|
||||
.badge-penduduk-sudah {
|
||||
background: rgba(16, 185, 129, 0.15);
|
||||
color: #34d399;
|
||||
}
|
||||
|
||||
.badge-penduduk-belum {
|
||||
background: rgba(239, 68, 68, 0.15);
|
||||
color: #f87171;
|
||||
}
|
||||
|
||||
.badge-default {
|
||||
background: rgba(148, 163, 184, 0.15);
|
||||
color: #94a3b8;
|
||||
@@ -468,14 +458,6 @@ body {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.hamburger-menu-btn {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mobile-menu-dropdown {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tool-btn {
|
||||
background: rgba(255, 255, 255, 0.07);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
@@ -513,21 +495,6 @@ body {
|
||||
border: 1px solid #0f172a;
|
||||
}
|
||||
|
||||
#connection-status.online {
|
||||
color: #10b981;
|
||||
border-color: rgba(16, 185, 129, 0.25);
|
||||
}
|
||||
#connection-status.online .status-dot {
|
||||
background: #10b981;
|
||||
}
|
||||
#connection-status.offline {
|
||||
color: #ef4444;
|
||||
border-color: rgba(239, 68, 68, 0.25);
|
||||
}
|
||||
#connection-status.offline .status-dot {
|
||||
background: #ef4444;
|
||||
}
|
||||
|
||||
/* ============================
|
||||
POPUP STYLES (MODERN CARD)
|
||||
============================ */
|
||||
@@ -635,7 +602,7 @@ body {
|
||||
|
||||
.info-label {
|
||||
font-weight: 600;
|
||||
color: var(--text-secondary);
|
||||
color: var(--text-muted);
|
||||
font-size: 10px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.8px;
|
||||
@@ -646,7 +613,7 @@ body {
|
||||
.info-value {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: var(--text-muted);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
/* Popup form inputs */
|
||||
@@ -1542,11 +1509,10 @@ body {
|
||||
/* Halaman Login Khusus */
|
||||
.login-body {
|
||||
display: flex;
|
||||
overflow-y: auto;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 100vh;
|
||||
background: #0f172a;
|
||||
padding: 40px 20px;
|
||||
box-sizing: border-box;
|
||||
background-image: radial-gradient(circle at top right, rgba(30, 64, 175, 0.15), transparent 40%),
|
||||
radial-gradient(circle at bottom left, rgba(15, 118, 110, 0.15), transparent 40%);
|
||||
}
|
||||
@@ -1557,13 +1523,11 @@ body {
|
||||
-webkit-backdrop-filter: blur(16px);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: 24px;
|
||||
margin: auto;
|
||||
padding: 32px;
|
||||
width: 100%;
|
||||
max-width: 380px;
|
||||
box-shadow: var(--shadow-lg);
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
.login-logo {
|
||||
@@ -1766,128 +1730,9 @@ body {
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.header-tools-divider,
|
||||
.user-profile-menu,
|
||||
.auth-btn,
|
||||
#connection-status,
|
||||
#about-btn {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.hamburger-menu-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: rgba(255, 255, 255, 0.07);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: 8px;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
color: #94a3b8;
|
||||
cursor: pointer;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
|
||||
.hamburger-menu-btn:hover {
|
||||
background: rgba(255, 255, 255, 0.12);
|
||||
color: #e2e8f0;
|
||||
}
|
||||
|
||||
.hamburger-menu-btn svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.mobile-menu-dropdown {
|
||||
position: absolute;
|
||||
top: calc(100% + 8px);
|
||||
right: 10px;
|
||||
width: 200px;
|
||||
background: rgba(15, 23, 42, 0.96);
|
||||
backdrop-filter: blur(16px);
|
||||
-webkit-backdrop-filter: blur(16px);
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border-radius: var(--radius-md);
|
||||
box-shadow: var(--shadow-lg);
|
||||
padding: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
z-index: 1250;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transform: translateY(-8px) scale(0.95);
|
||||
transform-origin: top right;
|
||||
transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
|
||||
}
|
||||
|
||||
.mobile-menu-dropdown.active {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
transform: translateY(0) scale(1);
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.mobile-menu-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 10px 12px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: #cbd5e1;
|
||||
text-decoration: none;
|
||||
border-radius: 6px;
|
||||
transition: all 0.15s ease;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.mobile-menu-item:hover {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
color: #f1f5f9;
|
||||
}
|
||||
|
||||
.mobile-menu-item svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.mobile-menu-divider {
|
||||
height: 1px;
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
margin: 4px 6px;
|
||||
}
|
||||
|
||||
.mobile-menu-user {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 8px 12px;
|
||||
}
|
||||
|
||||
.mobile-avatar {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 50%;
|
||||
border: 1.5px solid var(--primary);
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.mobile-username {
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
color: #f8fafc;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 130px;
|
||||
}
|
||||
|
||||
.mobile-role {
|
||||
font-size: 10.5px;
|
||||
color: #64748b;
|
||||
margin-top: 1px;
|
||||
.tool-btn {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
/* Sidebar Full-width (100%) */
|
||||
@@ -1901,21 +1746,10 @@ body {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
/* Dashboard Sidebar Full-width (100%) */
|
||||
.dashboard-sidebar {
|
||||
width: 100%;
|
||||
right: -100%;
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
.dashboard-sidebar.open {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
/* Pindahkan Tombol Toggle ke Bawah Tengah pada Mobile */
|
||||
.sidebar-toggle {
|
||||
top: auto;
|
||||
bottom: 80px;
|
||||
bottom: 24px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
|
||||
@@ -1931,12 +1765,8 @@ body {
|
||||
top: 65px !important;
|
||||
}
|
||||
|
||||
.leaflet-bottom {
|
||||
bottom: 68px !important;
|
||||
}
|
||||
|
||||
.pick-mode-overlay {
|
||||
bottom: 136px;
|
||||
bottom: 80px;
|
||||
}
|
||||
|
||||
/* Naikkan sedikit agar tidak tertutup tombol toggle */
|
||||
@@ -2174,578 +2004,4 @@ body {
|
||||
.logout-link:hover {
|
||||
background: rgba(239, 68, 68, 0.1);
|
||||
color: #f87171;
|
||||
}
|
||||
|
||||
/* ==========================================
|
||||
POPUP CLOSE BUTTON OVERRIDES
|
||||
========================================== */
|
||||
.leaflet-popup-close-button {
|
||||
position: absolute !important;
|
||||
top: 12px !important;
|
||||
right: 12px !important;
|
||||
width: 20px !important;
|
||||
height: 20px !important;
|
||||
line-height: 20px !important;
|
||||
text-align: center !important;
|
||||
color: rgba(255, 255, 255, 0.75) !important;
|
||||
background: rgba(255, 255, 255, 0.15) !important;
|
||||
border-radius: 50% !important;
|
||||
font-size: 12px !important;
|
||||
font-weight: normal !important;
|
||||
z-index: 1000 !important;
|
||||
transition: all 0.2s ease !important;
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: center !important;
|
||||
padding: 0 !important;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.leaflet-popup-close-button:hover {
|
||||
color: #ffffff !important;
|
||||
background: rgba(255, 255, 255, 0.3) !important;
|
||||
}
|
||||
|
||||
/* ==========================================
|
||||
DASHBOARD STATISTIK (RIGHT SIDEBAR)
|
||||
========================================== */
|
||||
.dashboard-sidebar {
|
||||
position: fixed;
|
||||
top: 56px;
|
||||
right: -340px;
|
||||
width: 330px;
|
||||
height: calc(100vh - 56px);
|
||||
background: rgba(13, 20, 36, 0.97);
|
||||
backdrop-filter: blur(16px);
|
||||
-webkit-backdrop-filter: blur(16px);
|
||||
border-left: 1px solid rgba(255, 255, 255, 0.08);
|
||||
z-index: 1040;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
box-shadow: -4px 0 32px rgba(0, 0, 0, 0.4);
|
||||
color: #e2e8f0;
|
||||
}
|
||||
|
||||
.dashboard-sidebar.open {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.dashboard-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 16px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.07);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.dashboard-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.dashboard-title-icon {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
background: linear-gradient(135deg, #10b981, #059669);
|
||||
border-radius: 9px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.dashboard-title-icon svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.dashboard-title-text {
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
color: #f1f5f9;
|
||||
}
|
||||
|
||||
.dashboard-title-sub {
|
||||
font-size: 11px;
|
||||
color: #64748b;
|
||||
margin-top: 1px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 180px;
|
||||
}
|
||||
|
||||
.dashboard-close {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: 7px;
|
||||
color: #94a3b8;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.15s;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.dashboard-close:hover {
|
||||
background: rgba(255, 255, 255, 0.12);
|
||||
color: #f1f5f9;
|
||||
}
|
||||
|
||||
.dashboard-close svg {
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
}
|
||||
|
||||
.dashboard-body {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
/* Stats Grid cards */
|
||||
.stats-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.stat-card {
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
border: 1px solid rgba(255, 255, 255, 0.06);
|
||||
border-radius: 8px;
|
||||
padding: 10px 6px;
|
||||
text-align: center;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.stat-card:hover {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.stat-num {
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
color: #e2e8f0;
|
||||
font-family: var(--font-mono);
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: 9px;
|
||||
color: #64748b;
|
||||
margin-top: 4px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.2px;
|
||||
}
|
||||
|
||||
.stat-card.stat-success {
|
||||
border-color: rgba(16, 185, 129, 0.2);
|
||||
background: rgba(16, 185, 129, 0.03);
|
||||
}
|
||||
|
||||
.stat-card.stat-success .stat-num {
|
||||
color: #10b981;
|
||||
}
|
||||
|
||||
.stat-card.stat-danger {
|
||||
border-color: rgba(239, 68, 68, 0.2);
|
||||
background: rgba(239, 68, 68, 0.03);
|
||||
}
|
||||
|
||||
.stat-card.stat-danger .stat-num {
|
||||
color: #ef4444;
|
||||
}
|
||||
|
||||
/* Chart Section */
|
||||
.chart-section {
|
||||
background: rgba(255, 255, 255, 0.02);
|
||||
border: 1px solid rgba(255, 255, 255, 0.06);
|
||||
border-radius: 10px;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.chart-title {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
color: #cbd5e1;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* Families List Section */
|
||||
.families-section {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
.families-title {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
color: #cbd5e1;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.families-list {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
border: 1px solid rgba(255, 255, 255, 0.06);
|
||||
border-radius: 8px;
|
||||
background: rgba(0, 0, 0, 0.15);
|
||||
max-height: 250px;
|
||||
}
|
||||
|
||||
.family-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 10px 12px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
||||
cursor: pointer;
|
||||
transition: background 0.15s;
|
||||
}
|
||||
|
||||
.family-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.family-item:hover {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.family-details {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
.family-name {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: #f1f5f9;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.family-address {
|
||||
font-size: 10px;
|
||||
color: #64748b;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.family-badge {
|
||||
font-size: 8.5px;
|
||||
font-weight: 700;
|
||||
padding: 2px 6px;
|
||||
border-radius: 12px;
|
||||
text-transform: uppercase;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.family-badge.badge-success {
|
||||
background: rgba(16, 185, 129, 0.15);
|
||||
color: #34d399;
|
||||
}
|
||||
|
||||
.family-badge.badge-danger {
|
||||
background: rgba(239, 68, 68, 0.15);
|
||||
color: #f87171;
|
||||
}
|
||||
|
||||
.families-empty {
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
color: #64748b;
|
||||
font-size: 11.5px;
|
||||
}
|
||||
|
||||
/* ==========================================
|
||||
MARKER CLUSTER CUSTOM STYLING
|
||||
========================================== */
|
||||
.marker-cluster-small {
|
||||
background-color: rgba(59, 130, 246, 0.4) !important;
|
||||
}
|
||||
|
||||
.marker-cluster-small div {
|
||||
background-color: rgba(37, 99, 235, 0.95) !important;
|
||||
color: white !important;
|
||||
font-weight: 700 !important;
|
||||
}
|
||||
|
||||
.marker-cluster-medium {
|
||||
background-color: rgba(37, 99, 235, 0.4) !important;
|
||||
}
|
||||
|
||||
.marker-cluster-medium div {
|
||||
background-color: rgba(29, 78, 216, 0.95) !important;
|
||||
color: white !important;
|
||||
font-weight: 700 !important;
|
||||
}
|
||||
|
||||
.marker-cluster-large {
|
||||
background-color: rgba(30, 58, 138, 0.4) !important;
|
||||
}
|
||||
|
||||
.marker-cluster-large div {
|
||||
background-color: rgba(30, 64, 175, 0.95) !important;
|
||||
color: white !important;
|
||||
font-weight: 700 !important;
|
||||
}
|
||||
|
||||
.marker-cluster div {
|
||||
font-family: var(--font-mono) !important;
|
||||
font-size: 12px !important;
|
||||
box-shadow: 0 0 10px rgba(37, 99, 235, 0.5) !important;
|
||||
}
|
||||
|
||||
/* Menghapus padding agar header hijau bisa mentok ke atas dan samping */
|
||||
.leaflet-popup-content-wrapper {
|
||||
padding: 0 !important;
|
||||
border-radius: 12px !important;
|
||||
overflow: hidden !important;
|
||||
/* Agar sudut tetap melengkung walau header mentok */
|
||||
background-color: #1e2130 !important;
|
||||
/* Warna gelap utama body popup */
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
/* Menghapus margin bawaan konten */
|
||||
.leaflet-popup-content {
|
||||
margin: 0 !important;
|
||||
width: 280px !important;
|
||||
/* Sesuaikan lebar popup */
|
||||
}
|
||||
|
||||
/* Mengubah warna panah di bawah popup agar menyatu dengan body */
|
||||
.leaflet-popup-tip {
|
||||
background-color: #1e2130 !important;
|
||||
}
|
||||
|
||||
/* Menyesuaikan tombol silang (close/x) bawaan Leaflet */
|
||||
.leaflet-popup-close-button {
|
||||
color: #ffffff !important;
|
||||
padding: 4px 8px !important;
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
CUSTOM LAYERS CONTROL - KHUSUS KANAN BAWAH SAJA
|
||||
============================================================ */
|
||||
|
||||
/* Menargetkan tombol Basemap HANYA yang berada di pojok kanan bawah */
|
||||
.leaflet-bottom.leaflet-right .leaflet-control-layers-toggle {
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6l6-3 6 3 6-3v15l-6 3-6-3-6 3V6z'%3E%3C/path%3E%3Cline x1='9' y1='3' x2='9' y2='21'%3E%3C/line%3E%3Cline x1='15' y1='6' x2='15' y2='24'%3E%3C/line%3E%3C/svg%3E") !important;
|
||||
background-color: #1e2130 !important;
|
||||
|
||||
background-size: 18px 18px !important;
|
||||
|
||||
width: 30px !important;
|
||||
|
||||
height: 30px !important;
|
||||
|
||||
|
||||
background-position: center !important;
|
||||
background-repeat: no-repeat !important;
|
||||
border-radius: 8px !important;
|
||||
/* Jika tombol zoom Anda kotak tajam, ubah ini jadi 4px atau 2px */
|
||||
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
|
||||
transition: background-color 0.2s ease;
|
||||
}
|
||||
|
||||
/* Efek hover khusus tombol di kanan bawah */
|
||||
.leaflet-bottom.leaflet-right .leaflet-control-layers-toggle:hover {
|
||||
background-color: #2a2d3d !important;
|
||||
}
|
||||
|
||||
/* Styling panel pop-up pilihan peta (hanya di kanan bawah) */
|
||||
.leaflet-bottom.leaflet-right .leaflet-control-layers {
|
||||
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5) !important;
|
||||
border: 1px solid rgba(255, 255, 255, 0.05) !important;
|
||||
border-radius: 12px !important;
|
||||
background-color: #1e2130 !important;
|
||||
color: #f8fafc !important;
|
||||
padding: 6px !important;
|
||||
}
|
||||
|
||||
.leaflet-bottom.leaflet-right .leaflet-control-layers-list {
|
||||
padding: 4px !important;
|
||||
}
|
||||
|
||||
/* ============================
|
||||
MODAL TENTANG APLIKASI
|
||||
============================ */
|
||||
.modal-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(15, 23, 42, 0.6);
|
||||
backdrop-filter: blur(8px);
|
||||
-webkit-backdrop-filter: blur(8px);
|
||||
z-index: 2000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.modal-overlay.active {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background: #1e293b;
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border-radius: var(--radius-lg);
|
||||
width: 90%;
|
||||
max-width: 460px;
|
||||
box-shadow: var(--shadow-lg), 0 20px 25px -5px rgba(0, 0, 0, 0.5);
|
||||
overflow: hidden;
|
||||
transform: scale(0.95);
|
||||
transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||
}
|
||||
|
||||
.modal-overlay.active .modal-content {
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 16px 20px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
||||
}
|
||||
|
||||
.modal-header h3 {
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
color: #f1f5f9;
|
||||
}
|
||||
|
||||
.modal-close-btn {
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: #94a3b8;
|
||||
font-size: 24px;
|
||||
cursor: pointer;
|
||||
line-height: 1;
|
||||
padding: 0;
|
||||
transition: color 0.15s;
|
||||
}
|
||||
|
||||
.modal-close-btn:hover {
|
||||
color: #f1f5f9;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
padding: 24px 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.modal-logo {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(96, 165, 250, 0.15));
|
||||
border: 1px solid rgba(96, 165, 250, 0.25);
|
||||
border-radius: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0 auto 16px;
|
||||
color: #60a5fa;
|
||||
}
|
||||
|
||||
.modal-logo svg {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.app-title {
|
||||
margin: 0 0 8px 0;
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
color: #ffffff;
|
||||
letter-spacing: -0.3px;
|
||||
}
|
||||
|
||||
.app-desc {
|
||||
font-size: 13px;
|
||||
color: #94a3b8;
|
||||
line-height: 1.6;
|
||||
margin: 0 0 20px 0;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
.modal-divider {
|
||||
height: 1px;
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
.credits-section {
|
||||
background: rgba(15, 23, 42, 0.4);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 14px 16px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.04);
|
||||
}
|
||||
|
||||
.credit-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 12.5px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.credit-row:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.credit-label {
|
||||
color: #64748b;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.credit-value {
|
||||
color: #e2e8f0;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding: 14px 20px;
|
||||
background: rgba(15, 23, 42, 0.3);
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.06);
|
||||
}
|
||||
|
||||
.modal-footer .btn {
|
||||
min-width: 90px;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -27,9 +27,8 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
$alamat = $_POST['alamat'];
|
||||
$lat = $_POST['latitude'];
|
||||
$lng = $_POST['longitude'];
|
||||
$bantuan = isset($_POST['bantuan']) ? $_POST['bantuan'] : 'Belum Menerima';
|
||||
$stmt = $conn->prepare("UPDATE penduduk_miskin SET nama_kk=?, alamat=?, lat=?, lng=?, bantuan=? WHERE id=?");
|
||||
$stmt->bind_param("ssddsi", $nama, $alamat, $lat, $lng, $bantuan, $id);
|
||||
$stmt = $conn->prepare("UPDATE penduduk_miskin SET nama_kk=?, alamat=?, lat=?, lng=? WHERE id=?");
|
||||
$stmt->bind_param("ssddi", $nama, $alamat, $lat, $lng, $id);
|
||||
}
|
||||
|
||||
if ($stmt) {
|
||||
|
||||
@@ -4,398 +4,50 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Sistem Informasi Geografis Terpadu - Portal WebGIS</title>
|
||||
|
||||
<!-- Premium Google Fonts -->
|
||||
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap" rel="stylesheet">
|
||||
|
||||
<title>Landing Page - Tugas WebGIS</title>
|
||||
<style>
|
||||
:root {
|
||||
--bg-primary: #090d16;
|
||||
--bg-card: rgba(17, 24, 39, 0.7);
|
||||
--border-color: rgba(255, 255, 255, 0.08);
|
||||
--text-main: #f3f4f6;
|
||||
--text-muted: #9ca3af;
|
||||
|
||||
/* Card Theme Accent Colors */
|
||||
--color-road: #06b6d4; /* Cyan */
|
||||
--color-spbu: #f59e0b; /* Amber */
|
||||
--color-poverty: #f43f5e; /* Rose */
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Plus Jakarta Sans', sans-serif;
|
||||
background-color: var(--bg-primary);
|
||||
/* Rich radial gradient for modern background depth */
|
||||
background-image:
|
||||
radial-gradient(circle at 10% 20%, rgba(6, 182, 212, 0.08), transparent 40%),
|
||||
radial-gradient(circle at 90% 80%, rgba(244, 63, 94, 0.08), transparent 45%),
|
||||
radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.05), transparent 50%),
|
||||
linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
|
||||
linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
|
||||
background-size: 100% 100%, 100% 100%, 100% 100%, 40px 40px, 40px 40px;
|
||||
color: var(--text-main);
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
padding: 40px 20px;
|
||||
overflow-x: hidden;
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 40px;
|
||||
background-color: #f4f4f9;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1200px;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* ==============================
|
||||
HEADER SECTION
|
||||
============================== */
|
||||
header {
|
||||
text-align: center;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.brand-icon-wrapper {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(244, 63, 94, 0.2));
|
||||
border: 1px solid rgba(255, 255, 255, 0.15);
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0 auto 20px;
|
||||
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.brand-icon-wrapper::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: -4px;
|
||||
border-radius: 24px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.05);
|
||||
animation: pulse-ring 3s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes pulse-ring {
|
||||
0% { transform: scale(0.95); opacity: 0.8; }
|
||||
50% { transform: scale(1.05); opacity: 0.4; }
|
||||
100% { transform: scale(0.95); opacity: 0.8; }
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: -0.5px;
|
||||
background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 1.05rem;
|
||||
color: var(--text-muted);
|
||||
max-width: 600px;
|
||||
margin: 0 auto 24px;
|
||||
line-height: 1.6;
|
||||
margin: 0 auto;
|
||||
background: white;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.developer-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
background: rgba(15, 23, 42, 0.6);
|
||||
backdrop-filter: blur(8px);
|
||||
-webkit-backdrop-filter: blur(8px);
|
||||
border: 1px solid var(--border-color);
|
||||
padding: 8px 18px;
|
||||
border-radius: 30px;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 500;
|
||||
color: #e2e8f0;
|
||||
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.developer-badge .dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background-color: #10b981;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 10px #10b981;
|
||||
animation: blink 2s infinite;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
0%, 100% { opacity: 0.4; }
|
||||
50% { opacity: 1; }
|
||||
}
|
||||
|
||||
.developer-badge span.separator {
|
||||
opacity: 0.3;
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
.developer-badge span.nim {
|
||||
color: #a1a1aa;
|
||||
}
|
||||
|
||||
/* ==============================
|
||||
CARD GRID SECTION
|
||||
============================== */
|
||||
.card-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
|
||||
gap: 24px;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: var(--bg-card);
|
||||
backdrop-filter: blur(16px);
|
||||
-webkit-backdrop-filter: blur(16px);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 24px;
|
||||
padding: 32px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
|
||||
box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
/* Top glow line per card based on its custom color */
|
||||
.card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 3px;
|
||||
background: linear-gradient(90deg, transparent, var(--theme-color), transparent);
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
transform: translateY(-8px);
|
||||
border-color: rgba(255, 255, 255, 0.18);
|
||||
box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5),
|
||||
0 0 30px -5px var(--theme-glow);
|
||||
}
|
||||
|
||||
/* Specific Accent Colors variables setup for each card */
|
||||
.card.card-road {
|
||||
--theme-color: var(--color-road);
|
||||
--theme-glow: rgba(6, 182, 212, 0.15);
|
||||
}
|
||||
.card.card-spbu {
|
||||
--theme-color: var(--color-spbu);
|
||||
--theme-glow: rgba(245, 158, 11, 0.15);
|
||||
}
|
||||
.card.card-poverty {
|
||||
--theme-color: var(--color-poverty);
|
||||
--theme-glow: rgba(244, 63, 94, 0.15);
|
||||
}
|
||||
|
||||
/* Card Content Inner elements */
|
||||
.card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.card-icon {
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
border: 1px solid rgba(255, 255, 255, 0.06);
|
||||
border-radius: 14px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--theme-color);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.card:hover .card-icon {
|
||||
background: var(--theme-color);
|
||||
color: #000000;
|
||||
transform: rotate(5deg) scale(1.05);
|
||||
box-shadow: 0 0 15px var(--theme-glow);
|
||||
}
|
||||
|
||||
.module-badge {
|
||||
font-size: 0.75rem;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
padding: 4px 12px;
|
||||
border-radius: 20px;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: 1px solid rgba(255, 255, 255, 0.05);
|
||||
color: var(--theme-color);
|
||||
}
|
||||
|
||||
.card-title {
|
||||
font-size: 1.4rem;
|
||||
font-weight: 700;
|
||||
color: #ffffff;
|
||||
margin-bottom: 12px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.card-description {
|
||||
font-size: 0.92rem;
|
||||
color: var(--text-muted);
|
||||
line-height: 1.6;
|
||||
margin-bottom: 24px;
|
||||
min-height: 72px; /* aligns grid content heights */
|
||||
}
|
||||
|
||||
/* Features List styling */
|
||||
.features-list {
|
||||
list-style: none;
|
||||
margin-bottom: 30px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.feature-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 12px;
|
||||
font-size: 0.88rem;
|
||||
color: #e2e8f0;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.feature-check {
|
||||
flex-shrink: 0;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
margin-top: 2px;
|
||||
color: var(--theme-color);
|
||||
}
|
||||
|
||||
/* Tech Tags Group styling */
|
||||
.tech-tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
margin-bottom: 28px;
|
||||
border-top: 1px dashed rgba(255, 255, 255, 0.06);
|
||||
padding-top: 16px;
|
||||
}
|
||||
|
||||
.tech-tag {
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
color: #a1a1aa;
|
||||
background: rgba(255, 255, 255, 0.02);
|
||||
border: 1px solid rgba(255, 255, 255, 0.04);
|
||||
padding: 4px 10px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
/* Launch Button styling */
|
||||
.btn-launch {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
width: 100%;
|
||||
background: rgba(255, 255, 255, 0.04);
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
font-size: 0.95rem;
|
||||
padding: 14px 20px;
|
||||
border-radius: 14px;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.btn-launch svg {
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.card:hover .btn-launch {
|
||||
background: var(--theme-color);
|
||||
border-color: var(--theme-color);
|
||||
color: #090d16;
|
||||
font-weight: 700;
|
||||
box-shadow: 0 10px 20px -5px var(--theme-glow);
|
||||
}
|
||||
|
||||
.card:hover .btn-launch svg {
|
||||
transform: translateX(4px);
|
||||
}
|
||||
|
||||
/* ==============================
|
||||
FOOTER SECTION
|
||||
============================== */
|
||||
footer {
|
||||
h2 {
|
||||
text-align: center;
|
||||
margin-top: 60px;
|
||||
font-size: 0.8rem;
|
||||
color: #52525b;
|
||||
letter-spacing: 0.5px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/* ==============================
|
||||
RESPONSIVE STYLE OVERRIDES
|
||||
============================== */
|
||||
@media (max-width: 768px) {
|
||||
body {
|
||||
padding: 24px 16px;
|
||||
}
|
||||
header {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
h1 {
|
||||
font-size: 1.85rem;
|
||||
}
|
||||
.subtitle {
|
||||
font-size: 0.95rem;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.card-grid {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 16px;
|
||||
}
|
||||
.card {
|
||||
padding: 24px;
|
||||
}
|
||||
.card-description {
|
||||
min-height: auto;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.features-list {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.tech-tags {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.link-list {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.link-list li {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.link-list a {
|
||||
display: block;
|
||||
padding: 10px 15px;
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.link-list a:hover {
|
||||
background-color: #0056b3;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
@@ -403,202 +55,14 @@
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<!-- HEADER -->
|
||||
<header>
|
||||
<div class="brand-icon-wrapper">
|
||||
<svg width="32" height="32" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7" />
|
||||
</svg>
|
||||
</div>
|
||||
<h1>Portal Tugas WebGIS</h1>
|
||||
<p class="subtitle">Kumpulan modul dan sistem pemetaan geografis digital berbasis web untuk visualisasi data spasial wilayah Kota Pontianak.</p>
|
||||
|
||||
<div class="developer-badge">
|
||||
<div class="dot"></div>
|
||||
<span>Aleksander William</span>
|
||||
<span class="separator">|</span>
|
||||
<span class="nim">NIM: D1041231003</span>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- CARD GRID -->
|
||||
<div class="card-grid">
|
||||
|
||||
<!-- CARD 1: WEBGIS JALAN DAN PARSIL -->
|
||||
<div class="card card-road">
|
||||
<div>
|
||||
<div class="card-header">
|
||||
<div class="card-icon">
|
||||
<!-- Custom Path & Area Vector Icon -->
|
||||
<svg width="24" height="24" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7" />
|
||||
</svg>
|
||||
</div>
|
||||
<span class="module-badge">Pertemuan 1</span>
|
||||
</div>
|
||||
|
||||
<h2 class="card-title">WebGIS Jalan dan Parsil</h2>
|
||||
<p class="card-description">Sistem pemetaan interaktif untuk melakukan digitasi, modifikasi, serta kalkulasi otomatis terhadap data jalan dan bidang tanah.</p>
|
||||
|
||||
<ul class="features-list">
|
||||
<li class="feature-item">
|
||||
<svg class="feature-check" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" />
|
||||
</svg>
|
||||
<span>Digitasi & edit koordinat geometri (LineString & Polygon) di peta secara langsung.</span>
|
||||
</li>
|
||||
<li class="feature-item">
|
||||
<svg class="feature-check" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" />
|
||||
</svg>
|
||||
<span>Kalkulasi otomatis panjang jalan (m) dan luas parsil tanah (m²).</span>
|
||||
</li>
|
||||
<li class="feature-item">
|
||||
<svg class="feature-check" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" />
|
||||
</svg>
|
||||
<span>Manajemen data spasial yang terintegrasi penuh dengan sistem database MySQL.</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="tech-tags">
|
||||
<span class="tech-tag">Leaflet.js</span>
|
||||
<span class="tech-tag">Leaflet Draw</span>
|
||||
<span class="tech-tag">PHP</span>
|
||||
<span class="tech-tag">MySQL</span>
|
||||
</div>
|
||||
|
||||
<a href="./pertemuan1/index.php" class="btn-launch">
|
||||
<span>Buka Aplikasi</span>
|
||||
<svg width="18" height="18" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M14 5l7 7m0 0l-7 7m7-7H3" />
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CARD 2: WEBGIS SPBU -->
|
||||
<div class="card card-spbu">
|
||||
<div>
|
||||
<div class="card-header">
|
||||
<div class="card-icon">
|
||||
<!-- Fuel Pump Icon -->
|
||||
<svg width="24" height="24" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
|
||||
</svg>
|
||||
</div>
|
||||
<span class="module-badge">Pertemuan 2</span>
|
||||
</div>
|
||||
|
||||
<h2 class="card-title">WebGIS SPBU</h2>
|
||||
<p class="card-description">Portal informasi sebaran Stasiun Pengisian Bahan Bakar Umum (SPBU) di wilayah Pontianak beserta detail jam operasional.</p>
|
||||
|
||||
<ul class="features-list">
|
||||
<li class="feature-item">
|
||||
<svg class="feature-check" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" />
|
||||
</svg>
|
||||
<span>Layer Groups pengelompokan SPBU (Buka 24 Jam vs Tidak 24 Jam).</span>
|
||||
</li>
|
||||
<li class="feature-item">
|
||||
<svg class="feature-check" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" />
|
||||
</svg>
|
||||
<span>Kontrol layer base map (Pilihan OpenStreetMap & Citra Satelit).</span>
|
||||
</li>
|
||||
<li class="feature-item">
|
||||
<svg class="feature-check" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" />
|
||||
</svg>
|
||||
<span>CRUD data lokasi SPBU lengkap melalui Web API berbasis PHP.</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="tech-tags">
|
||||
<span class="tech-tag">Leaflet.js</span>
|
||||
<span class="tech-tag">LayerControl</span>
|
||||
<span class="tech-tag">PHP API</span>
|
||||
<span class="tech-tag">MySQL</span>
|
||||
</div>
|
||||
|
||||
<a href="./pertemuan2/index.php" class="btn-launch">
|
||||
<span>Buka Aplikasi</span>
|
||||
<svg width="18" height="18" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M14 5l7 7m0 0l-7 7m7-7H3" />
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CARD 3: WEBGIS POVERTY MAP -->
|
||||
<div class="card card-poverty">
|
||||
<div>
|
||||
<div class="card-header">
|
||||
<div class="card-icon">
|
||||
<!-- Chart & Pin/Analytics Icon -->
|
||||
<svg width="24" height="24" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M11 3.055A9.003 9.003 0 1020.945 13H11V3.055z" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M20.488 9H15V3.512A9.025 9.025 0 0120.488 9z" />
|
||||
</svg>
|
||||
</div>
|
||||
<span class="module-badge">Final Project</span>
|
||||
</div>
|
||||
|
||||
<h2 class="card-title">WebGIS Poverty Map Kota Pontianak</h2>
|
||||
<p class="card-description">Sistem terintegrasi analisis spasial sebaran penduduk miskin berbasis radius jarak (buffer) terhadap lokasi rumah ibadah.</p>
|
||||
|
||||
<ul class="features-list">
|
||||
<li class="feature-item">
|
||||
<svg class="feature-check" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" />
|
||||
</svg>
|
||||
<span>Analisis spasial radius radius (buffer) penduduk miskin terdekat dari rumah ibadah.</span>
|
||||
</li>
|
||||
<li class="feature-item">
|
||||
<svg class="feature-check" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" />
|
||||
</svg>
|
||||
<span>Dashboard statistik terpadu dengan visualisasi chart data interaktif (Chart.js).</span>
|
||||
</li>
|
||||
<li class="feature-item">
|
||||
<svg class="feature-check" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" />
|
||||
</svg>
|
||||
<span>Pencarian cepat, filter klaster data, & autentikasi keamanan admin/operator.</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="tech-tags">
|
||||
<span class="tech-tag">Leaflet.js</span>
|
||||
<span class="tech-tag">Chart.js</span>
|
||||
<span class="tech-tag">MarkerCluster</span>
|
||||
<span class="tech-tag">PHP</span>
|
||||
<span class="tech-tag">MySQL</span>
|
||||
</div>
|
||||
|
||||
<a href="./WebGISPovertyMap/index.php" class="btn-launch">
|
||||
<span>Buka Aplikasi</span>
|
||||
<svg width="18" height="18" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M14 5l7 7m0 0l-7 7m7-7H3" />
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- FOOTER -->
|
||||
<footer>
|
||||
<p>© 2026 Aleksander William • Portal Tugas WebGIS Terpadu</p>
|
||||
</footer>
|
||||
<h2>Laman Tugas WebGIS</h2>
|
||||
<p style="text-align: center;">Nama: Aleksander William | NIM: D1041231003</p>
|
||||
|
||||
<ul class="link-list">
|
||||
<li><a href="./pertemuan1/index.php">Tugas Pertemuan 1</a></li>
|
||||
<li><a href="./pertemuan2/index.php">Tugas Pertemuan 2</a></li>
|
||||
<li><a href="./WebGISPovertyMap/index.php">Tugas Poverty Map</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
+4
-15
@@ -1,19 +1,8 @@
|
||||
<?php
|
||||
$host_sekarang = $_SERVER['HTTP_HOST'];
|
||||
|
||||
// Cek apakah URL yang sedang diakses mengandung kata 'localhost' atau '127.0.0.1'
|
||||
if (strpos($host_sekarang, 'localhost') !== false || strpos($host_sekarang, '127.0.0.1') !== false) {
|
||||
$host = "localhost";
|
||||
$user = "root";
|
||||
$pass = "";
|
||||
$db = "webgis_db_pertemuan1";
|
||||
} else {
|
||||
// Gunakan Kredensial Normal User dari Coolify
|
||||
$host = "b84c4osgw4kcw0wc8o8cg8cg";
|
||||
$user = "mysql"; // Menggunakan normal user
|
||||
$pass = "YN54ned6j7P6K7c76sLqh9ERUbm8xvhPFj31Mnt0yKPXxqrIhWICWlbJbJjUCfn7"; // Normal User Password
|
||||
$db = "webgis_db_pertemuan1";
|
||||
}
|
||||
$host = "localhost";
|
||||
$user = "root";
|
||||
$pass = "";
|
||||
$db = "webgis_db_pertemuan1";
|
||||
|
||||
|
||||
// Connect first without DB to ensure we can create it if missing
|
||||
|
||||
+1
-157
@@ -860,30 +860,8 @@ body {
|
||||
}
|
||||
|
||||
.leaflet-popup-close-button {
|
||||
position: absolute !important;
|
||||
top: 12px !important;
|
||||
right: 12px !important;
|
||||
width: 20px !important;
|
||||
height: 20px !important;
|
||||
line-height: 20px !important;
|
||||
text-align: center !important;
|
||||
color: rgba(255, 255, 255, 0.75) !important;
|
||||
background: rgba(255, 255, 255, 0.15) !important;
|
||||
border-radius: 50% !important;
|
||||
font-size: 12px !important;
|
||||
font-weight: normal !important;
|
||||
z-index: 1000 !important;
|
||||
transition: all 0.2s ease !important;
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: center !important;
|
||||
padding: 0 !important;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.leaflet-popup-close-button:hover {
|
||||
color: #ffffff !important;
|
||||
background: rgba(255, 255, 255, 0.3) !important;
|
||||
padding: 12px !important;
|
||||
}
|
||||
|
||||
.popup-container {
|
||||
@@ -1260,137 +1238,3 @@ body {
|
||||
.leaflet-control-layers-selector:focus {
|
||||
box-shadow: 0 0 0 2.5px rgba(99, 102, 241, 0.25) !important;
|
||||
}
|
||||
|
||||
/* ==========================================
|
||||
RESPONSIVE DESIGN (BREAKPOINTS)
|
||||
========================================== */
|
||||
|
||||
/* 1. Tablet (< 1024px dan >= 768px) */
|
||||
@media (max-width: 1023px) and (min-width: 768px) {
|
||||
.search-wrapper {
|
||||
max-width: 320px;
|
||||
}
|
||||
|
||||
.brand-subtitle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.custom-select-trigger {
|
||||
min-width: auto;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.input-sidebar {
|
||||
width: 310px;
|
||||
left: -330px;
|
||||
}
|
||||
|
||||
.input-sidebar.open {
|
||||
left: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
/* 2. Mobile (< 768px) */
|
||||
@media (max-width: 767px) {
|
||||
/* Header Kompak */
|
||||
.webgis-header {
|
||||
height: 56px;
|
||||
padding: 0 10px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.brand-name {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.brand-subtitle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.header-divider {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.search-wrapper {
|
||||
max-width: 100%;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* Layout Kompak untuk Search Bar */
|
||||
.custom-select-trigger {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.search-category-wrap {
|
||||
padding: 0 6px;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.category-arrow {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.header-tools {
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.tool-badge {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Sidebar Full-width (100%) */
|
||||
.input-sidebar {
|
||||
width: 100%;
|
||||
left: -100%;
|
||||
top: 56px;
|
||||
bottom: 0;
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.input-sidebar.open {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
/* Pindahkan Tombol Toggle ke Bawah Tengah pada Mobile */
|
||||
.sidebar-toggle {
|
||||
top: auto;
|
||||
bottom: 80px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
/* Sembunyikan tombol toggle saat sidebar terbuka penuh agar tidak menumpuk */
|
||||
.sidebar-toggle.open {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Penyesuaian UI Peta pada Mobile */
|
||||
.leaflet-top {
|
||||
margin-top: 0 !important;
|
||||
top: 65px !important;
|
||||
}
|
||||
|
||||
.leaflet-bottom {
|
||||
bottom: 68px !important;
|
||||
}
|
||||
|
||||
.pick-mode-overlay {
|
||||
top: 66px;
|
||||
}
|
||||
|
||||
.pick-mode-overlay.active {
|
||||
top: 66px;
|
||||
}
|
||||
|
||||
/* Buat legenda lebih kecil di perangkat seluler */
|
||||
.legend h4 {
|
||||
font-size: 10px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.legend-item {
|
||||
font-size: 9px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ session_start();
|
||||
<!-- Leaflet & Leaflet.draw CDN -->
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/1.0.4/leaflet.draw.css" />
|
||||
|
||||
|
||||
<!-- Premium Fonts -->
|
||||
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap" rel="stylesheet">
|
||||
|
||||
@@ -152,7 +152,7 @@ session_start();
|
||||
<div class="step-badge">Langkah 1</div>
|
||||
<p>Klik tombol <strong>Tandai Lokasi SPBU</strong> di bawah, lalu klik di peta pada posisi SPBU yang diinginkan.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<button class="btn-pick-location" id="btn-pick-spbu" onclick="activatePickMode()">
|
||||
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round"
|
||||
@@ -222,4 +222,4 @@ session_start();
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
||||
+4
-14
@@ -1,19 +1,9 @@
|
||||
<?php
|
||||
$host_sekarang = $_SERVER['HTTP_HOST'];
|
||||
|
||||
// Cek apakah URL yang sedang diakses mengandung kata 'localhost' atau '127.0.0.1'
|
||||
if (strpos($host_sekarang, 'localhost') !== false || strpos($host_sekarang, '127.0.0.1') !== false) {
|
||||
$host = "localhost";
|
||||
$user = "root";
|
||||
$pass = "";
|
||||
$db = "webgis_db_pertemuan2";
|
||||
} else {
|
||||
// Gunakan Kredensial Normal User dari Coolify
|
||||
$host = "b84c4osgw4kcw0wc8o8cg8cg";
|
||||
$user = "mysql"; // Menggunakan normal user
|
||||
$pass = "YN54ned6j7P6K7c76sLqh9ERUbm8xvhPFj31Mnt0yKPXxqrIhWICWlbJbJjUCfn7"; // Normal User Password
|
||||
$db = "webgis_db_pertemuan2";
|
||||
}
|
||||
$host = "localhost";
|
||||
$user = "root";
|
||||
$pass = "";
|
||||
$db = "webgis_db_pertemuan2";
|
||||
|
||||
|
||||
// Connect first without DB to ensure we can create it if missing
|
||||
|
||||
+1
-157
@@ -842,30 +842,8 @@ body {
|
||||
}
|
||||
|
||||
.leaflet-popup-close-button {
|
||||
position: absolute !important;
|
||||
top: 12px !important;
|
||||
right: 12px !important;
|
||||
width: 20px !important;
|
||||
height: 20px !important;
|
||||
line-height: 20px !important;
|
||||
text-align: center !important;
|
||||
color: rgba(255, 255, 255, 0.75) !important;
|
||||
background: rgba(255, 255, 255, 0.15) !important;
|
||||
border-radius: 50% !important;
|
||||
font-size: 12px !important;
|
||||
font-weight: normal !important;
|
||||
z-index: 1000 !important;
|
||||
transition: all 0.2s ease !important;
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: center !important;
|
||||
padding: 0 !important;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.leaflet-popup-close-button:hover {
|
||||
color: #ffffff !important;
|
||||
background: rgba(255, 255, 255, 0.3) !important;
|
||||
padding: 12px !important;
|
||||
}
|
||||
|
||||
.popup-container {
|
||||
@@ -1221,137 +1199,3 @@ body {
|
||||
.leaflet-control-layers-selector:focus {
|
||||
box-shadow: 0 0 0 2.5px rgba(16, 185, 129, 0.25) !important;
|
||||
}
|
||||
|
||||
/* ==========================================
|
||||
RESPONSIVE DESIGN (BREAKPOINTS)
|
||||
========================================== */
|
||||
|
||||
/* 1. Tablet (< 1024px dan >= 768px) */
|
||||
@media (max-width: 1023px) and (min-width: 768px) {
|
||||
.search-wrapper {
|
||||
max-width: 320px;
|
||||
}
|
||||
|
||||
.brand-subtitle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.custom-select-trigger {
|
||||
min-width: auto;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.input-sidebar {
|
||||
width: 310px;
|
||||
left: -330px;
|
||||
}
|
||||
|
||||
.input-sidebar.open {
|
||||
left: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
/* 2. Mobile (< 768px) */
|
||||
@media (max-width: 767px) {
|
||||
/* Header Kompak */
|
||||
.webgis-header {
|
||||
height: 56px;
|
||||
padding: 0 10px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.brand-name {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.brand-subtitle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.header-divider {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.search-wrapper {
|
||||
max-width: 100%;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* Layout Kompak untuk Search Bar */
|
||||
.custom-select-trigger {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.search-category-wrap {
|
||||
padding: 0 6px;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.category-arrow {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.header-tools {
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.tool-badge {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Sidebar Full-width (100%) */
|
||||
.input-sidebar {
|
||||
width: 100%;
|
||||
left: -100%;
|
||||
top: 56px;
|
||||
bottom: 0;
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.input-sidebar.open {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
/* Pindahkan Tombol Toggle ke Bawah Tengah pada Mobile */
|
||||
.sidebar-toggle {
|
||||
top: auto;
|
||||
bottom: 80px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
/* Sembunyikan tombol toggle saat sidebar terbuka penuh agar tidak menumpuk */
|
||||
.sidebar-toggle.open {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Penyesuaian UI Peta pada Mobile */
|
||||
.leaflet-top {
|
||||
margin-top: 0 !important;
|
||||
top: 65px !important;
|
||||
}
|
||||
|
||||
.leaflet-bottom {
|
||||
bottom: 68px !important;
|
||||
}
|
||||
|
||||
.pick-mode-overlay {
|
||||
top: 66px;
|
||||
}
|
||||
|
||||
.pick-mode-overlay.active {
|
||||
top: 66px;
|
||||
}
|
||||
|
||||
/* Buat legenda lebih kecil di perangkat seluler */
|
||||
.legend h4 {
|
||||
font-size: 10px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.legend-item {
|
||||
font-size: 9px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user