function Simpan($md, $id, $resid, $Kembali) { $_Gabungkan = $_REQUEST['_Gabungkan'] + 0; $w = GetFields('jadwal', "JadwalID", $id, '*'); $w['JenisJadwalID'] = $_REQUEST['JenisJadwalID']; $w['HariID'] = $_REQUEST['HariID']; //$w['JamMulai'] = "$_REQUEST[JamMulai_h]:$_REQUEST[JamMulai_n]"; //$w['JamSelesai'] = "$_REQUEST[JamSelesai_h]:$_REQUEST[JamSelesai_n]"; $w['RuangID'] = sqling($_REQUEST['RuangID']); $w['Kapasitas'] = $_REQUEST['Kapasitas'] + 0; //$w['KuliahTanggal'] = "$_REQUEST[KuliahTanggal]"; $w['_RencanaKehadiranRes'] = $_REQUEST['_RencanaKehadiranRes']; $w['_MaxAbsenRes'] = $_REQUEST['_MaxAbsenRes']; if ($_Gabungkan == 721222) { //$w['TglMulai'] = sqling($_REQUEST['TglMulai']); //$w['TglSelesai'] = sqling($_REQUEST['TglSelesai']); $w['KuliahTanggal'] = sqling($_REQUEST['KuliahTanggal']); $w['JamMulai'] = $_REQUEST['JamMulai']; $w['JamSelesai'] = $_REQUEST['JamSelesai']; } else { $w['KuliahTanggal'] = sqling($_REQUEST['KuliahTanggal']); //"$_REQUEST[KuliahTanggal_y]-$_REQUEST[KuliahTanggal_m]-$_REQUEST[KuliahTanggal_d]"; $w['JamMulai'] = "{$_REQUEST['JamMulai_h']}:{$_REQUEST['JamMulai_n']}"; $w['JamSelesai'] = "{$_REQUEST['JamSelesai_h']}:{$_REQUEST['JamSelesai_n']}"; //$w['TglMulai'] = "$_REQUEST[TglMulai_y]-$_REQUEST[TglMulai_m]-$_REQUEST[TglMulai_d]"; //$w['TglSelesai'] = "$_REQUEST[TglSelesai_y]-$_REQUEST[TglSelesai_m]-$_REQUEST[TglSelesai_d]"; } // *** Cek semuanya dulu *** $oke = ''; if (!empty($w['RuangID'])) { $oke .= CekRuang($w, $id, $resid); } //if (!empty($w['RuangID'])) $oke .= CekJadwalLab($w, $id, $resid); // Ambil data MK $mk = GetFields('mk', "MKID", $w['MKID'], "Nama,MKKode,KurikulumID,SKS,Sesi"); // Jika semuanya baik2 saja if (empty($oke) || $_Gabungkan == 721222) { // Jika mode=edit if ($md == 0) { $s = "update jadwal\r\n set JenisJadwalID = '{$w['JenisJadwalID']}',\r\n\t\t\tHariID = '{$w['HariID']}',\r\n JamMulai = '{$w['JamMulai']}',\r\n JamSelesai = '{$w['JamSelesai']}',\r\n DosenID = '{$w['DosenID']}',\r\n RuangID = '{$w['RuangID']}',\r\n Kapasitas = '{$w['Kapasitas']}',\r\n KuliahTanggal = '{$w['KuliahTanggal']}',\r\n\t\t\tRencanaKehadiran = '{$w['_RencanaKehadiranRes']}',\r\n\t\t\tMaxAbsen = '{$w['_MaxAbsenRes']}',\r\n\t\t\tTglEdit = now(),\r\n LoginEdit = '{$_SESSION['_Login']}'\r\n\t\twhere JadwalID='{$resid}'"; //where JadwalResponsiID = '$resid' "; $r = _query($s); TutupScript(); } elseif ($md == 1) { $s = "insert into jadwal\r\n\t\t(KodeID, TahunID, ProdiID, ProgramID, NamaKelas, MKID, MKKode, Nama, \r\n\t\tJadwalRefID, KuliahTanggal, HariID, JamMulai, JamSelesai, SKSAsli, SKS, JenisJadwalID,\r\n DosenID, Kapasitas, RuangID, RencanaKehadiran, KehadiranMin, MaxAbsen, TglBuat, LoginBuat)\r\n values\r\n ('" . KodeID . "', '{$w['TahunID']}', '{$w['ProdiID']}', '{$w['ProgramID']}', '{$w['NamaKelas']}', '{$w['MKID']}', '{$w['MKKode']}', '{$w['Nama']}',\r\n\t\t'{$id}', '{$w['KuliahTanggal']}', '{$w['HariID']}', '{$w['JamMulai']}', '{$w['JamSelesai']}', '{$w['SKSAsli']}', 0, '{$w['JenisJadwalID']}',\r\n '{$w['DosenID']}', '{$w['Kapasitas']}', '{$w['RuangID']}', '{$w['_RencanaKehadiranRes']}', '{$w['_RencanaKehadiranRes']}', '{$w['_MaxAbsenRes']}', now(), '{$_SESSION['_Login']}')"; $r = _query($s); TutupScript(); } } else { //KembaliScript($md, $id, $resid, $w); GabungkanScript($md, $id, $resid, $w); die(ErrorMsg('Jadwal Bentrok', "Berikut adalah pesan kesalahannya: \r\n <ol>{$oke}</ol>\r\n <hr size=1 color=silver />\r\n <p align=center>\r\n <input type=button name='Paksakan' value='Gabungkan Jadwal' onClick='javascript:Gabung()' />\r\n <input type=button name='Kembali' value='Kembali' onClick=\"javascript:Kembali()\" />\r\n\t\t\t<input type=button name='Tutup' value='Tutup' onClick=\"window.close()\" />\r\n </p>")); } }
function Simpan($md, $id, $Kembali) { $_Gabungkan = $_REQUEST['_Gabungkan'] + 0; $w = array(); $w['TahunID'] = sqling($_REQUEST['TahunID']); $w['ProgramID'] = sqling($_REQUEST['ProgramID']); $w['ProdiID'] = sqling($_REQUEST['ProdiID']); $w['HariID'] = $_REQUEST['HariID']; $w['JamMulai'] = "{$_REQUEST['JamMulai_h']}:{$_REQUEST['JamMulai_n']}"; $w['JamSelesai'] = "{$_REQUEST['JamSelesai_h']}:{$_REQUEST['JamSelesai_n']}"; $w['RuangID'] = sqling($_REQUEST['RuangID']); $w['Kapasitas'] = $_REQUEST['Kapasitas'] + 0; $w['MKID'] = $_REQUEST['MKID']; $w['MKKode'] = $_REQUEST['MKKode']; $w['MKNama'] = $_REQUEST['MKNama']; $w['SKS'] = $_REQUEST['SKS'] + 0; $w['DosenID'] = $_REQUEST['DosenID']; $w['NamaKelas'] = sqling($_REQUEST['NamaKelas']); $w['RencanaKehadiran'] = $_REQUEST['RencanaKehadiran'] + 0; $w['KehadiranMin'] = $_REQUEST['KehadiranMin'] + 0; $w['MaxAbsen'] = $_REQUEST['MaxAbsen'] + 0; if ($_Gabungkan == 721222) { $w['TglMulai'] = sqling($_REQUEST['TglMulai']); $w['TglSelesai'] = sqling($_REQUEST['TglSelesai']); } else { $w['TglMulai'] = "{$_REQUEST['TglMulai_y']}-{$_REQUEST['TglMulai_m']}-{$_REQUEST['TglMulai_d']}"; $w['TglSelesai'] = "{$_REQUEST['TglSelesai_y']}-{$_REQUEST['TglSelesai_m']}-{$_REQUEST['TglSelesai_d']}"; } if ($_REQUEST['BiayaKhusus'] == 'Y') { $w['BiayaKhusus'] = 'Y'; $w['Biaya'] = $_REQUEST['Biaya'] + 0; $w['NamaBiaya'] = $_REQUEST['NamaBiaya']; } else { $w['BiayaKhusus'] = 'N'; $w['Biaya'] = 0; $w['NamaBiaya'] = ''; } $w['AdaResponsi'] = $_REQUEST['AdaResponsi'] == 'Y' ? 'Y' : 'N'; // Validasi if (empty($w['MKID'])) { die(ErrorMsg('Error', "Matakuliah belum dipilih.<br />\r\n Ambil matakuliah di fasiltas pencarian untuk melengkapi data matakuliah.<br />\r\n Hubungi Sysadmin untuk informasi lebih lanjut.\r\n <hr size=1 color=silver />\r\n Opsi: <input type=button name='Tutup' value='Tutup' onClick=\"window.close()\" />")); } // *** parameters *** $DosenAda = GetaField('dosen', "KodeID='" . KodeID . "' and Login", $w['DosenID'], 'Nama'); if (empty($DosenAda)) { die(ErrorMsg('Error', "Dosen dengan kode: <b>{$w['DosenID']}</b> tidak ditemukan.<br />\r\n Masukkan Dosen dengan fasilitas pencarian.<br />\r\n Hubungi Sysadmin untuk informasi lebih lanjut.\r\n <hr size=1 color=silver />\r\n Opsi: <input type=button name='Tutup' value='Tutup' onClick=\"window.close()\" />")); } // *** Cek semuanya dulu *** $oke = ''; if (!empty($w['RuangID'])) { $oke .= CekRuang($w, $id); } $oke .= CekDosen($w, $id); // Ambil data MK $mk = GetFields('mk', "MKID", $w['MKID'], "Nama,MKKode,KurikulumID,SKS,Sesi"); // Jika semuanya baik2 saja if (empty($oke) || $_Gabungkan == 721222) { // Jika mode=edit if ($md == 0) { $s = "update jadwal\r\n set ProgramID = '{$w['ProgramID']}',\r\n MKID = '{$w['MKID']}',\r\n MKKode = '{$mk['MKKode']}',\r\n Nama = upper('{$mk['Nama']}'),\r\n NamaKelas = upper('{$w['NamaKelas']}'),\r\n HariID = '{$w['HariID']}',\r\n JamMulai = '{$w['JamMulai']}',\r\n JamSelesai = '{$w['JamSelesai']}',\r\n SKS = '{$w['SKS']}',\r\n SKSAsli = '{$mk['SKS']}',\r\n DosenID = '{$w['DosenID']}',\r\n RencanaKehadiran = '{$w['RencanaKehadiran']}',\r\n KehadiranMin = '{$w['KehadiranMin']}',\r\n\t\t\tMaxAbsen = '{$w['MaxAbsen']}',\r\n RuangID = '{$w['RuangID']}',\r\n Kapasitas = '{$w['Kapasitas']}',\r\n TglMulai = '{$w['TglMulai']}',\r\n\t\t\tTglSelesai = '{$w['TglSelesai']}',\r\n\t\t\tAdaResponsi = '{$w['AdaResponsi']}',\r\n\t\t\tBiayaKhusus = '{$w['BiayaKhusus']}',\r\n Biaya = '{$w['Biaya']}',\r\n\t\t\tNamaBiaya = '{$w['NamaBiaya']}',\r\n TglEdit = now(),\r\n LoginEdit = '{$_SESSION['_Login']}'\r\n where JadwalID = '{$id}' "; $r = _query($s); // Tambahan untuk update kuliah tambahan lab/responsi/tutorial $s = "update jadwal\r\n set ProgramID = '{$w['ProgramID']}',\r\n MKID = '{$w['MKID']}',\r\n MKKode = '{$mk['MKKode']}',\r\n Nama = upper('{$mk['Nama']}'),\r\n NamaKelas = upper('{$w['NamaKelas']}'),\r\n SKS = '{$w['SKS']}',\r\n SKSAsli = '{$mk['SKS']}',\r\n TglEdit = now(),\r\n LoginEdit = '{$_SESSION['_Login']}'\r\n where JadwalRefID = '{$id}' "; $r = _query($s); TutupScript(); } elseif ($md == 1) { $s = "insert into jadwal\r\n (KodeID, TahunID, ProdiID, ProgramID,\r\n NamaKelas, MKID, MKKode, Nama, TglMulai, TglSelesai,\r\n HariID, JamMulai, JamSelesai, SKSAsli, SKS,\r\n DosenID, RencanaKehadiran, KehadiranMin, MaxAbsen, \r\n AdaResponsi, BiayaKhusus, Biaya, NamaBiaya, \r\n Kapasitas, RuangID, TglBuat, LoginBuat)\r\n values\r\n ('" . KodeID . "', '{$w['TahunID']}', '{$w['ProdiID']}', '{$w['ProgramID']}',\r\n upper('{$w['NamaKelas']}'), '{$w['MKID']}', '{$mk['MKKode']}', upper('{$mk['Nama']}'), '{$w['TglMulai']}', '{$w['TglSelesai']}',\r\n '{$w['HariID']}', '{$w['JamMulai']}', '{$w['JamSelesai']}', '{$mk['SKS']}', '{$w['SKS']}',\r\n '{$w['DosenID']}', '{$w['RencanaKehadiran']}', '{$w['KehadiranMin']}', '{$w['MaxAbsen']}',\r\n '{$w['AdaResponsi']}', '{$w['BiayaKhusus']}', '{$w['Biaya']}', '{$w['NamaBiaya']}',\r\n '{$w['Kapasitas']}', '{$w['RuangID']}', now(), '{$_SESSION['_Login']}')"; $r = _query($s); TutupScript(); } } else { GabungkanScript($md, $id, $w); die(ErrorMsg('Ada Kesalahan', "Berikut adalah pesan kesalahannya: \r\n <ol>{$oke}</ol>\r\n <hr size=1 color=silver />\r\n <p align=center>\r\n <input type=button name='Kembali' value='Kembali' onClick=\"javascript:Kembali()\" />\r\n\t <input type=button name='Tutup' value='Tutup' onClick=\"window.close()\" />\r\n </p>")); // <input type=button name='Paksakan' value='Gabungkan Jadwal' // onClick='javascript:Gabung()' /> } }
function Simpan($md, $id, $Kembali) { include_once "../util.lib.php"; $_Gabungkan = $_REQUEST['_Gabungkan'] + 0; $w = array(); $w['TahunID'] = sqling($_REQUEST['_remTahun']); $w['ProgramID'] = sqling($_REQUEST['_remProg']); $w['ProdiID'] = sqling($_REQUEST['_remProdi']); $w['MKID'] = $_REQUEST['MKID']; $w['MKKode'] = $_REQUEST['MKKode']; $w['MKNama'] = $_REQUEST['MKNama']; $w['SKS'] = $_REQUEST['SKS'] + 0; $w['DosenID'] = $_REQUEST['DosenID']; $w['NamaKelas'] = sqling($_REQUEST['NamaKelas']); $w['RencanaKehadiran'] = $_REQUEST['RencanaKehadiran'] + 0; $w['KehadiranMin'] = $_REQUEST['KehadiranMin'] + 0; $w['MaxAbsen'] = $_REQUEST['MaxAbsen'] + 0; $TanggalPenting = $_REQUEST['StringTanggalPenting']; if ($_Gabungkan == 721222) { $w['TglMulai'] = sqling($_REQUEST['TglMulai']); $w['TglSelesai'] = sqling($_REQUEST['TglSelesai']); } else { $w['TglMulai'] = "{$_REQUEST['TglMulai_y']}-{$_REQUEST['TglMulai_m']}-{$_REQUEST['TglMulai_d']}"; $w['TglSelesai'] = "{$_REQUEST['TglSelesai_y']}-{$_REQUEST['TglSelesai_m']}-{$_REQUEST['TglSelesai_d']}"; } if ($_REQUEST['BiayaKhusus'] == 'Y') { $w['BiayaKhusus'] = 'Y'; $w['Biaya'] = $_REQUEST['Biaya'] + 0; $w['NamaBiaya'] = $_REQUEST['NamaBiaya']; } else { $w['BiayaKhusus'] = 'N'; $w['Biaya'] = 0; $w['NamaBiaya'] = ''; } // Validasi if (empty($w['MKID'])) { die(ErrorMsg('Error', "Matakuliah belum dipilih.<br />\r\n Ambil matakuliah di fasiltas pencarian untuk melengkapi data matakuliah.<br />\r\n Hubungi Sysadmin untuk informasi lebih lanjut.\r\n <hr size=1 color=silver />\r\n Opsi: <input type=button name='Tutup' value='Tutup' onClick=\"window.close()\" />")); } // *** parameters *** $DosenAda = GetaField('dosen', "KodeID='" . KodeID . "' and Login", $w['DosenID'], 'Nama'); if (empty($DosenAda)) { die(ErrorMsg('Error', "Dosen dengan kode: <b>{$w['DosenID']}</b> tidak ditemukan.<br />\r\n Masukkan Dosen dengan fasilitas pencarian.<br />\r\n Hubungi Sysadmin untuk informasi lebih lanjut.\r\n <hr size=1 color=silver />\r\n Opsi: <input type=button name='Tutup' value='Tutup' onClick=\"window.close()\" />")); } // *** Cek semuanya dulu *** $oke = ''; //if (!empty($w['RuangID'])) $oke .= CekRuang($w, $id); //$oke .= CekDosen($w, $id); // Ambil data MK $mk = GetFields('mk', "MKID", $w['MKID'], "Nama,MKKode,KurikulumID,SKS,Sesi"); // Jika semuanya baik2 saja if (empty($oke) || $_Gabungkan == 721222) { // Ambil Semua tanggal yang sudah terdaftar di database ke dalam array $arrTanggalYangAda = array(); $s1 = "select PresensiRemedialID from presensiremedial where JadwalRemedialID='{$id}' and KodeID='" . KodeID . "'"; $r1 = _query($s1); while ($w1 = _fetch_array($r1)) { $arrTanggalYangAda[] = $w1['PresensiRemedialID']; } // Bila TanggalPenting memiliki isi, masukkan/update tanggal2 penting yang terdaftar di database if (!empty($TanggalPenting)) { $arrTanggalPenting = explode('<|>', $TanggalPenting); foreach ($arrTanggalPenting as $tanggal) { $arr = explode('!/!', $tanggal); if ($arr[0] == 0) { $s1 = "insert into presensiremedial \r\n\t\t\t\t\t\tset Tanggal = '{$arr['1']}', JamMulai = '{$arr['2']}:00', JamSelesai = '{$arr['3']}:00', Keterangan = '{$arr['4']}',\r\n\t\t\t\t\t\t\tJadwalRemedialID= '{$id}', KodeID='" . KodeID . "', LoginBuat='{$_SESSION['_Login']}', TanggalBuat=now()"; $r1 = _query($s1); } else { $s1 = "update presensiremedial\r\n\t\t\t\t\t\tset Tanggal = '{$arr['1']}', JamMulai = '{$arr['2']}:00', JamSelesai = '{$arr['3']}:00', Keterangan='{$arr['4']}',\r\n\t\t\t\t\t\t\tKodeID='" . KodeID . "', LoginEdit='{$_SESSION['_Login']}', TanggalEdit=now()\r\n\t\t\t\t\t\twhere PresensiRemedialID='{$arr['0']}'"; $r1 = _query($s1); $arrTanggalYangAda = RemoveElementFromArray($arr[0], $arrTanggalYangAda); } $n++; } } if (!empty($arrTanggalYangAda)) { foreach ($arrTanggalYangAda as $tglremid) { $s1 = "delete from presensiremedial where PresensiRemedialID='{$tglremid}' and KodeID='" . KodeID . "'"; $r1 = _query($s1); } } // Jika mode=edit if ($md == 0) { $s = "update jadwalremedial\r\n set ProgramID = '{$w['ProgramID']}',\r\n\t\t\tProdiID = '{$w['ProdiID']}',\r\n MKID = '{$w['MKID']}',\r\n MKKode = '{$mk['MKKode']}',\r\n Nama = upper('{$mk['Nama']}'),\r\n NamaKelas = upper('{$w['NamaKelas']}'),\r\n SKS = '{$w['SKS']}',\r\n SKSAsli = '{$mk['SKS']}',\r\n DosenID = '{$w['DosenID']}',\r\n RencanaKehadiran = '{$w['RencanaKehadiran']}',\r\n KehadiranMin = '{$w['KehadiranMin']}',\r\n\t\t\tMaxAbsen = '{$w['MaxAbsen']}',\r\n Kapasitas = '{$w['Kapasitas']}',\r\n TglMulai = '{$w['TglMulai']}',\r\n\t\t\tTglSelesai = '{$w['TglSelesai']}',\r\n\t\t\tBiayaKhusus = '{$w['BiayaKhusus']}',\r\n Biaya = '{$w['Biaya']}',\r\n\t\t\tNamaBiaya = '{$w['NamaBiaya']}',\r\n TglEdit = now(),\r\n LoginEdit = '{$_SESSION['_Login']}'\r\n where JadwalRemedialID = '{$id}' "; $r = _query($s); TutupScript(); } elseif ($md == 1) { $s = "insert into jadwalremedial\r\n (KodeID, TahunID, ProdiID, ProgramID,\r\n NamaKelas, MKID, MKKode, Nama, TglMulai, TglSelesai, \r\n SKSAsli, SKS,\r\n DosenID, RencanaKehadiran, KehadiranMin, MaxAbsen, \r\n BiayaKhusus, Biaya, NamaBiaya, \r\n TglBuat, LoginBuat)\r\n values\r\n ('" . KodeID . "', '{$w['TahunID']}', '{$w['ProdiID']}', '{$w['ProgramID']}',\r\n upper('{$w['NamaKelas']}'), '{$w['MKID']}', '{$mk['MKKode']}', upper('{$mk['Nama']}'), '{$w['TglMulai']}', '{$w['TglSelesai']}', \r\n '{$mk['SKS']}', '{$w['SKS']}',\r\n '{$w['DosenID']}', '{$w['RencanaKehadiran']}', '{$w['KehadiranMin']}', '{$w['MaxAbsen']}',\r\n '{$w['BiayaKhusus']}', '{$w['Biaya']}', '{$w['NamaBiaya']}',\r\n now(), '{$_SESSION['_Login']}')"; $r = _query($s); TutupScript(); } } else { GabungkanScript($md, $id, $w); die(ErrorMsg('Ada Kesalahan', "Berikut adalah pesan kesalahannya: \r\n <ol>{$oke}</ol>\r\n <hr size=1 color=silver />\r\n <p align=center>\r\n <input type=button name='Kembali' value='Kembali' onClick=\"javascript:Kembali()\" />\r\n\t <input type=button name='Tutup' value='Tutup' onClick=\"window.close()\" />\r\n <input type=button name='Paksakan' value='Gabungkan Jadwal'\r\n onClick='javascript:Gabung()' />\r\n </p>")); } }
function JdwlEdt() { global $LevelAksesHarga; CheckFormScript('MKKode,NamaKelas,DosenID,HariID,JamMulai,JamSelesai'); CariMKScript(); CariDosenAjax(); PhpAutocomplete($_SESSION['prodi']); $md = $_REQUEST['md'] + 0; $hari = $_REQUEST['hari']; if ($md == 0) { $w = $_REQUEST['GAGAL'] == 1 ? AmbilArrJadwal() : GetFields('jadwal', "JadwalID", $_REQUEST['JadwalID'], '*'); $jdl = "Edit Jadwal"; } else { $w = $_REQUEST['GAGAL'] == 1 ? AmbilArrJadwal() : ResetArrJadwal(); $jdl = "Tambah Jadwal"; $w['DosenID'] = 5000; $w['RencanaKehadiran'] = 14; $w['HariID'] = $hari; } // cek jika kelas serial if (!empty($w['JadwalSer'])) { $serial = GetFields('jadwal', 'JadwalID', $w['JadwalSer'], 'JadwalID, MKID, MKKode, Nama, NamaKelas, JenisJadwalID, DosenID'); $w['MKID'] = $serial['MKID']; $w['MKKode'] = $serial['MKKode']; $w['Nama'] = $serial['Nama']; $w['NamaKelas'] = $serial['NamaKelas']; $w['JenisJadwalID'] = $serial['JenisJadwalID']; $w['DosenID'] = $serial['DosenID']; } if ($_SESSION['prodi'] == '99') { // Daftar prodi yg bisa diakses $_ProdiID = trim($_SESSION['_ProdiID'], ','); //echo $_ProdiID; $arrProdi = explode(',', $_ProdiID); $_prodi = ''; for ($i = 0; $i < sizeof($arrProdi); $i++) { $_prodi .= ",'" . $arrProdi[$i] . "'"; } $_prodi = trim($_prodi, ','); $_prodi = empty($arrProdi) ? '-1' : $_prodi; //implode(', ', $arrProdi); } else { $_prodi = "'{$_SESSION['prodi']}'"; } // sekarang hanya 1 prodi saja kecuali prodi -99 $optprodi = GetCheckboxes("prodi", "ProdiID", "concat(ProdiID, ' - ', Nama) as NM", "NM", $w['ProdiID'], '.', "ProdiID in ({$_prodi})"); $optprid = GetCheckboxes("program", "ProgramID", "concat(ProgramID, ' - ', Nama) as NM", "NM", $w['ProgramID'], '.'); $opthari = GetOption2('hari', "Nama", "HariID", $w['HariID'], '', 'HariID'); //$optmk = GetOption2('mk', "concat(MKKode, ' - ', Nama, ' (', SKS, ' SKS)')", // 'MKKode', $w['MKID'], "ProdiID='$_SESSION[prodi]'", 'MKID'); //$optdsn = GetOption2('dosen', "concat(Nama, ', ', Gelar)", // 'Login', $w['DosenID'], "INSTR(ProdiID, '.$_SESSION[prodi].')", 'Login'); $NamaDosen = empty($w['DosenID']) ? '' : GetaField('dosen', "Login", $w['DosenID'], 'Nama'); $optrg = GetOption2('ruang', "concat(RuangID, ' - ', Nama)", 'KampusID, RuangID', $w['RuangID'], '', 'RuangID'); $ckHargaStandar = $w['HargaStandar'] == 'Y' ? 'checked' : ''; $optjenjad = GetOption2('jenisjadwal', "concat(JenisJadwalID, ' - ', Nama)", "JenisJadwalID", $w['JenisJadwalID'], '', 'JenisJadwalID'); // Dapatkah mengedit harga matakuliah? if (strpos($LevelAksesHarga, ".{$_SESSION['_LevelID']}.") === false) { $EdtHrg = "<input type=hidden name='HargaStandar' value='{$w['HargaStandar']}'>\r\n <input type=hidden name='Harga' value='{$w['Harga']}'>"; } else { $EdtHrg = "<tr><td class=inp1>Harga :</td><td class=ul><input type=checkbox name='HargaStandar' value='Y' {$ckHargaStandar}> Apakah harga standar?<hr size=1 color=silver />\r\n Jika tidak tidak standar, harganya adalah: <br />\r\n Rp. <input type=text name='Harga' value='{$w['Harga']}' size=15 maxlength=15></td></tr>"; } //<tr><td class=inp1>Matakuliah :</td><td class=ul><select name='MKID'>$optmk</select></td></tr> // Tampilkan form GabungkanScript(); echo "<p><table class=box cellspacing=1 cellpadding=4>\r\n <form action='?' name='data' method=POST onSubmit=\"return CheckForm(this);\">\r\n <input type=hidden name='JadwalID' value='{$w['JadwalID']}'>\r\n <input type=hidden name='JadwalPar' value='{$w['JadwalPar']}'>\r\n <input type=hidden name='JadwalSer' value='{$w['JadwalSer']}'>\r\n <input type=hidden name='TahunID' value='{$w['TahunID']}'>\r\n <input type=hidden name='md' value='{$md}'>\r\n <input type=hidden name='mnux' value='jadwal'>\r\n <input type=hidden name='gos' value='JdwlSav'>\r\n <input type=hidden id='prodi' name='prodi' value='{$_SESSION['prodi']}'>\r\n <input type=hidden id='MKID' name='MKID' value='{$w['MKID']}'>\r\n <input type=hidden name='bypass' value=0>\r\n\r\n <tr><th class=ttl colspan=2>{$jdl}</th></tr>\r\n\r\n <tr><td class=inp1>Berlaku untuk<br />Program :</td><td class=ul>{$optprid}</td></tr>\r\n <tr><td class=inp1>Berlaku untuk<br />Program Studi :</td><td class=ul>{$optprodi}</td></tr>\r\n <tr><td class=inp1>Hari :</td><td class=ul><select name='HariID'>{$opthari}</select></td></tr>\r\n <tr><td class=inp1>Jam Kuliah :</td><td class=ul>\r\n <input type=text name='JamMulai' value='{$w['JamMulai']}' size=5 maxlength=5> s/d\r\n <input type=text name='JamSelesai' value='{$w['JamSelesai']}' size=5 maxlength=5>\r\n </td></tr>\r\n <tr><td class=inp1>Mata kuliah :</td><td class=ul><input type=text id='MKKode' name='MKKode' value='{$w['MKKode']}' size=10 maxlength=20>\r\n <a href=\"javascript:carimkajax(data)\">Cari Matakuliah</a><br />\r\n <input type=text name='Nama' autocomplete='off' id='NamaMK' value='{$w['Nama']}' size=50 maxlength=50></td></tr>\r\n <tr><td class=inp1>Nama Kelas :</td><td class=ul><input type=text name='NamaKelas' value='{$w['NamaKelas']}' size=5 maxlength=1></td></tr>\r\n <tr><td class=inp1>Jenis Jadwal :</td><td class=ul><select name='JenisJadwalID'>{$optjenjad}</select></td></tr>\r\n <tr><td class=inp1>SKS :</td><td class=ul><input type=text name='SKS' value='{$w['SKS']}' size=3 maxlength=3>\r\n Isikan dengan -1 jika jumlah SKS menggunakan SKS asli dari matakuliah.</td></tr>\r\n <tr><td class=inp1>SKS Honor :</td>\r\n <td class=ul><input type=text name='SKSHonor' value='{$w['SKSHonor']}' size=3 maxlength=3>\r\n Isikan dengan -1 jika jumlah SKS honor menggunakan SKS asli dari matakuliah.</td></tr>\r\n <tr><td class=inp1>Ruang Kuliah :</td><td class=ul>\r\n <select name='RuangID'>{$optrg}</select></td></tr>\r\n <tr><td class=inp1>Kapasitas/Target :</td><td class=ul>\r\n <input type=text name='Kapasitas' value='{$w['Kapasitas']}' size=5 maxlength=4>\r\n Jika diisi dengan nilai -1, maka nilai kapasitas akan diambil dari nilai kapasitas ruang.</td></tr>\r\n <tr><td class=inp1>Dosen Pengampu :</td><td class=ul><input type=text name='DosenID' id='DosenID' value='{$w['DosenID']}' size=10 maxlength=20>\r\n <a href='javascript:caridosenajax(data)'>Cari Dosen</a><br />\r\n <input type=text autocomple='off' id='NamaDosen' name='NamaDosen' value='{$NamaDosen}' size=50 maxlength=50></td></tr>\r\n <tr><td class=inp1>Rencana Tatap Muka :</td><td class=ul><input type=text name='RencanaKehadiran' value='{$w['RencanaKehadiran']}' size=3 maxlength=3></td></tr>\r\n <tr><td class=inp1>Minimal Kehadiran Mhsw :</td><td class=ul><input type=text name='KehadiranMin' value='{$w['KehadiranMin']}' size=3 maxlength=3></td></tr>\r\n {$EdtHrg}\r\n <tr><td colspan=2 class=ul><input type=submit name='Simpan' value='Simpan'>\r\n <input type=reset name='Reset' value='Reset'>\r\n <input type=button name='Batal' value='Batal' onClick=\"location='?mnux=jadwal'\"></td></tr>\r\n </table></p>"; }