
<div class="box box-danger">
            <div class="box-header with-border">
              <h3 class="box-title">Filter</h3>
            </div>
            <div class="box-body">
           <form class="form-horizontal" method="post" action="<?=base_admin();?>modul/akm/download_data.php">
                      <div class="form-group">
                        <label for="Semester" class="control-label col-lg-2">Periode Keluar</label>
                        <div class="col-lg-6">
                        <select id="sem_filter_lulus" name="sem_filter" data-placeholder="Pilih Semester ..." class="form-control chzn-select" tabindex="2">
                          <option value="all">Semua</option>
                     <?php 
 $jurusan_sem = "";
        if ($_SESSION['level']!=1) {
              $jurusan_sem = "where nilai_akm.kode_jurusan='".$_SESSION['jurusan']."'";
        }
               foreach ($db->fetch_custom("select semester,nama_semester from semester order by semester desc") as $isi) {
                    echo "<option value='$isi->semester'>$isi->nama_semester</option>";
                  
               } ?>
              </select>

 </div>
  </div><!-- /.form-group -->
      <div class="form-group">
                        <label for="Semester" class="control-label col-lg-2">Program Studi</label>
                        <div class="col-lg-6">
                        <select id="jur_filter_lulus" name="jur_filter" data-placeholder="Pilih Program Studi ..." class="form-control chzn-select" tabindex="2">
                           <option value="all">Semua</option>
 <?php 
 $jurusan_sem = "";
        if ($_SESSION['level']!=1) {
              $jurusan_sem = "where kode_jurusan='".$_SESSION['jurusan']."'";
        }
foreach ($db->fetch_custom("select kode_jurusan,concat(jenjang,' ',nama_jurusan) as nama_jurusan from jurusan $jurusan_sem order by nama_jurusan asc") as $isi) {
                  echo "<option value='$isi->kode_jurusan'>$isi->nama_jurusan</option>";

                }
        ?>
                       
              </select>

 </div>
  </div><!-- /.form-group -->

<div class="form-group">
                        <label for="Semester" class="control-label col-lg-2">Angkatan</label>
                        <div class="col-lg-3" >
                        <select id="angkatan_awal" name="angkatan_awal" data-placeholder="Pilih Angkatan ..." class="form-control chzn-select" tabindex="2" style="z-index: 1" required="">
                          <option value="all">Semua</option>
                        <?php
                        $startingYear = 1980;
                        $endingYear = date('Y');

                        for ($i = $endingYear;$i >= $startingYear;$i--)
                        {
                            echo '<option value='.$i.'>'.$i.'</option>';
                        }
                        ?>
                        </select>
                      </div> 
                      <div class="col-lg-2" style="width: 20px;padding: 0;padding-top: 7px;">S/D</div>
                        <div class="col-lg-3" >
                        <select id="angkatan_akhir" name="angkatan_akhir" data-placeholder="Pilih Angkatan ..." class="form-control chzn-select" tabindex="2" style="z-index: 1" required="">
                          <option value="all">Semua</option>
                        <?php
                        $startingYear = 1980;
                        $endingYear = date('Y');

                        for ($i = $endingYear;$i >= $startingYear;$i--)
                        {
                            echo '<option value='.$i.'>'.$i.'</option>';
                        }
                        ?>
                        </select>
                      </div>
                      </div><!-- /.form-group -->
 
                      <div class="form-group">
                        <label for="tags" class="control-label col-lg-2">&nbsp;</label>
                        <div class="col-lg-10">
                           <span id="filter_lulus" class="btn btn-primary"><i class="fa fa-refresh"></i> Filter</span>
                      </div>
                      </div><!-- /.form-group -->
                    </form>
            </div>
            <!-- /.box-body -->
          </div>
<div id="content-lulus">
  
</div>
<script type="text/javascript">
$(document).ready(function() {

  $('#filter_lulus').on('click', function() {
    $("#show_progress").show();
    var jurusan = $("#jur_filter_lulus").val();
    var sem_filter = $("#sem_filter_lulus").val();
    var angkatan_awal = $("#angkatan_awal").val();
    var angkatan_akhir = $("#angkatan_akhir").val();

    $.ajax({
      type: "POST",
      url: "<?=base_admin();?>modul/rekapitulasi/get_lulus.php",
      data: {jurusan: jurusan, semester: sem_filter,angkatan_awal:angkatan_awal,angkatan_akhir:angkatan_akhir},
      success: function(result) {
        $("#show_progress").hide();
        
        $('#content-lulus').html(result);
      }
    });
  });
});

</script>