
<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">Semester</label>
                        <div class="col-lg-6">
                        <select id="sem_filter_krs" name="sem_filter" data-placeholder="Pilih Semester ..." class="form-control chzn-select" tabindex="2">
                     <?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) {
                  if ((date('Y')-1).'1'==$isi->semester) {
                    echo "<option value='$isi->semester' selected>$isi->nama_semester</option>";
                  } else {
                    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_krs" 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="tags" class="control-label col-lg-2">&nbsp;</label>
                        <div class="col-lg-10">
                           <span id="filter_krs" class="btn btn-primary"><i class="fa fa-refresh"></i> Filter</span>
                      </div>
                      </div><!-- /.form-group -->
                    </form>
            </div>
            <!-- /.box-body -->
          </div>
<div id="content-krs">
  
</div>
<script type="text/javascript">
$(document).ready(function() {

  $('#filter_krs').on('click', function() {
    $("#show_progress").show();
    var jurusan = $("#jur_filter_krs").val();
    var sem_filter = $("#sem_filter_krs").val();

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

</script>