public function cetak() { $cek = $this->session->userdata('logged_in'); if (!empty($cek)) { $NoDaftar = $this->session->userdata('nim'); $NoUjian = $this->app_model->CariNoUjian($NoDaftar); $d['NoDaftar'] = $this->session->userdata('nim'); $d['NoUjian'] = $NoUjian; // ambil data dengan memanggil fungsi di model $data = $this->app_model->getSelectedData("mspcmb", $d); $num_rows = $data->num_rows(); if ($num_rows > 0) { // memanggil (instantiasi) class reportProduct di file print_rekap_helper.php $pdf = new reportProduct(); // anda dapat membuat report lainnya dalam satu file print_rekap_helper.php // dengan cukup mengubah setKriteria dan membuat kondisi (elseif) di file print_rekap_helper.php $pdf->setKriteria("transaksi"); // judul report $pdf->setNama("DATA TRANSAKSI UNTUK BARANG " . $NoDaftar); // buat halaman $pdf->AliasNbPages(); // Potrait ukuran A4 $pdf->AddPage("P", "A4"); foreach ($data->result() as $t) { //Instanciation of inherited class $thA = $t->ThAjaran; //$th = $thA.'/'.$thA+1; $A4[0] = 210; $A4[1] = 297; $Q[0] = 216; $Q[1] = 279; //$pdf=new PDF('P','mm',$A4); //$pdf->Open(); //$pdf->AliasNbPages(); //$pdf->AddPage(); $pdf->SetTitle('KARTU UJIAN CALOM MAHASISWA BARU' . $thA); $pdf->SetCreator('puskom.iainbanten.ac.id with fpdf'); $pdf->SetLineWidth(0.3); $pdf->SetXY(6, 6); $pdf->Cell(96, 120, '', 1, 0, 'C'); $pdf->Cell(6, 120, '', 0, 0, 'C'); $pdf->Cell(96, 120, '', 1, 1, 'C'); $pdf->Image(base_url() . 'asset/images/logo-iain2.jpg', 8, 8, 15, 15); $pdf->SetXY(6, 8); $pdf->SetFont('Times', 'B', 9); $pdf->Cell(96, 4, 'KARTU UJIAN', 0, 1, 'C'); $pdf->Ln(); $pdf->SetFont('Times', 'B', 8); $pdf->SetX(6); $pdf->Cell(96, 3, 'Penerimaan Calon Mahasiswa Baru (S1)', 0, 1, 'C'); $pdf->SetX(6); $pdf->Cell(96, 3, 'Institut Agama Islam Negeri', 0, 1, 'C'); $pdf->SetX(6); $pdf->Cell(96, 3, '"Sultan Maulana Hasanuddin" Banten', 0, 1, 'C'); $pdf->SetX(6); $pdf->Cell(96, 3, 'Tahun Akademik ' . $thA, 0, 1, 'C'); $pdf->Ln(10); $pdf->SetFont('Times', '', 8); $pdf->Cell(30, 5, 'Ruang Ujian', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->Cell(61, 5, $t->RUjian, 0, 1, 'L', false); $pdf->Cell(30, 5, 'Nomor Ujian', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->SetFont('Times', 'B', 8); $pdf->Cell(61, 5, $t->NoUjian, 0, 1, 'L', false); $pdf->SetFont('Times', '', 8); $pdf->Cell(30, 5, 'Nama', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->Cell(61, 5, $t->Nama, 0, 1, 'L', false); $pdf->Cell(10, 5, 'Jurusan', 0, 0, 'L', false); $pdf->Cell(20, 5, 'PIL.1', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->Cell(61, 5, $t->Jur1 . '-' . $this->app_model->cari_jurusan($t->Jur1), 0, 1, 'L', false); $pdf->Cell(10, 5, '', 0, 0, 'L', false); $pdf->Cell(20, 5, 'PIL.2', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->Cell(61, 5, $t->Jur2 . '-' . $this->app_model->cari_jurusan($t->Jur2), 0, 1, 'L', false); $pdf->Cell(10, 5, '', 0, 0, 'L', false); $pdf->Cell(20, 5, 'PIL.3', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->Cell(61, 5, $t->Jur3 . '-' . $this->app_model->cari_jurusan($t->Jur3), 0, 1, 'L', false); /* $pdf->Cell(10,5,'',0,0,'L',false); $pdf->Cell(20,5,'PIL.3',0,0,'L',false); $pdf->Cell(5,5,':',0,0,'C',false); $pdf->Cell(61,5,$Jur3,0,1,'L',false); */ $pdf->Ln(10); $pdf->Cell(40, 3, '', 0, 0); $pdf->Cell(56, 3, 'Serang, ' . $this->app_model->tgl_indo($t->TglDaftar), 0, 1, 'C'); $pdf->Cell(40, 3, '', 0, 0); $pdf->Cell(56, 3, 'Peserta,', 0, 1, 'C'); $pdf->Ln(20); $pdf->SetFont('', 'B'); $pdf->Cell(40, 2, '', 0, 0); $pdf->Cell(56, 2, $t->Nama, 0, 1, 'C'); $pdf->Cell(40, 2, '', 0, 0); $pdf->Cell(56, 2, '-------------------------------------', 0, 1, 'C'); $pdf->Cell(40, 2, '', 0, 0); $pdf->SetFont('', 'I'); $pdf->Cell(56, 2, 'Nama Jelas & Tanda Tangan', 0, 1, 'C'); /* $pdf->SetXY(12,77); $pdf->SetLineWidth(.1); $pdf->Cell(35,43,'Pas Foto 4 x 6',1,1,'C'); */ /* $config['image_library'] = 'gd2'; $config['source_image'] = './peserta/foto/'.$t->foto;//'/path/to/image/mypic.jpg'; //$config['create_thumb'] = TRUE; $config['maintain_ratio'] = TRUE; $config['width'] = 320; $config['height'] = 150; $this->load->library('image_lib', $config); $foto = $this->image_lib->resize(); */ $pdf->SetXY(12, 77); $foto = $t->foto; if (empty($foto)) { $pdf->SetLineWidth(0.1); $pdf->Cell(35, 43, 'Pas Foto 4 x 6', 1, 1, 'C'); } else { $pdf->Image(base_url() . 'peserta/foto/' . $foto); } $pdf->SetXY(108, 8); $pdf->SetFont('', 'B'); $pdf->Cell(96, 3, 'JADWAL UJIAN', 0, 1, 'C'); $pdf->Ln(4); $pdf->SetFont('Arial', 'B', 8); $pdf->SetX(108); $pdf->Cell(96, 3, 'TES TULIS', 0, 1, 'C'); $pdf->Ln(4); $pdf->SetFillColor(229, 229, 229); $pdf->SetFont('Helvetica', '', 7); $pdf->SetX(113); $pdf->Cell(84, 3, 'PROGRAM STRATA 1 (S1)', 0, 1, 'L'); $pdf->SetX(114); $pdf->SetFont('Helvetica', 'B', 7); $pdf->Cell(5, 5, 'No', 1, 0, 'C', true); $pdf->Cell(45, 5, 'Mata Ujian', 1, 0, 'C', true); $pdf->Cell(17, 5, 'Tanggal', 1, 0, 'C', true); $pdf->Cell(19, 5, 'Waktu', 1, 1, 'C', true); $pdf->SetX(114); $pdf->SetFont('Helvetica', '', 7); $pdf->Cell(5, 3, '1.', 'LR', 0, 'C'); $pdf->Cell(45, 3, 'Pengetahuan Agama (Tafsir, Hadits, ', 'LR', 0, 'L'); $pdf->Cell(17, 3, '30 Juli 2013', 'LR', 0, 'L'); $pdf->Cell(19, 3, '08.00 s/d 10.00', 'LR', 1, 'C'); $pdf->SetX(114); $pdf->Cell(5, 3, '', 'LR', 0, 'C'); $pdf->Cell(45, 3, 'Tauhid, Fiqh dan Sejarah ', 'LR', 0, 'L'); $pdf->Cell(17, 3, '', 'LR', 0, 'L'); $pdf->Cell(19, 3, '', 'LR', 1, 'C'); $pdf->SetX(114); $pdf->Cell(5, 3, '', 'LBR', 0, 'C'); $pdf->Cell(45, 3, 'Kebudayaan Islam)', 'LBR', 0, 'L'); $pdf->Cell(17, 3, '', 'LBR', 0, 'L'); $pdf->Cell(19, 3, '', 'LBR', 1, 'C'); $pdf->SetX(114); $pdf->Cell(5, 3, '2.', 'LR', 0, 'C'); $pdf->Cell(45, 3, 'Pengetahuan Umum (PPKn, Bhs. ', 'LR', 0, 'L'); $pdf->Cell(17, 3, '30 Juli 2013', 'LR', 0, 'L'); $pdf->Cell(19, 3, '10.30 s/d 12.30', 'LR', 1, 'C'); $pdf->SetX(114); $pdf->Cell(5, 3, '', 'LBR', 0, 'C'); $pdf->Cell(45, 3, 'Indonesia, IPS, IPA, dan Matematika) ', 'LBR', 0, 'L'); $pdf->Cell(17, 3, '', 'LBR', 0, 'L'); $pdf->Cell(19, 3, '', 'LBR', 1, 'C'); $pdf->SetX(114); $pdf->Cell(5, 3, '3.', 'LBR', 0, 'C'); $pdf->Cell(45, 3, 'Bahasa Arab', 'LBR', 0, 'L'); $pdf->Cell(17, 3, '31 Juli 2013', 'LBR', 0, 'L'); $pdf->Cell(19, 3, '08.00 s/d 10.00', 'LBR', 1, 'C'); $pdf->SetX(114); $pdf->Cell(5, 3, '4.', 'LBR', 0, 'C'); $pdf->Cell(45, 3, 'Bahasa Inggris', 'LBR', 0, 'L'); $pdf->Cell(17, 3, '31 Juli 2013', 'LBR', 0, 'L'); $pdf->Cell(19, 3, '10.30 s/d 12.30', 'LBR', 1, 'C'); $pdf->Ln(10); $pdf->SetX(108); $pdf->SetFont('Helvetica', 'B', 7); $pdf->Cell(96, 3, 'TES LISAN', 0, 1, 'C'); $pdf->Ln(4); $pdf->SetX(113); $pdf->SetFont('Helvetica', '', 7); $pdf->Cell(84, 3, 'PROGRAM STRATA 1 (S1)', 0, 1, 'L'); $pdf->SetFillColor(229, 229, 229); $pdf->SetX(114); $pdf->SetFont('Helvetica', 'B', 7); $pdf->Cell(5, 5, 'No', 1, 0, 'C', true); $pdf->Cell(45, 5, 'Mata Ujian', 1, 0, 'C', true); $pdf->Cell(17, 5, 'Tanggal', 1, 0, 'C', true); $pdf->Cell(19, 5, 'Waktu', 1, 1, 'C', true); $pdf->SetX(114); $pdf->SetFont('Helvetica', '', 7); $pdf->Cell(5, 3, '1.', 'LBR', 0, 'C'); $pdf->Cell(45, 3, "Baca Tulis Al-Qur'an", 'LBR', 0, 'L'); $pdf->Cell(17, 3, '01 Agst 2013', 'LBR', 0, 'L'); $pdf->Cell(19, 3, '09.00 s/d 11.00', 'LBR', 1, 'C'); $pdf->Ln(12); $pdf->SetX(114); $pdf->Cell(40, 3, '', 0, 0); $pdf->Cell(44, 3, 'Ketua Panitia PCMB 2013/2014', 0, 1, 'C'); $pdf->Ln(8); $pdf->SetX(114); $pdf->Cell(40, 3, '', 0, 0); $pdf->Cell(44, 3, 'Ttd,', 0, 1, 'C'); $pdf->Ln(8); $pdf->SetX(114); $pdf->SetFont('Helvetica', 'BU', 7); $pdf->Cell(40, 3, '', 0, 0); $pdf->Cell(44, 3, 'Drs. H. Nadjmuddin, MM', 0, 1, 'C'); $pdf->Ln(15); $pdf->SetX(0); $pdf->SetFont('Times', 'I', 7); $pdf->MultiCell(210, 4, '--------------------------------------------------------------------------------------------------------------------- potong di sini ---------------------------------------------------------------------------------------------------------------------'); $pdf->SetXY(6, 140); $pdf->SetLineWidth(0.3); $pdf->Cell(198, 120, '', 1, 1); //$pdf->Image('../../images/logo-iain2.jpg',8,142,20,20); $pdf->SetXY(6, 142); $pdf->SetFont('Times', 'B', 10); $pdf->Cell(198, 5, 'TANDA BUKTI PENDAFTARAN', 0, 1, 'C'); $pdf->Ln(2); $pdf->SetX(6); $pdf->Cell(198, 4, 'Penerimaan Calon Mahasiswa Baru', 0, 1, 'C'); $pdf->SetX(6); $pdf->Cell(198, 4, 'Institut Agama Islam Negeri "Sultan Maulana Hasanuddin" Banten', 0, 1, 'C'); $pdf->SetX(6); $pdf->Cell(198, 4, 'Tahun Akademik ' . $thA, 0, 1, 'C'); $pdf->SetLineWidth(0.2); $pdf->Line(8, 164, 200, 164); $pdf->Ln(10); $pdf->SetFont('Times', '', 10); $pdf->Cell(35, 5, 'Ruang Ujian', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->Cell(61, 5, $t->RUjian, 0, 1, 'L', false); $pdf->Cell(35, 5, 'Nomor Ujian', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->SetFont('Times', 'B', 10); $pdf->Cell(61, 5, $t->NoUjian, 0, 1, 'L', false); $pdf->SetFont('Times', '', 10); $pdf->Cell(35, 5, 'Nama', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->Cell(61, 5, $t->Nama, 0, 1, 'L', false); $pdf->Cell(35, 5, 'Tempat/Tgl Lahir', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->Cell(61, 5, $t->TmptLhr . ", " . $this->app_model->tgl_indo($t->TglLhr), 0, 1, 'L', false); $pdf->Cell(35, 5, 'Asal Sekolah', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->Cell(61, 5, $t->AsalSek, 0, 1, 'L', false); $pdf->Cell(35, 5, 'Nama Asal Sekolah', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->Cell(61, 5, $t->NmAsalSek, 0, 1, 'L', false); $pdf->Cell(15, 5, 'Jurusan', 0, 0, 'L', false); $pdf->Cell(20, 5, 'PIL.1', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->Cell(61, 5, $t->Jur1 . '-' . $this->app_model->cari_jurusan($t->Jur1), 0, 1, 'L', false); $pdf->Cell(15, 5, '', 0, 0, 'L', false); $pdf->Cell(20, 5, 'PIL.2', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->Cell(61, 5, $t->Jur2 . '-' . $this->app_model->cari_jurusan($t->Jur2), 0, 1, 'L', false); $pdf->Cell(15, 5, '', 0, 0, 'L', false); $pdf->Cell(20, 5, 'PIL.3', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->Cell(61, 5, $t->Jur3 . '-' . $this->app_model->cari_jurusan($t->Jur3), 0, 1, 'L', false); $pdf->Ln(10); $pdf->Cell(140, 4, '', 0, 0); $pdf->Cell(56, 4, 'Serang, ' . $this->app_model->tgl_indo($t->TglDaftar), 0, 1, 'C'); $pdf->Cell(140, 4, '', 0, 0); $pdf->Cell(56, 4, 'Peserta,', 0, 1, 'C'); $pdf->Ln(15); $pdf->SetFont('', 'B'); $pdf->Cell(140, 2, '', 0, 0); $pdf->Cell(56, 2, $t->Nama, 0, 1, 'C'); $pdf->Cell(140, 2, '', 0, 0); $pdf->Cell(56, 2, '-------------------------------------', 0, 1, 'C'); $pdf->Cell(140, 2, '', 0, 0); $pdf->SetFont('', 'I'); $pdf->Cell(56, 2, 'Nama Jelas & Tanda Tangan', 0, 1, 'C'); } //$a->Output(); //$a->Image($file_foto,160,173,$new_w,$new_h); $pdf->Output('KARTU_UJIAN_S1_' . $NoDaftar . '.pdf', 'D'); } else { redirect('/peserta/home/selesai/'); //echo "data ewehan"; } exit; } else { redirect('/peserta/home/logout/'); } }
public function cetak() { $tahun = $this->uri->segment(4); $thak = $tahun . '/' . $tahun + 1; $ruang = $this->uri->segment(5); $data = $this->db->query("SELECT * FROM mspcmb WHERE ThAjaran='" . $tahun . "' AND RUjian='" . $ruang . "'"); if ($data->num_rows() > 0) { //Instanciation of inherited class $pdf = new reportProduct(); $pdf->setKriteria("krs"); $pdf->setNama("DAFTAR HADIR TERTULIS " . $tahun); $pdf->Open(); $pdf->AliasNbPages(); $pdf->AddPage("P", "A4"); /* $A4[0]=210; $A4[1]=297; $F4[0]=210; $F4[1]=330; $Q[0]=216; $Q[1]=279; $pdf=new PDF('P','mm',$F4); $pdf->Open(); $pdf->AliasNbPages(); $pdf->AddPage(); */ $pdf->SetTitle('DAFTAR PESERTA PMB TAHUN AKADEMIK ' . $thak); $pdf->SetFont('arial', 'B', 12); $pdf->Cell(0, 5, 'DAFTAR HADIR UJIAN TERTULIS PMB', 0, 1, 'C'); $pdf->Cell(0, 5, 'TAHUN AKADEMIK ' . $thak, 0, 1, 'C'); $pdf->Ln(5); $pdf->SetFont('arial', '', 11); $pdf->Cell(171, 5, 'Jenjang : S2', 0, 0, 'L'); $pdf->SetLineWidth(0.3); $pdf->Cell(20, 5, ' R : ' . $ruang, 1, 1, 'C'); $pdf->Ln(1); $pdf->SetFont('arial', 'B', 11); $pdf->SetFillColor(229, 229, 229); $pdf->Cell(8, 10, 'No.', 1, 0, 'C', true); $pdf->Cell(18, 10, 'No Ujian', 1, 0, 'C', true); $pdf->Cell(85, 10, 'Nama', 1, 0, 'C', true); $pdf->Cell(80, 5, 'Tanda Tangan', 1, 1, 'C', true); $pdf->SetXY(121, 36); $pdf->SetFont('arial', '', 9); $pdf->Cell(40, 5, 'Peng.Agama', 1, 0, 'C', true); $pdf->Cell(40, 5, 'Peng.Umum', 1, 1, 'C', true); $pdf->Ln(1); $pdf->SetFont('arial', '', 11); $pdf->SetLineWidth(0.1); //$pdf->FancyTable($baris_data); /**awal **/ //$w=array(10,25,80,20,25,30); $w = array(8, 18, 85, 40, 40); $isi_data = $this->app_model->manualQuery("SELECT * FROM mspcmb \n\t\t\t\tWHERE ThAjaran='" . $tahun . "' \n\t\t\t\tAND RUjian='" . $ruang . "'"); $rec = $isi_data->result(); $n = 0; $fill = false; foreach ($rec as $r) { $pdf->SetFillColor(229, 229, 229); $n++; $pdf->Cell($w[0], 9, $n, 0, 0, 'C', $fill); $pdf->Cell($w[1], 9, $r->NoUjian, 0, 0, 'C', $fill); $pdf->Cell($w[2], 9, $r->Nama, 0, 0, 'L', $fill); $pdf->Cell($w[3], 9, '', 0, 0, 'C', $fill); $pdf->Cell($w[4], 9, '', 0, 0, 'L', $fill); $pdf->Ln(); } $pdf->Cell(array_sum($w), 0, '', 'T'); /** terakhir **/ $pdf->Ln(2); $pdf->Cell(0, 10, 'Serang, ____________________ 2012', 0, 1, 'R'); $pdf->SetFont('arial', '', 11); $pdf->Cell(95, 5, 'Peng. Agama', 'LTR', 0); $pdf->Cell(96, 5, '', 'LTR', 1); $pdf->Cell(95, 10, ' ', 'LR', 0); $pdf->Cell(96, 10, ' ', 'LR', 1); $pdf->Cell(95, 7, 'Pengawas I : __________________________', 'LBR', 0, 'C'); $pdf->Cell(96, 7, 'Pengawas II : __________________________', 'LBR', 1, 'C'); $pdf->Ln(3); $pdf->Cell(95, 5, 'Peng. Umum', 'LTR', 0); $pdf->Cell(96, 5, '', 'LTR', 1); $pdf->Cell(95, 10, ' ', 'LR', 0); $pdf->Cell(96, 10, ' ', 'LR', 1); $pdf->Cell(95, 7, 'Pengawas I : __________________________', 'LBR', 0, 'C'); $pdf->Cell(96, 7, 'Pengawas II : __________________________', 'LBR', 1, 'C'); //Second Page $pdf->AddPage(); $pdf->SetFont('arial', 'B', 12); $pdf->Cell(0, 5, 'DAFTAR HADIR UJIAN TERTULIS PMB', 0, 1, 'C'); $pdf->Cell(0, 5, 'TAHUN AKADEMIK ' . $thak, 0, 1, 'C'); $pdf->Ln(5); $pdf->SetFont('arial', '', 11); $pdf->Cell(171, 5, 'Jenjang : S2', 0, 0, 'L'); $pdf->SetLineWidth(0.3); $pdf->Cell(20, 5, ' R : ' . $ruang, 1, 1, 'C'); $pdf->Ln(1); $pdf->SetFont('arial', 'B', 11); $pdf->SetFillColor(229, 229, 229); $pdf->Cell(8, 10, 'No.', 1, 0, 'C', true); $pdf->Cell(18, 10, 'No Ujian', 1, 0, 'C', true); $pdf->Cell(85, 10, 'Nama', 1, 0, 'C', true); $pdf->Cell(80, 5, 'Tanda Tangan', 1, 1, 'C', true); $pdf->SetXY(121, 36); $pdf->SetFont('arial', '', 9); $pdf->Cell(40, 5, 'Bhs. Arab', 1, 0, 'C', true); $pdf->Cell(40, 5, 'Bhs. Inggris', 1, 1, 'C', true); $pdf->Ln(1); $pdf->SetFont('arial', '', 11); $pdf->SetLineWidth(0.1); //$pdf->FancyTable($baris_data); $w = array(8, 18, 85, 40, 40); //$pdf->SetFillColor(229,229,229); $isi_data = $this->app_model->manualQuery("SELECT * FROM mspcmb \n\t\t\t\tWHERE ThAjaran='" . $tahun . "' \n\t\t\t\tAND RUjian='" . $ruang . "'"); $rec = $isi_data->result(); $n = 0; $fill = false; foreach ($rec as $r) { $n++; $pdf->Cell($w[0], 9, $n, 0, 0, 'C', $fill); $pdf->Cell($w[1], 9, $r->NoUjian, 0, 0, 'C', $fill); $pdf->Cell($w[2], 9, $r->Nama, 0, 0, 'L', $fill); $pdf->Cell($w[3], 9, '', 0, 0, 'C', $fill); $pdf->Cell($w[4], 9, '', 0, 0, 'L', $fill); $pdf->Ln(); } $pdf->Cell(array_sum($w), 0, '', 'T'); $pdf->Ln(2); $pdf->Cell(0, 10, 'Serang, ____________________ 2012', 0, 1, 'R'); $pdf->SetFont('arial', '', 11); $pdf->Cell(95, 5, 'Bhs. Arab', 'LTR', 0); $pdf->Cell(96, 5, '', 'LTR', 1); $pdf->Cell(95, 10, ' ', 'LR', 0); $pdf->Cell(96, 10, ' ', 'LR', 1); $pdf->Cell(95, 7, 'Pengawas I : __________________________', 'LBR', 0, 'C'); $pdf->Cell(96, 7, 'Pengawas II : __________________________', 'LBR', 1, 'C'); $pdf->Ln(3); $pdf->Cell(95, 5, 'Bhs. Inggris', 'LTR', 0); $pdf->Cell(96, 5, '', 'LTR', 1); $pdf->Cell(95, 10, ' ', 'LR', 0); $pdf->Cell(96, 10, ' ', 'LR', 1); $pdf->Cell(95, 7, 'Pengawas I : __________________________', 'LBR', 0, 'C'); $pdf->Cell(96, 7, 'Pengawas II : __________________________', 'LBR', 1, 'C'); $pdf->Output(str_replace(' ', '_', strtoupper($tahun) . '_PCMB_RUANG-' . $ruang . '.pdf'), 'D'); } else { echo "Tidak Ada data"; } }
public function cetak() { $cek = $this->session->userdata('logged_in'); if (!empty($cek)) { $nisn = $this->uri->segment(4); //'123456';//$this->input->post('nim'); $d['nisn'] = $nisn; $thA = $this->config->item('thak'); // ambil data dengan memanggil fungsi di model $data = $this->app_model->getSelectedData("beli_formulir", $d); $num_rows = $data->num_rows(); if ($num_rows > 0) { $pdf = new reportProduct(); $pdf->setKriteria("transaksi"); $pdf->setNama("TANDA TERIMA PENDAFTARAN PCMB " . $nisn); $pdf->AliasNbPages(); $pdf->AddPage("P", "A4"); foreach ($data->result() as $t) { //Instanciation of inherited class //$thA = $t->ThAjaran; //$th = $thA.'/'.$thA+1; $A4[0] = 210; $A4[1] = 297; $Q[0] = 216; $Q[1] = 279; //$pdf=new PDF('P','mm',$A4); //$pdf->Open(); //$pdf->AliasNbPages(); //$pdf->AddPage(); $pdf->SetXY(6, 6); $pdf->SetLineWidth(0.3); $pdf->Cell(198, 100, '', 1, 1); //$pdf->Image('../../images/logo-iain2.jpg',8,142,20,20); $pdf->SetXY(6, 8); $pdf->SetFont('Times', 'B', 10); $pdf->Cell(198, 5, 'KWITANSI PEMBELIAN FORMULIR', 0, 1, 'C'); $pdf->Ln(2); $pdf->SetX(6); $pdf->Cell(198, 4, 'Penerimaan Calon Mahasiswa Baru', 0, 1, 'C'); $pdf->SetX(6); $pdf->Cell(198, 4, $this->config->item('nama_instansi'), 0, 1, 'C'); $pdf->SetX(6); $pdf->Cell(198, 4, 'Tahun Akademik ' . $thA, 0, 1, 'C'); $pdf->SetLineWidth(0.2); $pdf->Line(8, 30, 200, 30); $pdf->Ln(10); $pdf->SetFont('Times', '', 10); $pdf->Cell(35, 5, 'NISN', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->Cell(61, 5, $t->nisn, 0, 1, 'L', false); $pdf->SetFont('Times', '', 10); $pdf->Cell(35, 5, 'Nama', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->Cell(61, 5, $t->nama, 0, 1, 'L', false); $pdf->Cell(35, 5, 'No.HP', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->Cell(61, 5, $t->no_hp, 0, 1, 'L', false); $pdf->Cell(35, 5, 'PIN', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->Cell(61, 5, $t->pin, 0, 1, 'L', false); $pdf->Cell(35, 5, 'Biaya', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->Cell(61, 5, 'Rp. ' . number_format($t->biaya) . '( Dua Ratus Ribu Rupiah )', 0, 1, 'L', false); $pdf->Ln(10); $pdf->Cell(140, 4, '', 0, 0); $pdf->Cell(56, 4, 'Serang, ' . $this->app_model->tgl_indo($t->tglbeli), 0, 1, 'C'); $pdf->Cell(140, 4, '', 0, 0); $pdf->Cell(56, 4, 'Petugas,', 0, 1, 'C'); $pdf->Ln(15); $pdf->SetFont('', 'B'); $pdf->Cell(140, 2, '', 0, 0); $pdf->Cell(56, 2, $t->petugas, 0, 1, 'C'); $pdf->Cell(140, 2, '', 0, 0); $pdf->Cell(56, 2, '-------------------------------------', 0, 1, 'C'); $pdf->Cell(140, 2, '', 0, 0); $pdf->SetFont('', 'I'); $pdf->Cell(56, 2, 'Nama Jelas & Tanda Tangan', 0, 1, 'C'); $pdf->Ln(10); $pdf->SetX(0); $pdf->SetFont('Times', 'I', 7); $pdf->MultiCell(210, 4, '--------------------------------------------------------------------------------------------------------------------- potong di sini ---------------------------------------------------------------------------------------------------------------------'); $pdf->SetXY(6, 120); $pdf->SetLineWidth(0.3); $pdf->Cell(198, 100, '', 1, 1); //$pdf->Image('../../images/logo-iain2.jpg',8,142,20,20); $pdf->SetXY(6, 122); $pdf->SetFont('Times', 'B', 10); $pdf->Cell(198, 5, 'KWITANSI PEMBELIAN FORMULIR', 0, 1, 'C'); $pdf->Ln(2); $pdf->SetX(6); $pdf->Cell(198, 4, 'Penerimaan Calon Mahasiswa Baru', 0, 1, 'C'); $pdf->SetX(6); $pdf->Cell(198, 4, $this->config->item('nama_instansi'), 0, 1, 'C'); $pdf->SetX(6); $pdf->Cell(198, 4, 'Tahun Akademik ' . $thA, 0, 1, 'C'); $pdf->SetLineWidth(0.2); $pdf->Line(8, 144, 200, 144); $pdf->Ln(10); $pdf->SetFont('Times', '', 10); $pdf->Cell(35, 5, 'NISN', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->Cell(61, 5, $t->nisn, 0, 1, 'L', false); $pdf->SetFont('Times', '', 10); $pdf->Cell(35, 5, 'Nama', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->Cell(61, 5, $t->nama, 0, 1, 'L', false); $pdf->Cell(35, 5, 'No.HP', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->Cell(61, 5, $t->no_hp, 0, 1, 'L', false); $pdf->Cell(35, 5, 'PIN', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->Cell(61, 5, $t->pin, 0, 1, 'L', false); $pdf->Cell(35, 5, 'Biaya', 0, 0, 'L', false); $pdf->Cell(5, 5, ':', 0, 0, 'C', false); $pdf->Cell(61, 5, 'Rp. ' . number_format($t->biaya) . '( Dua Ratus Ribu Rupiah )', 0, 1, 'L', false); $pdf->Ln(10); $pdf->Cell(140, 4, '', 0, 0); $pdf->Cell(56, 4, 'Serang, ' . $this->app_model->tgl_indo($t->tglbeli), 0, 1, 'C'); $pdf->Cell(140, 4, '', 0, 0); $pdf->Cell(56, 4, 'Petugas,', 0, 1, 'C'); $pdf->Ln(15); $pdf->SetFont('', 'B'); $pdf->Cell(140, 2, '', 0, 0); $pdf->Cell(56, 2, $t->petugas, 0, 1, 'C'); $pdf->Cell(140, 2, '', 0, 0); $pdf->Cell(56, 2, '-------------------------------------', 0, 1, 'C'); $pdf->Cell(140, 2, '', 0, 0); $pdf->SetFont('', 'I'); $pdf->Cell(56, 2, 'Nama Jelas & Tanda Tangan', 0, 1, 'C'); } //$a->Output(); //$a->Image($file_foto,160,173,$new_w,$new_h); $pdf->Output('KWITANSI_FORMULIR_' . $nisn . '.pdf', 'D'); } else { redirect('/administrator/home/selesai/'); //echo "data ewehan"; } exit; } else { redirect('/administrator/home/logout/'); } }