<?php include 'header.php'; ?>
<?php
include '../koneksi.php';


?>


<div id="wrapper">
    <!-- Sidebar -->
    <!-- Tambahkan Sidebar sesuai template SB Admin -->
    <!-- Content Wrapper -->
    <div id="content-wrapper" class="d-flex flex-column">
        <!-- Main Content -->
        <div id="content">
            <!-- Topbar -->
            <!-- Tambahkan Topbar sesuai template SB Admin -->

            <!-- Begin Page Content -->
            <div class="container-fluid">
                <!-- Page Heading -->
                <h1 class="h3 mb-4 text-gray-800">Data Jadwal</h1>
                 
                <!-- Form Tambah Album -->
                <div class="card shadow mb-4">
                    <div class="card-header py-3">
                        <h6 class="m-0 font-weight-bold text-primary">Tambah Jadwal</h6>
                    </div>
                    <div class="card-body">
            
                        <form action="jadwal_act.php" method="post">
    <div class="form-group">
        <label for="hari">Hari</label>
        <input type="text" class="form-control" id="hari" name="hari" required>
    </div>
    <div class="form-group">
        <label for="jam_mulai">Jam Mulai</label>
        <input type="time" class="form-control" id="jam_mulai" name="jam_mulai" required>
    </div>
    <div class="form-group">
        <label for="jam_selesai">Jam Selesai</label>
        <input type="time" class="form-control" id="jam_selesai" name="jam_selesai" required>
    </div>
    <div class="form-group">
        <label for="id_dokter">Dokter</label>
        <select class="form-control" id="id_dokter" name="id_dokter" required>
            <?php
            // Mengambil daftar dokter dari database
            $dokter_query = mysqli_query($koneksi, "SELECT id_dokter, nama_dokter FROM tbl_dokter");
            while ($dokter = mysqli_fetch_assoc($dokter_query)) {
                echo "<option value='" . $dokter['id_dokter'] . "'>" . $dokter['nama_dokter'] . "</option>";
            }
            ?>
        </select>
    </div>
    <button type="submit" class="btn btn-primary">Simpan</button>
</form>

                </div>
            </div>
            <!-- /.container-fluid -->
        </div>
        <!-- End of Main Content --><?php include 'footer.php'; ?>