<?php 
session_start();
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Admin : Dashboard</title>
    <?php include("headerlink.php") ?>
</head>

<body class="hold-transition sidebar-mini layout-fixed">
    <div class="wrapper">

        <div class="preloader flex-column justify-content-center align-items-center">
            <img class="animation__shake" src="dist/img/AdminLTELogo.png" alt="AdminLTELogo" height="60" width="60">
        </div>

        <?php include("navbar.php") ?>

        <?php include("sidebar.php") ?>

        <div class="content-wrapper">

            <div class="content-header">
                <div class="container-fluid">
                    <div class="row mb-2">
                        <div class="col-sm-6">
                            <h1 class="m-0">Dashboard</h1>
                        </div>
                    </div>
                </div>
            </div>

            <section class="content">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-lg-3"></div>
                        <div class="col-lg-6">
                            <?php
                            if (isset($_GET['success'])) {
                                echo '<div class="alert alert-success">' . htmlspecialchars($_GET['success']) . '</div>';
                            } elseif (isset($_GET['error'])) {
                                echo '<div class="alert alert-danger">' . htmlspecialchars($_GET['error']) . '</div>';
                            }
                            ?>
                            <div class="card card-primary shadow">
                                <div class="card-header" style="background: #343a40;">
                                    <h3 class="card-title text-white fw-bold text-uppercase">Update Password</h3>
                                </div>
                                <form action="update_password_code.php" method="POST">
                                    <div class="card-body ">
                                        <div class="form-group">
                                            <label for="exampleInputName">Current Password:</label>
                                            <input type="password" class="form-control" name="currentPassword" required placeholder="Current Password">
                                        </div>
                                        <div class="form-group">
                                            <label for="exampleInputEmail1">New Password:</label>
                                            <input type="password" class="form-control" name="newPassword" required placeholder="New Password">
                                        </div>
                                        <div class="form-group">
                                            <label for="exampleInputNumber">Confirm New Password:</label>
                                            <input type="password" class="form-control" name="confirmNewPassword" required placeholder="Confirm New Password">
                                        </div>
                                    </div>
                                    <div class="card-footer">
                                        <button type="submit" class="btn text-white fw-bold" style="background: #343a40;">Change Password</button>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <div class="col-lg-3"></div>
                    </div>
                </div>
            </section>
        </div>

        <?php include("footer.php") ?>
    </div>
    <?php include("footerlink.php") ?>
</body>

</html>
