コード例 #1
0
ファイル: lap_absen.php プロジェクト: suryo/mysiakad
 public function print_pdf()
 {
     $cek = $this->session->userdata('logged_in');
     $level = $this->session->userdata('level');
     if (!empty($cek) && $level == 'admin') {
         $jadwal = $this->session->userdata('id_jadwal');
         $q = $this->db->query("SELECT * FROM krs WHERE id_jadwal='{$jadwal}' ");
         $r = $q->num_rows();
         if ($r > 0) {
             foreach ($q->result() as $dt) {
                 $th_ak = $dt->th_akademik;
                 $smt = $dt->semester;
                 $kd_dosen = $dt->kd_dosen;
                 $nama_dosen = $dt->nm_dosen;
                 $kd_mk = $dt->kd_mk;
                 $nama_mk = $dt->nama_mk;
                 $sks = $dt->sks;
                 $hari = $dt->hari;
                 $pukul = $dt->pukul;
                 $ruang = $dt->ruang;
             }
             $pdf = new reportProduct();
             $pdf->setKriteria("cetak_laporan");
             $pdf->setNama("CETAK LAPORAN");
             $pdf->AliasNbPages();
             $pdf->AddPage("L", "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 = 7;
             $w = 290;
             $pdf->SetFont('Times', 'B', 18);
             $pdf->Cell($w, $h, $this->config->item('nama_pendek'), 0, 1, 'C');
             $pdf->SetFont('Times', 'B', 14);
             $pdf->Cell($w, $h, $this->config->item('nama_instansi'), 0, 1, 'C');
             $pdf->SetFont('Times', '', 10);
             $pdf->Cell($w, 4, 'Alamat : ' . $this->config->item('alamat_instansi'), 0, 1, 'C');
             $pdf->Ln(8);
             //Column widths
             $pdf->SetFont('Arial', 'B', 16);
             $pdf->Cell($w, $h, 'ABSENSI MAHASISWA', 0, 1, 'C');
             $pdf->Cell($w, $h, $th_ak . ' - ' . strtoupper($smt), 0, 1, 'C');
             $pdf->Ln(5);
             $h = 6;
             $pdf->SetFont('Arial', '', 12);
             $pdf->Cell(30, $h, 'Mata Kuliah', 0, 0, 'L');
             $pdf->Cell(50, $h, ': ' . $kd_mk . '-' . $nama_mk, 0, 0, 'L');
             $pdf->SetX(180);
             $pdf->Cell(35, $h, 'Hari / Pukul', 0, 0, 'L');
             $pdf->Cell(50, $h, ': ' . $hari . ', ' . $pukul, 0, 1, 'L');
             $pdf->SetFont('Arial', '', 12);
             $pdf->Cell(30, $h, 'Nama Dosen', 0, 0, 'L');
             $pdf->Cell(50, $h, ': ' . $kd_dosen . '-' . strtoupper($nama_dosen), 0, 0, 'L');
             $pdf->SetX(180);
             $pdf->Cell(35, $h, 'Ruang ', 0, 0, 'L');
             $pdf->Cell(50, $h, ': ' . strtoupper($ruang), 0, 1, 'L');
             $l = 10;
             $w = array(10, 30, 60, $l, $l, $l, $l, $l, $l, 15, $l, $l, $l, $l, $l, $l, 15, 25);
             //Header
             $pdf->SetFont('Arial', 'B', 11);
             $pdf->SetFillColor(204, 204, 204);
             $pdf->SetTextColor(0);
             $fill = true;
             $h = 8;
             $pdf->Cell($w[0], $h, 'No', 1, 0, 'C', $fill);
             $pdf->Cell($w[1], $h, 'NIM', 1, 0, 'C', $fill);
             $pdf->Cell($w[2], $h, 'NAMA MAHASISWA', 1, 0, 'C', $fill);
             $pdf->Cell($w[3], $h, '1', 1, 0, 'C', $fill);
             $pdf->Cell($w[4], $h, '2', 1, 0, 'C', $fill);
             $pdf->Cell($w[5], $h, '3', 1, 0, 'C', $fill);
             $pdf->Cell($w[6], $h, '4', 1, 0, 'C', $fill);
             $pdf->Cell($w[7], $h, '5', 1, 0, 'C', $fill);
             $pdf->Cell($w[8], $h, '6', 1, 0, 'C', $fill);
             $pdf->Cell($w[9], $h, 'UTS', 1, 0, 'C', $fill);
             $pdf->Cell($w[10], $h, '8', 1, 0, 'C', $fill);
             $pdf->Cell($w[11], $h, '9', 1, 0, 'C', $fill);
             $pdf->Cell($w[12], $h, '10', 1, 0, 'C', $fill);
             $pdf->Cell($w[13], $h, '11', 1, 0, 'C', $fill);
             $pdf->Cell($w[14], $h, '12', 1, 0, 'C', $fill);
             $pdf->Cell($w[15], $h, '13', 1, 0, 'C', $fill);
             $pdf->Cell($w[16], $h, 'UAS', 1, 0, 'C', $fill);
             $pdf->Cell($w[17], $h, 'KET', 1, 0, 'C', $fill);
             $pdf->Ln();
             //data
             //$pdf->SetFillColor(224,235,255);
             $h = 7;
             $pdf->SetFont('Arial', '', 9);
             $pdf->SetFillColor(204, 204, 204);
             $pdf->SetTextColor(0);
             $fill = false;
             $no = 1;
             $jmlsks = 0;
             foreach ($q->result() as $row) {
                 $nama_mhs = $this->model_data->cari_nama_mhs($row->nim);
                 $pdf->Cell($w[0], $h, $no, 1, 0, 'C');
                 $pdf->Cell($w[1], $h, $row->nim, 1, 0, 'C');
                 $pdf->Cell($w[2], $h, strtoupper($nama_mhs), 1, 0, 'L');
                 $pdf->Cell($w[3], $h, '', 1, 0, 'C');
                 $pdf->Cell($w[4], $h, '', 1, 0, 'C');
                 $pdf->Cell($w[5], $h, '', 1, 0, 'C');
                 $pdf->Cell($w[6], $h, '', 1, 0, 'C');
                 $pdf->Cell($w[7], $h, '', 1, 0, 'C');
                 $pdf->Cell($w[8], $h, '', 1, 0, 'C');
                 $pdf->Cell($w[9], $h, '', 1, 0, 'C');
                 $pdf->Cell($w[10], $h, '', 1, 0, 'C');
                 $pdf->Cell($w[11], $h, '', 1, 0, 'C');
                 $pdf->Cell($w[12], $h, '', 1, 0, 'C');
                 $pdf->Cell($w[13], $h, '', 1, 0, 'C');
                 $pdf->Cell($w[14], $h, '', 1, 0, 'C');
                 $pdf->Cell($w[15], $h, '', 1, 0, 'C');
                 $pdf->Cell($w[16], $h, '', 1, 0, 'C');
                 $pdf->Cell($w[17], $h, '', 1, 0, 'C');
                 $pdf->Ln();
                 $fill = !$fill;
                 $no++;
             }
             // Closing line
             $pdf->Cell(array_sum($w), 0, '', 'T');
             $pdf->Ln(10);
             $h = 5;
             $pdf->Cell(50, $h, 'Menyetujui', 0, 0, 'C');
             $pdf->SetX(160);
             $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(160);
             $pdf->Cell(100, $h, 'Dosen Pengampu,', 0, 1, 'C');
             $pdf->Ln(20);
             $pdf->Cell(50, $h, '_______________________', 0, 0, 'C');
             $pdf->SetX(160);
             $pdf->Cell(100, $h, $nama_dosen, 0, 1, 'C');
             $pdf->Cell(50, $h, 'NIP : ', 0, 0, 'L');
             $pdf->SetX(160);
             $pdf->Cell(100, $h, $kd_dosen, 0, 1, 'C');
             //}
             //}
             $pdf->Output('ABSENSI_' . $th_ak . '_' . $smt . '_' . $kd_dosen . '.pdf', 'D');
         } else {
             $this->session->set_flashdata('result_info', '<center>Tidak Ada Data</center>');
             redirect('lap_absen');
             //echo "Maaf Tidak ada data";
         }
     } else {
         redirect('login', 'refresh');
     }
 }
コード例 #2
0
ファイル: c_lap_pck.php プロジェクト: pthsi/dap
 public function print_pdf()
 {
     $cek = $this->session->userdata('logged_in');
     $level = $this->session->userdata('level');
     if (!empty($cek) && $level == 'admin') {
         $tgl_awal = $this->session->userdata('tgl_awal');
         $tgl_akhir = $this->session->userdata('tgl_akhir');
         $pic = $this->session->userdata('pic');
         $shift = $this->session->userdata('shift');
         $kategori = $this->session->userdata('kategori');
         if (!empty($pic)) {
             $pic_status = "AND a.pic='{$pic}'";
         } else {
             $pic_status = '';
         }
         if (!empty($shift)) {
             $shift_status = "AND a.shift='{$shift}'";
         } else {
             $shift_status = '';
         }
         if (!empty($kategori)) {
             $kategori_stat = "AND c.cat_target = '{$kategori}'";
         } else {
             $kategori_stat = '';
         }
         $query = "SELECT a.id_pck,a.tgl_input,b.nama_lengkap,a.shift,c.cat_target as kategori,a.lokasi,\r\n\t\t\ta.plan,a.actual,a.ar*100 as ar,truncate((a.ac)*100,2) as ac,a.inputer \r\n\t\t\tFROM pck_transaksi as a JOIN fg_users as b ON a.pic = b.username \r\n\t\t\tJOIN wip_keramik_kat as c ON a.kategori = c.id_wip \r\n\t\t\twhere tgl_input between '{$tgl_awal}' and '{$tgl_akhir}' {$pic_status} {$shift_status} {$kategori_stat}";
         $q = $this->db->query($query);
         $r = $q->num_rows();
         if ($r > 0) {
             $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('Mpod Schuzatcky');
             $h = 7;
             $w = 190;
             $pdf->SetFont('Times', 'B', 18);
             $pdf->Cell($w, $h, $this->config->item('nama_pendek'), 0, 1, 'C');
             $pdf->SetFont('Times', 'B', 14);
             $pdf->Cell($w, $h, $this->config->item('nama_instansi'), 0, 1, 'C');
             $pdf->SetFont('Times', '', 10);
             $pdf->Cell($w, 4, 'Alamat : ' . $this->config->item('alamat_instansi'), 0, 1, 'C');
             $pdf->Ln(8);
             //Column widths
             $h = 5;
             $pdf->SetFont('Arial', 'B', 14);
             $pdf->Cell($w, $h, 'Laporan AR Packing', 0, 1, 'C');
             $pdf->Cell($w, $h, $this->model_global->tgl_indo($tgl_awal) . ' - ' . $this->model_global->tgl_indo($tgl_akhir), 0, 1, 'C');
             $pdf->Ln(5);
             $l = 12;
             $w = array(7, 26, 20, 13, 17, 18, 15, 15, 12, 20, 15, 12);
             //Header
             $pdf->SetFont('Arial', 'B', 7);
             $pdf->SetFillColor(204, 204, 204);
             $pdf->SetTextColor(0);
             $fill = true;
             $h = 8;
             $pdf->Cell($w[0], $h, 'No', 1, 0, 'C', $fill);
             $pdf->Cell($w[1], $h, 'Tanggal Input', 1, 0, 'C', $fill);
             $pdf->Cell($w[2], $h, 'PIC', 1, 0, 'C', $fill);
             $pdf->Cell($w[3], $h, 'Shift', 1, 0, 'C', $fill);
             $pdf->Cell($w[4], $h, 'Kategori', 1, 0, 'C', $fill);
             $pdf->Cell($w[5], $h, 'Lokasi', 1, 0, 'C', $fill);
             $pdf->Cell($w[6], $h, 'Plan (pcs)', 1, 0, 'C', $fill);
             $pdf->Cell($w[7], $h, 'Aktual (pcs)', 1, 0, 'C', $fill);
             $pdf->Cell($w[8], $h, 'AR (%)', 1, 0, 'C', $fill);
             $pdf->Cell($w[9], $h, 'Pencapaian (%)', 1, 0, 'C', $fill);
             $pdf->Cell($w[10], $h, 'Status', 1, 0, 'C', $fill);
             $pdf->Cell($w[11], $h, 'Inputer', 1, 0, 'C', $fill);
             $pdf->Ln();
             //data
             //$pdf->SetFillColor(224,235,255);
             $h = 7;
             $pdf->SetFont('Arial', '', 9);
             $pdf->SetFillColor(204, 204, 204);
             $pdf->SetTextColor(0);
             $fill = false;
             $no = 1;
             $jmlsks = 0;
             foreach ($q->result() as $row) {
                 $tgl = $this->model_global->tgl_indo($row->tgl_input);
                 $pdf->Cell($w[0], $h, $no, 1, 0, 'C');
                 $pdf->Cell($w[1], $h, $tgl, 1, 0, 'C');
                 $pdf->Cell($w[2], $h, $row->nama_lengkap, 1, 0, 'C');
                 $pdf->Cell($w[3], $h, $row->shift, 1, 0, 'C');
                 $pdf->Cell($w[4], $h, $row->kategori, 1, 0, 'C');
                 $pdf->Cell($w[5], $h, $row->lokasi, 1, 0, 'C');
                 $pdf->Cell($w[6], $h, $row->plan, 1, 0, 'C');
                 $pdf->Cell($w[7], $h, $row->actual, 1, 0, 'C');
                 $pdf->Cell($w[8], $h, $row->ar, 1, 0, 'C');
                 $pdf->Cell($w[9], $h, $row->ac, 1, 0, 'C');
                 $rencana = $row->ar;
                 $hasil = $row->ac;
                 if ($hasil = $rencana && $hasil > $rencana) {
                     $status = "Tercapai";
                 } else {
                     $status = "Gagal";
                 }
                 $pdf->Cell($w[10], $h, $status, 1, 0, 'C');
                 $pdf->Cell($w[11], $h, $row->inputer, 1, 0, 'C');
                 $pdf->Ln();
                 $fill = !$fill;
                 $no++;
             }
             // Closing line
             $pdf->Cell(array_sum($w), 0, '', 'T');
             $pdf->Ln(10);
             $h = 5;
             //$pdf->Cell(50,$h,'Menyetujui',0,0,'C');
             $pdf->SetX(120);
             $pdf->Cell(100, $h, 'Cicadas, ' . $this->model_global->tgl_indo(date('Y-m-d')), 0, 1, 'C');
             //$pdf->Cell(50,$h,'Ketua Program Studi,',0,0,'C');
             $pdf->SetX(120);
             $pdf->Cell(100, $h, 'Packing,', 0, 1, 'C');
             $pdf->Ln(20);
             //$pdf->Cell(50,$h,'_______________________',0,0,'C');
             $pdf->SetX(120);
             $pdf->Cell(100, $h, '_____________________', 0, 1, 'C');
             //$pdf->Cell(50,$h,'NIP : ',0,0,'L');
             $pdf->SetX(150);
             $pdf->Cell(100, $h, 'NIK :', 0, 1, 'L');
             //}
             //}
             $pdf->Output('pck_transaksi_' . $tgl_awal . '-' . $tgl_akhir . '.pdf', 'D');
         } else {
             $this->session->set_flashdata('result_info', '<center>Tidak Ada Data</center>');
             redirect('c_lap_fg');
             //echo "Maaf Tidak ada data";
         }
     } else {
         redirect('login', 'refresh');
     }
 }
コード例 #3
0
ファイル: lap_mahasiswa.php プロジェクト: suryo/mysiakad
 public function cetak()
 {
     $cek = $this->session->userdata('logged_in');
     if (!empty($cek)) {
         $th_ak = $this->input->post('th_ak');
         $prodi = $this->input->post('kd_prodi');
         if (empty($th_ak)) {
             $this->session->set_flashdata('result_info', '<center>Tahun Akademik Tidak boleh kosong</center>');
             redirect('lap_mahasiswa');
             return false();
         }
         $where = "WHERE status='Aktif' AND th_akademik='{$th_ak}' ";
         if (!empty($prodi)) {
             $where .= " AND kd_prodi='{$prodi}'";
         }
         $q = $this->db->query("SELECT * FROM mahasiswa {$where} ");
         $r = $q->num_rows();
         if ($r > 0) {
             $pdf = new reportProduct();
             $pdf->setKriteria("cetak_laporan");
             $pdf->setNama("CETAK LAPORAN");
             $pdf->AliasNbPages();
             $pdf->AddPage("L", "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 = 7;
             $pdf->SetFont('Times', 'B', 14);
             $pdf->SetX(6);
             $pdf->Cell(198, 4, $this->config->item('nama_instansi'), 0, 1, 'L');
             $pdf->SetX(6);
             $pdf->SetFont('Times', '', 10);
             $pdf->Cell(198, 4, 'Alamat : ' . $this->config->item('alamat_instansi'), 0, 1, 'L');
             $pdf->Ln(5);
             //Column widths
             $pdf->SetFont('Arial', 'B', 14);
             $pdf->SetX(6);
             $pdf->Cell(290, 4, 'Laporan Mahasiswa', 0, 1, 'C');
             $pdf->Ln(5);
             $w = array(10, 25, 30, 30, 80, 10, 30, 35, 25);
             //Header
             $pdf->SetFont('Arial', 'B', 10);
             $pdf->Cell($w[0], $h, 'No', 1, 0, 'C');
             $pdf->Cell($w[1], $h, 'Th Akademik', 1, 0, 'C');
             $pdf->Cell($w[2], $h, 'PRODI', 1, 0, 'C');
             $pdf->Cell($w[3], $h, 'NIM', 1, 0, 'C');
             $pdf->Cell($w[4], $h, 'NAMA', 1, 0, 'C');
             $pdf->Cell($w[5], $h, 'L/P', 1, 0, 'C');
             $pdf->Cell($w[6], $h, 'HP', 1, 0, 'C');
             $pdf->Cell($w[7], $h, 'Kota', 1, 0, 'C');
             $pdf->Cell($w[8], $h, 'Status', 1, 0, 'C');
             $pdf->Ln();
             //data
             //$pdf->SetFillColor(224,235,255);
             $pdf->SetFont('Arial', '', 9);
             $pdf->SetFillColor(204, 204, 204);
             $pdf->SetTextColor(0);
             $fill = false;
             $no = 1;
             foreach ($q->result() as $row) {
                 $sing = $this->model_data->singkat_jurusan($row->kd_prodi);
                 $pdf->Cell($w[0], $h, $no, 'LR', 0, 'C', $fill);
                 $pdf->Cell($w[1], $h, $row->th_akademik, 'LR', 0, 'C', $fill);
                 $pdf->Cell($w[2], $h, $row->kd_prodi . '(' . $sing . ')', 'LR', 0, 'C', $fill);
                 $pdf->Cell($w[3], $h, $row->nim, 'LR', 0, 'C', $fill);
                 $pdf->Cell($w[4], $h, $row->nama_mhs, 'LR', 0, 'L', $fill);
                 $pdf->Cell($w[5], $h, $row->sex, 'LR', 0, 'C', $fill);
                 $pdf->Cell($w[6], $h, $row->hp, 'LR', 0, 'L', $fill);
                 $pdf->Cell($w[7], $h, $row->kota, 'LR', 0, 'L', $fill);
                 $pdf->Cell($w[8], $h, $row->status, 'LR', 0, 'C', $fill);
                 $pdf->Ln();
                 $fill = !$fill;
                 $no++;
             }
             // Closing line
             $pdf->Cell(array_sum($w), 0, '', 'T');
             $pdf->Ln(10);
             $pdf->SetX(200);
             $pdf->Cell(100, $h, 'Serang, ' . $this->model_global->tgl_indo(date('Y-m-d')), 'C');
             $pdf->Ln(20);
             $pdf->SetX(200);
             $pdf->Cell(100, $h, '___________________', 'C');
             //}
             //}
             $pdf->Output('Lap_Mahasiswa.pdf', 'D');
         } else {
             $this->session->set_flashdata('result_info', '<center>Tidak Ada Data</center>');
             redirect('lap_mahasiswa');
             //echo "Maaf Tidak ada data";
         }
     } else {
         redirect('login', 'refresh');
     }
 }
コード例 #4
0
ファイル: lap_mutasi_mhs.php プロジェクト: suryo/mysiakad
 public function print_pdf()
 {
     $cek = $this->session->userdata('logged_in');
     $level = $this->session->userdata('level');
     if (!empty($cek) && $level == 'admin') {
         $th_ak = $this->session->userdata('th_ak');
         $smt = $this->session->userdata('smt');
         $kd_prodi = $this->session->userdata('kd_prodi');
         $query = "SELECT a.id_mutasi,a.th_akademik,a.semester,a.tgl_mutasi,a.nim,a.status,a.ket,\n\t\t\t\t\t\tb.nama_mhs,b.sex,b.kd_prodi\n\t\t\t\t\t\tFROM mutasi_mhs as a\n\t\t\t\t\t\tJOIN mahasiswa as b\n\t\t\t\t\t\tON a.nim=b.nim\n\t\t\t\t\tWHERE a.th_akademik='{$th_ak}' AND a.semester='{$smt}' AND b.kd_prodi='{$kd_prodi}'";
         $q = $this->db->query($query);
         $r = $q->num_rows();
         if ($r > 0) {
             $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 = 7;
             $w = 190;
             $pdf->SetFont('Times', 'B', 18);
             $pdf->Cell($w, $h, $this->config->item('nama_pendek'), 0, 1, 'C');
             $pdf->SetFont('Times', 'B', 14);
             $pdf->Cell($w, $h, $this->config->item('nama_instansi'), 0, 1, 'C');
             $pdf->SetFont('Times', '', 10);
             $pdf->Cell($w, 4, 'Alamat : ' . $this->config->item('alamat_instansi'), 0, 1, 'C');
             $pdf->Ln(8);
             //Column widths
             $h = 5;
             $pdf->SetFont('Arial', 'B', 14);
             $pdf->Cell($w, $h, 'MUTASI MAHASISWA', 0, 1, 'C');
             $pdf->Cell($w, $h, $th_ak . ' - ' . strtoupper($smt), 0, 1, 'C');
             $pdf->Ln(5);
             $l = 10;
             $w = array(10, 30, 80, 10, 40, 20);
             //Header
             $pdf->SetFont('Arial', 'B', 11);
             $pdf->SetFillColor(204, 204, 204);
             $pdf->SetTextColor(0);
             $fill = true;
             $h = 8;
             $pdf->Cell($w[0], $h, 'No', 1, 0, 'C', $fill);
             $pdf->Cell($w[1], $h, 'NIM', 1, 0, 'C', $fill);
             $pdf->Cell($w[2], $h, 'NAMA MAHASISWA', 1, 0, 'C', $fill);
             $pdf->Cell($w[3], $h, 'L/P', 1, 0, 'C', $fill);
             $pdf->Cell($w[4], $h, 'TANGGAL', 1, 0, 'C', $fill);
             $pdf->Cell($w[5], $h, 'STATUS', 1, 0, 'C', $fill);
             $pdf->Ln();
             //data
             //$pdf->SetFillColor(224,235,255);
             $h = 7;
             $pdf->SetFont('Arial', '', 9);
             $pdf->SetFillColor(204, 204, 204);
             $pdf->SetTextColor(0);
             $fill = false;
             $no = 1;
             $jmlsks = 0;
             foreach ($q->result() as $row) {
                 $tgl = $this->model_global->tgl_indo($row->tgl_mutasi);
                 $pdf->Cell($w[0], $h, $no, 1, 0, 'C');
                 $pdf->Cell($w[1], $h, $row->nim, 1, 0, 'C');
                 $pdf->Cell($w[2], $h, strtoupper($row->nama_mhs), 1, 0, 'L');
                 $pdf->Cell($w[3], $h, $row->sex, 1, 0, 'C');
                 $pdf->Cell($w[4], $h, $tgl, 1, 0, 'C');
                 $pdf->Cell($w[5], $h, $row->status, 1, 0, 'C');
                 $pdf->Ln();
                 $fill = !$fill;
                 $no++;
             }
             // Closing line
             $pdf->Cell(array_sum($w), 0, '', 'T');
             $pdf->Ln(10);
             $h = 5;
             //$pdf->Cell(50,$h,'Menyetujui',0,0,'C');
             $pdf->SetX(120);
             $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(120);
             $pdf->Cell(100, $h, 'Bagian Akademik,', 0, 1, 'C');
             $pdf->Ln(20);
             //$pdf->Cell(50,$h,'_______________________',0,0,'C');
             $pdf->SetX(120);
             $pdf->Cell(100, $h, '_____________________', 0, 1, 'C');
             //$pdf->Cell(50,$h,'NIP : ',0,0,'L');
             $pdf->SetX(120);
             $pdf->Cell(100, $h, 'NIP :', 0, 1, 'L');
             //}
             //}
             $pdf->Output('MUTASI_MAHASISWA_' . $th_ak . '_' . $smt . '.pdf', 'D');
         } else {
             $this->session->set_flashdata('result_info', '<center>Tidak Ada Data</center>');
             redirect('lap_mutasi_mhs');
             //echo "Maaf Tidak ada data";
         }
     } else {
         redirect('login', 'refresh');
     }
 }
コード例 #5
0
ファイル: isi_krs.php プロジェクト: suryo/mysiakad
 public function print_krs()
 {
     $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_lalu = $this->model_data->cari_ipk_lalu($semester, $nim);
             $max_sks = $this->model_global->max_sks($ip_lalu);
             $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(198, 4, 'KARTU RENCANA STUDI (KRS) 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 smt. Lalu ', 0, 0, 'L');
             $pdf->Cell(50, $h, ': ' . $ip_lalu . ' Max ' . $max_sks . ' SKS', 0, 1, 'L');
             $w = array(8, 60, 10, 15, 20, 20, 55);
             //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, 'Mata Kuliah', 'TB', 0, 'C', $fill);
             $pdf->Cell($w[2], $h, 'SKS', 'TB', 0, 'C', $fill);
             $pdf->Cell($w[3], $h, 'Hari', 'TB', 0, 'C', $fill);
             $pdf->Cell($w[4], $h, 'Pukul', 'TB', 0, 'C', $fill);
             $pdf->Cell($w[5], $h, 'Ruang', 'TB', 0, 'C', $fill);
             $pdf->Cell($w[6], $h, 'Dosen', 'TB', 0, 'C', $fill);
             $pdf->Ln();
             //data
             //$pdf->SetFillColor(224,235,255);
             $h = 7;
             $pdf->SetFont('helvetica', '', 8);
             $pdf->SetFillColor(204, 204, 204);
             $pdf->SetTextColor(0);
             $fill = false;
             $no = 1;
             $jmlsks = 0;
             foreach ($q->result() as $row) {
                 $pdf->Cell($w[0], $h, $no, 0, 0, 'C', $fill);
                 $pdf->Cell($w[1], $h, '[' . $row->kd_mk . '] ' . $row->nama_mk, 0, 0, 'L', $fill);
                 $pdf->Cell($w[2], $h, $row->sks, 0, 0, 'C', $fill);
                 $pdf->Cell($w[3], $h, $row->hari, 0, 0, 'C', $fill);
                 $pdf->Cell($w[4], $h, $row->pukul, 0, 0, 'C', $fill);
                 $pdf->Cell($w[5], $h, $row->ruang, 0, 0, 'C', $fill);
                 $pdf->Cell($w[6], $h, $row->nm_dosen, 0, 0, 'L', $fill);
                 $pdf->Ln();
                 //$fill = !$fill;
                 $jmlsks = $jmlsks + $row->sks;
                 $no++;
             }
             // Closing line
             $pdf->SetFont('courier', 'B', 11);
             $pdf->Cell(array_sum($w), 0, '', 'T');
             $pdf->Ln();
             $pdf->SetFillColor(204, 204, 204);
             $pdf->SetTextColor(0);
             $fill = true;
             $pdf->Cell(68, $h, 'Jumlah SKS :', 'TB', 0, 'R', $fill);
             $pdf->Cell(10, $h, $jmlsks, 'TB', 0, 'C', $fill);
             $pdf->Cell(110, $h, '', 'TB', 0, 'C', $fill);
             $pdf->SetFont('courier', '', 11);
             $pdf->Ln(10);
             $h = 5;
             $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->Output('KRS_' . $th_ak . '_' . $smt . '_' . $nim . '.pdf', 'D');
         } else {
             $this->session->set_flashdata('result_info', '<center>Tidak Ada Data</center>');
             redirect('krs');
             //echo "Maaf Tidak ada data";
         }
     } else {
         redirect('login', 'refresh');
     }
 }
コード例 #6
0
ファイル: c_lap_wip.php プロジェクト: pthsi/dap
 public function print_pdf()
 {
     $cek = $this->session->userdata('logged_in');
     $level = $this->session->userdata('level');
     if (!empty($cek) && $level == 'admin') {
         $tgl_awal = $this->session->userdata('tgl_awal');
         $tgl_akhir = $this->session->userdata('tgl_akhir');
         $pic = $this->session->userdata('pic');
         $shift = $this->session->userdata('shift');
         $jns_wip = $this->session->userdata('jns_wip');
         if (!empty($pic)) {
             $pic_status = "AND a.pic='{$pic}'";
         } else {
             $pic_status = '';
         }
         if (!empty($shift)) {
             $shift_status = "AND a.shift='{$shift}'";
         } else {
             $shift_status = '';
         }
         if (!empty($jns_wip)) {
             $status_wip = "AND c.jns_wip = '{$jns_wip}'";
         } else {
             $status_wip = '';
         }
         $query = "SELECT a.tgl_input,b.nama_lengkap,a.shift,c.jns_wip,a.lokasi,a.pcs_wip,a.target,\r\n\t\t\t\t\t\ta.akurasi,a.inputer\r\n\t\t\t\t\t\tFROM wip_transaksi as a\r\n\t\t\t\t\t\tJOIN fg_users as b\r\n\t\t\t\t\t\tON a.pic=b.username\r\n\t\t\t\t\t\tJoin wip_keramik_kat as c\r\n\t\t\t\t\t\ton a.jns_wip = c.id_wip\r\n\t\t\t\t\tWHERE (a.tgl_input BETWEEN '{$tgl_awal}' AND '{$tgl_akhir}') {$pic_status} {$shift_status} {$status_wip}";
         $q = $this->db->query($query);
         $r = $q->num_rows();
         if ($r > 0) {
             $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('Mpod Schuzatcky');
             $h = 7;
             $w = 190;
             $pdf->SetFont('Times', 'B', 18);
             $pdf->Cell($w, $h, $this->config->item('nama_pendek'), 0, 1, 'C');
             $pdf->SetFont('Times', 'B', 14);
             $pdf->Cell($w, $h, $this->config->item('nama_instansi'), 0, 1, 'C');
             $pdf->SetFont('Times', '', 10);
             $pdf->Cell($w, 4, 'Alamat : ' . $this->config->item('alamat_instansi'), 0, 1, 'C');
             $pdf->Ln(8);
             //Column widths
             $h = 5;
             $pdf->SetFont('Arial', 'B', 14);
             $pdf->Cell($w, $h, 'Laporan Rekap WIP Keramik', 0, 1, 'C');
             $pdf->Cell($w, $h, $tgl_awal . ' - ' . $tgl_akhir, 0, 1, 'C');
             $pdf->Ln(5);
             $l = 10;
             $w = array(8, 28, 20, 15, 25, 20, 15, 15, 15, 20);
             //Header
             $pdf->SetFont('Arial', 'B', 7);
             $pdf->SetFillColor(204, 204, 204);
             $pdf->SetTextColor(0);
             $fill = true;
             $h = 8;
             $pdf->Cell($w[0], $h, 'No', 1, 0, 'C', $fill);
             $pdf->Cell($w[1], $h, 'Tanggal Input', 1, 0, 'C', $fill);
             $pdf->Cell($w[2], $h, 'PIC', 1, 0, 'C', $fill);
             $pdf->Cell($w[3], $h, 'Shift', 1, 0, 'C', $fill);
             $pdf->Cell($w[4], $h, 'Jenis WIP', 1, 0, 'C', $fill);
             $pdf->Cell($w[5], $h, 'Lokasi', 1, 0, 'C', $fill);
             $pdf->Cell($w[6], $h, 'Total (pcs)', 1, 0, 'C', $fill);
             $pdf->Cell($w[7], $h, 'Target', 1, 0, 'C', $fill);
             $pdf->Cell($w[8], $h, 'Akurasi', 1, 0, 'C', $fill);
             $pdf->Cell($w[9], $h, 'Inputer', 1, 0, 'C', $fill);
             $pdf->Ln();
             //data
             //$pdf->SetFillColor(224,235,255);
             $h = 7;
             $pdf->SetFont('Arial', '', 9);
             $pdf->SetFillColor(204, 204, 204);
             $pdf->SetTextColor(0);
             $fill = false;
             $no = 1;
             $jmlsks = 0;
             foreach ($q->result() as $row) {
                 $tgl = $this->model_global->tgl_indo($row->tgl_input);
                 $pdf->Cell($w[0], $h, $no, 1, 0, 'C');
                 $pdf->Cell($w[1], $h, $tgl, 1, 0, 'C');
                 $pdf->Cell($w[2], $h, $row->nama_lengkap, 1, 0, 'C');
                 $pdf->Cell($w[3], $h, $row->shift, 1, 0, 'C');
                 $pdf->Cell($w[4], $h, $row->jns_wip, 1, 0, 'C');
                 $pdf->Cell($w[5], $h, $row->lokasi, 1, 0, 'C');
                 $pdf->Cell($w[6], $h, $row->pcs_wip, 1, 0, 'C');
                 $pdf->Cell($w[7], $h, $row->target, 1, 0, 'C');
                 $pdf->Cell($w[8], $h, $row->akurasi, 1, 0, 'C');
                 $pdf->Cell($w[9], $h, $row->inputer, 1, 0, 'C');
                 $pdf->Ln();
                 $fill = !$fill;
                 $no++;
             }
             // Closing line
             $pdf->Cell(array_sum($w), 0, '', 'T');
             $pdf->Ln(10);
             $h = 5;
             //$pdf->Cell(50,$h,'Menyetujui',0,0,'C');
             $pdf->SetX(120);
             $pdf->Cell(100, $h, 'Cicadas, ' . $this->model_global->tgl_indo(date('Y-m-d')), 0, 1, 'C');
             //$pdf->Cell(50,$h,'Ketua Program Studi,',0,0,'C');
             $pdf->SetX(120);
             $pdf->Cell(100, $h, 'WIP Keramik,', 0, 1, 'C');
             $pdf->Ln(20);
             //$pdf->Cell(50,$h,'_______________________',0,0,'C');
             $pdf->SetX(120);
             $pdf->Cell(100, $h, '_____________________', 0, 1, 'C');
             //$pdf->Cell(50,$h,'NIP : ',0,0,'L');
             $pdf->SetX(150);
             $pdf->Cell(100, $h, 'NIK :', 0, 1, 'L');
             //}
             //}
             $pdf->Output('wip_transaksi_' . $tgl_awal . '-' . $tgl_akhir . '.pdf', 'D');
         } else {
             $this->session->set_flashdata('result_info', '<center>Tidak Ada Data</center>');
             redirect('c_fg');
             //echo "Maaf Tidak ada data";
         }
     } else {
         redirect('login', 'refresh');
     }
 }
コード例 #7
0
ファイル: khs.php プロジェクト: suryo/mysiakad
 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');
     }
 }
コード例 #8
0
ファイル: wisuda.php プロジェクト: suryo/mysiakad
 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');
     }
 }
コード例 #9
0
ファイル: c_lap_ovt.php プロジェクト: pthsi/dap
 public function print_pdf()
 {
     $cek = $this->session->userdata('logged_in');
     $level = $this->session->userdata('level');
     if (!empty($cek) && $level == 'admin') {
         $tgl_awal = $this->session->userdata('tgl_awal');
         $tgl_akhir = $this->session->userdata('tgl_akhir');
         $pic = $this->session->userdata('pic');
         $shift = $this->session->userdata('shift');
         if (!empty($pic)) {
             $pic_status = "and b.sec_des = '{$pic}'";
         } else {
             $pic_status = '';
         }
         if (!empty($shift)) {
             $shift_status = "{$shift}";
         } else {
             $shift_status = 'month';
         }
         $query = "select distinct(b.sec_des) as sec_des, b.div_des , b.dep_des , a.periode,a.sond, sum(a.sondr) as sondr, sum(a.sonbdr) as sonbdr, \r\n(sum(a.sondr)-sum(a.sonbdr)) as ondor, a.sofd, sum(a.sofdr) as sofdr, sum(a.sofbdr) as sofbdr, \r\n(sum(a.sofdr)-sum(a.sofbdr)) as ofdor, ((sum(a.sondr)-sum(a.sonbdr))+(sum(a.sofdr)-sum(a.sofbdr))) as gt from ovt_transaksi a join dp_emp b on a.id = b.id\r\nwhere b.div_des <> '' AND b.dep_des <> '' AND b.sec_des <> '' AND b.div_des IN ('PRODUCTION & MAINTENANCE','QUALITY CONTROL','R & D & QUALITY CONTROL') \r\nAND a.periode between '{$tgl_awal}' and '{$tgl_akhir}' {$pic_status}\r\ngroup by {$shift_status}(a.periode), b.sec_des order by a.periode desc";
         $q = $this->db->query($query);
         $r = $q->num_rows();
         if ($r > 0) {
             $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('Mpod Schuzatcky');
             $h = 7;
             $w = 190;
             $pdf->SetFont('Times', 'B', 14);
             $pdf->Cell($w, $h, $this->config->item('nama_pendek'), 0, 1, 'C');
             $pdf->SetFont('Times', 'B', 10);
             $pdf->Cell($w, $h, $this->config->item('nama_instansi'), 0, 1, 'C');
             $pdf->SetFont('Times', '', 6);
             $pdf->Cell($w, 4, 'Alamat : ' . $this->config->item('alamat_instansi'), 0, 1, 'C');
             $pdf->Ln(2);
             //Column widths
             $h = 5;
             $pdf->SetFont('Arial', 'B', 10);
             $pdf->Cell($w, $h, 'Laporan Rekap Overtime', 0, 1, 'C');
             $pdf->SetFont('Arial', '', 8);
             $pdf->Cell($w, $h, $tgl_awal . ' - ' . $tgl_akhir, 0, 1, 'C');
             $pdf->Ln(5);
             $l = 10;
             $w = array(4, 12, 30, 38, 48, 20, 20, 15);
             //Header
             $pdf->SetFont('Arial', 'B', 4);
             $pdf->SetFillColor(204, 204, 204);
             $pdf->SetTextColor(0);
             $fill = true;
             $h = 8;
             $pdf->Cell($w[0], $h, 'No', 1, 0, 'C', $fill);
             $pdf->Cell($w[1], $h, 'Periode', 1, 0, 'C', $fill);
             $pdf->Cell($w[2], $h, 'Divisi', 1, 0, 'C', $fill);
             $pdf->Cell($w[3], $h, 'Departemen', 1, 0, 'C', $fill);
             $pdf->Cell($w[4], $h, 'Section', 1, 0, 'C', $fill);
             $pdf->Cell($w[5], $h, 'Total Lembur (di Off Day)', 1, 0, 'C', $fill);
             $pdf->Cell($w[6], $h, 'Total Lembur (di On Day)', 1, 0, 'C', $fill);
             $pdf->Cell($w[7], $h, 'Grand Total', 1, 0, 'C', $fill);
             $pdf->Ln();
             //data
             //$pdf->SetFillColor(224,235,255);
             $h = 3;
             $pdf->SetFont('Arial', '', 4);
             $pdf->SetFillColor(204, 204, 204);
             $pdf->SetTextColor(0);
             $fill = false;
             $no = 1;
             $jmlsks = 0;
             foreach ($q->result() as $row) {
                 $tgl = $this->model_global->tgl_indo($row->periode);
                 $pdf->Cell($w[0], $h, $no, 1, 0, 'C');
                 $pdf->Cell($w[1], $h, $tgl, 1, 0, 'C');
                 $pdf->Cell($w[2], $h, $row->div_des, 1, 0, 'L');
                 $pdf->Cell($w[3], $h, $row->dep_des, 1, 0, 'L');
                 $pdf->Cell($w[4], $h, $row->sec_des, 1, 0, 'L');
                 $pdf->Cell($w[5], $h, $row->ofdor / 60 . ' jam', 1, 0, 'R');
                 $pdf->Cell($w[6], $h, $row->ondor / 60 . ' jam', 1, 0, 'R');
                 $pdf->Cell($w[7], $h, $row->gt / 60 . ' jam', 1, 0, 'R');
                 $pdf->Ln();
                 $fill = !$fill;
                 $no++;
             }
             // Closing line
             $pdf->Cell(array_sum($w), 0, '', 'T');
             $pdf->Ln(5);
             $h = 5;
             //$pdf->Cell(50,$h,'Menyetujui',0,0,'C');
             $pdf->SetX(120);
             $pdf->Cell(100, $h, 'Cicadas, ' . $this->model_global->tgl_indo(date('Y-m-d')), 0, 1, 'C');
             //$pdf->Cell(50,$h,'Ketua Program Studi,',0,0,'C');
             $pdf->SetX(120);
             $pdf->Cell(100, $h, 'Personalia,', 0, 1, 'C');
             $pdf->Ln(10);
             //$pdf->Cell(50,$h,'_______________________',0,0,'C');
             $pdf->SetX(120);
             $pdf->Cell(100, $h, '_____________________', 0, 1, 'C');
             //$pdf->Cell(50,$h,'NIP : ',0,0,'L');
             $pdf->SetX(150);
             $pdf->Cell(100, $h, 'NIK :', 0, 1, 'L');
             //}
             //}
             $pdf->Output('ovt_transaksi_' . $tgl_awal . '-' . $tgl_akhir . '.pdf', 'D');
         } else {
             $this->session->set_flashdata('result_info', '<center>Tidak Ada Data</center>');
             redirect('c_lap_ovt');
             //echo "Maaf Tidak ada data";
         }
     } else {
         redirect('login', 'refresh');
     }
 }
コード例 #10
0
ファイル: home.php プロジェクト: rusdiansyah/pcmb
 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/');
     }
 }
コード例 #11
0
ファイル: data_beli.php プロジェクト: rusdiansyah/pcmb
 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/');
     }
 }
コード例 #12
0
ファイル: lap_mata_kuliah.php プロジェクト: suryo/mysiakad
 public function cetak()
 {
     $cek = $this->session->userdata('logged_in');
     if (!empty($cek)) {
         $kd_prodi = $this->input->post('kd_prodi');
         $smt = $this->input->post('smt');
         $where = "WHERE aktif='Ya'";
         if (!empty($kd_prodi)) {
             $where .= " AND kd_prodi='{$kd_prodi}'";
         }
         if (!empty($smt)) {
             $where .= " AND smt='{$smt}'";
         }
         $q = $this->db->query("SELECT * FROM mata_kuliah {$where} ");
         $r = $q->num_rows();
         if ($r > 0) {
             $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 = 7;
             $pdf->SetFont('Times', 'B', 14);
             $pdf->SetX(6);
             $pdf->Cell(198, 4, $this->config->item('nama_instansi'), 0, 1, 'L');
             $pdf->SetX(6);
             $pdf->SetFont('Times', '', 10);
             $pdf->Cell(198, 4, 'Alamat : ' . $this->config->item('alamat_instansi'), 0, 1, 'L');
             $pdf->Ln(5);
             //Column widths
             $pdf->SetFont('Arial', 'B', 14);
             $pdf->SetX(6);
             $pdf->Cell(210, 4, 'DAFTAR MATA KULIAH', 0, 1, 'C');
             $pdf->Ln(5);
             $w = array(10, 30, 30, 100, 10, 10);
             //Header
             $pdf->SetFont('Arial', 'B', 10);
             $pdf->Cell($w[0], $h, 'No', 1, 0, 'C');
             $pdf->Cell($w[1], $h, 'PRODI', 1, 0, 'C');
             $pdf->Cell($w[2], $h, 'KODE', 1, 0, 'C');
             $pdf->Cell($w[3], $h, 'NAMA MATA KULIAH', 1, 0, 'C');
             $pdf->Cell($w[4], $h, 'SKS', 1, 0, 'C');
             $pdf->Cell($w[5], $h, 'SMT', 1, 0, 'C');
             $pdf->Ln();
             //data
             //$pdf->SetFillColor(224,235,255);
             $pdf->SetFont('Arial', '', 9);
             $pdf->SetFillColor(204, 204, 204);
             $pdf->SetTextColor(0);
             $fill = false;
             $no = 1;
             $t_sks = 0;
             foreach ($q->result() as $row) {
                 $sing = $this->model_data->singkat_jurusan($row->kd_prodi);
                 $pdf->Cell($w[0], $h, $no, 'LR', 0, 'C', $fill);
                 $pdf->Cell($w[1], $h, $row->kd_prodi . '(' . $sing . ')', 'LR', 0, 'C', $fill);
                 $pdf->Cell($w[2], $h, $row->kd_mk, 'LR', 0, 'C', $fill);
                 $pdf->Cell($w[3], $h, $row->nama_mk, 'LR', 0, 'L', $fill);
                 $pdf->Cell($w[4], $h, $row->sks, 'LR', 0, 'C', $fill);
                 $pdf->Cell($w[5], $h, $row->smt, 'LR', 0, 'C', $fill);
                 $pdf->Ln();
                 $fill = !$fill;
                 $no++;
                 $t_sks = $t_sks + $row->sks;
             }
             // Closing line
             $pdf->Cell(array_sum($w), 0, '', 'T');
             $pdf->Ln();
             $pdf->Cell(170, $h, 'Total SKS', 0, 0, 'C');
             $pdf->Cell(10, $h, $t_sks, 0, 0, 'C');
             $pdf->Ln(10);
             $pdf->SetX(150);
             $pdf->Cell(100, $h, 'Serang, ' . $this->model_global->tgl_indo(date('Y-m-d')), 'C');
             $pdf->Ln(20);
             $pdf->SetX(150);
             $pdf->Cell(100, $h, '___________________', 'C');
             //}
             //}
             $pdf->Output('Lap_Mata_Kuliah.pdf', 'D');
         } else {
             $this->session->set_flashdata('result_info', '<center>Tidak Ada Data</center>');
             redirect('lap_mata_kuliah');
             //echo "Maaf Tidak ada data";
         }
     } else {
         redirect('login', 'refresh');
     }
 }
コード例 #13
0
ファイル: c_lap_jc.php プロジェクト: pthsi/dap
 public function print_pdf()
 {
     $cek = $this->session->userdata('logged_in');
     $level = $this->session->userdata('level');
     if (!empty($cek) && $level == 'admin') {
         $tgl_awal = $this->session->userdata('tgl_awal');
         $tgl_akhir = $this->session->userdata('tgl_akhir');
         $pic = $this->session->userdata('pic');
         $pengiriman = $this->session->userdata('pengiriman');
         if (!empty($pic)) {
             $pic_status = "AND a.pic='{$pic}'";
         } else {
             $pic_status = '';
         }
         if (!empty($pengiriman)) {
             $pengiriman_status = "AND a.jenis='{$pengiriman}'";
         } else {
             $pengiriman_status = '';
         }
         $query = "SELECT a.tgl_input,b.nama_lengkap,a.jenis,a.plan,a.aktual,a.inputer, truncate((a.aktual/a.plan),2)*100 as ar\r\n\t\t\t\t\t\tFROM jc_trans as a JOIN fg_users as b\r\n\t\t\t\t\t\tON a.pic=b.username WHERE (a.tgl_input BETWEEN '{$tgl_awal}' AND '{$tgl_akhir}') \r\n\t\t\t\t\t   {$pic_status} {$pengiriman_status} order by a.tgl_input desc";
         $q = $this->db->query($query);
         $r = $q->num_rows();
         if ($r > 0) {
             $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('Mpod Schuzatcky');
             $h = 7;
             $w = 190;
             $pdf->SetFont('Times', 'B', 18);
             $pdf->Cell($w, $h, $this->config->item('nama_pendek'), 0, 1, 'C');
             $pdf->SetFont('Times', 'B', 14);
             $pdf->Cell($w, $h, $this->config->item('nama_instansi'), 0, 1, 'C');
             $pdf->SetFont('Times', '', 10);
             $pdf->Cell($w, 4, 'Alamat : ' . $this->config->item('alamat_instansi'), 0, 1, 'C');
             $pdf->Ln(8);
             //Column widths
             $h = 5;
             $pdf->SetFont('Arial', 'B', 14);
             $pdf->Cell($w, $h, 'Laporan Rekap Cetak Jiggering Dan Casting', 0, 1, 'C');
             $pdf->Cell($w, $h, $tgl_awal . ' - ' . $tgl_akhir, 0, 1, 'C');
             $pdf->Ln(5);
             $l = 10;
             $w = array(10, 30, 30, 15, 25, 25, 25, 30);
             //Header
             $pdf->SetFont('Arial', 'B', 7);
             $pdf->SetFillColor(204, 204, 204);
             $pdf->SetTextColor(0);
             $fill = true;
             $h = 8;
             $pdf->Cell($w[0], $h, 'No', 1, 0, 'C', $fill);
             $pdf->Cell($w[1], $h, 'Tanggal Cetak', 1, 0, 'C', $fill);
             $pdf->Cell($w[2], $h, 'Planner', 1, 0, 'C', $fill);
             $pdf->Cell($w[3], $h, 'Jenis Cetak', 1, 0, 'C', $fill);
             $pdf->Cell($w[4], $h, 'Plan (pcs)', 1, 0, 'C', $fill);
             $pdf->Cell($w[5], $h, 'Aktual (pcs)', 1, 0, 'C', $fill);
             $pdf->Cell($w[6], $h, 'AR (%)', 1, 0, 'C', $fill);
             $pdf->Cell($w[7], $h, 'Inputer', 1, 0, 'C', $fill);
             $pdf->Ln();
             //data
             //$pdf->SetFillColor(224,235,255);
             $h = 7;
             $pdf->SetFont('Arial', '', 9);
             $pdf->SetFillColor(204, 204, 204);
             $pdf->SetTextColor(0);
             $fill = false;
             $no = 1;
             $jmlsks = 0;
             foreach ($q->result() as $row) {
                 $tgl = $this->model_global->tgl_indo($row->tgl_input);
                 $pdf->Cell($w[0], $h, $no, 1, 0, 'C');
                 $pdf->Cell($w[1], $h, $tgl, 1, 0, 'C');
                 $pdf->Cell($w[2], $h, $row->nama_lengkap, 1, 0, 'C');
                 $pdf->Cell($w[3], $h, $row->jenis, 1, 0, 'C');
                 $pdf->Cell($w[4], $h, number_format($row->plan, 0, '.', '.'), 1, 0, 'R');
                 $pdf->Cell($w[5], $h, number_format($row->aktual, 0, '.', '.'), 1, 0, 'R');
                 $pdf->Cell($w[6], $h, number_format($row->ar, 0, '.', '.'), 1, 0, 'R');
                 $pdf->Cell($w[7], $h, $row->inputer, 1, 0, 'C');
                 $pdf->Ln();
                 $fill = !$fill;
                 $no++;
             }
             // Closing line
             $pdf->Cell(array_sum($w), 0, '', 'T');
             $pdf->Ln(10);
             $h = 5;
             //$pdf->Cell(50,$h,'Menyetujui',0,0,'C');
             $pdf->SetX(120);
             $pdf->Cell(100, $h, 'Cicadas, ' . $this->model_global->tgl_indo(date('Y-m-d')), 0, 1, 'C');
             //$pdf->Cell(50,$h,'Ketua Program Studi,',0,0,'C');
             $pdf->SetX(120);
             $pdf->Cell(100, $h, 'Jiggering & Casting,', 0, 1, 'C');
             $pdf->Ln(20);
             //$pdf->Cell(50,$h,'_______________________',0,0,'C');
             $pdf->SetX(120);
             $pdf->Cell(100, $h, '_____________________', 0, 1, 'C');
             //$pdf->Cell(50,$h,'NIP : ',0,0,'L');
             $pdf->SetX(150);
             $pdf->Cell(100, $h, 'NIK :', 0, 1, 'L');
             //}
             //}
             $pdf->Output('jc_transaksi_' . $tgl_awal . '-' . $tgl_akhir . '.pdf', 'D');
         } else {
             $this->session->set_flashdata('result_info', '<center>Tidak Ada Data</center>');
             redirect('c_jigcas');
             //echo "Maaf Tidak ada data";
         }
     } else {
         redirect('login', 'refresh');
     }
 }