<?php
include "../../inc/config.php";
$token = get_token();
$url = $db->get_service_url('rest');

$id_jur = $_POST['jurusan'];
$semester = $_POST['semester'];
$id_mk = $_POST['matakuliah'];


    $filter_kelas = "p.id_sms='".$id_jur."' and p.id_smt='".$semester."' and p.id_mk='".$id_mk."'";
  
    $filter_kelas = "id_prodi='".$id_jur."' and id_semester='".$semester."' and id_matkul='".$id_mk."'";

                $temp_data_kelas = [
      'act' => 'GetDetailKelasKuliah',
        'token' => $token,
        'filter' => $filter_kelas,
        'order' => "id_semester DESC",
        'limit' => "",
        'offset' => ""

    ];


    $kelas = json_decode($db->run($temp_data_kelas,$url));


$array_kelas = array();
foreach ($kelas->data as $data_kelas) {
    $array_kelas[] = array('id_kelas' => $data_kelas->id_kelas_kuliah,'nama_kelas' => $data_kelas->nama_kelas_kuliah);
}

echo '<option value="all">Semua</option>';
foreach ($array_kelas as $isi) {
echo "<option value='".$isi['id_kelas']."'>".$isi['nama_kelas']."</option>";
} 
