$agama = mysql_fetch_array(mysql_query("SELECT * FROM mst_agama WHERE replid='" . $r['agama'] . "' LIMIT 0,1")); $kelamin = array('L' => 'Laki-laki', 'P' => 'Perempuan'); $a = 0; // add a page $pdf->AddPage(); page_header(); require_once 'header.php'; $pdf->SetFont(mydeffont, '', 12, '', true); $pdf->MultiCell($dcPageW, 0, 'DATA CALON SISWA BARU', 0, 'C', 0, 1, '', '', true); dc_YDown(3); if (mysql_num_rows($t) > 0) { head_label('Departemen', $departemen['departemen']); head_label('Proses Penerimaan', $proses['proses']); head_label('Kelompok', $kelompok['kelompok']); head_label('No. Pendaftaan', $r['nopendaftaran']); dc_Linebar('', '', 2, 5); group_label('Data Pribadi Siswa'); head_label('Nama', $r['nama']); head_label('Jenis kelamin', $kelamin[$r['kelamin']]); head_label('Tempat lahir', $r['tmplahir']); head_label('Tanggal lahir', fftgl($r['tgllahir'])); head_label('Agama', $agama['agama']); head_label('Alamat rumah', $r['alamat']); head_label('Telepon rumah', $r['telpon']); $pdf->Ln(); if (strlen($r['photo']) > 0) { $cx = $pdf->GetX(); $cy = $pdf->GetY(); $pdf->SetX(100); $pdf->SetY(30); $imgdata = base64_decode(chunk_split($r['photo']));
<?php if($departemen['nama']!=''){ if($departemen['photo']!=''){ $imgdata = base64_decode($departemen['photo']); $pdf->Image('@'.$imgdata); } $pdf->SetFont(mydeffont, 'B', 16, '', true); $pdf->MultiCell($dcPageW, 0, $departemen['nama'], 0, 'C', 0, 1, '', '', true); dc_YDown(2); $pdf->SetFont(mydeffont, '', 8, '', true); $pdf->MultiCell($dcPageW, 0, $departemen['alamat'].($departemen['telpon']==''?'':'. Telepon: '.$departemen['telpon']), 0, 'C', 0, 1, '', '', true); dc_Linebar('','',2,0.5); dc_Linebar('','',0,2); dc_YDown(5); } ?>
<?php if ($departemen['nama'] != '') { if ($departemen['photo'] != '') { $imgdata = base64_decode($departemen['photo']); $pdf->Image('@' . $imgdata); } $pdf->SetFont('dejavusans', 'B', 16, '', true); $pdf->MultiCell($dcPageW, 0, $departemen['nama'], 0, 'C', 0, 1, '', '', true); dc_YDown(2); $pdf->SetFont('dejavusans', '', 8, '', true); $pdf->MultiCell($dcPageW, 0, $departemen['alamat'] . ($departemen['telpon'] == '' ? '' : '. Telepon: ' . $departemen['telpon']), 0, 'C', 0, 1, '', '', true); dc_Linebar(); dc_YDown(5); }