function DftrSyarat() { global $arrID, $mnux, $pref; TampilkanPilihanInstitusi($mnux); // Tampilkan Daftar $s = "select *\r\n from pmbsyarat\r\n where KodeID='{$_SESSION['KodeID']}'\r\n order by PMBSyaratID"; $r = _query($s); echo "<p><a href='?mnux={$mnux}&{$pref}=Syarat&sub=SyaratEdt&md=1'>Tambah Syarat</a></p>\r\n <p><table class=box cellspacing=1 cellpadding=4>\r\n <tr><th class=ttl>ID</th>\r\n <th class=ttl>Nama</th>\r\n <th class=ttl>Status Mhsw</th>\r\n <th class=ttl>Program Studi</th>\r\n <th class=ttl>NA</th>\r\n </tr>"; while ($w = _fetch_array($r)) { $c = $w['NA'] == 'Y' ? 'class=nac' : 'class=ul'; echo "<tr>\r\n <td {$c}><a href='?mnux={$mnux}&{$pref}=Syarat&sub=SyaratEdt&syid={$w['PMBSyaratID']}&md=0'><img src='img/edit.png'>\r\n {$w['PMBSyaratID']}</a></td>\r\n <td {$c}>{$w['Nama']}</td>\r\n <td {$c}>{$w['StatusAwalID']}</td>\r\n <td {$c}>{$w['ProdiID']}</td>\r\n <td {$c} align=center><img src='img/book{$w['NA']}.gif'></td>\r\n </tr>"; } echo "</table></p>"; }
$DispensasiID = sqling($_REQUEST['dispid']); $Tanggal = "{$_REQUEST['Tanggal_y']}-{$_REQUEST['Tanggal_m']}-{$_REQUEST['Tanggal_d']}"; $SampaiTanggal = "{$_REQUEST['SampaiTanggal_y']}-{$_REQUEST['SampaiTanggal_m']}-{$_REQUEST['SampaiTanggal_d']}"; $Judul = sqling($_REQUEST['Judul']); $MhswID = $_REQUEST['MhswID']; $Keterangan = sqling($_REQUEST['Keterangan']); $NA = empty($_REQUEST['NA']) ? 'N' : $_REQUEST['NA']; if ($md == 0) { $s = "update dispensasi set Tanggal='{$Tanggal}', SampaiTanggal='{$SampaiTanggal}', Judul='{$Judul}',\r\n MhswID='{$MhswID}', Keterangan='{$Keterangan}', NA='{$NA}',\r\n LoginEdit='{$_SESSION['_Login']}', TanggalEdit=now()\r\n where DispensasiID='{$DispensasiID}' "; $r = _query($s); } else { $ada = GetFields('dispensasi', "DispensasiID", $DispensasiID, '*'); if (empty($ada)) { $s = "insert into dispensasi\r\n (DispensasiID, Tanggal, SampaiTanggal, Judul,\r\n MhswID, Keterangan, NA, LoginBuat, TanggalBuat)\r\n values ('{$DispensasiID}', '{$Tanggal}', '{$SampaiTanggal}', '{$Judul}',\r\n '{$MhswID}', '{$Keterangan}', '{$NA}', '{$_SESSION['_Login']}', now())"; $r = _query($s); } else { echo ErrorMsg("Nomer Dispensasi <b>{$DispensasiID}</b> telah dipakai.<br />\r\n Gunakan nomer lain."); } } DispDispensasi(); } // *** Parameters *** $crdispid = GetSetVar('crdispid'); $gos = empty($_REQUEST['gos']) ? "DispDispensasi" : $_REQUEST['gos']; // *** Main *** TampilkanJudul("Dispensasi"); TampilkanPilihanInstitusi('dispensasi'); if (!empty($_SESSION['KodeID'])) { TampilkanCariDispensasi(); $gos(); }
// *** Functions *** function bipot() { include "bipot.nama.php"; $sub = empty($_REQUEST['sub']) ? 'DftrBipotNama' : $_REQUEST['sub']; $sub(); } function bipotmhsw() { include "bipot.master.php"; $sub = empty($_REQUEST['sub']) ? 'DftrBipotMaster' : $_REQUEST['sub']; $sub(); } function bipotdef() { } // *** Konst *** $arrBipot = array("Master Biaya & Potongan->bipot", "Biaya & Potongan Mahasiswa->bipotmhsw"); // "Default Biaya & Potongan->bipotdef"); // *** Parameters *** $prodi = GetSetVar('prodi'); $prid = GetSetVar('prid'); $bipotid = GetSetVar('bipotid'); $tok = empty($_REQUEST['tok']) ? "bipot" : $_REQUEST['tok']; // *** Main *** TampilkanJudul("Master Biaya dan Potongan Mahasiswa"); TampilkanPilihanInstitusi($mnux); if (!empty($tok) && !empty($_SESSION['KodeID'])) { TampilkanSubMenu('bipot', $arrBipot, 'tok', $tok); $tok(); }