<?php 
session_start();
require"inc/auth.php";
?>

<?php 
  include"inc/conn.php";
  include"inc/session_siswa.php";
  include"inc/style.php";

  $id = $_GET["id"];
  $qunit=mysqli_query($connect,"select * from tb_unit where id_unit='".$id."' and aktif='1'");
  $runit=mysqli_fetch_array($qunit);
?>

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta content="width=device-width, initial-scale=1.0" name="viewport">

  <title>Materi | <?php echo $runit['judul_unit'];?></title>
  <meta content="" name="description">
  <meta content="" name="keywords">

  
  
</head>

<body>

  <?php include"inc/menu.php";?>

  
  <main id="main">
    
    <!-- ======= Breadcrumbs ======= -->
    <section class="breadcrumbs">
      <div class="container">
          <ol>
            <li><a href="index.php">Beranda</a></li>
            <li><a href="unit.php?id=<?php echo $id;?>">Unit</a></li>
            <li>Materi</li>
          </ol>
      </div>
    </section><!-- End Breadcrumbs -->
    

    <!-- ======= Blog Single Section ======= -->
    <section id="blog" class="blog" style="margin-top:30px;">
      <div class="container">

        <div class="row">

          <div class="col-lg-12 entries">

            <article class="entry entry-single" style="border-top:17px solid #c2326f;border-bottom:17px solid #c2326f;border-radius:5px;">
              
              <a href="unit.php?id=<?php echo $id;?>"><button class="btn btn-sm" style="background:#c2326f;color:white;"><i class="bi bi-arrow-left"></i> Kembali Ke Menu</button></a>
              <br><br>              

              <header class="section-header">
                  <h2>Materi Utama</h2>
				<p><?php echo $runit['judul_unit'];?></p>
			  </header>





              <div class="entry-content">


                          <!-- Tab panes -->
                          <div class="tab-content py-3 px-3 px-sm-0" id="nav-tabContent">
                           
                                <?php echo $runit['konten'];?>

                          </div>
                        
                          <a href="unit.php?id=<?php echo $id;?>"><button class="btn btn-sm" style="background:#c2326f;color:white;"><i class="bi bi-arrow-left"></i> Kembali Ke Menu</button></a>

                  </div>

              
            </article><!-- End blog entry -->

       

              

          </div><!-- End blog entries list -->

          

        </div>

      </div>
    </section><!-- End Blog Single Section -->

    
  </main><!-- End #main -->

  <!-- ======= Footer ======= -->
  <footer id="footer" class="footer">

    <?php include"inc/footer.php";?>
    
  </footer><!-- End Footer -->

  <a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a>

  <?php include"inc/script.php";?>

</body>

</html>