ceklog();
$this->load->library('pdf');
$this->load->library('rhrpt');
$this->load->library('rhlib');
$this->load->library('cezpdf');
}
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 getdata($wherex){
$this->db->select("*");
$this->db->from("v_mhs_lulus");
$where['nim'] =$wherex;
$this->db->where($where);
$q = $this->db->get();
$result = array();
if ($q->num_rows() > 0) {
$result = $q->result();
}
return $result;
}
function get_surat_lulus($var){
$par = explode("istra", $var);
$nim = $par[0];
$this->pdf->SetCreator(PDF_CREATOR);
// set default header data
$this->pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH,PDF_HEADER_TITLE,PDF_HEADER_STRING);
$this->pdf->setPrintHeader(true);
$this->pdf->setPrintFooter(false);
// set header and footer fonts
$this->pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', 10));
$this->pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$this->pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$this->pdf->SetMargins('15', '45', '35');
$this->pdf->SetHeaderMargin('10');
$this->pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$this->pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$this->pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
// set some language-dependent strings (optional)
// ---------------------------------------------------------
// set font
$this->pdf->SetCellPadding(0);
// add a page
$this->pdf->AddPage();
$tgllulus = '';
$data = $this->getdata($nim);
foreach($data as $row)
{
$tgllulus = $row->tgllulus;
$tgllulus2 = (!$tgllulus) ? null:$this->TanggalIndo(date("Ymd",strtotime($tgllulus)));
$this->pdf->SetFont('times', 'B'.'U', 16);
$this->pdf->Write(0, 'SURAT KETERANGAN LULUS', '', 0, 'C', true, 0, false, false, 0);
$this->pdf->SetFont('times', '', 11);
$this->pdf->Write(0, 'Nomor: '.$row->noskl, '', 0, 'C', true, 0, false, false, 0);
$this->pdf->Cell(40,10,'',0,1,'C');
$html = '
Yang bertanda tangan dibawah ini Rektor Universitas Langlangbuana, menerangkan bahwa :
Nama |
: |
'.$row->nmmhs.' |
|
N.I.M |
: |
'.$row->nim.' |
|
Program Studi |
: |
'.$row->nmprodi.' |
|
Alamat |
: |
'.$row->alamatasal.' |
Nama tersebut diatas, telah menyelesaikan Proses Pembelajaran
di Program Studi '.$row->nmprodi.' dan dinyatakan LULUS pada Sidang Yudisium tanggal '.$tgllulus2.'.
Adapun ijazah dan Transkip Nilai masih dalam proses.
Demikian surat keterangan ini dibuat untuk dapat dipergunakan sebagaimana mestinya.
|
|
|
|
|
Bandung, '.$this->TanggalIndo(date("Ymd")).' |
|
|
|
|
|
Rektor, |
|
|
|
|
|
|
|
|
|
|
'.$row->nmpimpinan.' |
|
|
|
|
|
'.$row->gelar.' |
';
$this->pdf->writeHTML($html, true, 0, true, 0);
}
$this->pdf->Output('Surat_lulus.pdf', 'I');
}
}