<?php
session_start();

if (!isset($_SESSION['login'])) {
    header("Location: login.php?error=noakses");
    exit;
}
$nama_pegawai = $_SESSION['nama_pegawai'];
$akses = $_SESSION['akses'];
?>
<!doctype html>
<html lang="en">

<head>
    <?php
    include "asset/head.php";
    ?>
</head>

<body>
    <!-- NAVIGASI -->
    <?php
    include "asset/navigasi.php";
    ?>
    <div class="container">
        <div class="row">
            <div class="d-flex bd-highlight mb-3">
                <div class="me-auto p-2 bd-highlight">
                    <h1>Tambah Data Pegawai</h1>
                </div>
            </div>
        </div>
        <form action="function/function-pegawai.php" method="post">
            <div class="row">
                <div class="col">
                    <div class="mb-3">
                        <label class="form-label">Nama Pegawai</label>
                        <input type="text" class="form-control" name="nama_pegawai" placeholder="Masukkan Nama Pegawai">
                    </div>
                    <div class="mb-3">
                        <label class="form-label">Akses</label>
                        <select class="form-select" name="akses">
                            <option selected>Open this select menu</option>
                            <option value="Raxi">Raxi</option>
                            <option value="Bisman">Bisman</option>
                            <option value="Semua">Semua</option>
                            <option value="Ga Semua">Ga Semua</option>
                        </select>
                    </div>
                </div>
                <div class="col">
                    <div class="mb-3">
                        <label class="form-label">Username</label>
                        <input type="text" class="form-control" name="username" placeholder="Masukkan Nama Username">
                    </div>
                    <div class="mb-3">
                        <label class="form-label">Password</label>
                        <input type="text" class="form-control" name="password" placeholder="Masukkan Nama Username">
                    </div>
                    <button type="submit" class="btn btnfunc">Simpan</button>
                </div>
            </div>
        </form>
    </div>
    <!-- INI FOOTER -->
    <?php
    include "asset/footer.php";
    ?>
</body>

</html>