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 get_bilangan($num){ return $this->rhlib->get_bilangan($num); } function get_par_val($table,$fieldName,$condition){ return $this->rhlib->get_par_val($table,$fieldName,$condition); } function get_row_pars($table,$fields,$condition){ return $this->rhlib->get_row_pars($table,$fields,$condition); } function get_data($nim){ $q = "SELECT * FROM v_srtobservasi WHERE nim='$nim'"; $query = $this->db->query($q); $result = array(); if ($query->num_rows() > 0) { $result = $query->result(); } return $result; } function get_surat_observasi($nim){ $row_srtobservasi = $this->get_row_pars("v_srtobservasi","nmprodi, alamatasal,nosrtobservasi,jabatan,nmpimpinan,nmfakultas, tglsrtobservasi,perihal,instansi,keterangan,keperluan,nmprodi,nmmhs,nmstsetuju, tingkat,nmkelas","nim='$nim'"); $no = $row_srtobservasi->nosrtobservasi; $nmmhs = $row_srtobservasi->nmmhs; $alamatasal = $row_srtobservasi->alamatasal; $nmpimpinan = $row_srtobservasi->nmpimpinan; $jabatan = $row_srtobservasi->jabatan; $nmfakultas = $row_srtobservasi->nmfakultas; $prodi = $row_srtobservasi->nmprodi; //$tahun = $row_srtobservasi->kdthnakademik; $tgl = $row_srtobservasi->tglsrtobservasi; $perihal = $row_srtobservasi->perihal; $keterangan = $row_srtobservasi->keterangan; $instansi = $row_srtobservasi->instansi; $keperluan = $row_srtobservasi->keperluan; //$semester = $row_srtobservasi->nmjnssemester; $tingkat = $row_srtobservasi->tingkat; $nmkelas = $row_srtobservasi->nmkelas; $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, '', 9)); $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(PDF_MARGIN_LEFT, '45', PDF_MARGIN_RIGHT); $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) // --------------------------------------------------------- $this->pdf->SetCellPadding(0); // add a page $this->pdf->AddPage(); $html ='
Nomor | :' .$no.' | |
Lampiran | : - | |
Perihal | :' .$perihal.' | |
Kepada Yth | : | |
Dekan FAKULTAS ' .$nmfakultas.' Universitas Langlangbuana Bandung | ||
menerangkan bahwa | : | |
Nama | :' .$nmmhs.' | |
NPM | :' .$nim.' | |
Alamat | :' .$alamatasal.' | |
Jurusan | :' .$prodi.' | |
Semester/Kelas | :' .$tingkat.' / ' .$nmkelas.' | |
Bermaksud '.$perihal.' pada '.$instansi.' yang bersangkutan tentang aspek-aspek : "'.$keterangan.'". Keperluan untuk '.$keperluan.'. | ||
Besar harapan kami, kiranya bapak/ibu dapat memberikan bantuan guna kemajuan mahasiswa kami tersebut. | ||
Atas perhatian dan kerjasama yang baik, kami ucapkan terimaksih. | ||
Bandung, '.$this->TanggalIndo(date("Ymd",strtotime($tgl))).' | ||
A.n.Dekan | ||
Wakil Dekan I Bidang Akademik, | ||
'.$nmpimpinan.' |