$a->SetAligns(array("C", "L", "R", "C", "R", "R")); $a->SetFont('Arial', '', 9); //$rec = $temp_rec->result(); $n = 0; $kredit = 0; $debit = 0; foreach ($temp_rec->result_object() as $r) { $n++; $a->Row(array($n, $r->Nama_Barang, number_format($r->Jumlah, 2), $r->Satuan, number_format($r->Harga, 2), number_format($r->Jumlah * $r->Harga, 2))); //sub tlot $kredit = $kredit + $r->Jumlah * $r->Harga; //$debit =($debit+($r->debit)); } if ($n < 15) { $h = 6 * (15 - $n); $a->MultiCell(190, $h, '', 1, 0, 'L'); } $a->SetFont('Arial', 'B', 10); $a->SetFillColor(225, 225, 225); $a->Cell(160, 8, "Sub Total", 1, 0, 'R', true); $a->Cell(30, 8, number_format($kredit, 2), 1, 1, 'R', true); $a->Cell(160, 8, "PPN 10%", 1, 0, 'R', true); $a->Cell(30, 8, number_format(round($kredit * 10 / 100, 0), 2), 1, 1, 'R', true); $a->Cell(160, 8, "Total", 1, 0, 'R', true); $a->Cell(30, 8, number_format($kredit + round($kredit * 10 / 100, 0), 2), 1, 1, 'R', true); $a->SetFont('Arial', 'i', 9); $a->MultiCell(190, 8, "Terbilang : " . $this->zetro_terbilang->terbilang($kredit + round($kredit * 10 / 100, 0)) . " rupiah.", 1, 'L', 'C'); $a->Output('application/logs/' . $this->session->userdata('userid') . '_laporan_beli.pdf', 'F'); //show pdf output in frame $path = 'application/views/laporan'; $img = " <img src='" . base_url() . "asset/images/back.png' onclick='js:window.history.back();' style='cursor:pointer' title='click for select other filter data'>";
$a->SetAligns(array("C", "L", "R", "C", "R", "R")); $a->SetFont('Arial', '', 9); //$rec = $temp_rec->result(); $n = 0; $kredit = 0; $debit = 0; foreach ($temp_rec->result_object() as $r) { $n++; $a->Row(array($n, $r->nm_barang, number_format($r->jml_transaksi, 2), $r->nm_satuan, number_format($r->harga_beli, 2), number_format($r->jml_transaksi * $r->harga_beli, 2))); //sub tlot $kredit = $kredit + $r->jml_transaksi * $r->harga_beli; //$debit =($debit+($r->debit)); } if ($n < 15) { $h = 6 * (15 - $n); $a->MultiCell(187, $h, '', 1, 0, 'L'); } $a->SetFont('Arial', 'B', 10); $a->SetFillColor(225, 225, 225); $a->Cell(157, 8, "Sub Total", 1, 0, 'R', true); $a->Cell(30, 8, number_format($kredit, 2), 1, 1, 'R', true); $a->Cell(157, 8, "PPN 10%", 1, 0, 'R', true); $a->Cell(30, 8, number_format(round($kredit * 10 / 100, 0), 2), 1, 1, 'R', true); $a->Cell(157, 8, "Total", 1, 0, 'R', true); $a->Cell(30, 8, number_format($kredit + round($kredit * 10 / 100, 0), 2), 1, 1, 'R', true); $a->SetFont('Arial', 'i', 9); $a->MultiCell(187, 8, "Terbilang : " . $terbilang, 1, 'L', 'C'); $a->Output('application/logs/' . $this->session->userdata('userid') . '_laporan_beli.pdf', 'F'); //show pdf output in frame $path = 'application/views/laporan'; $img = " <img src='" . base_url() . "asset/images/back.png' onclick='js:window.history.back();' style='cursor:pointer' title='click for select other filter data'>";
public function cetak() { $cek = $this->session->userdata('logged_in'); $level = $this->session->userdata('level'); if (!empty($cek) && $level == 'mahasiswa') { $nim = $this->session->userdata('username'); $q = $this->db->query("SELECT * FROM wisuda as a \n\t\t\t\t\t\t\t\t\tJOIN mahasiswa as b\n\t\t\t\t\t\t\t\t\tON a.nim=b.nim\n\t\t\t\t\t\t\t\t\tWHERE a.nim='{$nim}' "); $r = $q->num_rows(); if ($r > 0) { foreach ($q->result() as $dt) { $tgl_daftar = $this->model_global->tgl_indo($dt->tgl_daftar); $thak = $dt->th_akademik; $nama = $dt->nama_mhs; if ($dt->sex == 'L') { $sex = 'Laki-laki'; } else { $sex = 'Perempuan'; } $prodi = $dt->kd_prodi . '-' . $this->model_data->nama_jurusan($dt->kd_prodi); $tmpt_lhr = $dt->tempat_lahir; $tgl_lhr = $this->model_global->tgl_indo($dt->tanggal_lahir); $alamat = $dt->alamat; $tgl_sidang = $this->model_global->tgl_indo($dt->tgl_sidang); $skripsi = $dt->judul_skripsi; $ipk = $dt->ipk; } $pdf = new reportProduct(); $pdf->setKriteria("cetak_laporan"); $pdf->setNama("CETAK LAPORAN"); $pdf->AliasNbPages(); $pdf->AddPage("P", "A4"); //foreach($data->result() as $t){ $A4[0] = 210; $A4[1] = 297; $Q[0] = 216; $Q[1] = 279; $pdf->SetTitle('Laporan Aplikasi'); $pdf->SetCreator('Programmer IT with fpdf'); $h = 10; $pdf->SetFont('Times', 'B', 16); $pdf->image(base_url() . 'assets/img/logo-black.png', 95, 5, 20, 20); $pdf->Ln(15); $pdf->Cell(190, 8, $this->config->item('nama_pendek'), 0, 1, 'C'); $pdf->SetFont('Times', 'B', 14); $pdf->Cell(190, 5, $this->config->item('nama_instansi'), 0, 1, 'C'); $pdf->SetFont('Times', '', 10); $pdf->Cell(190, 5, 'Alamat : ' . $this->config->item('alamat_instansi'), 0, 1, 'C'); $pdf->Ln(10); //Column widths $pdf->SetFont('courier', 'B', 16); $pdf->Cell(190, 5, 'FORMULIR PENDAFTARAN WISUDA', 0, 1, 'C'); $pdf->Cell(190, 5, $thak, 0, 1, 'C'); $pdf->Ln(10); $pdf->SetFillColor(204, 204, 204); $pdf->SetTextColor(0); $fill = true; $h = 10; $wl = 50; $wr = 140; $pdf->SetFont('courier', '', 14); $pdf->Cell($wl, $h, 'Tanggal :', 'LTR', 0, 'R', $fill); $pdf->Cell($wr, $h, $tgl_daftar, 'TR', 1, 'L'); $pdf->Cell($wl, $h, 'NIM :', 'LTR', 0, 'R', $fill); $pdf->Cell($wr, $h, $nim, 'TR', 1, 'L'); $pdf->Cell($wl, $h, 'Nama Lengkap :', 'LTR', 0, 'R', $fill); $pdf->Cell($wr, $h, $nama, 'TR', 1, 'L'); $pdf->Cell($wl, $h, 'jenis Kelamin :', 'LTR', 0, 'R', $fill); $pdf->Cell($wr, $h, $sex, 'TR', 1, 'L'); $pdf->Cell($wl, $h, 'Tempat Lahir :', 'LTR', 0, 'R', $fill); $pdf->Cell($wr, $h, $tmpt_lhr, 'TR', 1, 'L'); $pdf->Cell($wl, $h, 'Tanggal Lahir :', 'LTR', 0, 'R', $fill); $pdf->Cell($wr, $h, $tgl_lhr, 'TR', 1, 'L'); $pdf->Cell($wl, $h, 'Alamat :', 'LTR', 0, 'R', $fill); $pdf->Cell($wr, $h, $alamat, 'TR', 1, 'L'); $pdf->Cell($wl, $h, 'Program Studi :', 'LTR', 0, 'R', $fill); $pdf->Cell($wr, $h, $prodi, 'TR', 1, 'L'); $pdf->Cell($wl, $h, 'Tanggal Sidang :', 'LTR', 0, 'R', $fill); $pdf->Cell($wr, $h, $tgl_sidang, 'TR', 1, 'L'); $pdf->Cell(190, $h, 'Judul Skripsi :', 'LTR', 1, 'C', $fill); $fill = false; $pdf->MultiCell(190, 7, $skripsi, 'LTR', 1, 'L', $fill); $fill = true; $pdf->Cell($wl, $h, 'IPK :', 'LBTR', 0, 'R', $fill); $pdf->Cell($wr, $h, $ipk, 'BTR', 1, 'L'); $h = 7; $pdf->Ln(10); $pdf->SetX(100); $pdf->Cell(80, $h, 'Serang, ' . $this->model_global->tgl_indo(date('Y-m-d')), 0, 1, 'C'); $pdf->SetX(100); $pdf->Cell(80, $h, 'Mahasiswa yang bersangkutan,', 0, 1, 'C'); $pdf->Ln(20); $pdf->SetX(100); $pdf->Cell(80, $h, $nama, 0, 1, 'C'); $pdf->footer(); //} //} $pdf->Output('Pendaftaran_Wisuda_' . $nim . '.pdf', 'D'); } else { $this->session->set_flashdata('result_info', '<center>Tidak Ada Data</center>'); redirect('site_mahasiswa/wisuda'); //echo "Maaf Tidak ada data"; } } else { redirect('login', 'refresh'); } }
public function print_khs() { $cek = $this->session->userdata('logged_in'); $level = $this->session->userdata('level'); if (!empty($cek) && $level == 'mahasiswa') { $th_ak = $this->session->userdata('th_ak'); $smt = $this->session->userdata('smt'); $nim = $this->session->userdata('username'); $q = $this->db->query("SELECT * FROM krs WHERE th_akademik='{$th_ak}' AND semester='{$smt}' AND nim='{$nim}' "); $r = $q->num_rows(); if ($r > 0) { $nama = $this->model_data->cari_nama_mhs($nim); $kd_prodi = $this->model_data->cari_kd_prodi_mhs($nim); $prodi = $this->model_data->nama_jurusan($kd_prodi); $data_prodi = $this->model_data->cari_nama_ka_prodi($kd_prodi); $nama_ka_prodi = $data_prodi['nama']; $nik_ka_prodi = $data_prodi['nik']; $semester = $this->model_data->cari_smt_krs($th_ak, $smt, $nim); $ip = $this->model_data->cari_ipk($semester, $nim); $pdf = new reportProduct(); $pdf->setKriteria("cetak_laporan"); $pdf->setNama("CETAK LAPORAN"); $pdf->AliasNbPages(); $pdf->AddPage("P", "A4"); //foreach($data->result() as $t){ $A4[0] = 210; $A4[1] = 297; $Q[0] = 216; $Q[1] = 279; $pdf->SetTitle('Laporan Aplikasi'); $pdf->SetCreator('Programmer IT with fpdf'); $h = 10; $pdf->SetFont('Times', 'B', 16); $pdf->image(base_url() . 'assets/img/logo-black.png', 95, 5, 20, 20); $pdf->Ln(15); $pdf->Cell(190, 8, $this->config->item('nama_pendek'), 0, 1, 'C'); $pdf->SetFont('Times', 'B', 14); $pdf->Cell(190, 5, $this->config->item('nama_instansi'), 0, 1, 'C'); $pdf->SetFont('Times', '', 10); $pdf->Cell(190, 5, 'Alamat : ' . $this->config->item('alamat_instansi'), 0, 1, 'C'); $pdf->Ln(7); //Column widths $pdf->SetFont('courier', 'B', 14); $pdf->Cell(198, 4, 'KARTU HASIL STUDI (KHS) MAHASISWA', 0, 1, 'C'); $pdf->Ln(5); $h = 6; $pdf->SetFont('courier', '', 12); $pdf->Cell(30, $h, 'NIM', 0, 0, 'L'); $pdf->Cell(50, $h, ': ' . $nim, 0, 0, 'L'); $pdf->SetX(120); $pdf->Cell(35, $h, 'Tahun Akademik ', 0, 0, 'L'); $pdf->Cell(50, $h, ': ' . $th_ak, 0, 1, 'L'); $pdf->Cell(30, $h, 'Nama', 0, 0, 'L'); $pdf->Cell(50, $h, ': ' . strtoupper($nama), 0, 0, 'L'); $pdf->SetX(120); $pdf->Cell(35, $h, 'Semester ', 0, 0, 'L'); $pdf->Cell(50, $h, ': ' . strtoupper($smt) . '/' . $semester, 0, 1, 'L'); $pdf->Cell(30, $h, 'PRODI', 0, 0, 'L'); $pdf->Cell(50, $h, ': S1 - ' . $prodi, 0, 0, 'L'); $pdf->SetX(120); $pdf->Cell(35, $h, 'IP ', 0, 0, 'L'); $pdf->Cell(50, $h, ': ' . $ip, 0, 1, 'L'); $w = array(10, 20, 85, 10, 20, 20, 20); //Header $pdf->SetFont('courier', 'B', 10); $pdf->SetFillColor(204, 204, 204); $pdf->SetTextColor(0); $fill = true; $h = 8; $pdf->Cell($w[0], $h, 'No.', 'TB', 0, 'C', $fill); $pdf->Cell($w[1], $h, 'Kode', 'TB', 0, 'C', $fill); $pdf->Cell($w[2], $h, 'Mata Kuliah', 'TB', 0, 'C', $fill); $pdf->Cell($w[3], $h, 'SKS', 'TB', 0, 'C', $fill); $pdf->Cell($w[4], $h, 'N.Huruf', 'TB', 0, 'C', $fill); $pdf->Cell($w[5], $h, 'N.Angka', 'TB', 0, 'C', $fill); $pdf->Cell($w[6], $h, 'N.Bobot', 'TB', 0, 'C', $fill); $pdf->Ln(); //data //$pdf->SetFillColor(224,235,255); $h = 7; $pdf->SetFont('courier', '', 9); $pdf->SetFillColor(204, 204, 204); $pdf->SetTextColor(0); $fill = false; $no = 1; $jmlsks = 0; $jmlnilai = 0; foreach ($q->result() as $row) { $sks = $row->sks; $angka = $this->model_data->cari_nilai_angka($row->nilai_akhir); $akhir = $angka * $sks; $pdf->Cell($w[0], $h, $no, 0, 0, 'C', $fill); $pdf->Cell($w[1], $h, $row->kd_mk, 0, 0, 'C', $fill); $pdf->Cell($w[2], $h, $row->nama_mk, 0, 0, 'L', $fill); $pdf->Cell($w[3], $h, $row->sks, 0, 0, 'C', $fill); $pdf->Cell($w[4], $h, $row->nilai_akhir, 0, 0, 'C', $fill); $pdf->Cell($w[5], $h, $angka, 0, 0, 'C', $fill); $pdf->Cell($w[6], $h, $akhir, 0, 0, 'C', $fill); $pdf->Ln(); //$fill = !$fill; $jmlsks = $jmlsks + $row->sks; $jmlnilai = $jmlnilai + $akhir; $no++; } //$ip = $jmlnilai/$jmlsks; // Closing line $pdf->Cell(array_sum($w), 0, '', 'T'); $pdf->Ln(); $pdf->SetFillColor(204, 204, 204); $pdf->SetTextColor(0); $fill = true; $h = 6; $pdf->SetFont('courier', 'B', 9); $pdf->Cell(115, $h, 'J U M L A H :', 'T', 0, 'C', $fill); $pdf->Cell(10, $h, $jmlsks, 'T', 0, 'C', $fill); $pdf->Cell(40, $h, '', 'T', 0, 'C', $fill); $pdf->Cell(20, $h, $jmlnilai, 'T', 0, 'C', $fill); $pdf->Ln(); $pdf->Cell(115, $h, 'Indeks Prestasi (IP) :', 'TB', 0, 'C', $fill); $pdf->Cell(10, $h, '', 'TB', 0, 'C', $fill); $pdf->Cell(40, $h, number_format($ip, 2), 'TB', 0, 'C', $fill); $pdf->Cell(20, $h, '', 'TB', 0, 'C', $fill); $pdf->Ln(10); $h = 5; $pdf->SetFont('courier', '', 12); $pdf->Cell(50, $h, 'Menyetujui', 0, 0, 'C'); $pdf->SetX(110); $pdf->Cell(100, $h, 'Serang, ' . $this->model_global->tgl_indo(date('Y-m-d')), 0, 1, 'C'); $pdf->Cell(50, $h, 'Ketua Program Studi,', 0, 0, 'C'); $pdf->SetX(110); $pdf->Cell(100, $h, 'Mahasiswa', 0, 1, 'C'); $pdf->Ln(20); $pdf->Cell(50, $h, $nama_ka_prodi, 0, 0, 'C'); $pdf->SetX(110); $pdf->Cell(100, $h, $nama, 0, 1, 'C'); $pdf->Cell(50, $h, 'NIK : ' . $nik_ka_prodi, 0, 0, 'C'); $pdf->SetX(110); $pdf->Cell(100, $h, 'NIM :' . $nim, 0, 1, 'C'); $pdf->Ln(5); $h = 4; $pdf->SetFont('courier', 'B', 8); $pdf->Cell(100, $h, 'Catatan :', 0, 1, 'L'); $pdf->SetFont('courier', '', 8); $pdf->MultiCell(0, $h, 'Jumlah maksimum SKS yang dapat diambil pada semester berikutnya berdasarkan indeks prestasi (IP) adalah sebagai berikut :'); $pdf->Ln(); $pdf->Cell(20, $h, '3.00 - 4.00', 0, 0, 'L'); $pdf->Cell(50, $h, '= 24 SKS', 0, 0, 'L'); $pdf->Ln(); $pdf->Cell(20, $h, '2.50 - 2.99', 0, 0, 'L'); $pdf->Cell(50, $h, '= 22 SKS', 0, 0, 'L'); $pdf->Ln(); $pdf->Cell(20, $h, '2.00 - 2.49', 0, 0, 'L'); $pdf->Cell(50, $h, '= 20 SKS', 0, 0, 'L'); $pdf->Ln(); $pdf->Cell(20, $h, '1.50 - 1.99', 0, 0, 'L'); $pdf->Cell(50, $h, '= 16 SKS', 0, 0, 'L'); $pdf->Ln(); $pdf->Cell(20, $h, '1.00 - 1.49', 0, 0, 'L'); $pdf->Cell(50, $h, '= 14 SKS', 0, 0, 'L'); $pdf->Ln(); $pdf->Cell(20, $h, '0.00 - 0.99', 0, 0, 'L'); $pdf->Cell(50, $h, '= 12 SKS', 0, 0, 'L'); $pdf->footer(); //} //} $pdf->Output('KHS_' . $th_ak . '_' . $smt . '_' . $nim . '.pdf', 'D'); } else { $this->session->set_flashdata('result_info', '<center>Tidak Ada Data</center>'); redirect('khs'); //echo "Maaf Tidak ada data"; } } else { redirect('login', 'refresh'); } }
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() { $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/'); } }