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/'); } }