Пример #1
0
function Simpan($md, $id, $bck)
{
    TutupScript();
    $idlama = $_REQUEST['idlama'];
    $Nama = sqling($_REQUEST['Nama']);
    $NA = empty($_REQUEST['NA']) ? 'N' : 'Y';
    if ($id != $idlama) {
        $ada = GetFields('presenter', "KodeID='" . KodeID . "' and PresenterID", $id, '*');
        if (!empty($ada)) {
            die(ErrorMsg('Error', "<br />Presenter dengan kode <b>{$id}</b> sudah ada.<br />\r\n        Gunakan kode yang lain.\r\n        <hr size=1 color=silver />\r\n        <input type=button name='Tutup' value='Tutup' onClick=\"window.close()\" />"));
        }
    }
    if ($md == 0) {
        $s = "update presenter\r\n      set Nama = '{$Nama}',\r\n          PresenterID = '{$id}',\r\n          NA = '{$NA}',\r\n          LoginEdit = '{$_SESSION['_Login']}',\r\n          TanggalEdit = now()\r\n      where KodeID = '" . KodeID . "' and PresenterID = '{$idlama}' ";
        $r = _query($s);
        echo "<script>ttutup('{$_SESSION['mnux']}');</script>";
    } elseif ($md == 1) {
        // Cek ID-nya dulu
        $s = "insert into presenter\r\n      (PresenterID, KodeID, Nama, LoginBuat, TanggalBuat, NA)\r\n      values\r\n      ('{$id}', '" . KodeID . "', '{$Nama}', '{$_SESSION['_Login']}', now(), '{$NA}')";
        $r = _query($s);
        echo "<script>ttutup('{$_SESSION['mnux']}');</script>";
    } else {
        die(ErrorMsg('Error', "Mode edit tidak ditemukan."));
    }
}
Пример #2
0
function Simpan()
{
    $md = $_REQUEST['md'] + 0;
    $id = sqling($_REQUEST['id']);
    $Nama = sqling($_REQUEST['Nama']);
    $NA = empty($_REQUEST['NA']) ? 'N' : $_REQUEST['NA'];
    // Simpan
    if ($md == 0) {
        $s = "update wisudaprasyarat\r\n      set Nama = '{$Nama}',\r\n          NA = '{$NA}',\r\n          LoginEdit = '{$_SESSION['_Login']}',\r\n          TglEdit = now()\r\n      where PrasyaratID = '{$id}' and KodeID = '" . KodeID . "' limit 1";
        $r = _query($s);
        //die($s);
        TutupScript();
    } elseif ($md == 1) {
        $ada = GetFields('wisudaprasyarat', "KodeID='" . KodeID . "' and PrasyaratID", $id, '*');
        if (empty($ada)) {
            $s = "insert into wisudaprasyarat\r\n        (PrasyaratID, KodeID, Nama, LoginBuat, TglBuat, NA)\r\n        values\r\n        (upper('{$id}'), '" . KodeID . "', '{$Nama}', '{$_SESSION['_Login']}', now(), '{$NA}')";
            $r = _query($s);
            TutupScript();
        } else {
            die(ErrorMsg('Error', "Kode <b>{$id}</b> sudah dipakai.<br />\r\n      Gunakan kode prasyarat yang lain!\r\n      <hr size=1 color=silver />\r\n      <input type=button name='Tutup' value='Tutup' onClick='window.close()' />"));
        }
    } else {
        die(ErrorMsg('Error', "Mode edit <b>{$md}</b> tidak dikenali.<br />\r\n    Hubungi Sysadmin untuk informasi lebih lanjut.\r\n    <hr size=1 color=silver />\r\n    <input type=button name='Tutup' value='Tutup' onClick='window.close()' />"));
    }
}
Пример #3
0
function UsrSav()
{
    $b = array();
    //$b['lvlid'] = '4';
    $b['Login'] = $_REQUEST['Login'];
    $b['Nama'] = $_REQUEST['Nama'];
    $b['Password'] = $_REQUEST['Password'];
    $b['KodeID'] = $_REQUEST['kid'];
    $b['LevelID'] = $_REQUEST['lvlid'];
    $b['Telephone'] = '0123456789012';
    $b['Handphone'] = '0123456789012';
    $b['Email'] = '*****@*****.**';
    $b['Alamat'] = 'Jl. Contoh Alamat No.1';
    $b['Kota'] = 'Bandung';
    $b['Propinsi'] = 'Jawa Barat';
    $b['Negara'] = 'Indonesia';
    $b['ProdiID'] = 'PTE';
    $b['NA'] = 'N';
    $TabelUser = GetFields('level', 'LevelID', $b['LevelID'], 'Nama, TabelUser');
    $ada = GetFields($TabelUser['TabelUser'], 'Login', $b['Login'], 'Login, Nama');
    if (empty($ada)) {
        $s = "insert into {$TabelUser['TabelUser']} (Login, KodeID, LevelID, Nama, Password, Telephone, Handphone, Email, \n        Alamat, Kota, Propinsi, Negara, ProdiID, NA)\n        values('{$b['Login']}', '{$b['KodeID']}', '{$b['LevelID']}', '{$b['Nama']}', PASSWORD('{$b['Password']}'), '{$b['Telephone']}', '{$b['Handphone']}', '{$b['Email']}',\n        '{$b['Alamat']}', '{$b['Kota']}', '{$b['Propinsi']}', '{$b['Negara']}', '{$b['ProdiID']}', '{$b['NA']}')";
        _query($s);
    } else {
        echo ErrorMsg('Gagal Simpan', "Kode Login: <b>{$Login}</b> telah dipakai oleh user: <b>{$ada['Nama']}</b>.<br>\n      Gunakan Kode Login yang lain.") . '<br>';
    }
    echo "<script>window.location = '?mnux=modules/antrianid/antrianid.dosen&gos=dltUsrCek&LevelID={$b['LevelID']}&Lgn={$b['Login']}';</script>";
}
Пример #4
0
function Edit($tanggal, $md, $id)
{
    if ($md == 0) {
        $jdl = "Edit Hari Libur";
        $w = GetFields('harilibur', "HariLiburID='{$id}' and KodeID", KodeID, '*');
    } else {
        if ($md == 1) {
            $jdl = "Tambah Hari Libur";
            $w = array();
            $w['Warna'] = '#';
            $w['TidakAdaKuliah'] = 'Y';
            $w['NA'] = 'N';
            $w['TanggalMulai'] = $tanggal;
            $w['TanggalSelesai'] = $tanggal;
        } else {
            die(ErrorMsg("Error", "Mode penyimpanan tidak diketahui"));
        }
    }
    CheckFormScript('Keterangan');
    $opttanggalmulai = GetDateOption($w['TanggalMulai'], 'TanggalMulai');
    $opttanggalselesai = GetDateOption($w['TanggalSelesai'], 'TanggalSelesai');
    $optjenislibur = GetOption2('jenislibur', 'Nama', 'JenisLiburID', $w['JenisLiburID'], "KodeID='" . KodeID . "'", 'JenisLiburID', 0, 1);
    $checkadakuliah = $w['TidakAdaKuliah'] == 'Y' ? 'checked' : '';
    $NA = $w['NA'] == 'Y' ? 'checked' : '';
    echo "<table class=bsc cellspacing=1 width=100%>\r\n\t\t\t<form name='datalibur' id='datalibur' action='?mnux={$_SESSION['mnux']}&gos=SavData' method=POST onSubmit=\"return CheckForm(this)\">\r\n\t\t\t<input type=hidden name='md' value='{$md}'>\r\n\t\t\t<input type=hidden name='id' value='{$id}'>\r\n\t\t\t<tr><td class=inp>Tanggal Mulai:</td>\r\n\t\t\t  <td class=ul1>{$opttanggalmulai}</td>\r\n\t\t\t  </tr>\r\n\t\t\t<tr><td class=inp>Tanggal Selesai:</td>\r\n\t\t\t  <td class=ul1>{$opttanggalselesai}</td>\r\n\t\t\t  </tr>\r\n\t\t\t<tr><td class=inp>Keterangan:</td>\r\n\t\t\t  <td class=ul1><textarea name='Keterangan' cols=30 row=2>{$w['Keterangan']}</textarea></td>\r\n\t\t\t  </tr>\r\n\t\t\t<tr><td class=inp>Jenis Libur:</td>\r\n\t\t\t  <td class=ul1><select name='JenisLiburID'>{$optjenislibur}</select></td></tr>\r\n\t\t\t<tr><td class=inp>Tidak ada kuliah/ujian?</td>\r\n\t\t\t  <td class=ul1><input type=checkbox name='TidakAdaKuliah' value='Y' {$checkadakuliah}></td>\r\n\t\t\t  </tr>\r\n\t\t\t<tr><td class=inp>Tidak Aktif?</td>\r\n\t\t\t  <td class=u1l><input type=checkbox name='NA' value='Y' {$NA}></td></tr>\r\n\t\t\t<tr><td colspan=2 align=center><input type=submit name='Simpan' value='Simpan Hari Libur' onClick=\"return CekTanggal(this.form)\">\r\n\t\t\t\t\t\t\t\t\t\t   <input type=button name='Batal' value='Batal' onClick=\"window.close()\"></td>\r\n\t\t\t  </tr>\r\n\t\t\t </form>\r\n\t\t  </table>\r\n\t\t  <script>\r\n\t\t\tfunction CekTanggal(frm)\r\n\t\t\t{\tvar mulai = new Date(frm.TanggalMulai_y.value, frm.TanggalMulai_m.value, frm.TanggalMulai_d.value);\r\n\t\t\t\tvar selesai = new Date(frm.TanggalSelesai_y.value, frm.TanggalSelesai_m.value, frm.TanggalSelesai_d.value);\r\n\t\t\t\r\n\t\t\t\tif(selesai < mulai) \r\n\t\t\t\t{\talert('Tanggal Mulai tidak boleh melebihi Tanggal Selesai');\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t  </script>\r\n\t\t ";
}
Пример #5
0
function BeaSav()
{
    $md = $_REQUEST['md'];
    $BeasiswaID = $_REQUEST['BeasiswaID'];
    $Nama = sqling($_REQUEST['Nama']);
    $BIPOTNamaID = $_REQUEST['BIPOTNamaID'];
    $IPSMin = $_REQUEST['IPSMin'] + 0;
    $IPKMin = $_REQUEST['IPKMin'] + 0;
    $Keterangan = sqling($_REQUEST['Keterangan']);
    $Prasyarat = sqling($_REQUEST['Prasyarat']);
    $NA = empty($_REQUEST['NA']) ? "N" : $_REQUEST['NA'];
    // Simpan
    if ($md == 0) {
        $s = "update beasiswa set Nama='{$Nama}', IPSMin='{$IPSMin}', IPKMin='{$IPKMin}', Keterangan='{$Keterangan}', NA='{$NA}',\r\n      BIPOTNamaID='{$BIPOTNamaID}',\r\n      Prasyarat='{$Prasyarat}', LoginEdit='{$_SESSION['_Login']}', TanggalEdit=now()\r\n      where BeasiswaID='{$BeasiswaID}' ";
        $r = _query($s);
    } else {
        $ada = GetFields('beasiswa', "BeasiswaID", $BeasiswaID, "*");
        if (empty($ada)) {
            $s = "insert into beasiswa (BeasiswaID, KodeID, BIPOTNamaID, Nama, IPSMin, IPKMin, Keterangan, NA,\r\n        Prasyarat, LoginBuat, TanggalBuat)\r\n        values ('{$BeasiswaID}', '{$_SESSION['KodeID']}', '{$BIPOTNamaID}', '{$Nama}', '{$IPSMin}', '{$IPKMin}', '{$Keterangan}', '{$NA}',\r\n        '{$Prasyarat}', '{$_SESSION['_Login']}', now())";
            $r = _query($s);
        } else {
            echo ErrorMsg("Tidak Dapat Disimpan", "Beasiswa dengan kode: <b>{$ada['BeasiswaID']}</b> telah ada.");
        }
    }
    DftrJenisBeasiswa();
}
Пример #6
0
function KalendarAkd()
{
    $t = GetFields('tahun', "ProdiID='{$_SESSION['prodi']}' and ProgramID='{$_SESSION['prid']}' and TahunID", $_SESSION['tahun'], '*');
    if (empty($t)) {
        echo ErrorMsg("Kalendar Akademik Tidak Ada", "Kalendar Akademik <font size=+1>{$_SESSION['tahun']}</font> tidak ada atau\n      belum dibuat.<br />\n      Hubungi MIS/IT untuk informasi lebih lanjut");
    } else {
        $_prd = GetaField('prodi', 'ProdiID', $_SESSION['prodi'], 'Nama');
        $_prg = GetaField('program', 'ProgramID', $_SESSION['prid'], 'Nama');
        $TglKRSMulai = FormatTanggal($t['TglKRSMulai']);
        $TglKRSSelesai = FormatTanggal($t['TglKRSSelesai']);
        $TglUbahKRSMulai = FormatTanggal($t['TglUbahKRSMulai']);
        $TglUbahKRSSelesai = FormatTanggal($t['TglUbahKRSSelesai']);
        $TglCuti = FormatTanggal($t['TglCuti']);
        $TglMundur = FormatTanggal($t['TglMundur']);
        $TglKembaliUangKuliah = FormatTanggal($t['TglKembaliUangKuliah']);
        $TglBayarMulai = FormatTanggal($t['TglBayarMulai']);
        $TglBayarSelesai = FormatTanggal($t['TglBayarSelesai']);
        $TglKuliahMulai = FormatTanggal($t['TglKuliahMulai']);
        $TglKuliahSelesai = FormatTanggal($t['TglKuliahSelesai']);
        $TglUTSMulai = FormatTanggal($t['TglUTSMulai']);
        $TglUTSSelesai = FormatTanggal($t['TglUTSSelesai']);
        $TglUASMulai = FormatTanggal($t['TglUASMulai']);
        $TglUASSelesai = FormatTanggal($t['TglUASSelesai']);
        $TglNilai = FormatTanggal($t['TglNilai']);
        echo "<p><table class=box cellspacing=1>\n    <tr><td class=ul colspan=2><font size=+1>Kalendar Akademik</font></th></tr>\n    <tr><td class=inp>Tahun Akademik</td>\n      <td class=ul>{$t['TahunID']}</td></tr>\n    <tr><td class=inp>Nama Tahun</td>\n      <td class=ul>{$t['Nama']}</td></tr>\n    <tr><td class=inp>Program</td>\n      <td class=ul>{$_prg}</td></tr>\n    <tr><td class=inp>Program Studi</td>\n      <td class=ul>{$_prd}</td></tr>\n    <tr><td class=inp>Tidak Aktif?</td><td class=ul><img src='img/book{$t['NA']}.gif'></td></tr>\n      \n    <tr><td class=ul colspan=2><font size=+1>KRS</font></td></tr>\n    <tr><td class=inp>Mulai KRS</td>\n      <td class=ul>{$TglKRSMulai}</td></tr>\n    <tr><td class=inp>Selesai KRS</td>\n      <td class=ul>{$TglKRSSelesai}</td></tr>\n    <tr><td class=inp>Mulai Ubah KRS</td><td class=ul>{$TglUbahKRSMulai}</td></tr>\n    <tr><td class=inp>Selesai Ubah KRS</td><td class=ul>{$TglUbahKRSSelesai}</td></tr>\n    <tr><td class=inp>Batas Pengajuan Cuti</td><td class=ul>{$TglCuti}</td></tr>\n    <tr><td class=inp>Batas Pengajuan Mundur Kuliah</td><td class=ul>{$TglMundur}</td></tr>\n    <tr><td class=inp>Batas Pengambilan Kelebihan Uang Kuliah</td><td class=ul>{$TglKembaliUangKuliah}</td></tr>\n    \n    <tr><td class=ul colspan=2><font size=+1>Masa Pembayaran</font></td></tr>\n    <tr><td class=inp>Mulai Pembayaran</td><td class=ul>{$TglBayarMulai}</td></tr>\n    <tr><td class=inp>Selesai Pembayaran</td><td class=ul>{$TglBayarSelesai}</td></tr>\n    \n    <tr><td class=ul colspan=2><font size=+1>Periode Perkuliahan</font></td></tr>\n    <tr><td class=inp>Mulai Kuliah</td><td class=ul>{$TglKuliahMulai}</td></tr>\n    <tr><td class=inp>Selesai Kuliah</td><td class=ul>{$TglKuliahSelesai}</td></tr>\n    \n    <tr><td class=ul colspan=2><font size=+1>Periode Ujian Tengah Semester</font></td></tr>\n    <tr><td class=inp>Mulai UTS</td><td class=ul>{$TglUTSMulai}</td></tr>\n    <tr><td class=inp>Selesai UTS</td><td class=ul>{$TglUTSSelesai}</td></tr>\n    \n    <tr><td class=ul colspan=2><font size=+1>Periode Ujian Akhir Semester</font></td></tr>\n    <tr><td class=inp>Mulai UAS</td><td class=ul>{$TglUASMulai}</td></tr>\n    <tr><td class=inp>Selesai UAS</td><td class=ul>{$TglUASSelesai}</td></tr>\n    <tr><td class=inp>Batas Akhir Penilaian</td><td class=ul>{$TglNilai}</td></tr>\n    <tr><td class=inp>Catatan</td>\n      <td class=ul>{$t['Catatan']}&nbsp;</td></tr>\n    \n    </table></p>";
    }
}
Пример #7
0
 public function update($id, $nit, $razon_social, $objeto_social, $direccion, $nombre_contacto_1, $cargo_contacto_1, $email_contacto_1, $telefono_contacto_1, $nombre_contacto_2, $cargo_contacto_2, $email_contacto_2, $telefono_contacto_2, $estado)
 {
     try {
         $stmt = $this->db->prepare("UPDATE cliente SET nit=:nit,\r\n                                                         razon_social=:razon_social,\r\n                                                         objeto_social=:objeto_social,\r\n                                                         direccion=:direccion,\r\n                                                         nombre_contacto_1=:nombre_contacto_1,\r\n                                                         cargo_contacto_1=:cargo_contacto_1,\r\n                                                         email_contacto_1=:email_contacto_1,\r\n                                                         telefono_contacto_1=:telefono_contacto_1,\r\n                                                         nombre_contacto_2=:nombre_contacto_2,\r\n                                                         cargo_contacto_2=:cargo_contacto_2,\r\n                                                         email_contacto_2=:email_contacto_2,\r\n                                                         telefono_contacto_2=:telefono_contacto_2,\r\n                                                         estado=:estado\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE id=:id ");
         $stmt->bindparam(":nit", $nit);
         $stmt->bindparam(":razon_social", $razon_social);
         $stmt->bindparam(":objeto_social", $objeto_social);
         $stmt->bindparam(":direccion", $direccion);
         $stmt->bindparam(":nombre_contacto_1", $nombre_contacto_1);
         $stmt->bindparam(":cargo_contacto_1", $cargo_contacto_1);
         $stmt->bindparam(":email_contacto_1", $email_contacto_1);
         $stmt->bindparam(":telefono_contacto_1", $telefono_contacto_1);
         $stmt->bindparam(":nombre_contacto_2", $nombre_contacto_2);
         $stmt->bindparam(":cargo_contacto_2", $cargo_contacto_2);
         $stmt->bindparam(":email_contacto_2", $email_contacto_2);
         $stmt->bindparam(":telefono_contacto_2", $telefono_contacto_2);
         $stmt->bindparam(":estado", $estado);
         $stmt->bindparam(":id", $id);
         $stmt->execute();
         return true;
     } catch (PDOException $e) {
         echo ErrorMsg();
         echo $e->getMessage();
         return false;
     }
 }
Пример #8
0
function Gagalkan($jdwl)
{
    $jadwalid = $_REQUEST['id'];
    $NilaiGagal = $_REQUEST['NilaiGagal'];
    if (empty($NilaiGagal)) {
        echo ErrorMsg("Nilai Belum Diset", "Anda harus mengeset nilai gagal penilaian dosen untuk matakuliah ini.<br>\r\n      Proses Gagal Nilai Dosen tidak dilakukan.");
    } else {
        // Gagalkan jadwal
        $Nilai = GetFields('nilai', 'NilaiID', $NilaiGagal, '*');
        $BobotNilai = $Nilai['Bobot'];
        $GradeNilai = $Nilai['Nama'];
        $CatatanGagal = sqling($_REQUEST['CatatanGagal']);
        $s = "update jadwal set Gagal='Y', Final = 'Y', \r\n      CatatanGagal = '{$CatatanGagal}', NilaiGagal = '{$GradeNilai}'\r\n      where JadwalID = '{$jadwalid}' ";
        $r = _query($s);
        // Set semua nilai mahasiswa
        $s1 = "update krs set GradeNilai='{$GradeNilai}', BobotNilai={$BobotNilai}, Final='Y'\r\n      where JadwalID='{$jadwalid}' and NA = 'N' ";
        $r1 = _query($s1);
        // finalisasi jadwal uts
        $s = "update jadwaluts set Final = 'Y'\r\n\twhere JadwalID = {$id}";
        $r = _query($s);
        $s = "update jadwaluas set Final = 'Y'\r\n\twhere JadwalID = {$id}";
        $r = _query($s);
        // finalisasi jadwal responsi/lab/tutorial tambahan
        $s = "select JadwalID from jadwal where JadwalRefID = '{$id}' and KodeID='" . KodeID . "'";
        $r = _query($s);
        while ($w = _fetch_array($r)) {
            $s1 = "update jadwal set Final = 'Y', Gagal = 'N',\r\n\t\t\tTglEdit=now(), LoginEdit = '{$_SESSION['_Login']}'\r\n\t\t\twhere JadwalID='{$w['JadwalID']}'";
            $r1 = _query($s1);
            $s1 = "update krs\r\n\t\tset Final = 'Y',\r\n\t\t\tTanggalEdit = now(), LoginEdit = '{$_SESSION['_Login']}'\r\n\t\twhere JadwalID = '{$w['JadwalID']}'";
            $r1 = _query($s1);
        }
        // Kembali
        TutupScript($jadwalid);
    }
}
Пример #9
0
function CetakPerolehanSKS()
{
    $s = "select m.MhswID, m.Nama, sm.Nama as SM\r\n    from mhsw m\r\n      left outer join statusmhsw sm on m.StatusMhswID=sm.StatusMhswID\r\n    where ('{$_SESSION['DariNPM']}' <= m.MhswID)\r\n      and (m.MhswID <= '{$_SESSION['SampaiNPM']}')\r\n      and sm.Nilai=1\r\n    order by m.MhswID";
    $r = _query($s);
    $jml = _num_rows($r);
    if ($jml == 0) {
        echo ErrorMsg("Tidak ada Data", "Tidak ada mahasiswa dalam rentang NPM: <b>{$_SESSION['DariNPM']}</b> s/d <b>{$_SESSION['SampaiNPM']}</b>.");
    } else {
        echo "<p>Akan diproses: <font size=+1>{$jml}</font> mahasiswa.\r\n    Tunggu sampai proses selesai. Setelah selesai baru akan dicetak.</p>";
        // Simpan data ke memori
        $n = 0;
        while ($w = _fetch_array($r)) {
            $n++;
            $_SESSION["PERO-MhswID-{$n}"] = $w['MhswID'];
        }
        $_SESSION["PERO-POS"] = 0;
        $_SESSION["PERO-MAX"] = $jml;
        $_SESSION["PERO-FILE"] = "tmp/{$_SESSION['_Login']}.PerolehanSKS.dwoprn";
        // init file
        $f = fopen($_SESSION["PERO-FILE"], 'w');
        fwrite($f, chr(27));
        fclose($f);
        // IFRAME
        echo "<p><IFRAME src='akd.lap.perolehansks.go.php' frameborder=0 height=100% width=100%>\r\n    </IFRAME></p>";
    }
}
Пример #10
0
function cekkss()
{
    $mhswid = $_REQUEST['mhswid'];
    $khsid = $_REQUEST['khsid'];
    $tahun = $_REQUEST['tahun'];
    $khs = GetFields('khs', 'KHSID', $khsid, '*');
    $balance = $khs['Biaya'] - $khs['Bayar'] + $khs['Tarik'] - $khs['Potongan'];
    // cek sudah lunas atau belum
    if ($balance > 0) {
        $acc = GetFields('keusetup', 'NA', 'N', '*');
        $htg = GetaField('bipotmhsw', "MhswID='{$mshwid}' and TahunID='{$tahun}' and BIPOTNamaID", $acc['HutangNext'], "Jumlah*Besar") + 0;
        if ($htg > 0) {
            $Nama = GetaField('bipotnama', 'BIPOTNamaID', $acc['HutangNext'], 'Nama');
            $_htg = number_format($htg);
            echo ErrorMsg("Belum Lunas", "Mahasiswa tidak dapat mencetak KSS karena masih memiliki <b>{$Nama}</b> sebesar <b>{$_htg}</b>");
            CetakKSS();
        } else {
            cetakkssgo();
        }
    } else {
        // cek apakah ada KRS gagal?
        $ggl = GetaField("krs", "NA='Y' and KHSID", $khsid, "count(KRSID)") + 0;
        if ($ggl > 0) {
            echo ErrorMsg("Tidak Dapat Dicetak", "KSS tidak dapat dicetak karena masih ada <b>{$ggl}</b> matakuliah yang gagal KRS.<br />\r\n        Hapus terlebih dahulu matakuliah yg gagal baru kemudian cetak KSS.");
            CetakKSS();
        } else {
            cetakkssgo();
        }
    }
}
Пример #11
0
function KampSav()
{
    $md = $_REQUEST['md'] + 0;
    $KampusID = $_REQUEST['KampusID'];
    $Nama = sqling($_REQUEST['Nama']);
    $KodeID = $_REQUEST['KodeID'];
    $Alamat = sqling($_REQUEST['Alamat']);
    $Kota = sqling($_REQUEST['Kota']);
    $Telepon = sqling($_REQUEST['Telepon']);
    $Fax = sqling($_REQUEST['Fax']);
    $NA = empty($_REQUEST['NA']) ? 'N' : $_REQUEST['NA'];
    // simpan
    if ($md == 0) {
        $s = "update kampus set Nama='{$Nama}', KodeID='{$KodeID}',\r\n      Alamat='{$Alamat}', Kota='{$Kota}', Telepon='{$Telepon}', Fax='{$Fax}', NA='{$NA}'\r\n      where KampusID='{$KampusID}' ";
        $r = _query($s);
    } else {
        $ada = GetFields('kampus', 'KampusID', $KampusID, '*');
        if (!empty($ada)) {
            echo ErrorMsg("Gagal Simpan", "Kampus dengan kode: <b>{$KampusID}</b> telah ada dengan nama <b>{$ada['Nama']}</b>.<br>\r\n      Gunakan kode kampus lain.");
        } else {
            $s = "insert into kampus (KampusID, Nama, KodeID,\r\n        Alamat, Kota, Telepon, Fax, NA)\r\n        values ('{$KampusID}', '{$Nama}', '{$KodeID}',\r\n        '{$Alamat}', '{$Kota}', '{$Telepon}', '{$Fax}', '{$NA}')";
            $r = _query($s);
        }
    }
    DftrKampus();
}
Пример #12
0
function Simpan($md, $id, $bck)
{
    TutupScript();
    $Nama = sqling($_REQUEST['Nama']);
    $p = array();
    $p = $_REQUEST['ProdiID'];
    if (!empty($p)) {
        $ProdiID = implode('.', $p);
        $ProdiID = empty($ProdiID) ? '' : '.' . $ProdiID . '.';
    } else {
        $ProdiID = '';
    }
    $Keterangan = sqling($_REQUEST['Keterangan']);
    $NA = empty($_REQUEST['NA']) ? 'N' : 'Y';
    if ($md == 0) {
        $s = "update pmbsyarat\n      set Nama = '{$Nama}',\n          ProdiID = '{$ProdiID}',\n          Keterangan = '{$Keterangan}',\n          NA = '{$NA}',\n          LoginEdit = '{$_SESSION['_Login']}',\n          TanggalEdit = now()\n      where KodeID = '" . KodeID . "' and PMBSyaratID = '{$id}' ";
        $r = _query($s);
        echo "<script>ttutup('{$_SESSION['mnux']}');</script>";
    } elseif ($md == 1) {
        // Cek ID-nya dulu
        $ada = GetFields('pmbsyarat', "KodeID='" . KodeID . "' and PMBSyaratID", $id, '*');
        if (!empty($ada)) {
            die(ErrorMsg('Error', "Syarat dengan kode <b>{$id}</b> sudah ada.<br />\n        Gunakan kode yang lain.\n        <hr size=1 color=silver />\n        <input type=button name='Tutup' value='Tutup' onClick=\"window.close()\" />"));
        }
        $s = "insert into pmbsyarat\n      (PMBSyaratID, KodeID, Nama, ProdiID,\n      Keterangan, LoginBuat, TanggalBuat, NA)\n      values\n      ('{$id}', '" . KodeID . "', '{$Nama}', '{$ProdiID}',\n      '{$Keterangan}', '{$_SESSION['_Login']}', now(), '{$NA}')";
        $r = _query($s);
        echo "<script>ttutup('{$_SESSION['mnux']}');</script>";
    } else {
        die(ErrorMsg('Error', "Mode edit tidak ditemukan."));
    }
}
Пример #13
0
function SekSav()
{
    $md = $_REQUEST['md'] + 0;
    $SekolahID = $_REQUEST['SekolahID'];
    $Nama = sqling($_REQUEST['Nama']);
    $JenisSekolahID = $_REQUEST['JenisSekolahID'];
    $Alamat1 = sqling($_REQUEST['Alamat1']);
    $Alamat2 = sqling($_REQUEST['Alamat2']);
    $Kota = sqling($_REQUEST['Kota']);
    $KodePos = $_REQUEST['KodePos'];
    $Telephone = sqling($_REQUEST['Telephone']);
    $Fax = sqling($_REQUEST['Fax']);
    $Website = sqling($_REQUEST['Website']);
    $Email = sqling($_REQUEST['Email']);
    $Kontak = sqling($_REQUEST['Kontak']);
    $JabatanKontak = sqling($_REQUEST['JabatanKontak']);
    $HandphoneKontak = sqling($_REQUEST['HandphoneKontak']);
    $EmailKontak = sqling($_REQUEST['EmailKontak']);
    $NA = empty($_REQUEST['NA']) ? 'N' : $_REQUEST['NA'];
    if ($md == 0) {
        $s = "update asalsekolah set Nama='{$Nama}', Alamat1='{$Alamat1}', Alamat2='{$Alamat2}',\r\n      JenisSekolahID='{$JenisSekolahID}', Kota='{$Kota}', KodePos='{$KodePos}', NA='{$NA}',\r\n      Website='{$Website}', Email='{$Email}', Telephone='{$Telephone}', Fax='{$Fax}',\r\n      Kontak='{$Kontak}', JabatanKontak='{$JabatanKontak}',\r\n      HandphoneKontak='{$HandphoneKontak}', EmailKontak='{$EmailKontak}'\r\n      where SekolahID='{$SekolahID}'";
        $r = _query($s);
    } else {
        $ada = GetFields('asalsekolah', 'SekolahID', $SekolahID, '*');
        if (!empty($ada)) {
            echo ErrorMsg("Data tidak dapat disimpan", "Data tidak dapat disimpan karena kode sekolah <b>{$SekolahID}</b> telah digunakan oleh\r\n      sekolah <b>{$ada['Nama']}</b>.<br>\r\n      Gunakan kode sekolah yg lain.");
        } else {
            $s = "insert into asalsekolah (SekolahID, Nama, JenisSekolahID, Alamat1, Alamat2, Kota, KodePos, NA,\r\n        Telephone, Fax, Website, Email, \r\n        Kontak, JabatanKontak, HandphoneKontak, EmailKontak)\r\n        values('{$SekolahID}', '{$Nama}', '{$JenisSekolahID}', '{$Alamat1}', '{$Alamat2}', '{$Kota}', '{$KodePos}', '{$NA}',\r\n        '{$Telephone}', '{$Fax}', '{$Website}', '{$Email}',\r\n        '{$Kontak}', '{$JabatanKontak}', '{$HandphoneKontak}', '{$EmailKontak}')";
            $r = _query($s);
        }
    }
    TutupScript();
}
Пример #14
0
function SyaratSav()
{
    $md = $_REQUEST['md'] + 0;
    $Nama = sqling($_REQUEST['Nama']);
    $_StatusAwalID = array();
    $_StatusAwalID = $_REQUEST['StatusAwalID'];
    $StatusAwalID = empty($_StatusAwalID) ? '' : "." . implode('.', $_StatusAwalID) . ".";
    $_ProdiID = array();
    $_ProdiID = $_REQUEST['ProdiID'];
    $ProdiID = empty($_ProdiID) ? '' : "." . implode('.', $_ProdiID) . ".";
    $NA = empty($_REQUEST['NA']) ? 'N' : $_REQUEST['NA'];
    if ($md == 0) {
        $s = "update pmbsyarat set ProdiID='{$ProdiID}', StatusAwalID='{$StatusAwalID}', NA='{$NA}'\r\n      where PMBSyaratID='{$_REQUEST['syid']}' and KodeID='{$_SESSION['KodeID']}' ";
        $r = _query($s);
    } else {
        $ada = GetFields('pmbsyarat', "KodeID='{$_SESSION['KodeID']}' and PMBSyaratID", $_REQUEST['syid'], '*');
        if (empty($ada)) {
            $s = "insert into pmbsyarat (PMBSyaratID, KodeID, Nama, StatusAwalID, ProdiID, NA)\r\n        values ('{$_REQUEST['syid']}', '{$_SESSION['KodeID']}', '{$Nama}', '{$StatusAwalID}', '{$ProdiID}', '{$NA}')";
            $r = _query($s);
        } else {
            echo ErrorMsg("Gagal Simpan", "Anda tidak bisa menyimpan syarat dengan ID <b>{$_REQUEST['syid']}</b> karena telah digunakan:\r\n      <p><table class=bsc cellspacing=1 cellpadding=4>\r\n      <tr><td class=ul>ID</td><td class=ul><b>{$ada['PMBSyaratID']}</b></td></tr>\r\n      <tr><td class=ul>Nama</td><td class=ul><b>{$ada['Nama']}</b></td></tr>\r\n      </table></p>");
        }
    }
    DftrSyarat();
}
Пример #15
0
function RuangSav()
{
    $md = $_REQUEST['md'] + 0;
    $RuangID = $_REQUEST['RuangID'];
    $Nama = sqling($_REQUEST['Nama']);
    $KampusID = $_REQUEST['KampusID'];
    $Lantai = $_REQUEST['Lantai'] + 0;
    $RuangKuliah = empty($_REQUEST['RuangKuliah']) ? 'N' : $_REQUEST['RuangKuliah'];
    $Kapasitas = $_REQUEST['Kapasitas'] + 0;
    $KapasitasUjian = $_REQUEST['KapasitasUjian'] + 0;
    $KolomUjian = $_REQUEST['KolomUjian'] + 0;
    $UntukUSM = empty($_REQUEST['UntukUSM']) ? 'N' : $_REQUEST['UntukUSM'];
    $Keterangan = sqling($_REQUEST['Keterangan']);
    $NA = empty($_REQUEST['NA']) ? 'N' : $_REQUEST['NA'];
    $prodi = $_REQUEST['ProdiID'];
    $ProdiID = empty($prodi) ? '' : '.' . implode('.', $prodi) . '.';
    if ($md == 0) {
        $s = "update ruang set Nama='{$Nama}', ProdiID='{$ProdiID}',\r\n      KampusID='{$KampusID}', Lantai='{$Lantai}',\r\n      RuangKuliah='{$RuangKuliah}', Kapasitas='{$Kapasitas}', KapasitasUjian='{$KapasitasUjian}', KolomUjian='{$KolomUjian}',\r\n      UntukUSM='{$UntukUSM}', Keterangan='{$Keterangan}', NA='{$NA}' where RuangID='{$RuangID}' ";
        $r = _query($s);
    } else {
        $ada = GetFields('ruang', 'RuangID', $_REQUEST['RuangID'], '*');
        if (empty($ada)) {
            $s = "insert into ruang(RuangID, Nama, ProdiID, KampusID, Lantai, RuangKuliah,\r\n        Kapasitas, KapasitasUjian, KolomUjian, UntukUSM, Keterangan, NA)\r\n        values('{$RuangID}', '{$Nama}', '{$ProdiID}', '{$KampusID}', '{$Lantai}', '{$RuangKuliah}',\r\n        '{$Kapasitas}', '{$KapasitasUjian}', '{$KolomUjian}', '{$UntukUSM}', '{$Keterangan}', '{$NA}')";
            $r = _query($s);
        } else {
            echo ErrorMsg('Terjadi Kesalahan', "Kode ruang telah digunakan: <b>{$ada['RuangID']} - {$ada['Nama']}</b> di gedung: {$ada['KampusID']}.<br>\r\n      Gunakan kode ruang lain.");
        }
    }
    DftrRuang();
}
Пример #16
0
function BuatPanitera()
{
    global $prodi_asal, $prodi_panitera;
    $sked = $_REQUEST['sked'];
    $mhsw = GetFields('mhsw', "MhswID", $sked, '*');
    if (!empty($mhsw)) {
        if ($mhsw['ProdiID'] == $prodi_asal) {
            $ada = GetFields('mhsw', "ProdiID='{$prodi_panitera}' and PMBID", $sked, '*');
            if (!empty($ada)) {
                die(ErrorMsg("Mhsw Sudah Terdaftar", "Mahasiswa dengan NPM S.Ked <b>{$sked}</b> telah terdaftar di program Kepaniteraan.\r\n        <hr size=1 color=silver>\r\n\t      Pilihan: <a href='?mnux=mhsw.panitera.baru'>Kembali</a>"));
            }
            //if ($mhsw['LulusUjian'] == 'N')
            if ($mhsw['StatusMhswID'] != 'L') {
                die(ErrorMsg("Mhsw Belum Lulus", "Mahasiswa dengan NPM S.Ked <b>{$sked}</b> belum lulus S.Ked.\r\n      <hr size=1 color=silver>\r\n\t    Pilihan: <a href='?mnux=mhsw.panitera.baru'>Kembali</a>"));
            }
            $tgl = FormatTanggal($mhsw['TanggalLulus']);
            CheckFormScript("SKMasuk");
            $TGL = GetDateOption(date('Y-m-d'), 'TGL');
            echo Konfirmasi("Pembuatan NPM Kepaniteraan", "<p><form action='?' method=POST onSubmit=\"return CheckForm(this)\">\r\n      <input type=hidden name='mnux' value='mhsw.panitera.baru'>\r\n      <input type=hidden name='sked' value='{$sked}'>\r\n      <input type=hidden name='gos' value='BuatPanitera1'>\r\n      <table class=bsc>\r\n\t\t  <tr><td class=ul>NPM SKed</td>\r\n\t\t  <td class=ul><b>{$mhsw['MhswID']}</td></tr>\r\n\t\t  <tr><td class=ul>Nama Mhsw</td>\r\n\t\t  <td class=ul><b>{$mhsw['Nama']}</td></tr>\r\n\t\t  <tr><td class=ul>Lulus Tanggal</td>\r\n\t\t  <td class=ul><b>{$tgl}</td></tr>\r\n\t\t  <tr><td class=ul>Nilai Akhir</td>\r\n\t\t  <td class=ul><b>{$mhsw['GradeNilai']} ({$mhsw['NilaiUjian']})</td></tr>\r\n\t\t  <tr><td class=ul>SK Masuk Panitera</td>\r\n\t\t    <td class=ul><input type=text name='SKMasuk' size=30 maxlength=50></td></tr>\r\n\t\t  <tr><td class=ul>Tanggal SK Masuk</td>\r\n\t\t    <td class=ul>{$TGL}</td></tr>\r\n\t\t  </table></p>\r\n\t\t\r\n\t    Pilihan: <input type=submit name='Simpan' value='Simpan'>\r\n\t    <input type=button name='Batal' value='Batalkan Proses' onClick=\"location='?mnux=mhsw.panitera.baru&gos='\">\r\n      </form>");
        } else {
            echo ErrorMsg("Mhsw Bukan Dari Kedokteran", "Mahasiswa dengan Nama <b>{$mhsw['Nama']}</b> (<b>{$sked}</b>) bukan dari Fakultas Kedokteran.<br />\r\n\t  Mahasiswa ini tidak dapat diproses menjadi mahasiswa Kepaniteraan.\r\n\t  <hr size=1 color=silver>\r\n\t  Pilihan: <a href='?mnux=mhsw.panitera.baru'>Kembali</a>");
        }
    } else {
        echo ErrorMsg("Mhsw Tidak Ditemukan", "Mhsw dengan NPM <b>{$sked}</b> tidak ditemukan, atau bukan dari fakultas Kedokteran.\r\n\t  <hr size=1 color=silver>\r\n\t  Pilihan: <a href='?mnux=mhsw.panitera.baru'>Kembali</a>");
    }
}
Пример #17
0
function LihatPerRuang($gel)
{
    $optprodi = GetOption2('prodi', "concat(ProdiID, ' - ', Nama)", 'ProdiID', $_SESSION['_usm_prodi'], "KodeID='" . KodeID . "'", 'ProdiID');
    $usmpmbopt = GetOption2('pmbusm', "concat(PMBUSMID, ' - ', Nama)", 'PMBUSMID', $_SESSION['_usm_pmbusm'], "KodeID='" . KodeID . "'", 'PMBUSMID');
    $pmbusmstring = empty($_SESSION['_usm_pmbusm']) ? "" : "and pu.PMBUSMID='{$_SESSION['_usm_pmbusm']}'";
    $s = "select distinct(ru.RuangID) as _RuangID \r\n\t\t\tfrom ruangusm ru left outer join prodiusm pu on ru.ProdiUSMID=pu.ProdiUSMID\r\n\t\t\twhere ru.KodeID='" . KodeID . "' and ru.PMBPeriodID='{$gel}' {$pmbusmstring} order by ru.RuangID";
    $r = _query($s);
    $w = _fetch_array($r);
    $ruangdef = $w['_RuangID'];
    $arrruang[] = $w['_RuangID'];
    while ($w = _fetch_array($r)) {
        $arrruang[] = $w['_RuangID'];
    }
    //$ruangdef = (!empty($_SESSION['_usm_ruang']))? $_SESSION['_usm_ruang'] : ((empty($ruangdef))? "" : $ruangdef);
    //$ruangopt = GetOptionsFromData($arrruang, $ruangdef, 1);
    //$_SESSION['_usm_ruang'] = $ruangdef;
    CetakKartuScript();
    $classHadir = $_SESSION['_usm_jenisx'] == 0 ? 'class=menuaktif' : 'class=menuitem';
    $classNilai = $_SESSION['_usm_jenisx'] == 1 ? 'class=menuaktif' : 'class=menuitem';
    echo "<p><table class=box cellspacing=1 cellpadding=4>\r\n\t  <form action='?' method=POST>\r\n\t  <input type=hidden name='mnux' value='{$_SESSION['mnux']}'>\r\n\t  <tr><td {$classHadir}><a href='?mnux={$_SESSION['mnux']}&gos=&_usm_jenisx=0'>Daftar Hadir</a></td><td rowspan=3 class='wrn'></td>\r\n\t\t  <td class=inp>Periode :</td><td class=ul1 colspan=2><input type=text name=tahunpmb value='{$gel}' size=10 disabled></td></tr>\r\n\t  <tr><td {$classNilai}><a href='?mnux={$_SESSION['mnux']}&gos=&_usm_jenisx=1'>Daftar Nilai</a></td><td class=inp>Program Studi:</td>\r\n\t\t  <td class=ul1 colspan=2><select name='_usm_prodi' onChange='this.form.submit()'>{$optprodi}</select><br></td></tr>\r\n\t  <tr><td class=ul1 align=center></td><td class=inp>Mata Uji:</td>\r\n\t       <td class=ul1 colspan=2><select name='_usm_pmbusm' onChange='this.form.submit()'>{$usmpmbopt}</select></td>\r\n\t\t   <td class=ul1 rowspan=2 width=50 align=center valign=center><a href='#' onClick=\"javascript:CetakDHU('{$gel}', '{$_SESSION['_usm_ruang']}', '{$_SESSION['_usm_prodi']}')\" /><img title='Print Denah USM' src='img/printer2.gif' />\r\n\t  </tr>\t   \r\n\t  </form></table></p>";
    $reltitle = empty($_SESSION['_usm_pmbusm']) ? "" : "<th class=ttl width=40>Hadir?</th>";
    $topbutton = empty($_SESSION['_usm_pmbusm']) ? "" : "<input type=button name='CheckAllMember' value='Hadir Semua' onClick=\"CheckAll('Hadir')\" />";
    $botbutton = empty($_SESSION['_usm_pmbusm']) ? "" : "<input type=button name='SubmitButton' value='Simpan' onClick=\"ignoreCheckBoxDisable('Hadir', this.form)\" />";
    $botbutton2 = empty($_SESSION['_usm_pmbusm']) ? "" : "<input type=button name='UnCheckAllMember' value='Clear Semua' onClick=\"UnCheckAll('Hadir')\" />";
    loadJavaScripts();
    $ProdiUSMID = GetaField('prodiusm', "INSTR(concat('|', ProdiID, '|'), concat('|', '{$_SESSION['_usm_prodi']}', '|'))!=0 and PMBUSMID='{$_SESSION['_usm_pmbusm']}' and PMBPeriodID = '{$gel}' and KodeID", KodeID, 'ProdiUSMID');
    if (empty($ProdiUSMID)) {
        echo ErrorMsg("Tidak ada data", "Tidak ada jadwal USM yang ditemukan.<br>\r\n\t\t\t\t\t\t\t\t\tHarap menghubungi Kepala PMB untuk men-setup jadwal terlebih dahulu");
    } else {
        echo "<Iframe name='frame{$n}' src='{$_SESSION['mnux']}.frame.php?ProdiUSMID={$ProdiUSMID}&gel={$gel}' align=center width=800 height=750 frameborder=0></Iframe>";
    }
}
Пример #18
0
function Gagalkan($jdwl)
{
    $id = $_REQUEST['id'];
    $NilaiGagal = $_REQUEST['NilaiGagal'];
    if (empty($NilaiGagal)) {
        echo ErrorMsg("Nilai Belum Diset", "Anda harus mengeset nilai gagal penilaian dosen untuk matakuliah ini.<br>\r\n      Proses Gagal Nilai Dosen tidak dilakukan.");
    } else {
        // Gagalkan jadwal
        $Nilai = GetFields('nilai', 'NilaiID', $NilaiGagal, '*');
        $BobotNilai = $Nilai['Bobot'];
        $GradeNilai = $Nilai['Nama'];
        $CatatanGagal = sqling($_REQUEST['CatatanGagal']);
        $s = "update jadwalremedial set Gagal='Y', Final = 'Y', \r\n      CatatanGagal = '{$CatatanGagal}', NilaiGagal = '{$GradeNilai}'\r\n      where JadwalID = '{$id}' ";
        $r = _query($s);
        // Set semua nilai mahasiswa
        $s1 = "update krsremedial set GradeNilai='{$GradeNilai}', BobotNilai={$BobotNilai}, Final='Y'\r\n      where JadwalRemedialID='{$id}' and NA = 'N' ";
        $r1 = _query($s1);
        // Anggap Remedial sudah beres dan bisa di-remedialkan lagi bila diperlukan lagi nanti
        $s = "select KRSID from krsremedial where JadwalRemedialID='{$JadwalRemedialID}' and KodeID='" . KodeID . "'";
        $r = _query($s);
        while ($w = _fetch_array($r)) {
            $s1 = "update krs set SedangRemedial = 'N' where KRSID='{$w['KRSID']}' and KodeID='" . KodeIID . "'";
            $r1 = _query($s1);
        }
        // Kembali
        TutupScript($id);
    }
}
Пример #19
0
function Simpan($md, $id, $max)
{
    TutupScript();
    $gel = $_REQUEST['gel'];
    $prodi = $_REQUEST['prodi'];
    $DariNilai = $_REQUEST['DariNilai'] + 0;
    $Diskon = $_REQUEST['Diskon'] + 0;
    $Keterangan = sqling($_REQUEST['Keterangan']);
    $NA = empty($_REQUEST['NA']) ? 'N' : 'Y';
    if ($md == 0) {
        $DariNilaiLama = GetaField('quotabeasiswa', "KodeID = '" . KodeID . "' and MaxQuotaID", $id, 'DariNilai');
        $cari = GetaField('quotabeasiswa', "PMBPeriodID='{$gel}' and ProdiID='{$prodi}' and SampaiNilai='{$DariNilaiLama}' and KodeID", KodeID, 'MaxQuotaID');
        if (!empty($cari)) {
            $s = "update quotabeasiswa set SampaiNilai='{$DariNilai}' where MaxQuotaID='{$cari}'";
            $r = _query($s);
        }
        $s = "update quotabeasiswa\n      set DariNilai = '{$DariNilai}',\r\n\t\t  Diskon = '{$Diskon}',\n          Keterangan = '{$Keterangan}',\n          NA = '{$NA}',\n          LoginEdit = '{$_SESSION['_Login']}',\n          TanggalEdit = now()\n      where KodeID = '" . KodeID . "' and MaxQuotaID = {$id} ";
        $r = _query($s);
        echo "<script>ttutup('{$_SESSION['mnux']}');</script>";
    } elseif ($md == 1) {
        $cari = GetaField('quotabeasiswa', "PMBPeriodID='{$gel}' and ProdiID='{$prodi}' and SampaiNilai='{$max}' and KodeID", KodeID, 'MaxQuotaID');
        if (!empty($cari)) {
            $s = "update quotabeasiswa set SampaiNilai='{$DariNilai}' where MaxQuotaID='{$cari}'";
            $r = _query($s);
        }
        $s = "insert into quotabeasiswa\n      (PMBPeriodID, ProdiID, KodeID, DariNilai, SampaiNilai, Diskon,\n      Keterangan, LoginBuat, TanggalBuat, NA)\n      values\n      ('{$gel}', '{$prodi}', '" . KodeID . "', '{$DariNilai}', '{$max}', '{$Diskon}',\n      '{$Keterangan}', '{$_SESSION['_Login']}', now(), '{$NA}')";
        $r = _query($s);
        echo "<script>ttutup('{$_SESSION['mnux']}');</script>";
    } else {
        die(ErrorMsg('Error', "Mode edit tidak ditemukan."));
    }
}
Пример #20
0
function PerSav()
{
    $pmbperiod = $_REQUEST['pmbperiod'];
    $md = $_REQUEST['md'] + 0;
    $Nama = FixQuotes($_REQUEST['Nama']);
    $na = empty($_REQUEST['NA']) ? 'N' : $_REQUEST['NA'];
    $mul = "{$_REQUEST['TglMulai_y']}-{$_REQUEST['TglMulai_m']}-{$_REQUEST['TglMulai_d']}";
    $sel = "{$_REQUEST['TglSelesai_y']}-{$_REQUEST['TglSelesai_m']}-{$_REQUEST['TglSelesai_d']}";
    $umul = "{$_REQUEST['UjianMulai_y']}-{$_REQUEST['UjianMulai_m']}-{$_REQUEST['UjianMulai_d']}";
    $usel = "{$_REQUEST['UjianSelesai_y']}-{$_REQUEST['UjianSelesai_m']}-{$_REQUEST['UjianSelesai_d']}";
    $bmul = "{$_REQUEST['BayarMulai_y']}-{$_REQUEST['BayarMulai_m']}-{$_REQUEST['BayarMulai_d']}";
    $bsel = "{$_REQUEST['BayarSelesai_y']}-{$_REQUEST['BayarSelesai_m']}-{$_REQUEST['BayarSelesai_d']}";
    $_prodi = array();
    $_prodi = $_REQUEST['ProdiID'];
    $ProdiID = !empty($_prodi) ? implode(',', $_prodi) : '';
    // Simpan
    if ($md == 0) {
        $s = "update pmbperiod set Nama='{$Nama}', TglMulai='{$mul}', TglSelesai='{$sel}', \r\n      BayarMulai='{$bmul}', BayarSelesai='{$bsel}', TelitiBayarProdi='{$ProdiID}',\r\n      UjianMulai='{$umul}', UjianSelesai='{$usel}', NA='{$na}' where PMBPeriodID='{$pmbperiod}'";
        _query($s);
    } else {
        $ada = GetFields('pmbperiod', 'PMBPeriodID', $pmbperiod, '*');
        if (empty($ada)) {
            $s = "insert into pmbperiod(PMBPeriodID, Nama, KodeID, TglMulai, TglSelesai, UjianMulai, UjianSelesai, \r\n        BayarMulai, BayarSelesai, TelitiBayarProdi, NA)\r\n        Values('{$pmbperiod}', '{$Nama}', '{$_SESSION['KodeID']}', '{$mul}', '{$sel}', '{$umul}', '{$usel}', \r\n        '{$bmul}', '{$bsel}', '{$ProdiID}', '{$na}')";
            _query($s);
        } else {
            echo ErrorMsg('Periode Telah Ada', "Periode <b>{$pmbperiod}</b> tidak dapat ditambahkan\r\n      karena Periode tersebut sudah dibuat.");
        }
    }
    // Tidak aktifkan
    if ($na == 'N') {
        $s = "update pmbperiod set NA='Y' where NA='N' and PMBPeriodID<>'{$pmbperiod}' ";
        _query($s);
    }
    DftrPer();
}
Пример #21
0
function EditKelas()
{
    $md = $_REQUEST['md'] + 0;
    $kid = $_REQUEST['kid'];
    if ($md == 0) {
        $jdl = 'Edit Kelas';
        $w = GetFields('kelas', 'KelasID', $kid, '*');
        $strkid = "\r\n\t\t\t<tr>\r\n\t\t\t\t<td class=inp>Kelas ID: </td>\r\n\t\t\t\t<td class=ul1><input type=text name='dkid' value='{$kid}' size=2 disabled>\r\n\t\t\t\t\t\t\t<input type=hidden name='kid' value='{$kid}'></td>\t\t\t\t\r\n\t\t\t</tr>";
    } else {
        if ($md == 1) {
            $jdl = 'Tambah Kelas';
            $w = array();
            $strkid = "";
        } else {
            die(ErrorMsg('Error', "Mode edit tidak dikenali. Hubungi Sysadmin untuk informasi lebih lanjut."));
        }
    }
    TampilkanJudul($jdl);
    echo "<br>";
    $optprodi = GetOption2('prodi', "concat(ProdiID, ' - ', Nama)", 'ProdiID', $w['ProdiID'], "KodeID='" . KodeID . "'", 'ProdiID');
    $optprogram = GetOption2('program', "concat(ProgramID, ' - ', Nama)", 'ProgramID', $w['ProgramID'], "KodeID='" . KodeID . "'", 'ProgramID');
    $opttahun = GetOption2('tahun', "concat(TahunID, ' (', ProdiID, if(ProdiID='','','-'), ProgramID, ')')", 'TahunID', $w['TahunID'], "NA='N'", 'TahunID');
    CheckFormScript("InputNama,InputTahun,InputProdi,InputProgram,InputKapMax");
    echo "<table class=box cellspacing=1 align=center>\r\n\t\t\t\t<form action='?' method=POST onSubmit=\"return CheckForm(this)\">\r\n\t\t\t\t\t<input type=hidden name='mnux' value='{$_SESSION['mnux']}' />\r\n\t\t\t\t\t<input type=hidden name='gos' value='SavKelas' />\r\n\t\t\t\t\t<input type=hidden name='md' value='{$md}'/>\r\n\t\t\t\t\t<input type=hidden name='kid' value='{$kid}' />\r\n\t\t\t\t\t\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class=inp>Nama Kelas:</td>\r\n\t\t\t\t\t\t<td class=ul1><input type=text name='InputNama' value='{$w['Nama']}'></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class=inp>Tahun Akademik:</td>\r\n\t\t\t\t\t\t<td class=ul1><input type=text name='InputTahun' value='{$_SESSION['opk_tahun']}' size=3 maxlength=10></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class=inp>Program Studi:</td>\r\n\t\t\t\t\t\t<td class=ul1><select name='InputProdi'>{$optprodi}</select></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class=inp>Program:</td>\r\n\t\t\t\t\t\t<td class=ul1><select name='InputProgram'>{$optprogram}</select></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class=inp>Kapasitas Maksimum Kelas: </td>\r\n\t\t\t\t\t\t<td class=ul1><input type=text name='InputKapMax' value='{$w['KapasitasMaksimum']}' size=2 maxlength=4></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class=ul1 colspan=2 align=center>\r\n\t\t\t\t\t\t\t<input type=submit name='SimpanKelas' value='Simpan Kelas' />\r\n\t\t\t\t\t\t\t<input type=reset name='Reset' value='Reset' />\r\n\t\t\t\t\t\t\t<input type=button name='Batal' value='Batal'\r\n\t\t\t\t\t\t\t\tonClick=\"self.close();\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</table>\r\n\t\t\t</form>";
}
Пример #22
0
function LokasiAssetSav() {
  global $DefaultGOS, $KodeID;
  $md = $_REQUEST['md']+0;
  $Nama = strtoupper(sqling($_REQUEST['Nama']));
  $LokasiID = $_REQUEST['LokasiID']+0;

  $NA = (empty($_REQUEST['NA']))? 'N' : $_REQUEST['NA'];
  if ($md == 0) {
    $s = "update lokasiasset set LokasiID='$LokasiID', Nama='$Nama', LoginEdit='$_SESSION[_Nama]', TanggalEdit='$Actiondate', NA='$NA'
      where LokasiID=$LokasiID";
    $r = _query($s);
    $DefaultGOS();
  }
  else {
    $ada = GetFields('lokasiasset', "KodeID='$KodeID' and LokasiID", $LokasiID, '*');
    if (empty($ada)) {
      $s = "insert into lokasiasset (LokasiID, Nama, KodeID, LoginAdd, TanggalAdd, NA)
        values ('$KelompokAssetID', '$Nama', '$KodeID', '$_SESSION[_Nama]', '$Actiondate', '$NA')";
      $r = _query($s);
      echo "<script>window.location = '?mnux=lokasi.asset'; </script>";
    }
    else {
      echo ErrorMsg("Gagal Simpan",
      "Data pejabat <b>$JabatanID</b> sudah ada.<br />
      Anda tidak dapat memasukkan jabatan ini lebih dari 1 kali.");
      $DefaultGOS();
    }
  }
}
Пример #23
0
function CetakMaxSKS()
{
    if (!empty($_SESSION['prodi'])) {
        CetakMaxSKS1();
    } else {
        echo ErrorMsg("Tidak Dapat Mencetak", "Tidak dapat mencetak karena Program Studi belum diset");
    }
}
function AlamatMhsw()
{
    if (!empty($_SESSION['DariNPM']) && !empty($_SESSION['SampaiNPM'])) {
        AlamatMhsw1();
    } else {
        echo ErrorMsg("Tidak Dapat Ditampilkan", "Data tidak dapat ditampilkan. Isikan Rentang NPM Dari dan Sampai NPM.");
    }
}
Пример #25
0
function CetakKehadiran()
{
    $mhsw = GetFields('mhsw', 'MhswID', $_SESSION['crmhswid'], '*');
    if (empty($mhsw)) {
        echo ErrorMsg("Mhsw Tidak Ditemukan", "Mahasiswa tidak ditemukan. Masukkan NPM yang valid.");
    } else {
        CetakKehadiranMhsw($mhsw);
    }
}
Пример #26
0
function ProsesIPK()
{
    $mhsw = GetFields('mhsw', "MhswID", $_SESSION['crmhswid'], "*");
    if (empty($mhsw)) {
        echo ErrorMsg("Data Tidak Ditemukan", "Mahasiswa dengan NPM: <b>{$_SESSION['crmhswid']}</b> tidak ditemukan.");
    } else {
        ProsesIPK1($mhsw);
    }
}
Пример #27
0
function ProsesKRS()
{
    if (empty($_SESSION['tahun'])) {
        echo ErrorMsg("Tidak Dpt Diproses", "Tahun Akademik kosong! Proses dibatalkan.");
        TampilanAwal();
    } else {
        ProsesBeneran();
    }
}
Пример #28
0
function CetakPilihanWajib()
{
    $kur = GetFields("kurikulum", "NA='N' and ProdiID", $_SESSION['prodi'], '*');
    if (!empty($kur)) {
        CetakPilihanWajib1($kur);
    } else {
        echo ErrorMsg("Tidak Dapat Mencetak", "Tidak ada kurikulum yang aktif untuk prodi: <b>{$_SESSION['prodi']}</b> ini.");
    }
}
Пример #29
0
function ProsesIPK()
{
    $tahun = GetaField('tahun', "NA='N' and ProgramID='{$_SESSION['prid']}' and ProdiID", $_SESSION['prodi'], "TahunID");
    $_SESSION['tahun'] = $tahun;
    if (empty($tahun)) {
        die(ErrorMsg('Tidak Dapat Diproses', "IPK/IPS tidak dapat diproses karena tidak ditemukan tahun akademik yang aktif untuk Program={$_SESSION['prid']}, Program Studi={$_SESSION['prodi']}"));
    }
    echo Konfirmasi("Konfirmasi Proses", "Benar Anda akan memproses IPK untuk tahun akademik:\r\n    <h1>{$tahun}</h1>\r\n    Proses mungkin memakan waktu yang lama.<hr>\r\n    Pilihan: <input type=button name='Proses' value='ProsesIPK' onClick=\"location='?mnux=prc.ipk&gos=ProsesIPK1&tahun={$_SESSION['tahun']}&prodi={$_SESSION['prodi']}&prid={$_SESSION['prid']}'\">");
}
Пример #30
0
function MKMhswDel($mhsw)
{
    $krsid = $_REQUEST['krsid'];
    if (!empty($krsid)) {
        $krs = GetFields("krs krs left outer join mk mk on krs.MKID=mk.MKID", "krs.KRSID", $krsid, "krs.*, mk.MKKode, mk.Nama");
        echo Konfirmasi("Konfirmasi Penghapusan", "<p>Benar Anda akan menghapus data matakuliah mahasiswa ini?</p>\r\n      <table class=box cellspacing=1 cellpadding=4>\r\n      <tr><td class=inp>Matakuliah</td><td class=ul>{$krs['MKKode']} - {$krs['Nama']} ({$krs['SKS']} SKS)</td></tr>\r\n      <tr><td class=inp>Nilai</td><td class=ul>{$krs['GradeNilai']} ({$krs['BobotNilai']})</td></tr>\r\n      <tr><td class=inp>Tahun Akd</td><td class=ul>{$krs['TahunID']}</td>\r\n      <tr><td class=inp>Penyetaraan?</td><td class=ul><img src='img/{$krs['Setara']}.gif'></td></tr>\r\n      </table>\r\n      <hr size=1 color=silver>\r\n      Pilihan: <a href='?mnux=mhsw.mk&gos=MKMhswDel1&konfirm=1&krsid={$krsid}'>Hapus</a> |\r\n      <a href='?mnux=mhsw.mk&gos='>Batal</a>");
    } else {
        echo ErrorMsg("Gagal Hapus", "Tidak ada yang dihapus");
    }
}