ceklog();
$this->load->library('pdf_ketkul');
$this->load->library('rhrpt');
$this->load->library('rhlib');
}
function ceklog() {
$user = $this->session->userdata("user_idunlaprivate");
if($user==""){
redirect('auth/login');
}
}
function TanggalIndo($date){
$BulanIndo = array("Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember");
$tahun = substr($date, 0, 4);
$bulan = substr($date, 4, 2);
$tgl = substr($date, 6, 2);
$result =$tgl . " " . $BulanIndo[(int)$bulan-1] . " ". $tahun;
return($result);
}
function get_row_pars($table,$fields,$condition){
return $this->rhlib->get_row_pars($table,$fields,$condition);
}
function get_data($nim){
$q = "SELECT * FROM v_srtketkuliah WHERE nim='$nim'";
$query = $this->db->query($q);
$result = array();
if ($query->num_rows() > 0) {
$result = $query->result();
}
return $result;
}
function get_surat_ketkul($nim){
$row_srtketkul = $this->get_row_pars("v_srtketkuliah","nmprodi,nmortu,kdthnakademik,alamatasal,nosrtkuliah,ttl,jabatan,nmpimpinan,nmfakultas,tglsrtkuliah,nmprodi,nmmhs,nmstsetuju,kdthnakademik,nmjnssemester","nim='$nim'");
$no = $row_srtketkul->nosrtkuliah;
$nmmhs = $row_srtketkul->nmmhs;
$ortu = $row_srtketkul->nmortu;
$ttl = $row_srtketkul->ttl;
$alamatasal = $row_srtketkul->alamatasal;
$nmpimpinan = $row_srtketkul->nmpimpinan;
$jabatan = $row_srtketkul->jabatan;
$nmfakultas = $row_srtketkul->nmfakultas;
$prodi = $row_srtketkul->nmprodi;
$tahun = $row_srtketkul->kdthnakademik;
$tgl = $row_srtketkul->tglsrtkuliah;
$this->pdf_ketkul->SetCreator(PDF_CREATOR);
// set default header data
$this->pdf_ketkul->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH,PDF_HEADER_TITLE,PDF_HEADER_STRING);
$this->pdf_ketkul->setPrintHeader(true);
$this->pdf_ketkul->setPrintFooter(false);
// set header and footer fonts
$this->pdf_ketkul->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', 10));
$this->pdf_ketkul->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$this->pdf_ketkul->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$this->pdf_ketkul->SetMargins('30', '45', PDF_MARGIN_RIGHT);
$this->pdf_ketkul->SetHeaderMargin('10');
$this->pdf_ketkul->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$this->pdf_ketkul->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$this->pdf_ketkul->setImageScale(PDF_IMAGE_SCALE_RATIO);
// set some language-dependent strings (optional)
// ---------------------------------------------------------
// set font
$this->pdf_ketkul->SetCellPadding(0);
// add a page
$this->pdf_ketkul->AddPage();
/* $text4 = $nmfakultas;
$x_text4 = 42;
$y_text4 = 25;
$this->pdf_ketkul->SetFont('helvetica', '', 15);
$this->pdf_ketkul->Text($x_text4,$y_text4,$text4,false);
*/
$this->pdf_ketkul->SetFont('times','',20);
$this->pdf_ketkul->writeHTMLCell(0,0,45,25, $nmfakultas, '', 0, false, true, 'C', false);
$this->pdf_ketkul->Cell(0,14,'',0,1,'C');
$this->pdf_ketkul->Cell(0,14,'',0,1,'C');
$this->pdf_ketkul->SetFont('helvetica', 'U.B', 16);
$this->pdf_ketkul->Write(0, 'SURAT KETERANGAN MASIH KULIAH', '', 0, 'C', true, 0, false, false, 0);
$this->pdf_ketkul->SetFont('helvetica', '', 12);
$this->pdf_ketkul->Write(0, 'Nomor : '.$no, '', 0, 'C', true, 0, false, false, 0);
$this->pdf_ketkul->Cell(40,10,'',0,1,'C');
$this->pdf_ketkul->SetFont('helvetica', '', 11);
$this->pdf_ketkul->Cell(40,10,'Yang bertanda tangan dibawah ini :',0,1,'L');
$this->pdf_ketkul->Cell(58,5,'Nama',0,0,'L');
$this->pdf_ketkul->Cell(5,5,': '.$nmpimpinan,0,1,'L');
$this->pdf_ketkul->Cell(58,5,'N I K',0,0,'L');
$this->pdf_ketkul->Cell(5,5,': ',0,1,'L');
$this->pdf_ketkul->Cell(58,5,'Pangkat/Gol/Ruang/Jab.',0,0,'L');
$this->pdf_ketkul->Cell(5,5,': ',0,1,'L');
$this->pdf_ketkul->Cell(58,5,'Jabatan',0,0,'L');
$this->pdf_ketkul->Cell(5,5,': '.$jabatan,0,1,'L');
$this->pdf_ketkul->Cell(0,5,'',0,1,'C');
$this->pdf_ketkul->Write(0, 'Pada Fakultas '.$nmfakultas.' Universitas Langlangbuana,', '', 0, 'L', true, 0, false, false, 0);
$this->pdf_ketkul->Write(0, 'menyatakan dengan sesungguhnya bahwa:', '', 0, 'L', true, 0, false, false, 0);
$this->pdf_ketkul->Cell(0,5,'',0,1,'C');
$this->pdf_ketkul->Cell(58,5,'Nama',0,0,'L');
$this->pdf_ketkul->Cell(5,5,': '.$nmmhs,0,1,'L');
$this->pdf_ketkul->Cell(58,5,'N P M',0,0,'L');
$this->pdf_ketkul->Cell(5,5,': '.$nim,0,1,'L');
$this->pdf_ketkul->Cell(58,5,'Tempat / Tgl Lahir',0,0,'L');
$this->pdf_ketkul->Cell(5,5,': '.$ttl,0,1,'L');
$this->pdf_ketkul->Cell(58,5,'Alamat',0,0,'L');
$this->pdf_ketkul->Cell(5,5,': '.$alamatasal,0,1,'L');
$this->pdf_ketkul->Cell(0,5,'',0,1,'C');
$this->pdf_ketkul->Write(0, 'Adalah benar mahasiswa '.$nmfakultas.' , pada:', '', 0, 'L', true, 0, false, false, 0);
$this->pdf_ketkul->Cell(58,5,'Jurusan/Smt/Kls',0,0,'L');
$this->pdf_ketkul->Cell(5,5,': '.$prodi,0,1,'L');
$this->pdf_ketkul->Cell(58,5,'Tahun Akademik',0,0,'L');
$this->pdf_ketkul->Cell(5,5,': '.$tahun,0,1,'L');
$this->pdf_ketkul->Write(0, 'Dan mahasiswa tersebut adalah Anak dari', '', 0, 'L', true, 0, false, false, 0);
$this->pdf_ketkul->Cell(58,5,'N a m a',0,0,'L');
$this->pdf_ketkul->Cell(5,5,': '.$ortu,0,1,'L');
$this->pdf_ketkul->Cell(58,5,'NIP/NRP',0,0,'L');
$this->pdf_ketkul->Cell(5,5,': ',0,1,'L');
$this->pdf_ketkul->Cell(58,5,'Pangkat/Gol/Ruang',0,0,'L');
$this->pdf_ketkul->Cell(5,5,': ',0,1,'L');
$this->pdf_ketkul->Cell(58,5,'Jabatan',0,0,'L');
$this->pdf_ketkul->Cell(5,5,': ',0,1,'L');
$this->pdf_ketkul->Cell(58,5,'Instansi',0,0,'L');
$this->pdf_ketkul->Cell(5,5,': ',0,1,'L');
$this->pdf_ketkul->Cell(0,5,'',0,1,'C');
$this->pdf_ketkul->Write(0, 'Demikian surat pernyataan ini dibuat, dengan sesungguhnya untuk dipergunakan seperlunya.', '', 0, 'L', true, 0, false, false, 0);
$html =
'
Bandung, '.$this->TanggalIndo(date("Ymd",strtotime($tgl))).' | |||||
a.n Dekan, | |||||
Wakil Dekan I Bidang Akademik | |||||
'.$nmpimpinan.' |