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

<div class="content-wrapper">

  <section class="content-header">
    <h1>
     Input Pelanggaran
     <!-- <small>Input Pelanggaran</small> -->
   </h1>
   <!-- <ol class="breadcrumb">
    <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
    <li class="active">Dashboard</li>
  </ol> -->
</section>

<section class="content">
  <div class="row">
    <section class="col-lg-6">       
      <div class="box box-primary">

        <div class="box-header">
          <h3 class="box-title">Input Pelanggaran Baru</h3>
          <a href="input_pelanggaran.php" class="btn btn-primary btn-sm pull-right"><i class="fa fa-reply"></i> &nbsp Kembali</a> 
        </div>
        <div class="box-body">
          <form action="input_pelanggaran_act.php" method="post">

            <div class="form-group">
              <label>Tahun Ajaran</label>
              <select class="form-control pilih_ta" name="ta" required="required">
                <option value="">- Pilih Tahun Ajaran</option>
                <?php 
                $ta = mysqli_query($koneksi,"select * from ta");
                while($j = mysqli_fetch_array($ta)){
                  ?>
                  <option value="<?php echo $j['ta_id'] ?>"><?php echo $j['ta_nama'] ?> <?php if($j['ta_status'] == "1"){ echo "(Aktif)"; } ?></option>
                  <?php 
                }
                ?>
              </select>
            </div>

            <div class="form-group">
              <label>Pilih Kelas</label>
              <div class="pilih_kelas"></div>
            </div>

            <div class="form-group">
              <label>Siswa</label>
              <div class="pilih_siswa"></div>
            </div>

            <div class="form-group">
              <label>Tanggal</label>
              <input type="date" class="form-control" name="tanggal" required="required">
            </div>

            <div class="form-group">
              <label>Jam</label>
              <input type="time" class="form-control" name="jam" required="required">
            </div>


            <div class="form-group">
              <label>Pelanggaran</label>
              <select class="form-control" name="pelanggaran" required="required">
                <option value=""> - Pilih Pelanggaran - </option>
                <?php 
                $pelanggaran = mysqli_query($koneksi,"select * from pelanggaran order by pelanggaran_nama asc");
                while($j = mysqli_fetch_array($pelanggaran)){
                  ?>
                  <option value="<?php echo $j['pelanggaran_id'] ?>"><?php echo $j['pelanggaran_nama'] ?> (<?php echo $j['pelanggaran_point'] ?> Point)</option>
                  <?php 
                }
                ?>
              </select>
            </div>

            <div class="form-group">
              <input type="submit" class="btn btn-sm btn-primary" value="Simpan">
            </div>
          </form>
        </div>

      </div>
    </section>
  </div>
</section>

</div>
<?php include 'footer.php'; ?>