                <!-- Content Header (Page header) -->
                <section class="content-header">
                    <h1>
                      Dosen Ajar
                    </h1>
                    <ol class="breadcrumb">
                        <li><a href="<?=base_index();?>"><i class="fa fa-dashboard"></i> Home</a></li>
                        <li><a href="<?=base_index();?>dosen-ajar">Dosen Ajar</a></li>
                        <li class="active">Edit Dosen Ajar</li>
                    </ol>
                </section>

                <!-- Main content -->
                <section class="content">
<div class="row">
    <div class="col-lg-12">
        <div class="box box-solid box-primary">
                                   <div class="box-header">
                                    <h3 class="box-title">Edit Dosen Ajar</h3>
                                    <div class="box-tools pull-right">
                                        <button class="btn btn-info btn-sm" data-widget="collapse"><i class="fa fa-minus"></i></button>
                                        <button class="btn btn-info btn-sm" data-widget="remove"><i class="fa fa-times"></i></button>
                                    </div>
                                </div>

                  <div class="box-body">
                     <form id="update" method="post" class="form-horizontal" action="<?=base_admin();?>modul/dosen_ajar/dosen_ajar_action.php?act=up">
                      <div class="form-group">
                        <label for="Semester" class="control-label col-lg-2">Semester</label>
                        <div class="col-lg-10">
                          <input type="text" data-rule-number="true" name="semester" value="<?=$data_edit->semester;?>" class="form-control" required> 
                        </div>
                      </div><!-- /.form-group -->
<div class="form-group">
                        <label for="NIDN" class="control-label col-lg-2">NIDN/ID Dosen NEO</label>
                        <div class="col-lg-10">
                          <input type="text" name="nidn" value="<?=$data_edit->nidn;?>" class="form-control" required> 
                        </div>
                      </div><!-- /.form-group -->
<div class="form-group">
                        <label for="Nama Dosen" class="control-label col-lg-2">Nama Dosen</label>
                        <div class="col-lg-10">
                          <input type="text" name="nama_dosen" value="<?=$data_edit->nama_dosen;?>" class="form-control" required> 
                        </div>
                      </div><!-- /.form-group -->
<div class="form-group">
                        <label for="Kode Matakuliah" class="control-label col-lg-2">Kode Matakuliah</label>
                        <div class="col-lg-10">
                          <input type="text" name="kode_mk" value="<?=$data_edit->kode_mk;?>" class="form-control" required> 
                        </div>
                      </div><!-- /.form-group -->
<div class="form-group">
                        <label for="Nama Kelas" class="control-label col-lg-2">Nama Kelas</label>
                        <div class="col-lg-10">
                          <input type="text" name="nama_kelas" value="<?=$data_edit->nama_kelas;?>" class="form-control" required> 
                        </div>
                      </div><!-- /.form-group -->
<div class="form-group">
                        <label for="NIDN" class="control-label col-lg-2">Jumlah Tatap Muka</label>
                        <div class="col-lg-10">
                          <input type="text" data-rule-number="true" name="tatap_muka" value="<?=$data_edit->rencana_tatap_muka;?>" placeholder="Jumlah Tatap Muka" class="form-control" required> 
                        </div>
                      </div><!-- /.form-group -->
<div class="form-group">
                        <label for="NIDN" class="control-label col-lg-2">Jumlah Realisasi Tatap Muka</label>
                        <div class="col-lg-10">
                          <input type="text" data-rule-number="true" name="tatap_muka_real" value="<?=$data_edit->tatap_muka_real;?>" placeholder="Jumlah Realisasi Tatap Muka" class="form-control" > 
                        </div>
                      </div><!-- /.form-group -->
<div class="form-group">
                        <label for="NIDN" class="control-label col-lg-2">SKS Ajar</label>
                        <div class="col-lg-10">
                          <input type="text" name="sks_ajar" value="<?=$data_edit->sks_ajar;?>" placeholder="Jumlah SKS Ajar" class="form-control" > 
                        </div>
                      </div><!-- /.form-group -->

<div class="form-group">
                        <label for="Jurusan" class="control-label col-lg-2">Jenis Evaluasi</label>
                        <div class="col-lg-10">
                           <select name="id_jenis_evaluasi" data-placeholder="Pilih Evaluasi..." class="form-control chzn-select" tabindex="2" required>
<?php
$evaluasi = array(
    1 => 'Evaluasi Akademik',
    2 => 'Aktivitas Partisipatif',
    3 => 'Hasil Proyek',
    4 => 'Kognitif/ Pengetahuan'
);
foreach ($evaluasi as $id => $val) {
    if ($data_edit->id_jenis_evaluasi==$id) {
      echo "<option value='$id' selected>$val</option>";
    } else {
      echo "<option value='$id'>$val</option>";
    }
} 
 ?>
              </select>
                        </div>
                      </div><!-- /.form-group -->
<div class="form-group">
                        <label for="Jurusan" class="control-label col-lg-2">Program Studi</label>
                        <div class="col-lg-10">
                           <select name="kode_jurusan" data-placeholder="Pilih Jurusan..." class="form-control chzn-select" tabindex="2" required>

               <?php 
if ($_SESSION['level']==1) {
  $jur = $db->fetch_custom("select * from jurusan");
} else {
  $jur = $db->fetch_custom("select * from jurusan where kode_jurusan='".$_SESSION['jurusan']."'");
}
foreach ($jur as $isi) {

                  if ($data_edit->kode_jurusan==$isi->kode_jurusan) {
                    echo "<option value='$isi->kode_jurusan' selected>$isi->jenjang $isi->nama_jurusan</option>";
                  } else {
                    echo "<option value='$isi->kode_jurusan'>$isi->jenjang $isi->nama_jurusan</option>";
                  }
               } ?>
              </select>
                        </div>
                      </div><!-- /.form-group -->

                  <div class="form-group">
                        <label for="id_substansi" class="control-label col-lg-2">ID Substansi Kuliah</label>
                        <div class="col-lg-10">
                          <input type="text" name="id_substansi" value="<?=$data_edit->id_substansi;?>" class="form-control" > 
                        </div>
                      </div><!-- /.form-group -->

                      <input type="hidden" name="id" value="<?=$data_edit->id;?>">
                      <div class="form-group">
                        <label for="tags" class="control-label col-lg-2">&nbsp;</label>
                        <div class="col-lg-10">
                          <a onclick="window.history.back(-1)" class="btn btn-success btn-flat"><i class="fa fa-step-backward"></i> Kembali</a>
                        <button type="submit" class="btn btn-primary"><i class="fa fa-save"></i> Simpan</button>
                
                        </div>
                      </div><!-- /.form-group -->
                    </form>
                  
                  </div>
                  </div>
              </div>
</div>
                  
                </section><!-- /.content -->
        
 