Exemplo n.º 1
0
function BuatIsinya($TahunID, $ProdiID, $sta, $p)
{
    $whr_prodi = $ProdiID == '' ? '' : "and h.ProdiID = '{$ProdiID}' ";
    $s = "select h.MhswID, h.StatusMhswID, m.Nama,\r\n      h.ProdiID, h.ProgramID, m.TahunID as ANGK,\r\n      d.Nama as PA, d.Gelar\r\n    from khs h\r\n      left outer join mhsw m on m.MhswID = h.MhswID and m.KodeID = '" . KodeID . "'\r\n      left outer join dosen d on d.Login = m.PenasehatAkademik and d.KodeID = '" . KodeID . "'\r\n    where h.KodeID = '" . KodeID . "'\r\n      and h.StatusMhswID = '{$sta}'\r\n      {$whr_prodi}\r\n    group by h.MhswID\r\n\torder by h.ProdiID, h.MhswID\r\n\t";
    $r = _query($s);
    $t = 6;
    $n = 0;
    $_prodi = ';alskdjfa;lsdjf;laksdjf;asldkjfa';
    while ($w = _fetch_array($r)) {
        if ($_prodi != $w['ProdiID']) {
            $n = 0;
            $_prodi = $w['ProdiID'];
            // Tampilkan
            BuatHeadernya($TahunID, $_prodi, $sta, $p);
        }
        $PA = empty($w['PA']) ? '(Belum diset)' : $w['PA'] . ", " . $w['Gelar'];
        $n++;
        $p->SetFont('Helvetica', '', 10);
        $p->Cell(15, $t, $n, 'LB', 0);
        $p->Cell(28, $t, $w['MhswID'], 'B', 0);
        $p->Cell(65, $t, $w['Nama'], 'B', 0);
        $p->Cell(20, $t, $w['ANGK'], 'B', 0);
        $p->Cell(60, $t, $PA, 'BR', 0);
        $p->Ln($t);
    }
}
Exemplo n.º 2
0
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);
    }
}
Exemplo n.º 3
0
function BuatIsinya($TahunID, $ProdiID, $p)
{
    global $lbr;
    $_prd = $ProdiID == '' ? '' : "and m.ProdiID = '{$ProdiID}' ";
    $s = "select b.BayarMhswID, b.BayarMhswRef,\r\n      date_format(b.Tanggal, '%d-%m-%Y') as TGL,\r\n      b.TahunID, b.RekeningID, b.MhswID, b.TrxID,\r\n      b.Bank, b.BuktiSetoran, b.Tanggal,\r\n      b.Jumlah, b.JumlahLain,\r\n      m.Nama as NamaMhsw,\r\n      format(b.Jumlah, 0) as JML\r\n    from bayarmhsw b\r\n      left outer join mhsw m on m.MhswID = b.MhswID and m.KodeID = '" . KodeID . "'\r\n    where b.KodeID = '" . KodeID . "'\r\n      and b.TahunID = '{$TahunID}'\r\n      and b.PMBMhswID = 1\r\n      and b.NA = 'N'\r\n      and '{$_SESSION['TglMulai']}' <= b.Tanggal\r\n      and b.Tanggal <= '{$_SESSION['TglSelesai']}'\r\n      {$_prd}\r\n    order by b.Tanggal, b.MhswID";
    $r = _query($s);
    $n = 0;
    $t = 6;
    BuatHeadernya($TahunID, $ProdiID, $p);
    $ttl = 0;
    while ($w = _fetch_array($r)) {
        $n++;
        $ttl += $w['Jumlah'];
        $p->SetFont('Helvetica', '', 10);
        $p->Cell(10, $t, $n, 'LB', 0);
        $p->Cell(22, $t, $w['TGL'], 'B', 0);
        $p->Cell(23, $t, $w['MhswID'], 'B', 0);
        $p->Cell(46, $t, $w['NamaMhsw'], 'B', 0);
        $p->Cell(23, $t, $w['JML'], 'B', 0, 'R');
        $p->Cell(22, $t, $w['Bank'], 'B', 0);
        $p->Cell(44, $t, $w['BuktiSetoran'], 'BR', 0);
        $p->Ln($t);
    }
    $p->Cell($lbr, 1, ' ', 1, 1);
    $_ttl = number_format($ttl);
    $p->SetFont('Helvetica', 'B', 11);
    $p->Cell(93, 7, 'TOTAL :', 0, 0, 'R');
    $p->Cell(30, 7, $_ttl, 0, 0, 'R');
}
function Isinya($MhswID, $KHSID, $p)
{
    $lbr = 190;
    $t = 5;
    BuatHeadernya($MhswID, $p);
    JudulKolomnya($p);
    $p->SetFont('Helvetica', '', 9);
    $_Sesi = GetaField('khs', "KHSID='{$KHSID}' and KodeID", KodeID, 'Sesi') + 0;
    $s = "select bm.*\r\n    from bipotmhsw bm\r\n\t\tleft outer join khs k on bm.TahunID=k.TahunID and bm.MhswID=k.MhswID and k.KodeID='" . KodeID . "'\r\n\twhere bm.KodeID='" . KodeID . "' \r\n\t\tand bm.MhswID = '{$MhswID}'\r\n\t\tand k.Sesi <= {$_Sesi}\r\n\t\tand bm.TrxID = '-1'\r\n\t\tand bm.Besar > 0\r\n    order by k.TahunID";
    $r = _query($s);
    $n = 0;
    $ttl = 0;
    $ttlsemua = 0;
    $_thn = "02n4lajwnrfvnaw34";
    while ($w = _fetch_array($r)) {
        if ($_thn != $w['TahunID']) {
            if ($_thn != "02n4lajwnrfvnaw34") {
                $p->SetFont('Helvetica', 'B', 9);
                $p->Cell(8, $t, '', 'T', 0);
                $p->Cell(80, $t, "Total Beasiswa Tahun {$_thn}", 'T', 0);
                $p->Cell(0, $t, number_format($ttl, 0, ',', '.'), 'T', 0, 'R');
                $p->Ln(2 * $t);
            }
            $p->SetFont('Helvetica', 'B', 10);
            $p->Cell(0, $t, $w['TahunID'], 'TB', 1);
            $p->SetFont('Helvetica', '', 9);
            $_thn = $w['TahunID'];
            $n = 0;
            $ttl = 0;
        }
        $n++;
        $p->Cell(8, $t, $n . '.', 0, 0, 'R');
        $p->Cell(101, $t, $w['Nama'] . (empty($w['TambahanNama']) ? "" : '(' . $w['TambahanNama'] . ')'), 0, 0);
        $p->Cell(27, $t, number_format($w['Jumlah'], 0, ',', '.'), 0, 0, 'R');
        $p->Cell(27, $t, number_format($w['Besar'], 0, ',', '.'), 0, 0, 'R');
        $p->Cell(27, $t, number_format($w['Jumlah'] * $w['Besar'], 0, ',', '.'), 0, 0, 'R');
        $p->Ln($t);
        $ttl += $w['Jumlah'] * $w['Besar'];
        $ttlsemua += $w['Jumlah'] * $w['Besar'];
    }
    $p->SetFont('Helvetica', 'B', 9);
    $p->Cell(8, $t, '', 'T', 0);
    $p->Cell(80, $t, "Total Beasiswa ", 'T', 0);
    $p->Cell(0, $t, number_format($ttl, 0, ',', '.'), 'T', 0, 'R');
    $p->Ln(2 * $t);
    $p->Ln($t);
    $t = 6;
    $p->SetFont('Helvetica', 'B', 11);
    $p->Cell(130, $t, '', 0, 0);
    $p->Cell(35, $t, "Total Beasiswa:", 1, 0);
    $p->Cell(25, $t, number_format($ttlsemua, 0, ',', '.'), 1, 0, 'R');
}
Exemplo n.º 5
0
// Email  : setio.dewo@gmail.com
// Start  : 23 September 2008
session_start();
include_once "../dwo.lib.php";
include_once "../db.mysql.php";
include_once "../connectdb.php";
include_once "../parameter.php";
include_once "../cekparam.php";
include_once "../header_pdf.php";
// *** Parameters ***
$TahunID = GetSetVar('TahunID');
// *** Init PDF
$pdf = new FPDF('L', 'mm', 'A5');
$pdf->SetTitle("Daftar Wisudawan - {$TahunID}");
$lbr = 190;
BuatHeadernya($pdf);
BuatIsinya($pdf);
$pdf->Output();
// *** Functions ***
function BuatHeadernya($p)
{
    global $arrID;
    $p->AddPage('L');
    $gel = GetFields('wisuda', "KodeID='" . KodeID . "' and TahunID", $_SESSION['TahunID'], "*, date_format(TglWisuda, '%d-%m-%Y') as _TglWisuda");
    $t = 8;
    $p->SetFont('Helvetica', 'B', 20);
    $p->Cell($lbr, $t, "Daftar Wisudawan {$arrID['Nama']}", 0, 1, 'C');
    $p->Cell($lbr, $t, $gel['Nama'], 0, 1, 'C');
    $p->Ln(20);
    $p->SetFont('Helvetica', 'BI', 16);
    $p->Cell($lbr, $t, "Selamat Kepada Para Wisudawan/wati Yang Berbahagia", 0, 1, 'C');
Exemplo n.º 6
0
function BuatIsinya($p)
{
    $t = 6;
    $arrAngkatan = GetArrayAngkatan($arrJml);
    $arrKelamin = GetArrayKelamin($arrJmlKelamin);
    $arrStatus = GetArrayStatus($arrJmlStatus);
    BuatHeadernya($arrKelamin, $arrStatus, $p);
    $total = 0;
    $det = array();
    for ($i = 0; $i < sizeof($arrAngkatan); $i++) {
        $angk = $arrAngkatan[$i];
        // Jumlah
        $p->SetFont('Helvetica', 'B', 10);
        $p->Cell(15, $t, $arrAngkatan[$i], 'B', 0);
        $p->SetFont('Helvetica', '', 10);
        $jml = number_format($arrJml[$arrAngkatan[$i]]);
        $p->Cell(13, $t, $jml, 'B', 0, 'R');
        $total += $arrJml[$arrAngkatan[$i]];
        // Kelamin
        foreach ($arrKelamin as $klmn) {
            $jmlkel = $arrJmlKelamin[$arrAngkatan[$i]][$klmn];
            $_jmlkel = $jmlkel == 0 ? '-' : number_format($jmlkel);
            $p->Cell(13, $t, $_jmlkel, 'B', 0, 'R');
            $det['kelamin_' . $klmn] += $jmlkel;
        }
        // Status
        foreach ($arrStatus as $stt) {
            $jmlstt = $arrJmlStatus[$arrAngkatan[$i]][$stt];
            $_jmlstt = $jmlstt == 0 ? '-' : number_format($jmlstt);
            $p->Cell(13, $t, $_jmlstt, 'B', 0, 'R');
            $det['status_' . $stt] += $jmlstt;
        }
        $p->Ln($t);
    }
    $p->SetFont('Helvetica', 'B', 10);
    // Menampilkan total
    $p->Cell(15, $t, "TOTAL :", 0, 0, 'R');
    $p->Cell(13, $t, number_format($total), 0, 0, 'R');
    // Total Kelamin
    foreach ($arrKelamin as $klmn) {
        $jml = $det['kelamin_' . $klmn];
        $_jml = number_format($jml);
        $p->Cell(13, $t, $_jml, 0, 0, 'R');
    }
    // Status
    foreach ($arrStatus as $stt) {
        $jml = $det['status_' . $stt];
        $_jml = number_format($jml);
        $p->Cell(13, $t, $_jml, 0, 0, 'R');
    }
    $p->Ln($t * 2);
    $p->SetFont('Helvetica', '', 8);
    $p->Cell(13, $t, 'Keterangan :', 0, 0);
    $p->Ln($t / 2);
    $s = "select DISTINCT(m.Kelamin)\r\n    from mhsw m\r\n    group by m.Kelamin";
    $r = _query($s);
    while ($w = _fetch_array($r)) {
        $Ket = GetaField('kelamin', "NA='N' and Kelamin", $w[Kelamin], 'Nama');
        $p->Cell(8, $t, $w[Kelamin], 0, 0);
        $p->Cell(15, $t, ': ' . $Ket, 0, 0);
        $p->Ln($t / 2);
    }
    $s = "select DISTINCT(m.StatusMhswID)\r\n    from mhsw m\r\n    group by m.StatusMhswID, m.TahunID";
    $r = _query($s);
    while ($w = _fetch_array($r)) {
        $Ket = GetaField('statusmhsw', "NA='N' and StatusMhswID", $w[StatusMhswID], 'Nama');
        $p->Cell(8, $t, $w[StatusMhswID], 0, 0);
        $p->Cell(15, $t, ': ' . $Ket, 0, 0);
        $p->Ln($t / 2);
    }
}
if (empty($ProdiID)) {
    die(ErrorMsg("Error", "Tentukan program studi-nya dulu.\r\n    <hr size=1 color=silver />\r\n    <input type=button name='Tutup' value='Tutup'\r\n      onClick='window.close()' />"));
}
// *** Main
$prds = getaField('prodi', "KodeID = '" . KodeID . "' and ProdiID", $ProdiID, 'Nama');
$jjgs = GetaField('jenjang', "JenjangID", GetaField('prodi', "KodeID = '" . KodeID . "' and ProdiID", $ProdiID, 'JenjangID'), "Nama");
$thn = NamaTahun($TahunID);
$pdf = new FPDF('P', 'mm', 'A4');
$pdf->SetTitle("Jadwal Ujian Komprehensif {$thn}");
$s1 = "select DISTINCT(r.KampusID) as _KMP, k.Tanggal as _TGL \r\n\t\t\tfrom kompredosen k \r\n\t\t\t\tleft outer join ruang r on k.RuangID=r.RuangID and r.KodeID='" . KodeID . "'\r\n\t\t\twhere k.KodeID='" . KodeID . "' \r\n\t\t\torder by _KMP, k.Tanggal";
$r1 = _query($s1);
while ($w1 = _fetch_array($r1)) {
    $pdf->AddPage('L');
    $pdf->SetAutoPageBreak(true, 5);
    HeaderLogo("JADWAL UJIAN KOMPREHENSIF - " . strtoupper($thn), $pdf, 'L', "JENJANG " . $jjgs . " PROGRAM STUDI: " . strtoupper($prds));
    BuatHeadernya($w1['_TGL'], $w1['_KMP'], $pdf);
    Isinya($w1['_TGL'], $w1['_KMP'], $pdf);
    BuatFooternya($pdf);
}
$pdf->Output();
// *** Functions ***
function BuatHeadernya($Tanggal, $KampusID, $p)
{
    $t = 6;
    $p->SetFont('Helvetica', 'B', 10);
    $p->Cell(30, $t, "Hari / Tanggal", 0, 0);
    $p->Cell(0, $t, ': ' . GetDateInWords($Tanggal), 0, 0);
    $p->Ln($t);
    $p->Cell(30, $t, "Tempat", 0, 0);
    $NamaKampus = GetaField('kampus', "KampusID='{$KampusID}' and KodeID", KodeID, "Nama");
    $p->Cell(0, $t, ': ' . $NamaKampus, 0, 0);
function Isinya($TAID, $p)
{
    $lbr = 190;
    $t = 5;
    BuatHeadernya($TAID, $p);
    JudulKolomnya($p);
    $p->SetFont('Helvetica', '', 10);
    $s = "select tb.Catatan, \n\t  date_format(tb.TglBimbingan, '%d-%m-%y') as _TglBimbingan\n    from tabimbingan tb\n    where tb.TAID = '{$TAID}'\n    order by tb.TglBimbingan";
    $r = _query($s);
    $n = 0;
    while ($w = _fetch_array($r)) {
        $n++;
        $length = 80;
        $Judul = $w['Catatan'];
        $JudulArr = array();
        if (strlen($Judul) < $length) {
            $JudulArr[] = $Judul;
        } else {
            $_Judul = $Judul;
            while (strlen($_Judul) > 0) {
                if (strlen($_Judul) > $length) {
                    $partialstring = substr($_Judul, 0, $length);
                    $temppos = strrpos($partialstring, ' ');
                    $partialstring = substr($_Judul, 0, $temppos);
                    $JudulArr[] = $partialstring;
                    $_Judul = substr($_Judul, $temppos + 1);
                } else {
                    $JudulArr[] = $_Judul;
                    $_Judul = '';
                }
            }
        }
        $partcount = 0;
        foreach ($JudulArr as $partial) {
            $p->Cell(8, $t, '', 'L', 0);
            $p->Cell(30, $t, '', 'L', 0);
            $p->Cell(160, $t, $partial, 'L', 0);
            $p->Cell(0, $t, '', 'R', 0);
            $p->Ln($t);
            $partcount++;
        }
        $p->SetY($p->GetY() - ($partcount + 1) * $t / 2);
        $p->Cell(8, $t, $n, 0, 0);
        $p->Cell(30, $t, $w['_TglBimbingan'], 0, 0, 'C');
        $p->Cell(120, $t, '', 0, 0);
        $p->SetY($p->GetY() + ($partcount - 1) * $t / 2);
        $p->Cell(0, $t, '', 'B', 0);
        $p->Ln($t);
    }
    while ($n < 16) {
        $n++;
        $p->Cell(8, $t, '', 'LT', 0);
        $p->Cell(30, $t, '', 'LT', 0);
        $p->Cell(0, $t, '', 'LTR', 0);
        $p->Ln($t / 2);
        $p->Cell(5, $t, $n, 0, 0);
        $p->Ln($t / 2);
        $p->Cell(8, $t, '', 'LB', 0);
        $p->Cell(30, $t, '', 'LB', 0, 'C');
        $p->Cell(0, $t, '', 'LBR', 0);
        $p->Ln($t);
    }
}
Exemplo n.º 9
0
function BuatIsinya($TahunID, $ProdiID, $Angkatan, $p)
{
    global $lbr;
    $n = 0;
    $t = 6;
    BuatHeadernya($TahunID, $ProdiID, $Angkatan, $p);
    $JumSesi = GetaField('prodi', "KodeID='" . KodeID . "' and ProdiID", $ProdiID, 'JumlahSesi');
    $MaxSesi = GetaField('mk', "KodeID='" . KodeID . "' and ProdiID", $ProdiID, 'MAX(Sesi)');
    $s = "select k.MhswID as _MhswID, k.Sesi, m.Nama as _NamaMhsw from khs k left outer join mhsw m on m.MhswID = k.MhswID\r\n  \t\twhere k.ProdiID = '{$ProdiID}' and m.TahunID like '{$Angkatan}%' and k.TahunID like '{$TahunID}%' group by k.MhswID";
    $q = _query($s);
    $totalJumlah = 0;
    $totalSisa = 0;
    while ($w = _fetch_array($q)) {
        $n++;
        $p->SetFont('Helvetica', '', 8);
        $p->Cell(10, $t, $n, 1, 0, 'R');
        $p->Cell(60, $t, $w[_NamaMhsw], 1, 0, 'L');
        $p->Cell(30, $t, $w[_MhswID], 1, 0, 'C');
        $js = $JumSesi;
        $CekSesi = ($TahunID - $Angkatan) * $js + $JumSesi;
        if ($CekSesi > $MaxSesi) {
            $JumSesi -= $CekSesi - $MaxSesi;
            if ($JumSesi <= 0) {
                $JumSesi = 1;
            }
        }
        $jumlahBiaya = 0;
        $jumlahBayar = 0;
        for ($i = 1; $i <= $JumSesi; $i++) {
            $sesi = ($TahunID - $Angkatan) * $js + $i;
            if ($sesi > $MaxSesi) {
                $sesi = $MaxSesi;
            }
            $s2 = "select * from khs where MhswID = '{$w['_MhswID']}' and Sesi = '{$i}' and TahunID like '{$TahunID}%' and ProdiID = '{$ProdiID}'";
            $q2 = _query($s2);
            $w2 = _fetch_array($q2);
            $jumlahBayar += $w2[Bayar];
            $bayar = $w2[Bayar] == 0 ? '-' : number_format($w2[Bayar], 0, '.', ',');
            $p->Cell(90 / $JumSesi, $t, $bayar, 1, 0, 'R');
        }
        $jumlahBiaya = GetFields('bipotmhsw', "KodeID='" . KodeID . "' and TahunID like '{$TahunID}%' and TrxID = '1' and MhswID", $w[_MhswID], 'SUM(Besar) as _jumlah');
        $jumlahPotongan = GetFields('bipotmhsw', "KodeID='" . KodeID . "' and TahunID like '{$TahunID}%' and TrxID = '-1' and MhswID", $w[_MhswID], 'SUM(Besar) as _jumlah');
        $jumlah = $jumlahBiaya[_jumlah] - $jumlahPotongan[_jumlah];
        $sisa = $jumlah - $jumlahBayar > 0 ? number_format($jumlah - $jumlahBayar, 0, '.', ',') : 'Lunas';
        //$p->Cell(30, $t, '', 1, 0, 'R');
        $p->Cell(30, $t, number_format($jumlahBayar, 0, '.', ','), 1, 0, 'R');
        $p->Cell(30, $t, $sisa, 1, 1, 'R');
        $totalJumlah += $jumlahBayar;
        $totalSisa += $jumlah - $jumlahBayar;
    }
    // buat total
    $lb = 190;
    $p->SetFont('Helvetica', 'B', 8);
    $p->Cell($lb, $t, '', 0, 0);
    $p->Cell(30, $t, number_format($totalJumlah, 0, '.', ','), 1, 0, 'R');
    $p->Cell(30, $t, number_format($totalSisa, 0, '.', ','), 1, 1, 'R');
}