Beispiel #1
0
function Proses()
{
    $jml = $_SESSION['PRC_IPK_JML'] + 0;
    $prc = $_SESSION['PRC_IPK_PRC'] + 0;
    $TahunID = $_SESSION['PRC_IPK_TahunID'];
    $ProdiID = $_SESSION['PRC_IPK_ProdiID'];
    if ($prc < $jml) {
        // Parameter
        $KHSID = $_SESSION['PRC_IPK_KHSID_' . $prc] + 0;
        $MhswID = $_SESSION['PRC_IPK_MhswID_' . $prc];
        $Nama = $_SESSION['PRC_IPK_Nama_' . $prc];
        // Proses
        ResetNilaiTertinggi($MhswID);
        BuatNilaiTertinggi($MhswID);
        $ips = HitungIPS($TahunID, $MhswID, $KHSID);
        $ipk = HitungIPK($TahunID, $MhswID, $KHSID);
        $s_ips = "update khs\r\n      set IPS = {$ips}, IP = {$ipk}\r\n      where KHSID = '{$KHSID}' ";
        $r_ips = _query($s_ips);
        // Tampilkan
        $persen = $jml > 0 ? $prc / $jml * 100 : 0;
        $sisa = $jml > 0 ? 100 - $persen : 0;
        $persen = number_format($persen);
        echo "<p align=center>\r\n    <font size=+1>{$persen} %</font><br />\r\n    <img src='../img/B1.jpg' width=1 height=20 /><img src='../img/B2.jpg' width={$persen} height=20 /><img src='../img/B3.jpg' width={$sisa} height=20 /><img src='../img/B1.jpg' width=1 height=20 /><br />\r\n    Memproses: #{$prc}<br />\r\n    <sup>{$MhswID}</sup><br />\r\n    <b>{$Nama}</b><br />\r\n    <h1 align=center>\r\n      IPS: {$ips}<br />\r\n      IPK: {$ipk}\r\n    </h1>\r\n    </p>\r\n    <hr size=1 color=silver />\r\n    <p align=center>\r\n      <input type=button name='Batal' value='Batalkan' onClick=\"window.close()\" />\r\n    </p>";
        // Next
        $_SESSION['PRC_IPK_PRC']++;
        // Reload
        $tmr = 10;
        echo <<<SCR
    <script>
    window.onload=setTimeout("window.location='../{$_SESSION['mnux']}.1.php?gos=Proses'", {$tmr});
    </script>
SCR;
    } else {
        echo Konfirmasi("Proses Selesai", "Proses telah selesai.<br />\r\n    Data yang berhasil diproses: <b>{$_SESSION['PRC_IPK_PRC']}</b>.\r\n    <hr size=1 color=silver />\r\n    <input type=button name='Tutup' value='Tutup' onClick=\"window.close()\" />");
    }
}
Beispiel #2
0
function BuatIsiTranskrip2($mhsw, $p)
{
    // Reset nilai tertinggi
    ResetNilaiTertinggi($mhsw);
    BuatNilaiTertinggi($mhsw);
    // Tampilkan isinya
    $s = "select k.KRSID, k.MKKode, k.Nama, k.BobotNilai, k.GradeNilai, k.SKS, k.Tinggi\r\n    from krs k left outer join jadwal j on k.JadwalID=j.JadwalID\r\n\t\t\t\tleft outer join jenisjadwal jj on jj.JenisJadwalID=j.JenisJadwalID\r\n    where k.KodeID = '" . KodeID . "'\r\n      and k.MhswID = '{$mhsw['MhswID']}'\r\n      and k.Tinggi = '*'\r\n\t  and k.Final = 'Y'\r\n    order by k.MKKode";
    $r = _query($s);
    $n = 0;
    $p->SetFont('Helvetica', '', 8);
    $t = 5;
    $_sks = 0;
    $_nxk = 0;
    while ($w = _fetch_array($r)) {
        $n++;
        $mutu = $w['SKS'] * $w['BobotNilai'];
        $_nxk += $mutu;
        $_sks += $w['SKS'];
        $p->Cell(10, $t, $n, 1, 0, 'C');
        $p->Cell(24, $t, $w['MKKode'], 1, 0);
        $p->Cell(90, $t, $w['Nama'], 1, 0);
        $p->Cell(15, $t, $w['SKS'], 1, 0, 'C');
        $p->Cell(15, $t, $w['GradeNilai'], 1, 0, 'C');
        $p->Cell(15, $t, $w['BobotNilai'], 1, 0, 'C');
        $p->Cell(15, $t, $mutu, 1, 0, 'C');
        $p->Ln($t);
    }
    // Tampilkan jumlahnya
    $p->SetFont('Helvetica', 'B', 9);
    $p->Cell(124, $t, 'JUMLAH:', 'LB', 0, 'R');
    $p->Cell(15, $t, $_sks, 'B', 0, 'C');
    $p->Cell(30, $t, '', 'B', 0);
    $p->Cell(15, $t, $_nxk, 'BR', 0, 'C');
    $p->Ln($t);
    $p->Ln(2);
}
Beispiel #3
0
function BuatIsiTranskrip2($mhsw, $p)
{
    JudulKolomnya2($p);
    // Reset nilai tertinggi
    ResetNilaiTertinggi($mhsw);
    BuatNilaiTertinggi($mhsw);
    // Tampilkan isinya
    $s = "select k.KRSID, k.MKKode, k.Nama, k.BobotNilai, k.GradeNilai, k.SKS, k.Tinggi, k.JadwalID, k.VoidOnTranskripBAA\r\n    from krs k left outer join jadwal j on k.JadwalID=j.JadwalID\r\n    where k.KodeID = '" . KodeID . "'\r\n      and k.MhswID = '{$mhsw['MhswID']}'\r\n      and k.Tinggi = '*'\t\t\t\r\n\t\t\tand k.SKS > 0\r\n\t\t\tand k.VoidOnTranskripBAA = 'N'\r\n    order by k.MKKode";
    //and k.Final = 'Y'
    $r = _query($s);
    $n = 0;
    $t = 6;
    $_sks = 0;
    $_nxk = 0;
    $counterData = 1;
    while ($w = _fetch_array($r)) {
        if ($counterData == 35 || $counterData > 73 && ($counterData - 35) % 39 == 0) {
            // masuk ke page baru => buat header kolom tabelnya
            JudulKolomnya2($p);
        }
        $p->SetFont('Helvetica', '', 5);
        $n++;
        $mutu = $w['SKS'] * $w['BobotNilai'];
        $_nxk += $mutu;
        $_sks += $w['SKS'];
        $p->Cell(10, $t, $n, 1, 0, 'C');
        $p->Cell(24, $t, $w['MKKode'], 1, 0);
        $p->Cell(90, $t, $w['Nama'], 1, 0);
        $p->Cell(15, $t, $w['SKS'], 1, 0, 'C');
        $p->Cell(15, $t, $w['GradeNilai'], 1, 0, 'C');
        $p->Cell(15, $t, $w['BobotNilai'], 1, 0, 'C');
        $p->Cell(15, $t, $mutu, 1, 0, 'C');
        $p->Ln($t);
        $counterData++;
    }
    // Tampilkan jumlahnya
    $p->SetFont('Helvetica', 'B', 6);
    $p->Cell(124, $t, 'JUMLAH:', 'LB', 0, 'R');
    $p->Cell(15, $t, $_sks, 'B', 0, 'C');
    $p->Cell(30, $t, '', 'B', 0);
    $p->Cell(15, $t, $_nxk, 'BR', 0, 'C');
    $p->Ln($t);
    $p->Ln(2);
}