Esempio n. 1
0
include_once "../connectdb.php";
include_once "../parameter.php";
include_once "../cekparam.php";
include_once "../header_pdf.php";
// *** Parameters ***
$kurid = GetSetVar('k');
$kur = GetFields('kurikulum', 'KurikulumID', $kurid, '*');
if (empty($kur)) {
    die(ErrorMsg('Error', "Kurikulum tidak ditemukan.<br />\r\n    Hubungi sysadmin utk informasi lebih lanjut.\r\n    <hr size=1 color=silver />\r\n    <input type=button name='Tutup' value='Tutup' onClick='window.close()' />"));
}
$pdf = new PDF();
$pdf->SetTitle("Matakuliah");
$pdf->AddPage();
$pdf->SetFont('Helvetica', 'B', 14);
CetakHeadernya($kur, $pdf);
CetakMatakuliahnya($kur, $pdf);
$pdf->Output();
// *** Functions ***
function CetakHeadernya($kur, $p)
{
    $lbr = 190;
    $t = 6;
    $_prd = GetaField('prodi', "ProdiID='{$kur['ProdiID']}' and KodeID", KodeID, 'Nama');
    $p->SetFont('Helvetica', 'B', 14);
    $p->Cell($lbr, $t, "Daftar Matakuliah Kurikulum: {$kur['Nama']}", 0, 1, 'C');
    $p->Cell($lbr, $t, "Program Studi: {$_prd}", 0, 1, 'C');
    $p->Ln(3);
}
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";
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 "../fpdf.php";
// *** Parameters ***
$MKPaketID = GetSetVar('MKPaketID');
$pdf = new FPDF();
$pdf->SetTitle("Matakuliah Paket");
$pdf->AddPage();
$pdf->SetFillColor(200, 200, 200);
$pdf->SetFont('Helvetica', 'B', 14);
CetakHeadernya($MKPaketID, $pdf);
CetakMatakuliahnya($MKPaketID, $pdf);
$pdf->Output();
// *** Functions ***
function CetakHeadernya($MKPaketID, $p)
{
    $lbr = 190;
    $t = 6;
    if (empty($MKPaketID)) {
        $_pid = "(SEMUA)";
    } else {
        $_pid = GetaField('mkpaket', "MKPaketID='{$MKPaketID}' and KodeID", KodeID, 'Nama');
    }
    HeaderLogo("Daftar Mata Kuliah Paket: {$_pid}", $p, 'P');
}
function CetakMatakuliahnya($MKPaketID, $p)
{
// Start  : 20 Oktober 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 ***
$ProdiID = GetSetVar('p');
$pdf = new PDF();
$pdf->SetTitle("Matakuliah");
$pdf->AddPage();
$pdf->SetFont('Helvetica', 'B', 14);
CetakHeadernya($ProdiID, $pdf);
CetakMatakuliahnya($ProdiID, $pdf);
$pdf->Output();
// *** Functions ***
function CetakHeadernya($ProdiID, $p)
{
    $lbr = 190;
    $t = 6;
    if (empty($ProdiID)) {
        $_prd = "(SEMUA)";
    } else {
        $_prd = GetaField('prodi', "ProdiID='{$kur['ProdiID']}' and KodeID", KodeID, 'Nama');
    }
    $p->SetFont('Helvetica', 'B', 14);
    $p->Cell($lbr, $t, "Daftar Kurikulum Program Studi: {$_prd}", 0, 1, 'C');
    $p->Ln(3);
}