277 lines
8.7 KiB
PHP
277 lines
8.7 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="id">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Login Admin - WebGIS Kemiskinan</title>
|
|
<style>
|
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
|
|
body {
|
|
font-family: 'Segoe UI', Arial, sans-serif;
|
|
min-height: 100vh;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: linear-gradient(135deg, #1a252f 0%, #2c3e50 40%, #1a6b4a 100%);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Lingkaran dekorasi background */
|
|
body::before {
|
|
content: '';
|
|
position: absolute;
|
|
width: 500px; height: 500px;
|
|
border-radius: 50%;
|
|
background: rgba(52, 152, 219, 0.08);
|
|
top: -150px; left: -150px;
|
|
}
|
|
body::after {
|
|
content: '';
|
|
position: absolute;
|
|
width: 400px; height: 400px;
|
|
border-radius: 50%;
|
|
background: rgba(39, 174, 96, 0.08);
|
|
bottom: -100px; right: -100px;
|
|
}
|
|
|
|
.wrapper {
|
|
display: flex;
|
|
width: 820px;
|
|
max-width: 96vw;
|
|
border-radius: 18px;
|
|
overflow: hidden;
|
|
box-shadow: 0 25px 60px rgba(0,0,0,0.5);
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
/* Panel kiri - branding */
|
|
.panel-kiri {
|
|
flex: 1;
|
|
background: linear-gradient(160deg, #27ae60, #2c3e50);
|
|
padding: 50px 36px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
color: white;
|
|
}
|
|
.panel-kiri .logo { font-size: 56px; margin-bottom: 18px; }
|
|
.panel-kiri h1 { font-size: 22px; font-weight: 700; margin-bottom: 10px; line-height: 1.3; }
|
|
.panel-kiri p { font-size: 13px; color: rgba(255,255,255,0.75); line-height: 1.7; }
|
|
|
|
.fitur-list { margin-top: 28px; list-style: none; }
|
|
.fitur-list li {
|
|
font-size: 13px;
|
|
color: rgba(255,255,255,0.85);
|
|
padding: 6px 0;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
.fitur-list li span.dot {
|
|
width: 8px; height: 8px;
|
|
background: #2ecc71;
|
|
border-radius: 50%;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* Panel kanan - form */
|
|
.panel-kanan {
|
|
width: 360px;
|
|
background: #ffffff;
|
|
padding: 48px 36px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
}
|
|
|
|
.panel-kanan h2 {
|
|
font-size: 22px;
|
|
color: #2c3e50;
|
|
font-weight: 700;
|
|
margin-bottom: 6px;
|
|
}
|
|
.panel-kanan .sub {
|
|
font-size: 13px;
|
|
color: #999;
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.field { margin-bottom: 18px; }
|
|
.field label {
|
|
display: block;
|
|
font-size: 12px;
|
|
font-weight: 700;
|
|
color: #555;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
margin-bottom: 7px;
|
|
}
|
|
.input-wrap {
|
|
position: relative;
|
|
}
|
|
.input-wrap .icon {
|
|
position: absolute;
|
|
left: 13px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
font-size: 16px;
|
|
color: #aaa;
|
|
pointer-events: none;
|
|
}
|
|
.input-wrap input {
|
|
width: 100%;
|
|
padding: 12px 14px 12px 40px;
|
|
border: 2px solid #e8e8e8;
|
|
border-radius: 9px;
|
|
font-size: 14px;
|
|
outline: none;
|
|
transition: border-color 0.2s, box-shadow 0.2s;
|
|
color: #2c3e50;
|
|
background: #fafafa;
|
|
}
|
|
.input-wrap input:focus {
|
|
border-color: #27ae60;
|
|
box-shadow: 0 0 0 3px rgba(39,174,96,0.12);
|
|
background: white;
|
|
}
|
|
.input-wrap input::placeholder { color: #c0c0c0; }
|
|
|
|
/* Toggle password */
|
|
.toggle-pw {
|
|
position: absolute;
|
|
right: 13px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
color: #aaa;
|
|
user-select: none;
|
|
}
|
|
.toggle-pw:hover { color: #27ae60; }
|
|
|
|
.btn-login {
|
|
width: 100%;
|
|
padding: 13px;
|
|
background: linear-gradient(135deg, #27ae60, #1e8449);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 9px;
|
|
font-size: 15px;
|
|
font-weight: 700;
|
|
cursor: pointer;
|
|
transition: opacity 0.2s, transform 0.15s;
|
|
margin-top: 6px;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
.btn-login:hover { opacity: 0.92; transform: translateY(-1px); }
|
|
.btn-login:active { transform: translateY(0); }
|
|
|
|
.error-msg {
|
|
background: #fdf0f0;
|
|
border: 1px solid #f5c6cb;
|
|
border-left: 4px solid #e74c3c;
|
|
color: #721c24;
|
|
padding: 10px 14px;
|
|
border-radius: 8px;
|
|
font-size: 13px;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.link {
|
|
text-align: center;
|
|
margin-top: 20px;
|
|
font-size: 13px;
|
|
color: #aaa;
|
|
}
|
|
.link a {
|
|
color: #27ae60;
|
|
text-decoration: none;
|
|
font-weight: 600;
|
|
}
|
|
.link a:hover { text-decoration: underline; }
|
|
|
|
/* Responsive - sembunyikan panel kiri di layar kecil */
|
|
@media (max-width: 600px) {
|
|
.panel-kiri { display: none; }
|
|
.panel-kanan { width: 100%; padding: 40px 28px; }
|
|
.wrapper { border-radius: 14px; }
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="wrapper">
|
|
<!-- PANEL KIRI -->
|
|
<div class="panel-kiri">
|
|
<div class="logo">🗺️</div>
|
|
<h1>WebGIS Kemiskinan<br>Kota Pontianak</h1>
|
|
<p>Sistem pemetaan rumah ibadah dan pendataan penduduk miskin berbasis geografis.</p>
|
|
<ul class="fitur-list">
|
|
<li><span class="dot"></span> Peta interaktif real-time</li>
|
|
<li><span class="dot"></span> Manajemen data penduduk miskin</li>
|
|
<li><span class="dot"></span> Pencatatan & laporan bantuan</li>
|
|
<li><span class="dot"></span> Analisis radius distribusi</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<!-- PANEL KANAN -->
|
|
<div class="panel-kanan">
|
|
<h2>Selamat Datang 👋</h2>
|
|
<p class="sub">Masuk ke dashboard admin WebGIS</p>
|
|
|
|
<?php
|
|
if (isset($_GET['error'])) {
|
|
if ($_GET['error'] == 'empty') {
|
|
echo '<div class="error-msg">⚠️ Username dan password wajib diisi!</div>';
|
|
} elseif ($_GET['error'] == 'wrong') {
|
|
echo '<div class="error-msg">⚠️ Username atau password salah. Coba lagi.</div>';
|
|
}
|
|
}
|
|
?>
|
|
|
|
<form action="login_process.php" method="POST">
|
|
<div class="field">
|
|
<label>Username</label>
|
|
<div class="input-wrap">
|
|
<span class="icon">👤</span>
|
|
<input type="text" name="username" placeholder="Masukkan username" required autofocus autocomplete="username">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="field">
|
|
<label>Password</label>
|
|
<div class="input-wrap">
|
|
<span class="icon">🔒</span>
|
|
<input type="password" name="password" id="inputPassword" placeholder="Masukkan password" required autocomplete="current-password">
|
|
<span class="toggle-pw" onclick="togglePassword()" id="toggleIcon">👁️</span>
|
|
</div>
|
|
</div>
|
|
|
|
<button type="submit" class="btn-login">🔐 LOGIN</button>
|
|
</form>
|
|
|
|
<div class="link">
|
|
<a href="lupa_password.html">Lupa password?</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
function togglePassword() {
|
|
var input = document.getElementById('inputPassword');
|
|
var icon = document.getElementById('toggleIcon');
|
|
if (input.type === 'password') {
|
|
input.type = 'text';
|
|
icon.textContent = '🙈';
|
|
} else {
|
|
input.type = 'password';
|
|
icon.textContent = '👁️';
|
|
}
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|