<?php include_once __DIR__ . '/../layouts/head.php'; ?>
<div class="container py-4" style="max-width: 1350px; width: 100%;">
  <div class="row">
    <div class="col-lg-12">
      <div class="shadow-sm bg-white rounded overflow-hidden border">
        <div class="p-0">
          <div class="row px-0 m-0">

            <?php include_once __DIR__ . '/../layouts/menu_body.php'; ?>

            <div class="col-12 col-md-9 px-0">
              <div class="tab-content" id="v-pills-tabContent">

				<!-- awal isi konten -->
				<div class="tab-pane fade show active" id="v-pills-home" role="tabpanel" aria-labelledby="v-pills-home-tab">
				  <div class="p-4">
					<div class="mb-4">
					  <h5 class="mb-0 fw-bold">Halaman KRS & KHS</h5>
					</div>
					<div class="row row-cols-1 row-cols-md-2 g-4">
					  <div class="col">
						<div class="border rounded d-flex gap-3 p-4">
						  <i class="bi bi-printer m-0 rounded-pill rounded-icon"></i>
						  <div class="text-start">
							<h6 class="mb-1 fw-bold">KRS</h6>
							<div class="text-muted small text-opacity-50 mb-3">Cetak KRS</div>
							<div id="v-pills-tab" role="tablist" aria-orientation="vertical">
							  <a href="/dashboard/mahasiswa-krs" class="fw-bold text-danger text-decoration-none text-uppercase">Open</a>
							</div>
						  </div>
						  <i class="bi bi-check-circle-fill ms-auto"></i>
						</div>
					  </div>
					  <div class="col">
						<div class="border rounded d-flex gap-3 p-4">
						  <i class="bi bi-printer-fill m-0 rounded-pill rounded-icon"></i>
						  <div class="text-start">
							<h6 class="mb-1 fw-bold">KHS</h6>
							<div class="text-muted small text-opacity-50 mb-3">Cetak KHS</div>
							<a href="/dashboard/mahasiswa-khs" class="fw-bold text-danger text-decoration-none text-uppercase">Open</a>
						  </div>
						  <i class="bi bi-check-circle-fill ms-auto"></i>
						</div>
					  </div>
					</div>
					<div class="col">
					  </br>
					</div>
					
<div class="container mt-4">
  <h4>Daftar Semester</h4>
  <table class="table table-bordered">
    <thead>
      <tr>
        <th>No</th>
        <th>Semester</th>
        <th>Aksi</th>
      </tr>
    </thead>
    <tbody>
      <?php if (!empty($semesters)) : ?>
        <?php $no = 1; foreach ($semesters as $smt) : ?>
          <tr>
            <td><?= $no++ ?></td>
            <td><?= htmlspecialchars($smt['smt']) ?></td>
            <td>
              <a href="/dashboard/mahasiswa-khs/detail?smt=<?= urlencode($smt['smt']) ?>" class="btn btn-primary btn-sm">Lihat</a>
            </td>
          </tr>
        <?php endforeach; ?>
      <?php else : ?>
        <tr><td colspan="3">Belum ada data semester.</td></tr>
      <?php endif; ?>
    </tbody>
  </table>
</div>

					
				  </div>
				</div>
				<!-- batas isi konten -->			  
			  
			  
			  </div>
            </div>

          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<?php include_once __DIR__ . '/../layouts/footer.php'; ?>