function TampilkanDaftarYudisium() { $optprd = GetOption2('prodi', "concat(ProdiID, ' - ', Nama)", "ProdiID", $_SESSION['prodi'], '', "ProdiID"); $bulan1 = GetMonthOption($_SESSION['bulan1']); $bulan2 = GetMonthOption($_SESSION['bulan2']); $tahun1 = GetNumberOption(date('Y') - 10, date('Y'), $_SESSION['tahun1']); $tahun2 = GetNumberOption(date('Y') - 10, date('Y') + 1, $_SESSION['tahun2']); $TglYudisium = GetDateOption($_SESSION['TglYudisium'], 'TglYudisium'); echo "<p><table class=box cellspacing=1 cellpadding=4>\r\n <form action='?' method=POST>\r\n <tr><td class=ul colspan=2><font size=+1>Filter</font></td></tr>\r\n <tr><td class=inp>Prodi :</td><td class=ul><select name='prodi'>{$optprd}</select> Kosongkan jika ingin melihat semua</td></tr>\r\n <tr><td class=inp>Lulus bulan :</td><td class=ul>\r\n <select name='bulan1'>{$bulan1}</select><select name='tahun1'>{$tahun1}</select> s/d\r\n <select name='bulan2'>{$bulan2}</select><select name='tahun2'>{$tahun2}</select> <input type=submit name='Filter' value='Filter Daftar'></td></tr>\r\n </form>\r\n \r\n <tr><td class=ul colspan=2><font size=+1>SK Yudisium</font></td></tr>\r\n <tr><td colspan=2>Set mahasiswa yang bertanda centang dalam daftar di bawah ini dengan SK Yudisium berikut ini:</td></tr> \r\n <form action='?' method=POST>\r\n <input type=hidden name='mnux' value='skyudisium'>\r\n <input type=hidden name='gos' value='SKYSAV'>\r\n <tr><td class=inp>No SK Yudisium :</td><td class=ul><input type=text name='SKYudisium' value='{$_SESSION['SKYudisium']}' size=50 maxlength=100></td></tr>\r\n <tr><td class=inp>Tanggal Yudisium :</td><td class=ul>{$TglYudisium} <input type=submit name='Simpan' value='Set SK Semua yg Dicentang'></td></tr>\r\n </table></p>"; if ($_SESSION['prodi'] != '10') { $_whr = "('{$_SESSION['tahun1']}-{$_SESSION['bulan1']}-01' <= ta.TglUjian) \r\n and (ta.TglUjian <= '{$_SESSION['tahun2']}-{$_SESSION['bulan2']}-31') and "; } else { $_whr = ""; } $s = "select ta.*, m.Nama\r\n from ta ta\r\n left outer join mhsw m on ta.MhswID=m.MhswID\r\n where ta.Lulus='Y'\r\n and m.ProdiID = '{$_SESSION['prodi']}'\r\n \r\n order by ta.MhswID"; $r = _query($s); $n = 0; $TotalSKY = _num_rows($r) + 0; echo "<input type=hidden name='TotalSKY' value={$TotalSKY}>\r\n <p><table class=box cellspacing=1 cellpadding=4>\r\n <tr><th class=ttl>#</th>\r\n <th class=ttl>N.P.M</th>\r\n <th class=ttl>Nama Mahasiswa</th>\r\n <th class=ttl>Tgl Ujian</th>\r\n <th class=ttl>Judul</th>\r\n <th class=ttl>SK Yudisium</th>\r\n <th class=ttl>Tgl Yudisium</th>\r\n <th class=ttl>Centang</th>\r\n </tr>"; while ($w = _fetch_array($r)) { $n++; $TglSKYudisium = FormatTanggal($w['TglSKYudisium']); echo "<tr><td class=inp>{$n}</td>\r\n <td class=ul>{$w['MhswID']}</td>\r\n <td class=ul>{$w['Nama']}</td>\r\n <td class=ul>{$w['TglUjian']}</td>\r\n <td class=ul>{$w['Judul']}</td>\r\n <td class=ul>{$w['SKYudisium']} </td>\r\n <td class=ul>{$TglSKYudisium}</td>\r\n <td class=ul><input type=checkbox name='SKY[]' value='{$w['TAID']}'></td>\r\n </tr>"; } echo "</table></form></p>"; }
function FrmEdt() { global $mnux, $pref, $_PMBMaxPilihan, $arrID; $md = $_REQUEST['md'] + 0; $PMBFormulirID = $_REQUEST['fid'] + 0; if ($md == 0) { $w = GetFields('pmbformulir', 'PMBFormulirID', $PMBFormulirID, '*'); $jdl = 'Edit Formulir PMB'; } else { $w = array(); $w['PMBFormulirID'] = 0; $w['Nama'] = ''; $w['KodeID'] = $arrID['Kode']; $w['Harga'] = 0; $w['JumlahPilihan'] = 1; $w['HanyaProdi1'] = ''; $w['KecualProdi1'] = ''; $w['HanyaProdi2'] = ''; $w['KecualProdi2'] = ''; $w['HanyaProdi3'] = ''; $w['KecualProdi3'] = ''; $w['NA'] = 'N'; $w['Keterangan'] = ''; $jdl = 'Tambah Formulir PMB'; } $na = $w['NA'] == 'Y' ? 'checked' : ''; $pil = GetNumberOption(1, $_PMBMaxPilihan, $w['JumlahPilihan']); $optKID = GetOption2('identitas', "concat(Kode, ' - ', Nama)", 'Kode', $w['KodeID'], '', 'Kode'); $snm = session_name(); $sid = session_id(); CheckFormScript("_KodeID,Nama,JumlahPilihan,Harga"); echo "<table class=box cellspacing=1 cellpadding=4>\r\n <form action='?' method=POST onSubmit=\"return CheckForm(this)\">\r\n <input type=hidden name='md' value='{$md}'>\r\n <input type=hidden name='mnux' value='{$mnux}'>\r\n <input type=hidden name='{$pref}' value='Hrg'>\r\n <input type=hidden name='sub' value='FrmSav'>\r\n <input type=hidden name='PMBFormulirID' value='{$w['PMBFormulirID']}'>\r\n \r\n <tr><th colspan=2 class=ttl>{$jdl}</th></tr>\r\n <tr><td class=inp1>Institusi</td><td class=ul><select name='_KodeID'>{$optKID}</select></td></tr>\r\n <tr><td class=inp1>Nama Formulir</td><td class=ul><input type=text name='Nama' value='{$w['Nama']}' size=40 maxlength=50></td></tr>\r\n <tr><td class=inp1>Jumlah Pilihan</td><td class=ul><select name='JumlahPilihan'>{$pil}</select></td></tr>\r\n <tr><td class=inp1>Harga Formulir</td><td class=ul><input type=text name='Harga' value='{$w['Harga']}' size=15 maxlength=15></td></tr>\r\n <tr><td class=inp1>Tidak aktif?</td><td class=ul><input type=checkbox name='NA' value='Y' {$na}></td></tr>\r\n <tr><td class=inp1>Keterangan</td><td class=ul><textarea name='Keterangan' cols=40 rows=4>{$w['Keterangan']}</textarea></td></tr>\r\n \r\n <tr><td class=ul colspan=2><b>Setup Pilihan 1</td></tr>\r\n <tr><td class=inp1>Hanya Prodi <font color=red>*)</td><td class=ul><input type=text name='HanyaProdi1' value='{$w['HanyaProdi1']}' size=50 maxlength=100></td></tr>\r\n <tr><td class=inp1>Kecuali Prodi <font color=red>**)</td><td class=ul><input type=text name='KecualiProdi1' value='{$w['KecualiProdi1']}' size=50 maxlength=100></td></tr>\r\n \r\n <tr><td class=ul colspan=2><b>Setup Pilihan 2</td></tr>\r\n <tr><td class=inp1>Hanya Prodi <font color=red>*)</td><td class=ul><input type=text name='HanyaProdi2' value='{$w['HanyaProdi2']}' size=50 maxlength=100></td></tr>\r\n <tr><td class=inp1>Kecuali Prodi <font color=red>**)</td><td class=ul><input type=text name='KecualiProdi2' value='{$w['KecualiProdi2']}' size=50 maxlength=100></td></tr>\r\n \r\n <tr><td class=ul colspan=2><b>Setup Pilihan 3</td></tr>\r\n <tr><td class=inp1>Hanya Prodi <font color=red>*)</td><td class=ul><input type=text name='HanyaProdi3' value='{$w['HanyaProdi3']}' size=50 maxlength=100></td></tr>\r\n <tr><td class=inp1>Kecuali Prodi <font color=red>**)</td><td class=ul><input type=text name='KecualiProdi3' value='{$w['KecualiProdi3']}' size=50 maxlength=100></td></tr>\r\n \r\n <tr><td colspan=2><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={$mnux}&{$pref}=Hrg&sub=&{$snm}={$sid}'\"></td></tr>\r\n \r\n </form></table><br>"; // Keterangan echo "<table class=box cellspacing=0 cellpadding=4>\r\n <tr><td class=ul><font color=red>*)</td><td class=ul>Jika formulir ini hanya berlaku untuk prodi ini.</td></tr>\r\n <tr><td class=ul><font color=red>**)</td><td class=ul>Jika formulir ini tidak berlaku untuk prodi ini.</td></tr>\r\n <tr><td colspan=2>Masing-masing Prodi diapit tanda titik (.)</td></tr>\r\n </table>"; }
function Edit($md, $id, $bck) { if ($md == 0) { $jdl = "Edit Formulir"; $w = GetFields('pmbformulir', "KodeID='" . KodeID . "' and PMBFormulirID", $id, "*"); } elseif ($md == 1) { $jdl = "Tambah Formulir"; $w = array(); $w['JumlahPilihan'] = 1; $w['USM'] = 'N'; $w['Wawancara'] = 'N'; $w['Prasyarat'] = 'N'; $w['NA'] = 'N'; } else { die(ErrorMsg('Error', "Mode edit tidak dikenali.")); } TampilkanJudul($jdl); // Parameters $optjml = GetNumberOption(1, 3, $w['JumlahPilihan']); $na = $w['NA'] == 'Y' ? 'checked' : ''; $usmchecked = $w['USM'] == 'Y' ? 'checked' : ''; $wawancarachecked = $w['Wawancara'] == 'Y' ? 'checked' : ''; $prasyaratchecked = $w['Prasyarat'] == 'Y' ? 'checked' : ''; $prasyaratvisibility = $w['Prasyarat'] == 'Y' ? 'visible' : 'hidden'; $Prasyarat = GetPrasyarat($w['PrasyaratExtra']); $webdefchecked = $w['WebDef'] == 'Y' ? 'checked' : ''; CheckFormScript('Nama,Harga'); //$TestMasuk = GetTestMasuk($w['USM']); echo "<p><table class=bsc cellspacing=1 align=center width=100%>\r\n <form action='../{$_SESSION['mnux']}.formulir.edit.php' method=POST onSubmit=\"return CheckForm(this)\">\r\n <input type=hidden name='gos' value='Simpan' />\r\n <input type=hidden name='md' value='{$md}' />\r\n <input type=hidden name='id' value='{$id}' />\r\n <input type=hidden name='bck' value='{$bck}' />\r\n \r\n <tr><td class=inp>Formulir:</td>\r\n <td class=ul1><input type=text name='Nama' value='{$w['Nama']}'\r\n size=30 maxlength=50 />\r\n </td></tr>\r\n <tr><td class=inp>Jumlah Pilihan:</td>\r\n <td class=ul1><select name='JumlahPilihan'>{$optjml}</select></td>\r\n </tr>\r\n <tr><td class=inp>Harga:</td>\r\n <td class=ul1><input type=text name='Harga' value='{$w['Harga']}' size=10 maxlength=15 /></td>\r\n </tr>\r\n <tr><td class=inp>Ada USM?</td>\r\n <td class=ul1><input type=checkbox name='USM' value='Y' {$usmchecked}></td>\r\n </tr>\r\n <tr><td class=inp>Ada Wawancara?</td>\r\n\t <td class=ul1><input type=checkbox name='Wawancara' value='Y' {$wawancarachecked}></td>\r\n\t </tr>\r\n <tr><td class=inp>Ada Prasyarat?</td>\r\n\t <td class=ul1>\r\n\t <div style='float:left'><input type=checkbox name='Prasyarat' value='Y' {$prasyaratchecked} onClick=\"toggleDiv('PrasyaratPlus');\"></div>\r\n\t <div id='PrasyaratPlus' style='float:left; padding-left:15px; padding-right:15px; background-color:#DDDDDD; visibility:{$prasyaratvisibility};'>\r\n\t\t{$Prasyarat}\r\n\t </div>\r\n\t </td>\r\n\t </tr>\r\n <tr><td class=inp>Keterangan:</td>\r\n <td class=ul1>\r\n <textarea name='Keterangan' cols=30 rows=3>{$w['Keterangan']}</textarea>\r\n </td></tr>\r\n <tr><td class=inp>NA (tidak aktif)?</td>\r\n <td class=ul1>\r\n <input type=checkbox name='NA' value='Y' {$na} /> *) Beri centang jika tidak aktif\r\n </td>\r\n </tr>\r\n \r\n <tr><td class=ul1 colspan=2 align=center>\r\n <input type=submit name='Simpan' value='Simpan' />\r\n <input type=button name='Batal' value='Batal'\r\n onClick=\"window.close()\" />\r\n </td>\r\n </tr>\r\n </form>\r\n </table></p>\r\n <script>\r\n\tfunction toggleDiv(name)\r\n\t{\tif(document.getElementById(name).style.visibility == 'hidden')\r\n\t\t\tdocument.getElementById(name).style.visibility = 'visible';\r\n\t\telse\r\n\t\t\tdocument.getElementById(name).style.visibility = 'hidden';\r\n\t}\r\n </script>"; }
function TampilkanHeaderProsesNomer() { $optprd = GetOption2('prodi', "concat(ProdiID, ' - ', Nama)", "ProdiID", $_SESSION['prodi'], '', "ProdiID"); $bulan1 = GetMonthOption($_SESSION['bulan1']); $bulan2 = GetMonthOption($_SESSION['bulan2']); $tahun1 = GetNumberOption(date('Y') - 10, date('Y'), $_SESSION['tahun1']); $tahun2 = GetNumberOption(date('Y') - 10, date('Y') + 1, $_SESSION['tahun2']); $TglYudisium = GetDateOption($_SESSION['TglYudisium']); echo "<p><table class=box cellspacing=1 cellpadding=4>\r\n <form action='?' method=POST>\r\n <tr><td class=ul colspan=2><font size=+1>Filter Mhsw</font> berdasarkan tanggal SK Yudisium</td></tr>\r\n <tr><td class=inp>Prodi :</td><td class=ul><select name='prodi'>{$optprd}</select> Kosongkan jika ingin melihat semua</td></tr>\r\n <tr><td class=inp>SK Yudisium bulan :</td><td class=ul>\r\n <select name='bulan1'>{$bulan1}</select><select name='tahun1'>{$tahun1}</select> s/d\r\n <select name='bulan2'>{$bulan2}</select><select name='tahun2'>{$tahun2}</select> <input type=submit name='Filter' value='Filter Daftar'></td></tr>\r\n </form>\r\n </table></p>"; }
function TampilkanHeaderHonorDosen($mnux = 'dosen.honor') { $TM = GetDateOption($_SESSION['TglMulai'], 'TglMulai'); $TS = GetDateOption($_SESSION['TglSelesai'], 'TglSelesai'); $optmgg = GetOption2('minggu', "concat(MingguID, ' - ', Nama)", 'MingguID', $_SESSION['PeriodeMinggu'], '', 'MingguID'); $optbln = GetMonthOption($_SESSION['PeriodeBulan']); $optthn = GetNumberOption(date('Y') - 1, date('Y') + 1, $_SESSION['PeriodeTahun']); $_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); $optprd = GetOption2('prodi', "concat(ProdiID, ' - ', Nama)", 'ProdiID', $_SESSION['prodi'], "ProdiID in ({$_prodi})", 'ProdiID'); echo "<p><table class=box cellspacing=1 cellpadding=4>\r\n <form action='?' method=GET>\r\n <input type=hidden name='mnux' value='{$mnux}'>\r\n <tr><td class=inp>Tahun Akademik</td>\r\n <td class=ul><input type=text name='tahun' value='{$_SESSION['tahun']}' size=10 maxlength=10>\r\n Prodi Jdwl: <select name='prodi' onChange='this.form.submit()'>{$optprd}</select></td>\r\n <td class=inp>Pilihan</td><td class=ul><input type=submit name='Tampilkan' value='Tampilkan'></td></tr>\r\n <tr><td class=inp>Dari Tgl</td><td class=ul>{$TM}</td>\r\n <td class=inp>Sampai Tgl</td><td class=ul>{$TS}</td></tr>\r\n <tr><td class=inp>Honor Periode</td><td class=ul>\r\n <select name='PeriodeMinggu' onChange='this.form.submit()'>{$optmgg}</select>\r\n <select name='PeriodeBulan' onChange='this.form.submit()'>{$optbln}</select>\r\n <select name='PeriodeTahun' onChange='this.form.submit()'>{$optthn}</select></td>\r\n <td class=inp>Proses</td><td class=ul>\r\n <input type=button name='ProsesHonor' value='Proses Honor Dosen' onClick=\"location='?mnux=dosen.honor&gos=HonDosPros'\">\r\n <input type=button name='CetakDaftar' value='Cetak Daftar' onClick=\"location='cetak/dosen.honor.daftar.php'\">\r\n <input type=button name='CetakPerBank' value='Cetak per Bank' onClick=\"location='cetak/dosen.honor.perbank.php'\">\r\n </td></tr>\r\n </form></table></p>"; }
function GetDateOptionReadOnly($dt, $nm = 'dt') { $ro = "readonly=true"; $arr = Explode('-', $dt); $_dy = GetNumberOption(1, 31, $arr[2]); $_mo = GetMonthOption($arr[1]); $_yr = GetNumberOption(1930, Date('Y') + 2, $arr[0]); return "<select name='" . $nm . "_d' {$ro}>{$_dy}</select>\r\n <select name='" . $nm . "_m' {$ro}>{$_mo}</select>\r\n <select name='" . $nm . "_y' {$ro}>{$_yr}</select>"; }
function GetDateOption2($dt, $nm = 'dt', $loc = '') { $arr = Explode('-', $dt); $_dy = GetNumberOption(1, 31, $arr[2]); $_mo = GetMonthOption($arr[1]); $_yr = GetNumberOption(1930, Date('Y') + 2, $arr[0]); return "<select name='" . $nm . "_d' onChange=\"{$loc}\">{$_dy}</select>\r\n <select name='" . $nm . "_m' onChange=\"{$loc}\">{$_mo}</select>\r\n <select name='" . $nm . "_y' onChange=\"{$loc}\">{$_yr}</select>"; }
function GetTimeOption($dt, $nm = 'tm') { $arr = Explode(':', $dt); $_hr = GetNumberOption(1, 24, $arr[0]); $_mn = GetNumberOption(0, 59, $arr[1]); return "<select name='" . $nm . "_h'>{$_hr}</select>\r\n <select name='" . $nm . "_n'>{$_mn}</select>"; }