<!DOCTYPE html>
<html>

<head>
    <link rel="stylesheet" href="https://bootswatch.com/4/litera/bootstrap.min.css">
    <style>
        .alert-error {
            background-color: #d9534f;
        }
    </style>
</head>

<body>
    <nav class="navbar navbar-expand-lg navbar-light bg-light"><a class="navbar-brand" href="/elearning">E-Learning</a><button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
        <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <ul class="navbar-nav ml-auto">
                <li class="nav-item">
                    <a href="#" class="nav-link">Akun</a>
                </li>
                <li>
                    <a href="<?php echo base_url().'elearning/logout'; ?>" class="nav-link">Logout</a>
                </li>
            </ul>
        </div>
    </nav>
    <div class="container">
        <?php if (!empty($this->session->flashdata('err'))): ?>
            <?php echo $this->session->flashdata('err'); ?>
        <?php endif; ?>
        <div class="my-5 row mx-auto">
            <div class="col-sm"></div>
            <div class="col-sm-9 col-md-8 col-lg-7">
                <h3 class="mb-3 text-center">Upload Materi Pelajaran</h3>
                <form method="POST" action="<?php echo base_url().'elearning/upload' ?>" enctype="multipart/form-data">
                    <div class="form-group">
                        <label>Mata Pelajaran</label>
                        <input type="text" class="form-control" name="materi-mapel"  value="<?php echo $guru->guru_mapel; ?>" readonly />
                    </div>
                    <div class="form-group">
                        <label>Judul Materi</label>
                        <input type="text" class="form-control" name="materi-judul" required />
                    </div>
                    <div class="form-group">
                        <label>Konten</label>
                        <input type="file" class="form-control-file" name="materi-konten" required />
                    </div>
                    <div class="form-group">
                        <label>Catatan</label>
                        <textarea class="form-control" name="materi-catatan" placeholder="Catatan... (Opsional)"></textarea>
                    </div>
                    <button class="btn btn-primary">Upload</button>
                </form>
            </div>
        <div class="col-sm"></div>
        </div>
    </div>
    <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
    <footer class="text-center fixed-bottom">
        <p>&copy; ppl-6</p>
    </footer>
</body>

</html>