function GetBipot2($pmb, $bipotid, &$total)
{
    global $_lf;
    $s0 = "select b2.*, bn.Nama, bn.DefJumlah, bn.DefBesar, bn.Diskon\r\n    from bipot2 b2\r\n    left outer join bipotnama bn on b2.BIPOTNamaID=bn.BIPOTNamaID\r\n    where b2.BIPOTID='{$bipotid}' and b2.SaatID=1\r\n      and INSTR(b2.StatusAwalID, '.{$pmb['StatusAwalID']}.')>0\r\n    order by b2.Prioritas";
    $r0 = _query($s0);
    $thn = substr($w['PMBID'], 0, 4);
    $a = '';
    $n = 0;
    $total = 0;
    while ($w0 = _fetch_array($r0)) {
        if ($w0['Jumlah'] == 0) {
        } elseif ($w0['GunakanGradeNilai'] == 'Y') {
            if (strpos($w0['GradeNilai'], ".{$pmb['GradeNilai']}.") === false) {
            } else {
                $n++;
                $a .= InsertBIPOT($n, $w0, $tot, $bipotid, $pmb);
                $total += $tot;
            }
        } else {
            $n++;
            $a .= InsertBIPOT($n, $w0, $tot, $bipotid, $pmb);
            $total += $tot;
        }
    }
    $strtotal = str_pad(' ', 57, ' ') . str_pad('-', 15, '-') . $_lf;
    $strtotal .= str_pad('Total :', 57, ' ', STR_PAD_LEFT) . str_pad(number_format($total), 15, ' ', STR_PAD_LEFT);
    return $a . $strtotal;
}
function Finalisasi($jdwl)
{
    $id = $_REQUEST['id'];
    // finalisasi jadwal
    $s = "update jadwal \n    set Final = 'Y', Gagal = 'N',\n        TglEdit = now(), LoginEdit = '{$_SESSION['_Login']}'\n    where JadwalID = {$id}";
    $r = _query($s);
    // finalisasi krs
    $s = "update krs\n    set Final = 'Y',\n        TanggalEdit = now(), LoginEdit = '{$_SESSION['_Login']}'\n    where JadwalID = {$id}";
    $r = _query($s);
    // finalisasi jadwal uts
    $s = "update jadwaluts set Final = 'Y'\n\twhere JadwalID = {$id}";
    $r = _query($s);
    $s = "update jadwaluas set Final = 'Y'\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',\n\t\t\tTglEdit=now(), LoginEdit = '{$_SESSION['_Login']}'\n\t\t\twhere JadwalID='{$w['JadwalID']}'";
        $r1 = _query($s1);
        $s1 = "update krs\n    set Final = 'Y',\n        TanggalEdit = now(), LoginEdit = '{$_SESSION['_Login']}'\n    where JadwalID = '{$w['JadwalID']}'";
        $r1 = _query($s1);
    }
    // Kembali
    TutupScript($id);
}
function TampilkanDaftarProgramStudi()
{
    global $Cari;
    $Max = 50;
    $arrcr = explode(',', $Cari);
    $arrwhr = array();
    if (!empty($arrcr[0])) {
        $arrwhr[] = "(Nama like '%" . TRIM($arrcr[0]) . "%') ";
    }
    $whr = implode(' and ', $arrwhr);
    // Hitung jumlah baris
    $Jml = GetaField('perguruantinggi', "{$whr} and NA", 'N', "count(PerguruanTinggiID)");
    if ($Jml > $Max) {
        $_Jml = number_format($Jml);
        echo "<p><b>Catatan:</b> Jumlah program studi yang Anda cari mencapai: <b>{$_Jml}</b>, tetapi sistem membatasi\r\n      jumlah program studi yang ditampilkan dan hanya menampilkan: <b>{$Max}</b>.\r\n      Gunakan Nama program studi dengan lebih spesifik untuk membatasi\r\n      jumlah program studi yang ditampilkan.</p>\r\n\r\n      <p><b>Format Pencarian:</b> NamaProgramStudi</p>";
    }
    // Tampilkan
    $s = "select ProdiDiktiID, Nama\r\n    from prodidikti\r\n    where {$whr} and NA='N'\r\n    order by Nama limit {$Max}";
    $r = _query($s);
    $n = 0;
    echo "<p><table class=box cellspacing=1 cellpadding=4 width=100%>\r\n    <tr><th class=ttl>#</th>\r\n    <th class=ttl>Kode Prodi</th>\r\n    <th class=ttl>Nama</th>\r\n    </tr>";
    while ($w = _fetch_array($r)) {
        $n++;
        echo "<tr><td class=ul>{$n}</td>\r\n    <td class=ul><a href='javascript:kembalikan(\"{$w['ProdiDiktiID']}\", \"{$w['Nama']}\")'>{$w['ProdiDiktiID']}</a></td>\r\n    <td class=ul>{$w['Nama']}&nbsp;</td>\r\n    </tr>";
    }
    echo "</table></p>";
}
function RekapPA($ProdiID, $p)
{
    // Buat headernya
    $t = 6;
    $p->SetFont('Helvetica', 'B', 10);
    $p->Cell(20, $t, 'Nmr', 1, 0);
    $p->Cell(40, $t, 'Kode Dosen', 1, 0);
    $p->Cell(100, $t, 'Nama Dosen', 1, 0);
    $p->Cell(20, $t, 'Mhsw', 1, 1, 'R');
    // Datanya
    $s = "select count(MhswID) as JML,\r\n      m.PenasehatAkademik,\r\n      d.Nama as NamaDosen, d.Gelar\r\n    from mhsw m\r\n      left outer join dosen d on d.Login = m.PenasehatAkademik and d.KodeID = '" . KodeID . "'\r\n    where m.KodeID = '" . KodeID . "'\r\n      and m.ProdiID = '{$ProdiID}'\r\n      and m.Keluar = 'N'\r\n    group by m.PenasehatAkademik";
    $r = _query($s);
    $n = 0;
    $t = 5;
    $p->SetFont('Helvetica', '', 9);
    while ($w = _fetch_array($r)) {
        $n++;
        $NamaDosen = empty($w['NamaDosen']) ? 'Belum diset' : $w['NamaDosen'] . ', ' . $w['Gelar'];
        $p->Cell(20, $t, $n, 'LB', 0);
        $p->Cell(40, $t, $w['PenasehatAkademik'], 'B', 0);
        $p->Cell(100, $t, $NamaDosen, 'B', 0);
        $p->Cell(20, $t, $w['JML'], 'BR', 0, 'R');
        $p->Ln($t);
    }
}
function ProsesCopyKRS1()
{
    $_JadwalID1 = $_REQUEST['_JadwalID1'];
    $_JadwalID2 = $_REQUEST['_JadwalID2'];
    $jdwl2 = GetFields('jadwal', 'JadwalID', $_JadwalID2, '*');
    $s = "select *\r\n    from krs\r\n    where JadwalID='{$_JadwalID1}'\r\n    order by MhswID";
    $r = _query($s);
    $n = 0;
    echo "<ol>";
    while ($w = _fetch_array($r)) {
        $ada = GetaField("krs", "MhswID='{$w['MhswID']}' and JadwalID", $_JadwalID2, 'KRSID');
        // Jika belum terdaftar, maka daftarkan
        if (empty($ada)) {
            $n++;
            $str = "insert into krs\r\n        (KHSID, MhswID, TahunID, JadwalID,\r\n        MKID, MKKode, SKS, HargaStandar, Harga,\r\n        Catatan, LoginBuat, TanggalBuat)\r\n        values ({$w['KHSID']}, '{$w['MhswID']}', '{$w['TahunID']}', {$_JadwalID2},\r\n        '{$jdwl2['MKID']}', '{$jdwl2['MKKode']}', '{$jdwl2['SKS']}', \r\n        '{$jdwl2['HargaStandar']}', '{$jdwl2['Harga']}',\r\n        'COPY DARI JadwalID: {$_JadwalID1}', 'DEWO', now()\r\n        )";
            $rstr = _query($str);
        } else {
            $str = "<font color=RED>Sudah</font>";
        }
        echo "<li>{$w['MhswID']} &raquo; {$str}</li>";
    }
    // Hitung Jumlah Mhsw di Jadwal2
    $jml = GetaField("krs", "JadwalID", $_JadwalID2, "count(*)") + 0;
    $sx = "update jadwal set JumlahMhsw={$jml} where JadwalID={$_JadwalID2}";
    $rx = _query($sx);
    echo "Telah tercopy <font size=+2>{$n}</font> KRS</td></tr>";
}
function DetailBIPOT()
{
    global $_lf;
    $bipotid = $_REQUEST['bipotid'];
    $bpt = GetFields('bipot', 'BIPOTID', $bipotid, '*');
    $prg = GetaField('program', 'ProgramID', $bpt['ProgramID'], 'Nama');
    $prd = GetaField('prodi', 'ProdiID', $bpt['ProdiID'], 'Nama');
    $nmf = HOME_FOLDER . DS . "tmp/{$_SESSION['_Login']}.bipot.dwoprn";
    $f = fopen($nmf, 'w');
    $mxc = 114;
    $grs = str_pad('-', $mxc, '-') . $_lf;
    $hdr = str_pad("Daftar Biaya & Potongan {$bpt['TahunID']}", $mxc, ' ', STR_PAD_BOTH) . $_lf . str_pad($bpt['Nama'], $mxc, ' ', STR_PAD_BOTH) . $_lf . str_pad("Program: {$prg}, Prodi: {$prd}", $mxc, ' ', STR_PAD_BOTH) . $_lf . $grs . "No. Prio " . str_pad("Nama", 30) . str_pad("Jumlah", 12, ' ', STR_PAD_LEFT) . ' ' . str_pad("Penarikan", 12) . str_pad("Oto?", 5) . ' ' . str_pad("St.Awal", 12) . ' ' . str_pad("St.Mhsw", 12) . ' ' . str_pad("Grade", 5) . ' ' . $_lf . $grs;
    $s = "select b2.*, bn.Nama, format(b2.Jumlah, 0) as JML,\r\n      t.Nama as NMTRX, s.Nama as SAAT\r\n      from bipot2 b2\r\n      left outer join bipotnama bn on b2.BIPOTNamaID=bn.BIPOTNamaID\r\n      left outer join saat s on b2.SaatID=s.SaatID\r\n      left outer join trx t on b2.TrxID=t.TrxID\r\n      where b2.BIPOTID='{$bipotid}' and KodeID='{$_SESSION['KodeID']}'\r\n      order by b2.TrxID, b2.Prioritas, b2.GradeNilai";
    $r = _query($s);
    $n = 0;
    fwrite($f, $hdr);
    while ($w = _fetch_array($r)) {
        $n++;
        $jml = number_format($w['Jumlah']);
        $sa = TRIM($w['StatusAwalID'], '.');
        $sa = str_replace('.', ',', $sa);
        $sm = TRIM($w['StatusMhswID'], '.');
        $sm = str_replace('.', ',', $sm);
        fwrite($f, str_pad($n, 4) . str_pad($w['Prioritas'], 5) . str_pad($w['Nama'], 30) . str_pad($jml, 12, ' ', STR_PAD_LEFT) . ' ' . str_pad($w['SAAT'], 12) . str_pad($w['Otomatis'], 5, ' ', STR_PAD_BOTH) . ' ' . str_pad($sa, 12) . ' ' . str_pad($sm, 12) . ' ' . str_pad($w['GradeNilai'], 5, ' ', STR_PAD_BOTH) . $_lf);
    }
    fwrite($f, $grs);
    fclose($f);
    TampilkanFileDWOPRN($nmf);
}
function VirtualBipotMhsw($MhswID, $BIPOTID)
{
    // Ambil BIPOT-nya
    $s = "select * \n    from bipot2 \n    where BIPOTID = '{$BIPOTID}'\n      and Otomatis = 'Y'\n      and NA = 'N'\n    order by TrxID, Prioritas";
    $r = _query($s);
    $total = 0;
    $mhsw = GetFields('mhsw', "KodeID='" . KodeID . "' and MhswID", $MhswID, "BIPOTID, GradeNilai, StatusMhswID, StatusAwalID");
    while ($w = _fetch_array($r)) {
        $oke = true;
        // Apakah sesuai dengan status awalnya?
        $pos = strpos($w['StatusAwalID'], "." . $mhsw['StatusAwalID'] . ".");
        $oke = $oke && !($pos === false);
        // Apakah grade-nya?
        if ($oke) {
            if ($w['GunakanGradeNilai'] == 'Y') {
                $pos = strpos($w['GradeNilai'], "." . $mhsw['GradeNilai'] . ".");
                $oke = $oke && !($pos === false);
            }
        }
        // Simpan data
        if ($oke) {
            // Cek apakah memakai script atau tidak?
            if ($w['GunakanScript'] == 'Y') {
                // BipotGunakanScript($pmb, '', $w, $ada, 0);
            } else {
                // Jika tidak ada duplikasi, maka akan di-insert. Tapi jika sudah ada, maka dicuekin aja.
                $total += $w['Jumlah'];
            }
            // end else
        }
        // end if $oke
    }
    // end while
    return $total;
}
function BuatRekapBeasiswa($tahun, $prodi)
{
    echo "<p align=center><font size=+1>Rekap Pemohon Beasiswa {$tahun}</font></p>";
    // Data
    $s = "select b.Nama, sum(bm.Besar) as BSR, sum(bm.Disetujui) as S7, count(bm.BeasiswaMhswID) as JML\r\n    from beasiswamhsw bm\r\n      left outer join beasiswa b on bm.BeasiswaID=b.BeasiswaID\r\n    where bm.TahunID='{$tahun}' and bm.NA='N'\r\n    group by bm.BeasiswaID";
    $r = _query($s);
    $n = 0;
    $_bsr = 0;
    $_s7 = 0;
    $_jml = 0;
    echo "<p><table class=box cellspacing=1 cellpadding=4>\r\n    <tr><th class=ttl>#</th>\r\n    <th class=ttl>Jenis Beasiswa</th>\r\n    <th class=ttl>Jml Pemohon</th>\r\n    <th class=ttl>Permohonan</th>\r\n    <th class=ttl>Disetujui</th>\r\n    </tr>";
    while ($w = _fetch_array($r)) {
        $n++;
        $BSR = number_format($w['BSR']);
        $S7 = number_format($w['S7']);
        $_bsr += $w['BSR'];
        $_s7 += $w['S7'];
        $JML = number_format($w['JML']);
        $_jml += $w['JML'];
        echo "<tr><td class=inp>{$n}</td>\r\n      <td class=ul>{$w['Nama']}</td>\r\n      <td class=ul align=right>{$JML}</td>\r\n      <td class=ul align=right>{$BSR}</td>\r\n      <td class=ul align=right>{$S7}</td>\r\n      </tr>";
    }
    $bsr = number_format($_bsr);
    $s7 = number_format($_s7);
    $jml = number_format($_jml);
    echo "<tr><td class=ul colspan=2 align=right>Jumlah :</td>\r\n  <td class=ul align=right><b>{$jml}</b></td>\r\n  <td class=ul align=right><b>{$bsr}</b></td>\r\n  <td class=ul align=right><b>{$s7}</b></td></tr>\r\n  </table></p>";
}
function CekDataKRS($MhswID, $ProdiID, $KHSID)
{
    $s = "select krs.KRSID, j.HariID, krs.MKID\r\n    from krs\r\n      left outer join jadwal j on krs.JadwalID=j.JadwalID\r\n    where krs.KHSID='{$KHSID}'\r\n    order by j.HariID, krs.MKID";
    $r = _query($s);
    $sebel = '';
    while ($w = _fetch_array($r)) {
        $strpsn = '';
        $skrg = "{$w['HariID']}-{$w['MKID']}";
        if ($sebel == $skrg) {
            $strpsn = "<font size=+2 color=maroon>Dihapus</font>";
            $_SESSION["CEK-KRS-DIHAPUS"]++;
            $sx = "delete from krs where KRSID='{$w['KRSID']}' ";
            $rx = _query($sx);
        }
        echo "<li>{$w['MKID']} {$skrg} {$strpsn}</li>";
        $sebel = $skrg;
    }
    // Hitung KRS
    $jml = GetFields("krs left outer join jadwal j on krs.JadwalID=j.JadwalID", "krs.StatusKRSID='A' and j.JenisJadwalID='K' and krs.KHSID", $KHSID, "sum(krs.SKS) as TotalSKS, count(*) as JumlahMK");
    $TotalSKS = $jml['TotalSKS'] + 0;
    $JumlahMK = $jml['JumlahMK'] + 0;
    $sr = "update khs set TotalSKS={$TotalSKS}, JumlahMK={$JumlahMK} where KHSID='{$KHSID}' ";
    $rr = _query($sr);
    echo "<p>Summary &raquo; Total SKS: <b>{$TotalSKS}</b>, Jumlah MK: <b>{$JumlahMK}</b></p>";
}
function TampilkanIsinya($page, $limit, $gel, $gels, $tahun, $nexttahun, $p)
{
    $pagelimit = $page * $limit;
    $s = "select DISTINCT(a.AplikanID), m.MhswID, a.Nama, k.Nama as NamaKelas, \r\n\t  if(aa.Nama like '_%', aa.Nama, \r\n\t\t\tif(pt.Nama like '_%', pt.Nama, b.AsalSekolah)) as NamaSekolah,\r\n\t  b.TahunLulus, pp.Urutan, a.SumberInformasi, a.PresenterID,\r\n\t  a.StatusMundur as Mundur\r\n\t  from \r\n\t\tstatusaplikanmhsw sam left outer join aplikan a on sam.AplikanID=a.AplikanID\r\n\t\t\t\t left outer join pmb b on a.PMBID=b.PMBID \r\n\t\t\t\t left outer join asalsekolah aa on b.AsalSekolah=aa.SekolahID\r\n\t\t\t\t left outer join perguruantinggi pt on b.AsalSekolah=pt.PerguruanTinggiID\r\n\t\t\t\t left outer join mhsw m on b.PMBID=m.PMBID\r\n\t\t\t\t left outer join kelas k on k.KelasID=m.KelasID\r\n\t\t\t\t left outer join pmbperiod pp on a.PMBPeriodID=pp.PMBPeriodID\r\n\t  where b.KodeID = '" . KodeID . "'\r\n\t\t\tand sam.StatusAplikanID='REG'\r\n\t\t\tand pp.Tahun='{$tahun}'\r\n\t  order by a.PresenterID, m.MhswID\r\n\t  limit {$pagelimit}, {$limit}";
    $r = _query($s);
    $n = 0;
    $t = 3;
    TampilkanHeader($p);
    while ($w = _fetch_array($r)) {
        $n++;
        $p->SetFont('Helvetica', '', 6);
        $p->Cell(7, $t, $n, 'LB', 0, 'C');
        $p->Cell(20, $t, $w['MhswID'], 1, 0, 'C');
        $p->SetFillColor(255, 255, 255);
        if ($w['Mundur'] == 'N') {
            $p->SetFillColor(255, 0, 0);
        }
        $p->Cell(50, $t, $w['Nama'], 1, 0, 'L', true);
        $p->Cell(20, $t, $w['NamaKelas'], 1, 0, 'C');
        $p->Cell(70, $t, $w['NamaSekolah'], 1, 0, 'C');
        $p->Cell(12, $t, $w['TahunLulus'], 1, 0, 'C');
        $p->Cell(10, $t, $w['Urutan'], 1, 0, 'C');
        $p->Cell(10, $t, $w['SumberInformasi'], 1, 0, 'C');
        $arrSumberInfo = explode(',', $w['SumberInformasi']);
        $NamaSumberInfo = GetaField('sumberinfo', 'InfoID', $arrSumberInfo[0], 'Nama');
        $p->Cell(70, $t, $NamaSumberInfo, 1, 0, 'L');
        $p->Cell(10, $t, $w['PresenterID'], 1, 0, 'C');
        $p->Ln($t);
    }
}
Beispiel #11
0
function perskskhusus($mhsw, $khs, $bipot, $ada, $pmbmhswid = 1)
{
    // Jumlah SKS yg diambil mhsw.
    // Hrs diparsing krn dicek apkh mhsw jg mengambil jdwl dgn hrg yg berbeda?
    $TabelKRS = $_REQUEST['DariKRS'] == 0 ? "krs" : "krstemp";
    // Apakah diakses dari modul KRS?
    $s = "select k.TahunID, k.MhswID,\n    j.JadwalID, j.SKSAsli, j.HargaStandar, j.Harga, j.JenisJadwalID\n    from {$TabelKRS} k\n      left outer join jadwal j on k.JadwalID=j.JadwalID\n    where k.MhswID='{$mhsw['MhswID']}' and k.TahunID='{$khs['TahunID']}'\n      and j.JenisJadwalID='R' ";
    $r = _query($s);
    $totharga = 0;
    $totsks = 0;
    $mk = '';
    $jml = 0;
    while ($w = _fetch_array($r)) {
        $jml++;
        //echo "$w[MKKode]: $w[Nama] ($w[SKS] SKS), Harga Standar? $w[HargaStandar]:$w[Harga]<br />";
        $totsks += $w['SKS'];
        $totharga += $w['Harga'];
        $mk .= "{$w['MKKode']} - {$w['Nama']}: {$w['SKSAsli']} SKS dgn Harga: {$w['Harga']} \r\n";
    }
    if (empty($ada) && $totharga > 0) {
        $s0 = "insert into bipotmhsw(MhswID, TahunID, BIPOT2ID, BIPOTNamaID,\n      PMBMhswID, TrxID, Jumlah, Besar, Catatan,\n      LoginBuat, TanggalBuat)\n      values('{$mhsw['MhswID']}', '{$khs['TahunID']}', '{$bipot['BIPOT2ID']}', '{$bipot['BIPOTNamaID']}',\n      '{$pmbmhswid}', '{$bipot['TrxID']}', {$totsks}, '{$bipot['Jumlah']}', '{$mk}',\n      '{$_SESSION['_Login']}', now())";
        $r0 = _query($s0);
    } else {
        $s0 = "update bipotmhsw set Jumlah='{$totsks}', Besar='{$bipot['Jumlah']}',\n      PMBMhswID='{$pmbmhswid}',\n      Catatan='{$mk}',\n      LoginEdit='{$_SESSION['_Login']}', TanggalEdit=now()\n      where BIPOTMhswID='{$ada['BIPOTMhswID']}' ";
        $r0 = _query($s0);
    }
}
function BuatIsinya2($TahunID, $ProdiID, $p)
{
    $maxentryperpage = 45;
    BuatHeader2($TahunID, 'Quota Absensi', ceil($ttl / $maxentryperpage) + 1, $p);
    $whr_prodi = empty($ProdiID) ? '' : "j.ProdiID = '{$ProdiID}' ";
    $whr_tahun = empty($TahunID) ? '' : "and j.TahunID = '{$TahunID}' ";
    $s = "select DISTINCT(p.MhswID), count(p.PresensiID) as _countAbsensi,\r\n      m.Nama as NamaMhsw, j.Nama,\r\n      d.Nama as NamaPA, d.Gelar,\r\n\t  j.MaxAbsen\r\n    from presensimhsw p\r\n\t  left outer join jadwal j on j.JadwalID=p.JadwalID and j.KodeID= '" . KodeID . "'\r\n\t  left outer join jenispresensi jp on p.JenisPresensiID=jp.JenisPresensiID\r\n\t  left outer join mhsw m on m.MhswID = p.MhswID and m.KodeID = '" . KodeID . "'\r\n\t  left outer join dosen d on d.Login = m.PenasehatAkademik and d.KodeID = '" . KodeID . "'\r\n    where \r\n      {$whr_prodi}\r\n\t  {$whr_tahun}\r\n\t  and jp.Nilai = 0\r\n\tgroup by p.MhswID, j.JadwalID\r\n    order by p.MhswID";
    $r = _query($s);
    $n = 0;
    $t = 5;
    if (_num_rows($r) > 0) {
        while ($w = _fetch_array($r)) {
            if ($w['_countAbsensi'] > $w['MaxAbsen']) {
                $n++;
                $NamaPA = empty($w['NamaPA']) ? '(Belum diset)' : $w['NamaPA'];
                $p->SetFont('Helvetica', '', 8);
                $p->Cell(10, $t, $n, 'LB', 0);
                $p->Cell(25, $t, $w['MhswID'], 'B', 0);
                $p->Cell(60, $t, $w['NamaMhsw'], 'B', 0);
                $p->Cell(10, $t, $w['_countAbsensi'], 'B', 0, 'C');
                $p->Cell(10, $t, $w['MaxAbsen'], 'B', 0, 'C');
                $p->Cell(75, $t, $w['Nama'], 'BR', 0);
                $p->Ln($t);
            }
        }
    } else {
        $p->SetFont('Helvetica', 'B', 8);
        $p->Cell(0, $t, '(Tidak ada mahasiswa yang dapat dicetak)', 0, 1, 'C');
    }
    $p->Ln($t);
    $p->SetFont('Helvetica', 'B', 12);
    $p->Cell(100, $t, 'Jumlah Mahasiswa: ' . $n, 0, 0);
}
Beispiel #13
0
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']}&nbsp;</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>";
}
Beispiel #14
0
function CetakMatakuliahnya($kur, $p)
{
    $s = "select mk.*\r\n    from mk\r\n    where mk.KurikulumID = {$kur['KurikulumID']}\r\n    order by mk.Sesi, mk.MKKode";
    $r = _query($s);
    $n = 0;
    $t = 6;
    $ss = -25;
    $ttl = 0;
    while ($w = _fetch_array($r)) {
        if ($ss != $w['Sesi']) {
            if ($ss != -25) {
                $p->SetFont('Helvetica', '', 10);
                $p->Cell(180, $t, 'Jumlah SKS: ', 'LB', 0, 'R');
                $p->Cell(10, $t, $ttl, 'BR', 1, 'R');
                $ttl = 0;
            }
            $ss = $w['Sesi'];
            $p->SetFont('Helvetica', 'B', 10);
            $p->Ln(2);
            $p->Cell(190, $t + 2, $kur['Sesi'] . " : " . $w['Sesi'], 1, 1);
            BuatHeaderTabel($p);
        }
        $n++;
        $ttl += $w['SKS'];
        $p->SetFont('Helvetica', '', 10);
        $p->Cell(10, $t, $n, 1, 0);
        $p->Cell(30, $t, $w['MKKode'], 1, 0);
        $p->Cell(140, $t, $w['Nama'], 1, 0);
        $p->Cell(10, $t, $w['SKS'], 1, 0, 'R');
        $p->Ln($t);
    }
}
function CreateDBFMHS()
{
    global $HeaderMSHS;
    if (!empty($_SESSION['DariNPM'])) {
        $_SESSION['SampaiNPM'] = empty($_SESSION['SampaiNPM']) ? $_SESSION['DariNPM'] : $_SESSION['SampaiNPM'];
        $_npm = "'{$_SESSION['DariNPM']}' <= MhswID and MhswID <= '{$_SESSION['SampaiNPM']}' ";
    } else {
        $drmhsw = GetaField('mhsw', "NA", "N", "min(MhswID)");
        $smpmhsw = GetaField('mhsw', "NA", "N", "max(MhswID)");
        $_npm = "'{$drmhsw}' <= MhswID and MhswID <= '{$smpmhsw}' ";
    }
    $s = "select MhswID\r\n    from mhsw\r\n    where {$_npm}\r\n\t\torder by MhswID";
    $r = _query($s);
    $n = 0;
    $DBFName = "dikti/MHMHS-20062.DBF";
    DBFCreate($DBFName, $HeaderMSHS);
    while ($w = _fetch_array($r)) {
        $n++;
        $_SESSION["DBF-MHSWID-{$n}"] = $w['MhswID'];
    }
    $_SESSION["DBF-FILES"] = $DBFName;
    $_SESSION["DBF-POS"] = 0;
    $_SESSION["DBF-MAX"] = $n;
    echo "<p>Akan diproses <font size=+1>{$n}</font> data.</p>";
    echo "<p><IFRAME src='dikti.mastermhsw.go.php' frameborder=0 height=400 width=600>\r\n  </IFRAME></p>";
}
Beispiel #16
0
function AkademikSav()
{
    // Cek Kelengkapan
    $_syarat = array();
    $_syarat = $_REQUEST['PMBSyaratID'];
    $syarat = empty($_syarat) ? '' : '.' . implode('.', $_syarat) . '.';
    // Cek Kelengkapan
    $mhsw = GetFields('mhsw', 'MhswID', $_REQUEST['mhswid'], 'StatusAwalID, ProdiID, Syarat, SyaratLengkap');
    $s = "select PMBSyaratID, Nama\r\n    from pmbsyarat\r\n    where NA='N' and KodeID='{$_SESSION['KodeID']}'\r\n      and INSTR(StatusAwalID, '.{$mhsw['StatusAwalID']}.') >0\r\n      and INSTR(ProdiID, '.{$mhsw['ProdiID']}.') >0\r\n    order by PMBSyaratID";
    $r = _query($s);
    $lkp = True;
    if (!empty($_syarat)) {
        while ($w = _fetch_array($r)) {
            if (array_search($w['PMBSyaratID'], $_syarat) === false) {
                $lkp = false;
            }
        }
    } else {
        $lkp = false;
    }
    $Lengkap = $lkp == true ? 'Y' : 'N';
    // Simpan
    $s = "update mhsw set PenasehatAkademik='{$_REQUEST['PenasehatAkademik']}', ProgramID='{$_REQUEST['ProgramID']}',\r\n    StatusAwalID='{$_REQUEST['StatusAwalID']}', StatusMhswID='{$_REQUEST['StatusMhswID']}',\r\n    Syarat='{$syarat}', SyaratLengkap='{$Lengkap}', BatasStudi='{$_REQUEST['BatasStudi']}'\r\n    where MhswID='{$_REQUEST['mhswid']}' ";
    $r = _query($s);
}
Beispiel #17
0
function CetakKSS()
{
    $s = "select khs.*, sm.Nama as STT\r\n    from khs khs\r\n      left outer join statusmhsw sm on khs.StatusMhswID=sm.StatusMhswID\r\n    where khs.MhswID='{$_SESSION['crmhswid']}'\r\n    order by khs.Sesi";
    $r = _query($s);
    echo "<p><table class=box cellspacing=1 cellpadding=4>";
    echo "<tr><th class=ttl>Sesi</th>\r\n    <th class=ttl>Tahun Akd</th>\r\n    <th class=ttl>SKS</th>\r\n    <th class=ttl>MK</th>\r\n    <th class=ttl>Status</th>\r\n    <th class=ttl>Biaya</th>\r\n    <th class=ttl>Bayar</th>\r\n    <th class=ttl>Tarik</th>\r\n    <th class=ttl>Potongan</th>\r\n    <th class=ttl>Balance</th>\r\n    <th class=ttl>Gagal<br />KRS</th>\r\n    <th class=ttl>Cetak</th>\r\n    </tr>";
    while ($w = _fetch_array($r)) {
        if ($w['TahunID'] == $_SESSION['tahun']) {
            $c = "class=ul";
            //$ctk = "<a href='kss.cetak.php?tahun=$w[TahunID]&mhswid=$w[MhswID]&khsid=$w[KHSID]' target=_blank><img src='img/printer.gif'></a>";
            $ctk1 = "<a href='?mnux=kss&gos=cekkss&tahun={$w['TahunID']}&mhswid={$w['MhswID']}&khsid={$w['KHSID']}'>\r\n        <img src='img/printer.gif'></a>";
        } else {
            $c = "class=ul";
            $ctk = "&nbsp;";
        }
        $bia = number_format($w['Biaya']);
        $byr = number_format($w['Bayar']);
        $trk = number_format($w['Tarik']);
        $pot = number_format($w['Potongan']);
        $balance = $w['Bayar'] - $w['Biaya'] + $w['Potongan'] - $w['Tarik'];
        $bal = number_format($balance);
        $cbal = $bal < 0 ? 'class=wrn' : 'class=ul';
        //$ggl = GetaField('krs', "KHSID", $w['KHSID'], "count(KRSID)")+0;
        $ggl = $w['TahunID'] == $_SESSION['tahun'] ? GetaField("krstemp", "NA='Y' and KHSID", $khsid, "count(KRSID)") + 0 : "&nbsp;";
        $cggl = $ggl > 0 ? 'class=wrn' : 'class=ul';
        if ($w['TahunID'] == $_SESSION['tahun']) {
            $ctk = $ggl > 0 ? "<img src='img/check.gif' title='Tidak dapat dicetak karena ada KRS gagal.'>" : "<a href='kss.cetak.php?tahun={$w['TahunID']}&mhswid={$w['MhswID']}&khsid={$w['KHSID']}'><img src='img/printer.gif'></a>";
            $ctk1 = $ggl > 0 ? "<img src='img/check.gif' title='Tidak dapat dicetak karena ada KRS gagal.'>" : "<a href='?mnux=kss&gos=cekkss&tahun={$w['TahunID']}&mhswid={$w['MhswID']}&khsid={$w['KHSID']}'><img src='img/printer.gif'></a>";
        } else {
            $ctk = '&nbsp;';
        }
        echo "<tr><td class=inp>{$w['Sesi']}</td>\r\n      <td {$c}>{$w['TahunID']}</td>\r\n      <td {$c} align=right>{$w['TotalSKS']}</td>\r\n      <td {$c} align=right>{$w['JumlahMK']}</td>\r\n      <td {$c}>{$w['STT']}</td>\r\n      <td {$c} align=right>{$bia}</td>\r\n      <td {$c} align=right>{$byr}</td>\r\n      <td {$c} align=right>{$pot}</td>\r\n      <td {$c} align=right>{$trk}</td>\r\n      <td {$cbal} align=right><b>{$bal}</b></td>\r\n      <td {$cggl} align=right><b>{$ggl}</b></td>\r\n      <td {$c} align=center>{$ctk}</td>\r\n      </tr>";
    }
    echo "</table></p>";
}
Beispiel #18
0
function BuatIsinya($jdwl, $p)
{
    $sudahbayar = "and (h.Biaya - h.Bayar + h.Tarik - h.Potongan) <= 0";
    $sudahpenuhiabsen = "and (select count(pm.PresensiMhswID) from presensimhsw pm left outer join jenispresensi jp on pm.JenisPresensiID=jp.JenisPresensiID where pm.KRSID=k.KRSID and jp.Nilai = 0) < {$jdwl['MaxAbsen']}";
    $s = "select k.MhswID, m.Nama, k._Presensi, k.KRSID\r\n    from krs k\r\n      left outer join mhsw m on m.MhswID = k.MhswID and m.KodeID = '" . KodeID . "'\r\n      left outer join khs h on k.KHSID = h.KHSID\r\n    where k.JadwalID = '{$jdwl['JadwalID']}'\r\n      {$sudahbayar}\r\n\t  {$sudahpenuhiabsen}\r\n    order by k.MhswID";
    $r = _query($s);
    $t = 7;
    $n = 0;
    // Header
    $p->SetFont('Helvetica', 'B', 10);
    $p->Cell(25, $t, 'N I M', 'B', 0);
    $p->Cell(100, $t, 'Nama Mahasiswa', 'B', 0);
    $p->Cell(20, $t, 'No. Kursi', 'B', 0, 'R');
    $p->Cell(20, $t, 'TTD', 'B', 0, 'C');
    $p->Ln($t);
    // Data
    $p->SetFont('Helvetica', '', 9);
    while ($w = _fetch_array($r)) {
        $n++;
        $p->SetFont('Helvetica', '', 9);
        $p->Cell(25, $t, $w['MhswID'], 0, 0);
        $p->Cell(100, $t, $w['Nama'], 0, 0);
        $p->SetFont('Helvetica', 'B', 9);
        $p->Cell(20, $t, $n, 0, 0, 'C');
        $p->Cell(20, $t, '', 'B', 0, 'C');
        $p->Ln($t);
    }
    $p->SetFont('Helvetica', '', 9);
    $p->Cell(165, 2, ' ', 'B', 1);
    $p->Cell(165, $t, 'Jumlah Peserta Ujian : ' . $n, 0, 1);
    $p->Cell(165, $t, 'Catatan: Mahasiswa yang tidak tercetak di daftar berarti belum melunasi kewajibannya.', 0, 1);
}
function CetakMatakuliahnya($MKPaketID, $p)
{
    $whr_pid = empty($MKPaketID) ? "" : "and mp.MKPaketID='{$MKPaketID}'";
    $s = "select mk.Sesi, mk.MKKode, mk.Nama, mk.Responsi, mk.PraktekKerja, mk.TugasAkhir, mk.SKS\r\n    from mkpaketisi mp left outer join mk mk on mp.MKID=mk.MKID\r\n    where mk.KodeID='" . KodeID . "'\r\n\t\t{$whr_pid}\r\n\torder by mk.Sesi, mk.Nama";
    $r = _query($s);
    $n = 0;
    $t = 6;
    $_sesi = '02q350mq3';
    BuatHeaderTabel($p);
    while ($w = _fetch_array($r)) {
        /*if ($_sesi != $w['Sesi']) { 
            $_sesi = $w['Sesi'];
            $p->SetFont('Helvetica', 'B', 10);
            $p->Ln(2);
            $p->Cell(170, $t+2, $w['Sesi'], 1, 1);
            BuatHeaderTabel($p);
          }*/
        $n++;
        $p->SetFont('Helvetica', '', 10);
        $p->Cell(10, $t, $n . '.', 1, 0, 'R');
        $p->Cell(30, $t, $w['MKKode'], 1, 0);
        $p->Cell(100, $t, $w['Nama'], 1, 0);
        $p->Cell(10, $t, $w['SKS'], 1, 0, 'C');
        $p->Cell(1, $t, '', 1, 0, '', true);
        $p->Cell(10, $t, $w['Sesi'], 1, 0, 'C');
        $p->Cell(1, $t, '', 1, 0, '', true);
        $p->Cell(10, $t, $w['Responsi'] == 'Y' ? 'Lab' : '', 1, 0, 'C');
        $p->Cell(10, $t, $w['PraktekKerja'] == 'Y' ? 'KP' : '', 1, 0, 'C');
        $p->Cell(10, $t, $w['TugasAkhir'] == 'Y' ? 'TA' : '', 1, 0, 'C');
        $p->Ln($t);
    }
}
function CetakMKSetara($kurid, $p)
{
    $lbr = 190;
    $t = 6;
    $p->SetFont('Helvetica', 'B', 11);
    $p->Cell(10, $t, 'No.', 1, 0, 'R');
    $p->Cell(30, $t, 'MKKode', 1, 0, 'L');
    $p->Cell(100, $t, 'Nama Mata Kuliah', 1, 0, 'L');
    $p->Cell(10, $t, 'SKS', 1, 0, 'C');
    $p->Cell(10, $t, 'Sesi', 1, 0, 'C');
    $p->Cell(30, $t, 'MK Setara', 1, 0, 'C');
    $p->Ln($t);
    // tuliskan
    $s = "select MKKode, Nama, SKS, Sesi, MKSetara\r\n    from mk\r\n    where KurikulumID='{$kurid}' and NA='N'\r\n    order by Sesi, MKKode";
    $r = _query($s);
    $n = 0;
    while ($w = _fetch_array($r)) {
        $n++;
        $p->SetFont('Helvetica', 'B', 11);
        $p->Cell(10, $t, $n, 1, 0, 'R');
        $p->Cell(30, $t, $w['MKKode'], 1, 0, 'L');
        $p->Cell(100, $t, $w['Nama'], 1, 0, 'L');
        $p->Cell(10, $t, $w['SKS'], 1, 0, 'C');
        $p->Cell(10, $t, $w['Sesi'], 1, 0, 'C');
        $p->Cell(30, $t, $w['MKSetara'], 1, 0, 'C');
        $p->Ln($t);
    }
}
function AmbilJadwal($TahunID, $dsn, $p)
{
    $s = "select j.*,\r\n      left(j.JamMulai, 5) as _JM,\r\n      left(j.JamSelesai, 5) as _JS, \r\n\t  k.Nama AS namaKelas\r\n    from jadwal j\r\n\tLEFT OUTER JOIN kelas k ON k.KelasID = j.NamaKelas\r\n    where j.TahunID = '{$TahunID}'\r\n      and j.DosenID = '{$dsn['Login']}'\r\n      and j.KodeID = '" . KodeID . "'\r\n    order by j.HariID, j.JamMulai, j.JamSelesai";
    $r = _query($s);
    $n = 0;
    $t = 6;
    $hr = -25;
    $ttl = 0;
    while ($w = _fetch_array($r)) {
        if ($hr != $w['HariID']) {
            $hr = $w['HariID'];
            $NamaHari = GetaField('hari', 'HariID', $hr, 'Nama');
            TampilkanHeaderTabel($NamaHari, $p);
        }
        $n++;
        $ttl += $w['SKS'];
        $p->SetFont('Helvetica', '', 9);
        $p->Cell(7, $t, $n, 1, 0);
        $p->Cell(20, $t, $w['_JM'] . '-' . $w['_JS'], 1, 0);
        $p->Cell(24, $t, $w['MKKode'], 1, 0);
        $p->Cell(70, $t, $w['Nama'], 1, 0);
        $p->Cell(8, $t, $w['SKS'], 1, 0, 'R');
        $p->Cell(18, $t, $w['namaKelas'], 1, 0);
        $p->Cell(18, $t, $w['RuangID'], 1, 0);
        $p->Cell(14, $t, $w['ProgramID'], 1, 0);
        $p->Cell(14, $t, $w['ProdiID'], 1, 0);
        $p->Ln($t);
    }
    $p->SetFont('Helvetica', '', 10);
    $p->Cell(100, $t, "Total SKS: " . $ttl, 0, 1);
}
Beispiel #22
0
function TampilkanDaftar()
{
    //echo $ProdiID;
    $s = "select d.Login, d.Nama, d.Gelar, d.NA\r\n    from dosen d\r\n    where d.KodeID = '" . KodeID . "'\r\n      and d.Nama like '%{$_SESSION['Nama']}%'\r\n      and INSTR(d.ProdiID, '{$_SESSION['ProdiID']}') > 0\r\n    order by d.Nama";
    $r = _query($s);
    $i = 0;
    echo "<table class=bsc cellspacing=1 width=100%>";
    echo "<tr>\r\n    <th class=ttl>#</th>\r\n    <th class=ttl>Kode/NIP</th>\r\n    <th class=ttl>Nama Dosen</th>\r\n    <th class=ttl>NA</th>\r\n    </tr>";
    while ($w = _fetch_array($r)) {
        $i++;
        if ($w['NA'] == 'Y') {
            $c = "class=nac";
            $d = "{$w['Nama']} <sup>{$w['Gelar']}</sup>";
        } else {
            $c = "class=ul";
            $d = "<a href=\"javascript:{$_SESSION['frm']}.DosenID{$_SESSION['indexKompre']}.value='{$w['Login']}';{$_SESSION['frm']}.NamaDosen{$_SESSION['indexKompre']}.value='{$w['Nama']}';toggleBox('{$_SESSION['div']}', 0)\">\r\n        &raquo;\r\n        {$w['Nama']}</a>\r\n        <sup>{$w['Gelar']}</sup>";
        }
        echo <<<SCR
      <tr>
      <td class=inp width=20>{$i}</td>
      <td {$c} width=100 align=center>{$w['Login']}</td>
      <td {$c}>{$d}</td>
      <td class=ul width=20 align=center><img src='../img/book{$w['NA']}.gif' /></td>
      </tr>
SCR;
    }
    echo "</table>";
}
Beispiel #23
0
function BuatIsinya($jdwl, $p)
{
    $s = "select pm.MhswID, m.Nama, sum(pm.Nilai) as HDR\r\n    from presensimhsw pm\r\n      left outer join mhsw m on m.MhswID = pm.MhswID and m.KodeID = '" . KodeID . "'\r\n    where pm.JadwalID = '{$jdwl['JadwalID']}'\r\n    group by pm.MhswID";
    $r = _query($s);
    $n = 0;
    $t = 6;
    // Buat header dulu
    $p->SetFont('Helvetica', 'BI', 9);
    $p->Cell(10, $t, 'No', 'BT', 0);
    $p->Cell(22, $t, 'NIM', 'BT', 0);
    $p->Cell(70, $t, 'Mahasiswa', 'BT', 0);
    $p->Cell(20, $t, 'Hadir', 'BT', 0, 'R');
    $p->Cell(20, $t, 'Persen', 'BT', 0, 'R');
    $p->Ln($t);
    // Isinya
    $p->SetFont('Helvetica', '', 9);
    while ($w = _fetch_array($r)) {
        $n++;
        $persen = $jdwl['Kehadiran'] > 0 ? $w['HDR'] / $jdwl['Kehadiran'] * 100 : 0;
        $_persen = number_format($persen, 2);
        $p->Cell(10, $t, $n, 'B', 0);
        $p->Cell(22, $t, $w['MhswID'], 'B', 0);
        $p->Cell(70, $t, $w['Nama'], 'B', 0);
        $p->Cell(20, $t, $w['HDR'] . '/' . $jdwl['Kehadiran'], 'B', 0, 'R');
        $p->Cell(20, $t, $_persen . '%', 'B', 0, 'R');
        $p->Ln($t);
    }
}
function CetakDataLulus($gels, $p)
{
    $s = "select p.PMBID, p.Nama, p.AsalSekolah, p.NilaiUjian, p.NilaiSekolah,\n      p.ProdiID, p.ProgramID,\n      prg.Nama as _PRG, prd.Nama as _PRD\n    from pmb p\n      left outer join program prg on prg.ProgramID = p.ProgramID and prg.KodeID='" . KodeID . "'\n      left outer join prodi prd on prd.ProdiID = p.ProdiID and prd.KodeID='" . KodeID . "'\n    where p.KodeID = '" . KodeID . "'\n      and p.PMBPeriodID = '{$gels['PMBPeriodID']}'\n      and p.LulusUjian = 'Y'\n    order by p.ProdiID, p.ProgramID, p.PMBID ";
    $r = _query($s);
    $n = 0;
    $t = 6;
    $pr = 'alskdjflaksjdf';
    while ($w = _fetch_array($r)) {
        $n++;
        if ($pr != $w['ProdiID'] . $w['ProgramID']) {
            $pr = $w['ProdiID'] . $w['ProgramID'];
            $p->Ln(1);
            $p->SetFont('Helvetica', 'B', 11);
            $p->Cell(190, 8, "Program Studi: {$w['_PRD']} ~ {$w['_PRG']}", 0, 1);
            BuatHeaderTabel($p);
        }
        $p->SetFont('Helvetica', '', 10);
        $p->Cell(16, $t, $n, 'LB', 0, 'R');
        $p->Cell(24, $t, $w['PMBID'], 'B', 0);
        $p->Cell(60, $t, $w['Nama'], 'B', 0);
        $p->Cell(70, $t, $w['AsalSekolah'], 'B', 0);
        $p->Cell(10, $t, $w['NilaiSekolah'], 'B', 0, 'R');
        $p->Cell(10, $t, $w['NilaiUjian'], 'BR', 0, 'R');
        $p->Ln($t);
    }
}
Beispiel #25
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);
    }
}
function CreateDBFNilaiMhsw()
{
    global $HeaderTRNLM;
    if (!empty($_SESSION['DariNPM'])) {
        $_SESSION['SampaiNPM'] = empty($_SESSION['SampaiNPM']) ? $_SESSION['DariNPM'] : $_SESSION['SampaiNPM'];
        $_npm = "'{$_SESSION['DariNPM']}' <= MhswID and MhswID <= '{$_SESSION['SampaiNPM']}' ";
    } else {
        $_npm = '';
    }
    $_prd = empty($_SESSION['prodi']) ? "" : "and ProdiID = '{$_SESSION['prodi']}'";
    $s = "select MhswID\r\n    from khs\r\n    where \r\n\t\t\t TahunID = '{$_SESSION['tahun']}' {$_prd} {$_npm}\r\n\t\t\t and StatusMhswID in ('A', 'C')\r\n\t\torder by MhswID";
    $r = _query($s);
    $n = 0;
    $DBFName = "dikti/TRNLM-{$_SESSION['tahun']}.DBF";
    DBFCreate($DBFName, $HeaderTRNLM);
    while ($w = _fetch_array($r)) {
        $n++;
        $_SESSION["DBF-MHSWID-{$n}"] = $w['MhswID'];
    }
    $_SESSION["DBF-TAHUN"] = $_SESSION['tahun'];
    $_SESSION["DBF-FILES"] = $DBFName;
    $_SESSION["DBF-POS"] = 0;
    $_SESSION["DBF-MAX"] = $n;
    echo "<p>Akan diproses <font size=+1>{$n}</font> data.</p>";
    echo "<p><IFRAME src='dikti.nilaimhsw.go.php' frameborder=0 height=400 width=600>\r\n  </IFRAME></p>";
}
function Isinya($MhswID, $p)
{
    $lbr = 190;
    $t = 5;
    BuatHeadernya($MhswID, $p);
    JudulKolomnya($p);
    $p->SetFont('Helvetica', '', 9);
    $s = "select k.*\r\n    from krs k\r\n      left outer join khs h on h.KHSID = k.KHSID and h.KodeID = '" . KodeID . "'\r\n      left outer join nilai n on k.GradeNilai=n.Nama and h.ProdiID=n.ProdiID and n.KodeID = '" . KodeID . "'\r\n\twhere k.MhswID = '{$MhswID}'\r\n\t\tand n.Lulus = 'N'\r\n    order by k.TahunID, k.MKKode";
    $r = _query($s);
    $n = 0;
    $_thn = "02n4lajwnrfvnaw34";
    while ($w = _fetch_array($r)) {
        if ($_thn != $w['TahunID']) {
            $p->Ln($t);
            $p->SetFont('Helvetica', 'B', 10);
            $p->Cell(0, $t, $w['TahunID'], 'B', 1);
            $n = 0;
            $p->SetFont('Helvetica', '', 9);
            $_thn = $w['TahunID'];
        }
        $n++;
        $p->Cell(8, $t, $n, 0, 0);
        $p->Cell(25, $t, $w['MKKode'], 0, 0, 'C');
        $p->Cell(100, $t, $w['Nama'], 0, 0);
        $p->Cell(15, $t, $w['SKS'], 0, 0, 'C');
        $p->Cell(15, $t, $w['GradeNilai'], 0, 0, 'C');
        $p->Cell(15, $t, $w['BobotNilai'], 0, 0, 'C');
        $p->Ln($t);
    }
}
Beispiel #28
0
function TampilkanPembayaranDariDeposit($mhsw, $krs, $byr)
{
    $optrek = GetOption2('rekening', "concat(RekeningID, ' - ', Nama)", 'RekeningID', '', '', 'RekeningID');
    CheckFormScript("RekeningID");
    echo "<p><font size=+2>&raquo; Pembayaran Dari Deposit</font></p>";
    $s = "select dep.*, date_format(dep.Tanggal, '%d-%m-%Y') as TGL\r\n    from depositmhsw dep\r\n    where dep.MhswID='{$mhsw['MhswID']}'\r\n      order by Tanggal";
    $r = _query($s);
    $n = 0;
    echo "<blockquote><table class=box>\r\n    <tr><th class=ttl>#</th>\r\n    <th class=ttl>Tanggal</th>\r\n    <th class=ttl>Jumlah</th>\r\n    <th class=ttl>Dipakai</th>\r\n    <th class=ttl>Sisa</th>\r\n    <th class=ttl>Opsi</th>\r\n    </tr>";
    while ($w = _fetch_array($r)) {
        $n++;
        if ($w['Tutup'] == 'Y') {
            $c = "class=nac";
            $byrkn = "<td class=ul>&nbsp;</td>";
        } else {
            $c = "class=ul";
            $byrkn = "<form action='?' method=POST onSubmit=\"return CheckForm(this)\">\r\n        <input type=hidden name='mnux' value='klinik.biyar.trx'>\r\n        <input type=hidden name='gos' value='DariDeposit'>\r\n        <input type=hidden name='DMID' value='{$w['DepositMhswID']}'>\r\n        <input type=hidden name='MhswID' value='{$_SESSION['MhswID']}'>\r\n        <input type=hidden name='KRS' value='{$krs['KRSID']}'>\r\n        <td class=ul><select name='RekeningID'>{$optrek}</select>\r\n        <input type=submit name='Bayarkan' value='Bayarkan'></td>\r\n        </form>";
        }
        $jml = number_format($w['Jumlah']);
        $pki = number_format($w['Dipakai']);
        $ssa = number_format($w['Jumlah'] - $w['Dipakai']);
        echo "<tr><td class=inp>{$n}</td>\r\n    <td {$c}>{$w['TGL']}</td>\r\n    <td {$c} align=right>{$jml}</td>\r\n    <td {$c} align=right>{$pki}</td>\r\n    <td {$c} align=right>{$ssa}</td>\r\n    {$byrkn}\r\n    </tr>";
    }
    echo "</table></blockquote>";
}
Beispiel #29
0
function TampilkanJadwalDosen()
{
    $s = "select j.*, h.Nama as HR\n    from jadwal j\n      left outer join hari h on j.HariID=h.HariID\n    where j.DosenID='{$_SESSION['dosen']}'\n    and j.TahunID='{$_SESSION['tahun']}'\n    order by j.HariID, j.JamMulai, j.MKKode";
    $r = _query($s);
    // Tampilkan
    $nomer = 0;
    $hari = -1;
    $totsks = 0;
    $hdrjdwl = "<tr><th class=ttl>No</th>\n    <th class=ttl>Jam</th>\n    <th class=ttl>Ruang</th>\n    <th class=ttl>Kode MK</th>\n    <th class=ttl>Matakuliah</th>\n    <th class=ttl>Kelas</th>\n    <th class=ttl>SKS</th>\n    <th class=ttl>Prodi</th>\n    <th class=ttl>Dosen</th>\n    <th class=ttl title='Presensi'>Prs</th>\n    <th class=ttl>Link</th>\n    </tr>";
    echo "<p><table class=box cellspacing=1 cellpadding=4>";
    while ($w = _fetch_array($r)) {
        if ($hari != $w['HariID']) {
            $hari = $w['HariID'];
            echo "<tr><td class=ul colspan=12><b>{$w['HR']}</b></td></tr>";
            echo $hdrjdwl;
        }
        $nomer++;
        $totsks += $w['SKS'];
        // Array dosen
        $arrdosen = explode('.', TRIM($w['DosenID'], '.'));
        $strdosen = implode(',', $arrdosen);
        $_dosen = empty($strdosen) ? '' : GetArrayTable("select Nama from dosen where Login in ({$strdosen}) order by Nama", "Login", "Nama", '<br />');
        // Array prodi
        $arrprodi = explode('.', TRIM($w['ProdiID'], '.'));
        $strprodi = implode(',', $arrprodi);
        $_prodi = empty($strprodi) ? '' : GetArrayTable("select Nama from prodi where ProdiID in ({$strprodi}) order by ProdiID", "ProdiID", "Nama", '<br />');
        echo "<tr><td class=inp1>{$nomer}</td>\n      <td class=ul>{$w['JamMulai']}-{$w['JamSelesai']}</td>\n      <td class=ul>{$w['RuangID']}</td>\n      <td class=ul>{$w['MKKode']}</td>\n      <td class=ul>{$w['Nama']}</td>\n      <td class=ul>{$w['NamaKelas']}&nbsp;</td>\n      <td class=ul>{$w['SKS']} ({$w['SKSAsli']})</td>\n      <td class=ul>{$_prodi}</td>\n      <td class=ul>{$_dosen}</td>\n      <td class=ul align=right>{$w['Kehadiran']}</td>\n      <td class=ul><a href='?mnux=dosen.nilai&tahun={$_SESSION['tahun']}&jadwalid={$w['JadwalID']}&dosen={$_SESSION['dosen']}'>Nilai</a></td>\n      </tr>";
    }
    echo "<tr><td colspan=6 align=right>Total SKS :</td><td class=cnnY align=right><b>{$totsks}</b></td></tr>\n    </table></p>";
}
function ProsesTransferDep()
{
    $s = "select *\r\n    from _transferdeposit\r\n    order by TahunID, MhswID";
    $r = _query($s);
    $jml = _num_rows($r);
    echo "<p>Ada <font size=+2>{$jml}</font> data yg akan diproses.</p>";
    echo "<ol>";
    $bn_dep = 32;
    // transfer deposit. Lihat di BipotNama
    $bn_nm = "Transfer Deposit";
    while ($w = _fetch_array($r)) {
        $_dep = number_format($w['Jumlah']);
        $ada = GetFields('bipotmhsw', "TahunID='{$w['TahunID']}' and BIPOTNamaID={$bn_dep} and MhswID", $w['MhswID'], "*");
        if (empty($ada)) {
            $str = "Diproses ";
            $s0 = "insert into bipotmhsw\r\n        (PMBMhswID, MhswID, TahunID, \r\n        BIPOTNamaID, Nama, TrxID, Draft,\r\n        Jumlah, Besar, Dibayar,\r\n        Catatan, LoginBuat, TanggalBuat)\r\n        values (1, '{$w['MhswID']}', '{$w['TahunID']}',\r\n        {$bn_dep}, '{$bn_nm}', -1, 'N',\r\n        1, {$w['Jumlah']}, {$w['Jumlah']}, \r\n        'import-061030', 'import-061030', now())";
            //$str .= $s0;
            $r0 = _query($s0);
        } else {
            $str = "<font color=red>Sudah</font>";
        }
        echo "<li>{$w['MhswID']} - {$w['TahunID']} &raquo; {$_dep} &raquo; {$str}</li>";
    }
    echo "</ol>";
}