Auto-create tugas tables + fix portal link
This commit is contained in:
+36
@@ -9,3 +9,39 @@ if (!$conn) {
|
||||
die(json_encode(['status' => 'error', 'message' => 'Koneksi database gagal: ' . mysqli_connect_error()]));
|
||||
}
|
||||
mysqli_set_charset($conn, 'utf8mb4');
|
||||
|
||||
if (!isset($GLOBALS['tugas_setup'])) {
|
||||
$GLOBALS['tugas_setup'] = true;
|
||||
$conn->query("CREATE TABLE IF NOT EXISTS spbu (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
nama VARCHAR(255) NOT NULL,
|
||||
nomor VARCHAR(50),
|
||||
status_24jam ENUM('Ya','Tidak') DEFAULT 'Tidak',
|
||||
lat DECIMAL(10,7) NOT NULL,
|
||||
lng DECIMAL(10,7) NOT NULL,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
)");
|
||||
$conn->query("CREATE TABLE IF NOT EXISTS jalan (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
nama_jalan VARCHAR(255) NOT NULL,
|
||||
status_jalan VARCHAR(100),
|
||||
panjang_m DECIMAL(10,2),
|
||||
geojson TEXT,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
)");
|
||||
$conn->query("CREATE TABLE IF NOT EXISTS persil (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
nomor_persil VARCHAR(100),
|
||||
status_milik VARCHAR(100),
|
||||
luas_m2 DECIMAL(10,2),
|
||||
geojson TEXT,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
)");
|
||||
$conn->query("CREATE TABLE IF NOT EXISTS wilayah (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
nama VARCHAR(255),
|
||||
tipe VARCHAR(100),
|
||||
geojson TEXT,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
)");
|
||||
}
|
||||
|
||||
+2
-2
@@ -127,9 +127,9 @@ input::placeholder{color:#94a3b8}
|
||||
|
||||
<p class="hint">Default: <span>admin</span> / <span>admin123</span></p>
|
||||
<div style="text-align:center;margin-top:20px;padding-top:20px;border-top:1px solid #1e293b">
|
||||
<a href="index.php" style="color:#475569;font-size:12px;text-decoration:none;display:inline-flex;align-items:center;gap:6px;transition:.15s" onmouseover="this.style.color='#94a3b8'" onmouseout="this.style.color='#475569'">
|
||||
<a href="/index.php" style="color:#475569;font-size:12px;text-decoration:none;display:inline-flex;align-items:center;gap:6px;transition:.15s" onmouseover="this.style.color='#94a3b8'" onmouseout="this.style.color='#475569'">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg>
|
||||
Ke Peta Utama
|
||||
Kembali ke Portal
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user