MINI
C:
/
xampp
/
htdocs
/
ktpel
/
Upload File:
files >> C:/xampp/htdocs/ktpel/login.php
<?php require_once __DIR__ . '/config/auth.php'; $error = ''; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $username = trim($_POST['username'] ?? ''); $password = $_POST['password'] ?? ''; // DEMO. Untuk produksi, ganti dengan tabel user Oracle/MySQL // dan password_hash/password_verify. if ($username === 'admin' && $password === 'admin123') { $_SESSION['logged_in'] = true; $_SESSION['username'] = $username; header('Location: index.php'); exit; } $error = 'Username atau password salah.'; } ?> <!doctype html> <html lang="id"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <title>Login - Administrasi Cetak KTP-el</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"> <link href="assets/style.css" rel="stylesheet"> </head> <body class="login-page"> <div class="login-card"> <div class="text-center mb-4"> <div class="brand-icon">ID</div> <h3>Administrasi Cetak KTP-el</h3> <div class="text-muted">Login Petugas</div> </div> <?php if ($error): ?><div class="alert alert-danger"><?=htmlspecialchars($error)?></div><?php endif; ?> <form method="post"> <label class="form-label">Username</label> <input class="form-control mb-3" name="username" required autofocus> <label class="form-label">Password</label> <input class="form-control mb-4" type="password" name="password" required> <button class="btn btn-primary w-100">Masuk</button> </form> <div class="small text-muted mt-3">Demo: admin / admin123</div> </div> </body> </html>
Copyright ©2021 || Defacer Indonesia