<?php
// File: admin/change_password.php
require '../includes/db_connect.php';

$msg = "";
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    // ... Logic Ganti Password ...
}

$page_title = 'Ganti Password';
require 'includes/header.php';
?>

<div class="max-w-md bg-white p-8 rounded-xl shadow mt-10">
    <h2 class="text-2xl font-bold mb-6 text-gray-800">Ganti Password</h2>
    <?= $msg ?>
    <form method="POST">
        <div class="mb-4">
            <label class="block text-sm font-bold mb-2">Password Lama</label>
            <input type="password" name="current_password" class="w-full p-2 border rounded" required>
        </div>
        <div class="mb-4">
            <label class="block text-sm font-bold mb-2">Password Baru</label>
            <input type="password" name="new_password" class="w-full p-2 border rounded" required>
        </div>
        <div class="mb-6">
            <label class="block text-sm font-bold mb-2">Konfirmasi Password Baru</label>
            <input type="password" name="confirm_password" class="w-full p-2 border rounded" required>
        </div>
        <button type="submit" class="w-full bg-blue-600 text-white font-bold py-2 rounded hover:bg-blue-700">Simpan</button>
    </form>
</div>

<?php require 'includes/footer.php'; ?>