feat: complete WebGIS implementation with nominal bantuan and cache busting

This commit is contained in:
fananazril
2026-06-11 19:18:25 +07:00
parent 0d59e629bd
commit 0ae2768849
36 changed files with 7687 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
<?php
// ================================================================
// Auth Action — Proses Login
// ================================================================
require_once __DIR__ . '/../config/config.php';
require_once __DIR__ . '/../config/database.php';
require_once __DIR__ . '/../includes/auth.php';
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
header('Location: ' . BASE_URL . '/admin/login.php');
exit;
}
$email = trim($_POST['email'] ?? '');
$password = $_POST['password'] ?? '';
if (empty($email) || empty($password)) {
header('Location: ' . BASE_URL . '/admin/login.php?error=empty');
exit;
}
$db = getDB();
$stmt = $db->prepare("SELECT * FROM users WHERE email = ? LIMIT 1");
$stmt->execute([$email]);
$user = $stmt->fetch();
if (!$user || !password_verify($password, $user['password'])) {
// Tambah sedikit delay untuk mencegah brute force
sleep(1);
header('Location: ' . BASE_URL . '/admin/login.php?error=invalid&email=' . urlencode($email));
exit;
}
loginUser($user);
header('Location: ' . BASE_URL . '/admin/');
exit;