$ProgramID = GetSetVar('_jdwlProg'); $_jdwlHari = GetSetVar('_jdwlHari'); $_jdwlKelas = GetSetVar('_jdwlKelas'); $_jdwlSemester = GetSetVar('_jdwlSemester'); $thn = GetFields('tahun', "TahunID='{$TahunID}' and KodeID='" . KodeID . "' and ProdiID='{$ProdiID}' and ProgramID", $ProgramID, "*"); $lbr = 280; $pdf = new FPDF('L'); $pdf->SetTitle("Jadwal Kuliah - {$TahunID}"); $pdf->SetAutoPageBreak(true, 5); $pdf->AddPage('L'); $pdf->SetFont('Helvetica', 'B', 14); HeaderLogo("Jadwal Kuliah", $pdf, 'L'); // Buat header dulu BuatHeader($thn, $pdf); // Tampilkan datanya AmbilJadwal($thn, $pdf); // Buat footer BuatFooter($thn, $pdf); $pdf->Output(); // *** Functions *** function BuatFooter($thn, $p) { global $arrID; $mrg = 220; $t = 6; // Tanda tangan $pjbt = GetFields('pejabat', "KodeID='" . KodeID . "' and KodeJabatan", 'PUKET1', "*"); $p->Ln(4); $p->Cell($mrg); $p->Cell(60, $t, $arrID['Kota'] . ", " . date('d M Y'), 0, 1); $p->Cell($mrg);
include_once "../connectdb.php"; include_once "../parameter.php"; include_once "../cekparam.php"; include_once "../header_pdf.php"; // *** Parameters *** $TahunID = GetSetVar('TahunID'); $DosenID = GetSetVar('DosenID'); $dsn = GetFields('dosen', "Login='******' and KodeID", KodeID, "*"); // *** Main *** $pdf = new PDF(); $pdf->SetTitle("Jadwal Dosen"); $pdf->AddPage(); // Buat header dulu BuatHeader($TahunID, $dsn, $pdf); // Tampilkan datanya AmbilJadwal($TahunID, $dsn, $pdf); $pdf->Output(); // *** Functions *** function BuatHeader($TahunID, $dsn, $p) { $lbr = 190; $t = 5; $p->SetFont('Helvetica', 'B', 14); $p->Cell($lbr, $t, "Jadwal Mengajar - {$TahunID}", 0, 1, 'C'); $p->Cell($lbr, $t, "Dosen: {$dsn['Nama']}, {$dsn['Gelar']}", 0, 1, 'C'); $p->Ln(2); } 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);
$pdf = new FPDF('L', 'mm', 'A4'); $pdf->SetTitle("Jadwal Remedial"); if ($JRID == 0) { $prodistring = empty($_SESSION['_remedialProdiID']) ? "" : "and jr.ProdiID='{$_SESSION['_remedialProdiID']}'"; $tahunstring = empty($_SESSION['_remedialTahunID']) ? "" : "and jr.TahunID='{$_SESSION['_remedialTahunID']}'"; $s = "select jr.* \r\n\t\t\tfrom jadwalremedial jr\r\n\t\t\twhere jr.KodeID='" . KodeID . "' {$prodistring} {$tahunstring} "; $r = _query($s); } else { $s = "select jr.*\r\n\t\t\tfrom jadwalremedial jr\r\n\t\t\twhere jr.KodeID='" . KodeID . "' and JadwalRemedialID='{$JRID}'"; $r = _query($s); } $pdf->AddPage('L', 'A4'); $pdf->SetFont('Helvetica', 'B', 16); $pdf->Cell($lbr, 9, "JADWAL REMEDIAL", 0, 0, 'C'); $pdf->Ln(9); AmbilJadwal($r, $pdf); $pdf->Ln(9); AmbilFooter($pdf); $pdf->Output(); // *** Functions *** function AmbilFooter($p) { $p->SetFont('Helvetica', 'B', 12); $t = 7; $identitas = GetFields('identitas', 'Kode', KodeID, '*'); $p->Cell(270, $t, $identitas['Kota'] . ', ' . AmbilBulan(date('m')) . ' ' . date('Y'), 0, 1); $p->Cell(270, $t, '', 0, 1); $p->Cell(270, $t, 'BAAK', 0, 1); } function AmbilJadwal($query, $p) {
include_once "../connectdb.php"; include_once "../parameter.php"; include_once "../cekparam.php"; include_once "../header_pdf.php"; // *** Parameters *** $TahunID = GetSetVar('TahunID'); $ProdiID = GetSetVar('ProdiID'); $ProgramID = GetSetVar('ProgramID'); //die("$TahunID » $ProdiID » $ProgramID"); $lbr = 190; $pdf = new PDF(); $pdf->SetTitle("Jadwal Mengajar Dosen - {$TahunID}"); // Buat header dulu //BuatHeader($TahunID, $ProdiID, $pdf); // Tampilkan datanya AmbilJadwal($TahunID, $ProdiID, $pdf); // Buat footer BuatFooter($pdf); $pdf->Output(); // *** Functions *** function BuatFooter($p) { global $arrID; $mrg = 130; $t = 6; // Tanda tangan $pjbt = GetFields('pejabat', "KodeID='" . KodeID . "' and KodeJabatan", 'KABAA', "*"); $p->Ln(4); $p->Cell($mrg); $p->Cell(60, $t, $arrID['Kota'] . ", " . date('d M Y'), 0, 1); $p->Cell($mrg);
$n = _num_rows($r); while ($w = _fetch_array($r)) { if ($countToThree == 3) { $countToThree = 0; $pdf->AddPage('P', 'A4'); } $currentheight = $cardheight * $countToThree; $pdf->SetFont('Helvetica', 'B', 9); $pdf->SetY($currentheight + 28); $pdf->Cell($lbr1, 9, "KARTU UJIAN SELEKSI MASUK", 0, 0, 'C'); $pdf->Cell($lbr2, 9, "JADWAL UJIAN SELEKSI MASUK", 0, 1, 'C'); $pdf->Ln(9); // Tampilkan datanya HeaderLogo($currentheight, $pdf); AmbilKartu($w['PMBID'], $w['Nama'], $w['Alamat'], $w['Kota'], $w['Pilihan1'], $w['Pilihan2'], 37 + $currentheight, $pdf); AmbilJadwal($w['RuangID'], $w['Pilihan1'], $gelombang, 37 + $currentheight, $pdf); $pdf->SetY($currentheight + $cardheight); if ($countToThree != 2) { $pdf->Cell(190, 0, "", 1, 1); } $countToThree++; } $pdf->Output(); // *** Functions *** function AmbilKartu($PMBID, $Nama, $Alamat, $Kota, $Pilihan1, $Pilihan2, $Y, $p) { if (!empty($Pilihan1)) { $s1 = "select ProdiID, Nama from `prodi` where ProdiID='{$Pilihan1}' "; $r1 = _query($s1); $w1 = _fetch_array($r1); $Pilihan1String = $Pilihan1 . ' - ' . $w1['Nama'];
$pdf->AddPage('P', 'A4'); $pdf->SetFont('Helvetica', 'B', 9); $pdf->SetY(28); $pdf->Cell($lbr1, 9, "KARTU UJIAN SELEKSI MASUK", 0, 0, 'C'); $pdf->Cell($lbr2, 9, "JADWAL UJIAN SELEKSI MASUK", 0, 0, 'C'); $pdf->Ln(9); $s = "select PMBID, Nama, Alamat, RuangID, Pilihan1, Pilihan2, Pilihan3, PMBFormulirID, Foto from `pmb` where PMBID='{$PMBID}' and KodeID='" . KodeID . "'"; $r = _query($s); $w = _fetch_array($r); $prodi1 = $w['Pilihan1']; $s = "update pmb set CetakKartu = CetakKartu+1 where PMBID='{$PMBID}' and KodeID='" . KodeID . "'"; $r = _query($s); // Tampilkan datanya HeaderLogo($pdf); AmbilKartu($w['PMBID'], $w['Nama'], $w['Alamat'], $w['Kota'], $w['Pilihan1'], $w['Pilihan2'], $w['Pilihan3'], $w['Foto'], 37, $pdf); AmbilJadwal($w, $gelombang, 37, $pdf); $pdf->SetY(98); $pdf->Cell(190, 0, "", 1, 1); $pdf->Output(); // *** Functions *** function AmbilKartu($PMBID, $Nama, $Alamat, $Kota, $Pilihan1, $Pilihan2, $Pilihan3, $Foto, $Y, $p) { if (!empty($Pilihan1)) { $s1 = "select ProdiID, Nama from `prodi` where ProdiID='{$Pilihan1}' "; $r1 = _query($s1); $w1 = _fetch_array($r1); $Pilihan1String = $Pilihan1 . ' - ' . $w1['Nama']; } else { $Pilihan1String = '<Belum pilih>'; } if (!empty($Pilihan2)) {