load->library('cezpdf');
}
function ceklog() {
$user = $this->session->userdata("user_id1unla");
if($user==""){
redirect('user/login');
}
}
function ceklogpmb() {
$user = $this->session->userdata("nopmbunla");
if($user==""){
redirect('index.php/web/content/prosedurpmb');
}
}
//=================================Header Khusus Transkrip=============================================
function header_transkrip(){
$x_image = 20;
$y_image = 770;
$x_text1 = 140;
$y_text1 = 820;
$x_text2 = 140;
$y_text2 = 795;
$alamat=' Jl. Karapitan No. 116 Bandung 40261, Telp. 022-4218084, Fax. 022-4237144';
$this->cezpdf->line(20,765,570,765);
$image = imagecreatefrompng('resources/img/report.png');
$this->cezpdf->addImage($image,$x_image,$y_image,90);
// $this->cezpdf->addPngFromFile(base_url().'resources/common-web/gfx/theme1/icon.png',100,490,100,'left'); //245,510,100,'left');
// $this->cezpdf->ezText($text,7,array('justification' => 'right'));
//head info laporan
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->addText($x_text1,$y_text1,16,"YAYASAN PENDIDIKAN TRI BHAKTI LANGLANGBUANA",0);
$this->cezpdf->addText($x_text2,$y_text2,26,"UNIVERSITAS LANGLANGBUANA",0);
$this->cezpdf->selectFont('./fonts/Helvetica');
$head_unla[]=array( 'kol1'=>'','kol2'=>'');
$head_unla[]=array( 'kol1'=>'','kol2'=>'');
$head_unla[]=array( 'kol1'=>'','kol2'=>'');
$head_unla[]=array( 'kol1'=>'','kol2'=>$alamat);
$this->cezpdf->ezTable($head_unla, '', '', array( 'width'=>660,
'fontSize' => 11,
'showLines'=> 0,
'showHeadings'=>0,
'shaded'=>0,
'cols'=>array(
'kol1'=>array('justification'=>'left','width'=>'35','fontSize' => 12),
'kol2'=>array('justification'=>'left','width'=>'500'))));
}
//=================================Header Report=============================================
function header($orientation){
if($orientation=='landscape'){
$x_image = 50;
$y_image = 500;
$size_image = 90;
$x_text1 = 180;
$y_text1 = 550;
$x_text2 = 250;
$y_text2 = 525;
$x_text3 = 250;
$y_text3 = 505;
$font_size1 = 23;
$font_size2 = 27;
$font_size3 = 12;
$alamat=' Jl. Karapitan No. 116 Bandung 40261, Telp. 022-4218084, Fax. 022-4237144';
$this->cezpdf->line(25,495,850,495);
}else{
$x_image = 40;
$y_image = 745;
$size_image = 70;
$x_text1 = 135;
$y_text1 = 795;
$x_text2 = 135;
$y_text2 = 770;
$x_text3 = 155;
$y_text3 = 755;
$font_size1 = 15;
$font_size2 = 25;
$font_size3 = 10;
$alamat=' Jl. Karapitan No. 116 Bandung 40261, Telp. 022-4218084, Fax. 022-4237144';
$this->cezpdf->line(35,740,560,740);
}
$image = imagecreatefrompng('resources/img/report.png');
$this->cezpdf->addImage($image,$x_image,$y_image,$size_image);
// $this->cezpdf->addPngFromFile(base_url().'resources/common-web/gfx/theme1/icon.png',100,490,100,'left'); //245,510,100,'left');
// $this->cezpdf->ezText($text,7,array('justification' => 'right'));
//head info laporan
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->addText($x_text1,$y_text1,$font_size1,"YAYASAN PENDIDIKAN TRI BHAKTI LANGLANGBUANA",0);
$this->cezpdf->addText($x_text2,$y_text2,$font_size2,"UNIVERSITAS LANGLANGBUANA",0);
$this->cezpdf->addText($x_text3,$y_text3,$font_size3,"Jl. Karapitan No. 116 Bandung 40261, Telp. 022-4218084, Fax. 022-4237144",0);
$this->cezpdf->selectFont('./fonts/Helvetica');
$head_unla[]=array( 'kol1'=>'','kol2'=>'');
$head_unla[]=array( 'kol1'=>'','kol2'=>'');
$head_unla[]=array( 'kol1'=>'','kol2'=>'');
$head_unla[]=array( 'kol1'=>'','kol2'=>'');
$this->cezpdf->ezTable($head_unla, '', '', array( 'width'=>660,
'fontSize' => 11,
'showLines'=> 0,
'showHeadings'=>0,
'shaded'=>0,
'cols'=>array(
'kol1'=>array('justification'=>'left','width'=>'35','fontSize' => 12),
'kol2'=>array('justification'=>'left','width'=>'500'))));
}
function header_hitamputih($orientation){
if($orientation=='landscape'){
$x_image = 110;
$y_image = 475;
$x_text1 = 218;
$y_text1 = 535;
$x_text2 = 218;
$y_text2 = 515;
$alamat=' Jl. Karapitan No. 116 Bandung 40261, Telp. 022-4218084, Fax. 022-4237144';
$this->cezpdf->line(90,465,745,465);
}else{
$x_image = 50;
$y_image = 725;
$x_text1 = 168;
$y_text1 = 785;
$x_text2 = 168;
$y_text2 = 765;
$alamat=' Jl. Karapitan No. 116 Bandung 40261, Telp. 022-4218084, Fax. 022-4237144';
$this->cezpdf->line(55,720,550,720);
}
$image = imagecreatefrompng('resources/img/hitamputih.png');
$this->cezpdf->addImage($image,$x_image,$y_image,90);
// $this->cezpdf->addPngFromFile(base_url().'resources/common-web/gfx/theme1/icon.png',100,490,100,'left'); //245,510,100,'left');
// $this->cezpdf->ezText($text,7,array('justification' => 'right'));
//head info laporan
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->addText($x_text1,$y_text1,14,"YAYASAN PENDIDIKAN TRI BHAKTI LANGLANGBUANA",0);
$this->cezpdf->addText($x_text2,$y_text2,23,"UNIVERSITAS LANGLANGBUANA",0);
$this->cezpdf->selectFont('./fonts/Helvetica');
$head_unla[]=array( 'kol1'=>'','kol2'=>'');
$head_unla[]=array( 'kol1'=>'','kol2'=>'');
$head_unla[]=array( 'kol1'=>'','kol2'=>'');
$head_unla[]=array( 'kol1'=>'','kol2'=>$alamat);
$this->cezpdf->ezTable($head_unla, '', '', array( 'width'=>660,
'fontSize' => 11,
'showLines'=> 0,
'showHeadings'=>0,
'shaded'=>0,
'cols'=>array(
'kol1'=>array('justification'=>'left','width'=>'35','fontSize' => 12),
'kol2'=>array('justification'=>'left','width'=>'500'))));
}
//=================================Konversi Tanggal Ke Indo=============================================
function TanggalIndo($date){
$BulanIndo = array("Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember");
$tahun = substr($date, 0, 4);
$bulan = substr($date, 4, 2);
$tgl = substr($date, 6, 2);
$result =$tgl . " " . $BulanIndo[(int)$bulan-1] . " ". $tahun;
return($result);
}
//=================================Format Bilangan untuk angka/nominal uang=============================================
function terbilang($x)
{
$abil = array(
"",
" Satu",
" Dua",
" Tiga",
" Empat",
" Lima",
" Enam",
" Tujuh",
" Delapan",
" Sembilan",
" Sepuluh",
" Sebelas");
if ($x < 12){
return $abil[$x];}
elseif ($x < 20){
return $this->terbilang($x - 10) . " Belas";}
elseif ($x < 100){
return $this->terbilang($x / 10) . " Puluh" . $this->terbilang($x % 10);}
elseif ($x < 200){
return " Seratus" . $this->terbilang($x - 100);}
elseif ($x < 1000){
return $this->terbilang($x / 100) . " Ratus" . $this->terbilang($x % 100);}
elseif ($x < 2000){
return " Seribu" . $this->terbilang($x - 1000);}
elseif ($x < 1000000){
return $this->terbilang($x / 1000) . " Ribu" . $this->terbilang($x % 1000);}
elseif ($x < 1000000000){
return $this->terbilang($x / 1000000) . " Juta" . $this->terbilang($x % 1000000);}
}
//=================================Fungsi Mencari nama field=============================================
function nm_field($column,$tbl,$whereb, $wherea){
$q = "SELECT ".$column." as nm FROM ".$tbl." where ".$whereb." = '".$wherea."' " ;
$query = $this->db->query($q);
$nm= '';
if ($query->num_rows() != 0)
{
$row = $query->row();
$nm=$row->nm;
}
return $nm;
}
function nm_field2($column,$tbl,$whereb, $wherea){
$KEDUA= $this->load->database('second', TRUE);
$q = "SELECT ".$column." as nm FROM ".$tbl." where ".$whereb." = '".$wherea."' " ;
$query = $KEDUA->query($q);
$nm= '';
if ($query->num_rows() != 0)
{
$row = $query->row();
$nm=$row->nm;
}
return $nm;
}
function nm_field2cond($column,$tbl,$whereb, $wherea, $whered, $wherec){
$KEDUA= $this->load->database('second', TRUE);
$q = "SELECT ".$column." as nm FROM ".$tbl." where ".$whereb." = '".$wherea."' AND ".$whered." = '".$wherec."'" ;
$query = $KEDUA->query($q);
$nm= '';
if ($query->num_rows() != 0)
{
$row = $query->row();
$nm=$row->nm;
}
return $nm;
}
//=================================Fungsi mencari data dosen wali mahasiswa=============================================
function get_wali($column,$tbl,$whereb, $wherea){
$KEDUA= $this->load->database('second', TRUE);
$q = "SELECT ".$column." as nm FROM ".$tbl." where ".$whereb." = '".$wherea."' " ;
$query = $KEDUA->query($q);
$nm= '';
if ($query->num_rows() != 0)
{
$row = $query->row();
$nm=$row->nm;
}
return $nm;
}
//=================================Fungsi mencari data jadwal usm=============================================
function get_jadwalusm($idjadwalpmb,$idstmskmhs){
$q = "SELECT jadwalusm.*, jusm.nmjnsusm
FROM
jadwalusm
LEFT JOIN jusm
ON jadwalusm.idjnsusm = jusm.idjnsusm
WHERE jadwalusm.idjadwalpmb = '".$idjadwalpmb."'
AND jadwalusm.idstmskmhs = '".$idstmskmhs."'";
$query = $this->db->query($q);
$nm= '';
$result = array();
if ($query->num_rows() != 0)
{
$result = $query->result();
}
return $result;
}
//=================================Fungsi mencari data jadwal usm sedang aktif=============================================
function get_jadwalusmaktif($idstmskmhs){
$q = "SELECT jadwalusm.*, jusm.nmjnsusm
FROM
jadwalusm
LEFT JOIN jusm
ON jadwalusm.idjnsusm = jusm.idjnsusm
WHERE jadwalusm.idstatus = '1'
AND jadwalusm.idstmskmhs = '".$idstmskmhs."'";
$query = $this->db->query($q);
$nm= '';
$result = array();
if ($query->num_rows() != 0)
{
$result = $query->result();
}
return $result;
}
//=================================Fungsi mencari data student body=============================================
function get_vstudentbody($kdstsemester,$kdfakultas){
$KEDUA= $this->load->database('second', TRUE);
$query = $KEDUA->query("CALL sp_getStudentbodysemesterfakultas(?,?)",array($kdstsemester,$kdfakultas));
$result = array();
if ($query->num_rows() > 0) {
$result = $query->result();
}
return $result;
}
//=================================Fungsi mencari data stmhssemester=============================================
function get_stmhssemester($kdprodi,$kdstsemester,$kdstaktivitasmhs){
$kdstaktivitasmhsx = ($kdstaktivitasmhs=='-') ? "":"AND a.kdstaktivitasmhs = '".$kdstaktivitasmhs."'";
$KEDUA= $this->load->database('second', TRUE);
$q = "SELECT a.*
, b.nmstaktivitasmhs
, c.nmmhs
, c.kdprodi
, c.kdjnskelamin
, c.thnmasuk
, d.nmkelas
, e.tingkat
, f.nmkodtbkod
, concat(e.tingkat, '/ ', e.kdsemester) AS tingsem
, g.nmcutidet
FROM
stmhssemester a
LEFT JOIN (SELECT kdkodtbkod AS kode
, nmkodtbkod AS nmstaktivitasmhs
FROM
tbkod
WHERE
kdapltbkod = '05') b
ON b.kode = a.kdstaktivitasmhs
LEFT JOIN mahasiswa c
ON c.nim = a.nim
LEFT JOIN kelas d
ON d.idkelas = a.idkelas
LEFT JOIN semester e
ON e.idsemester = a.idsemester
LEFT JOIN tbkod f
ON c.kdstawalmhs = f.kdkodtbkod AND f.kdapltbkod = '06'
LEFT JOIN cutidet g
ON a.catnonaktif = g.idcutidet
WHERE
c.kdprodi = '$kdprodi'
AND a.kdstsemester = '$kdstsemester'
".$kdstaktivitasmhsx."
ORDER BY
f.nmkodtbkod,
c.thnmasuk,
right(a.nim, 4)";
$query = $KEDUA->query($q);
$result = array();
if ($query->num_rows() > 0) {
$result = $query->result();
}
return $result;
}
//=================================Fungsi mencari data mhsnostatustemp=============================================
function get_mhsnostatustemp(){
$KEDUA= $this->load->database('second', TRUE);
$q = "SELECT * FROM mhsnostatustemp WHERE ipuser='".$_SERVER['REMOTE_ADDR']."-".$this->session->userdata("user_id1unla")."'
ORDER BY stmasuk, thnmasuk, right(nim, 4)";
$query = $KEDUA->query($q);
$result = array();
if ($query->num_rows() > 0) {
$result = $query->result();
}
return $result;
}
//=================================Fungsi mencari data pmb=============================================
function getlpmb($wherex){
$kdstsemesterx = $wherex['kdstsemester'];
$idjadwalpmbx = $wherex['idjadwalpmb'];
$kdprodix = $wherex['kdprodi'];
$this->db->select("*");
$this->db->from("v_pendaftar");
if($idjadwalpmbx !='-'){
$where['idjadwalpmb'] =$idjadwalpmbx;
} else {
$where['kdstsemester'] =$kdstsemesterx;
}
if($kdprodix !=''){
$where['kdprodi1'] =$kdprodix;
}
//======================================================================
$this->db->where($where);
$q = $this->db->get();
$result = array();
if ($q->num_rows() > 0) {
$result = $q->result();
}
return $result;
}
//=================================Fungsi mencari data pmb terverifikasi=============================================
function getllpterverifikasi($wherex){
$idjadwalpmbx = $wherex['idjadwalpmb'];
$kdprodix = $wherex['kdprodi'];
$this->db->select("*");
$this->db->from("v_pmbterverifikasi1");
if($idjadwalpmbx !=''){
$where['idjadwalpmb'] =$idjadwalpmbx;
}
if($kdprodix !=''){
$where['kdprodi1'] =$kdprodix;
}
//======================================================================
if($idjadwalpmbx !='' || $kdprodix !=''){
$this->db->where($where);
}
$q = $this->db->get();
$result = array();
if ($q->num_rows() > 0) {
$result = $q->result();
}
return $result;
}
//=================================Fungsi mencari data hasil usm=============================================
function getlhasilusm($wherex){
$kdstsemesterx = $wherex['kdstsemester'];
$idjadwalpmbx = $wherex['idjadwalpmb'];
$idstusmx = $wherex['idstusm'];
$this->db->select("*");
$this->db->from("v_hasilusm");
if($idjadwalpmbx !='-'){
$where['idjadwalpmb'] =$idjadwalpmbx;
} else {
$where['kdstsemester'] =$kdstsemesterx;
}
if($idstusmx !=''){
$where['idstusm'] =$idstusmx;
}
$this->db->where($where);
$q = $this->db->get();
$result = array();
if ($q->num_rows() > 0) {
$result = $q->result();
}
return $result;
}
//=================================Fungsi mencari data head rekap pmb=============================================
function getHeadlrpmb(){
$qq ="SELECT kdfakultas, nmfakultas,
sum(if(isnull(jmlpendaftar),0,1)) as headjmlpendaftar,
sum(terverifikasi) as headterverifikasi,
sum(diterima) as headditerima
FROM v_rekappmb group by kdfakultas";
$q = $this->db->query($qq);
$result = array();
if ($q->num_rows() > 0) {
$result = $q->result();
}
return $result;
}
//=================================Fungsi mencari data rekap pmb=============================================
function getlrpmb($wherex=''){
$idjadwalpmb = $wherex['idjadwalpmb'];
$kdstsemester = $wherex['kdstsemester'];
$where = ($idjadwalpmb !='-') ? "pmb.idjadwalpmb = '$idjadwalpmb'":"jadwalpmb.kdstsemester = '$kdstsemester'";
$q = $this->db->query("SELECT v_prodi.kdfakultas AS kdfakultas
, v_prodi.nmfakultas AS nmfakultas
, v_prodi.kdprodi AS kdprodi
, v_prodi.nmprodi AS nmprodi
, v_prodi.nmjenjangstudi AS nmjenjangstudi
, v_prodi.nourutprodi AS nourutprodi
, ifnull((SELECT count(pmb.nopmb) AS countnopmb
FROM
pmb
LEFT JOIN jadwalpmb
ON pmb.idjadwalpmb = jadwalpmb.idjadwalpmb
JOIN kuitansipmb
ON kuitansipmb.nokuitansipmb = pmb.nokuitansipmb
WHERE
$where
AND pmb.kdprodi1 = v_prodi.kdprodi
AND pmb.idstpmb = 1
AND kuitansipmb.idstkuitansi = 1), 0) AS jmlpendaftar
, ifnull((SELECT count(pmb.nopmb) AS sumnopmb
FROM
pmb
LEFT JOIN jadwalpmb
ON pmb.idjadwalpmb = jadwalpmb.idjadwalpmb
JOIN kuitansipmb
ON kuitansipmb.nokuitansipmb = pmb.nokuitansipmb
WHERE
date_format(pmb.tglpmb, '%d-%m-%Y') = date_format(now(), '%d-%m-%Y')
AND $where
AND pmb.kdprodi1 = v_prodi.kdprodi
AND pmb.idstpmb = 1
AND kuitansipmb.idstkuitansi = 1), 0) AS jmlpendaftarhariini
, ifnull((SELECT count(pmb.nopmb) AS sumnopmb
FROM
pmb
LEFT JOIN jadwalpmb
ON pmb.idjadwalpmb = jadwalpmb.idjadwalpmb
JOIN kuitansipmb
ON kuitansipmb.nokuitansipmb = pmb.nokuitansipmb
WHERE
pmb.tglpmb BETWEEN (SELECT min(cast(pmb.tglpmb AS DATE)) AS mindatepmbtglpmb
FROM
pmb
LEFT JOIN jadwalpmb
ON pmb.idjadwalpmb = jadwalpmb.idjadwalpmb
WHERE
$where
AND pmb.kdprodi1 = v_prodi.kdprodi
AND pmb.idstpmb = 1) AND now()
AND $where
AND pmb.kdprodi1 = v_prodi.kdprodi
AND pmb.idstpmb = 1
AND kuitansipmb.idstkuitansi = 1), 0) AS jmlpendaftarsampaihariini
, ifnull((SELECT count(pmb.nopmb) AS sumnopmb
FROM
pmb
LEFT JOIN jadwalpmb
ON pmb.idjadwalpmb = jadwalpmb.idjadwalpmb
JOIN kuitansipmb
ON kuitansipmb.nokuitansipmb = pmb.nokuitansipmb
WHERE
pmb.idstpmb = 1
AND $where
AND pmb.kdprodi1 = v_prodi.kdprodi
AND pmb.idstpmb = 1
AND kuitansipmb.idstkuitansi = 1), 0) AS terverifikasi
, ifnull((SELECT count(pmb.nopmb) AS sumnopmb
FROM
pmb
LEFT JOIN jadwalpmb
ON pmb.idjadwalpmb = jadwalpmb.idjadwalpmb
JOIN kuitansipmb
ON kuitansipmb.nokuitansipmb = pmb.nokuitansipmb
WHERE
pmb.idstusm IN (1, 3)
AND $where
AND pmb.kdprodi = v_prodi.kdprodi
AND pmb.idstpmb = 1
AND kuitansipmb.idstkuitansi = 1), 0) AS diterima
, ifnull((SELECT count(pmb.nopmb) AS sumnopmb
FROM
pmb
LEFT JOIN jadwalpmb
ON pmb.idjadwalpmb = jadwalpmb.idjadwalpmb
LEFT JOIN klsmhs
ON pmb.idklsmhs = klsmhs.idklsmhs
JOIN kuitansipmb
ON kuitansipmb.nokuitansipmb = pmb.nokuitansipmb
WHERE
klsmhs.idjnskls = 1
AND $where
AND pmb.kdprodi = v_prodi.kdprodi
AND pmb.nim IS NOT NULL
AND kuitansipmb.idstkuitansi = 1), 0) AS regular
, ifnull((SELECT count(pmb.nopmb) AS sumnopmb
FROM
pmb
LEFT JOIN jadwalpmb
ON pmb.idjadwalpmb = jadwalpmb.idjadwalpmb
LEFT JOIN klsmhs
ON pmb.idklsmhs = klsmhs.idklsmhs
JOIN kuitansipmb
ON kuitansipmb.nokuitansipmb = pmb.nokuitansipmb
WHERE
klsmhs.idjnskls = 2
AND $where
AND pmb.kdprodi = v_prodi.kdprodi
AND pmb.nim IS NOT NULL
AND kuitansipmb.idstkuitansi = 1), 0) AS nonregular
, ifnull((SELECT count(pmb.nopmb) AS sumnopmb
FROM
pmb
LEFT JOIN jadwalpmb
ON pmb.idjadwalpmb = jadwalpmb.idjadwalpmb
JOIN kuitansipmb
ON kuitansipmb.nokuitansipmb = pmb.nokuitansipmb
WHERE
pmb.kdprodi = v_prodi.kdprodi
AND $where
AND pmb.nim IS NOT NULL
AND kuitansipmb.idstkuitansi = 1), 0) AS registrasi
FROM
v_prodi
ORDER BY
v_prodi.nmfakultas");
$result = array();
if ($q->num_rows() > 0) {
$result = $q->result();
}
return $result;
}
//=================================Fungsi mencari data kuitansi pmb=============================================
function getkwitansi($wherex=''){
$this->db->select("*");
$this->db->from("v_kuitansipmb");
if($wherex !=''){
$this->db->where('nokuitansipmb',$wherex);
}
$q = $this->db->get();
$result = array();
if ($q->num_rows() > 0) {
$result = $q->result();
}
return $result;
}
//=================================Fungsi mencari data mahasiswa=============================================
function getmahasiswa($wherex=''){
$KEDUA= $this->load->database('second', TRUE); /*membuka koneksi database untuk d_mahasiswa*/
$KEDUA->select("*");
$KEDUA->from("vv_mahasiswa_profile2");
if($wherex !=''){
$KEDUA->where('nim',$wherex);
}
$q = $KEDUA->get();
$result = array();
if ($q->num_rows() > 0) {
$result = $q->result();
}
return $result;
}
//=================================Fungsi mencari data prodi=============================================
function getprodi($wherex=''){
$KEDUA= $this->load->database('second', TRUE); /*membuka koneksi database untuk d_mahasiswa*/
$KEDUA->select("*");
$KEDUA->from("v_prodi");
if($wherex !=''){
$KEDUA->where('kdprodi',$wherex);
}
$q = $KEDUA->get();
$result = array();
if ($q->num_rows() > 0) {
$result = $q->result();
}
return $result;
}
//=================================Fungsi mencari data nilai mahasiswa per semester=============================================
function getvnilai($wherex=''){
$KEDUA= $this->load->database('second', TRUE);
$KEDUA->select("*");
$KEDUA->from("v_nilai");
if($wherex !=''){
$KEDUA->where('nim', $wherex['nim']);
$KEDUA->where('kdthnakademik', $wherex['kdthnakademik']);
$KEDUA->where('nmjnssemester', $wherex['nmjnssemester']);
}
$q = $KEDUA->get();
$result = array();
if ($q->num_rows() > 0) {
$result = $q->result();
}
return $result;
}
//=================================Fungsi mencari data semua nilai mahasiswa =============================================
function getvnilaiall($nim,$kdprodi,$tahunmsk,$limit,$start){
$KEDUA= $this->load->database('second', TRUE); //membuka koneksi database untuk d_mahasiswa
$q = $KEDUA->query("SELECT `kurikulum`.`kdprodi` AS `kdprodi`
, `kurikulum`.`thnmasuk` AS `thnmasuk`
, `kurikulum`.`kdmk` AS `kdmk`
, `matakuliah`.`nmmkind` AS `nmmkind`
, `matakuliah`.`nmmkeng` AS `nmmkeng`
, ifnull((SELECT max(`nilai`.`nilaihuruf`) AS `nilaihuruf`
FROM
`nilai`
WHERE
((`nilai`.`nim` = '".$nim."')
AND (`nilai`.`kdprodi` = `kurikulum`.`kdprodi`)
AND (`nilai`.`kdmk` = `kurikulum`.`kdmk`))),'-') AS `nilaihuruf`
, ifnull((SELECT max(`nilai`.`bobotnilai`) AS `bobotnilai`
FROM
`nilai`
WHERE
((`nilai`.`nim` = '".$nim."')
AND (`nilai`.`kdprodi` = `kurikulum`.`kdprodi`)
AND (`nilai`.`kdmk` = `kurikulum`.`kdmk`))),0) AS `bobotnilai`
, `kurikulum`.`jmlsks` AS `jmlsks`
, ifnull(((SELECT max(`nilai`.`bobotnilai`) AS `bobotnilai`
FROM
`nilai`
WHERE
((`nilai`.`nim` = '".$nim."')
AND (`nilai`.`kdprodi` = `kurikulum`.`kdprodi`)
AND (`nilai`.`kdmk` = `kurikulum`.`kdmk`))) * `kurikulum`.`jmlsks`),0) AS `mutu`
FROM
(`kurikulum`
JOIN `matakuliah`
ON (((`kurikulum`.`kdprodi` = `matakuliah`.`kdprodi`) AND (`kurikulum`.`kdmk` = `matakuliah`.`kdmk`))))
WHERE `kurikulum`.kdprodi ='".$kdprodi."' AND `kurikulum`.thnmasuk ='".$tahunmsk."'
ORDER BY
`kurikulum`.`idsemester`
, `kurikulum`.`kdmk`
LIMIT
".$start.", ".$limit."");
$result = array();
if ($q->num_rows() > 0) {
$result = $q->result();
}
return $result;
}
/* function getvnilaiall($wherex='',$limit,$start){
$KEDUA= $this->load->database('second', TRUE); //membuka koneksi database untuk d_mahasiswa
$KEDUA->select("*");
$KEDUA->from("v_nilai");
if($limit !='' || $start !='' ){
$KEDUA->limit($limit,$start);
}
if($wherex !=''){
$KEDUA->where('nim', $wherex);
}
$q = $KEDUA->get();
$result = array();
if ($q->num_rows() > 0) {
$result = $q->result();
}
return $result;
} */
//=================================Fungsi cek jumlah record data semua nilai mahasiswa=============================================
function cekjumlahvnilaiall($nim,$kdprodi,$tahunmsk){
$KEDUA= $this->load->database('second', TRUE); //membuka koneksi database untuk d_mahasiswa
$q = $KEDUA->query("SELECT `kurikulum`.`kdprodi` AS `kdprodi`
, `kurikulum`.`thnmasuk` AS `thnmasuk`
, `kurikulum`.`kdmk` AS `kdmk`
, `matakuliah`.`nmmkind` AS `nmmkind`
, `matakuliah`.`nmmkeng` AS `nmmkeng`
, ifnull((SELECT max(`nilai`.`nilaihuruf`) AS `nilaihuruf`
FROM
`nilai`
WHERE
((`nilai`.`nim` = '".$nim."')
AND (`nilai`.`kdprodi` = `kurikulum`.`kdprodi`)
AND (`nilai`.`kdmk` = `kurikulum`.`kdmk`))),'-') AS `nilaihuruf`
, ifnull((SELECT max(`nilai`.`bobotnilai`) AS `bobotnilai`
FROM
`nilai`
WHERE
((`nilai`.`nim` = '".$nim."')
AND (`nilai`.`kdprodi` = `kurikulum`.`kdprodi`)
AND (`nilai`.`kdmk` = `kurikulum`.`kdmk`))),0) AS `bobotnilai`
, `kurikulum`.`jmlsks` AS `jmlsks`
, ifnull(((SELECT max(`nilai`.`bobotnilai`) AS `bobotnilai`
FROM
`nilai`
WHERE
((`nilai`.`nim` = '".$nim."')
AND (`nilai`.`kdprodi` = `kurikulum`.`kdprodi`)
AND (`nilai`.`kdmk` = `kurikulum`.`kdmk`))) * `kurikulum`.`jmlsks`),0) AS `mutu`
FROM
(`kurikulum`
JOIN `matakuliah`
ON (((`kurikulum`.`kdprodi` = `matakuliah`.`kdprodi`) AND (`kurikulum`.`kdmk` = `matakuliah`.`kdmk`))))
WHERE `kurikulum`.kdprodi ='".$kdprodi."' AND `kurikulum`.thnmasuk ='".$tahunmsk."'
ORDER BY
`kurikulum`.`idsemester`
, `kurikulum`.`kdmk`");
$result = 0;
if ($q->num_rows() > 0) {
$result = $q->num_rows();
} else {
$result = 0;
}
return $result;
}
/* function cekjumlahvnilaiall($wherex=''){
$KEDUA= $this->load->database('second', TRUE); //membuka koneksi database untuk d_mahasiswa
$KEDUA->select("*");
$KEDUA->from("v_nilai");
if($wherex !=''){
$KEDUA->where('nim', $wherex);
}
$q = $KEDUA->get();
$result = 0;
if ($q->num_rows() > 0) {
$result = $q->num_rows();
} else {
$result = 0;
}
return $result;
} */
//=================================Fungsi mencari data pmb=============================================
function getpmb($wherex=''){
if($wherex !=''){
$q = "SELECT *, pr.nmprodi
FROM
pmb as p
JOIN prodi as pr
ON p.kdprodi1 = pr.kdprodi
WHERE p.nopmb = '".$wherex."'";
$query = $this->db->query($q);
$result = array();
if ($query->num_rows() > 0) {
$result = $query->result();
}
return $result;
}
}
//=================================Fungsi mencari periksa usm=============================================
function getperiksausm($wherex=''){
$this->db->select("*");
$this->db->from("v_periksausm");
if($wherex !=''){
$this->db->where('nopmb',$wherex);
}
$q = $this->db->get();
$result = array();
if ($q->num_rows() > 0) {
$result = $q->result();
}
return $result;
}
//=================================Fungsi mencari data kas pmb=============================================
function getkaspmb($cek1,$where1,$cek2,$where2,$where3,$cek4,$where4){
$this->db->select("*");
$this->db->from("v_kaspmb");
if($cek1=='true'){
$this->db->where('left(nopmb,5) =', $where1);
}
if($cek2=='true'){
$this->db->where("date(tglkuitansipmb) between '". $where2 ."' and '". $where3."'" );
}
if($cek4=='true'){
$this->db->where('nominal', $where4);
}
$q = $this->db->get();
$result = array();
if ($q->num_rows() > 0) {
$result = $q->result();
}
return $result;
}
// ===============================================================================================================
// CETAK STUDENT BODY
function pstudentbody($var)
{
$this->ceklog();
$par = explode("&", $var);
$kdstsemester = $par[0];
$temp = $par[1];
$kdstsemester1 = $par[2];
$temp1 = $par[3];
$kdfakultas = $par[4];
$nmfakultas = $par[5];
$thnakademikpar = substr($temp,0,4);
$semesterpar = substr($temp,5,15);
$thnakademikpar1 = substr($temp1,0,4);
$semesterpar1 = substr($temp1,5,15);
$dispfakultas = ($kdfakultas==99) ? $nmfakultas:"FAKULTAS ".$nmfakultas;
//====================================================
$this->cezpdf->Cezpdf('F4','landscape'); //landscape
$this->cezpdf->ezSetMargins(20,30,20,10); //kiri, atas, kanan, bawah
$this->header('landscape');
$this->cezpdf->ezSetDy(-30, 'makeSpace'); //separator space
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->ezText("STUDENT BODY", 20, array("justification" => "center"));
if ($kdfakultas!=99) {
$this->cezpdf->ezText("".$dispfakultas."", 20, array("justification" => "center"));
}
$this->cezpdf->selectFont('./fonts/Helvetica');
$this->cezpdf->ezSetDy(-20, 'makeSpace'); //separator space
$this->cezpdf->ezColumnsStart(array("num"=>2, "gap"=>-5)); // bikin dua kolom
//===================KOLOM1==========================
$head[]=array('kol1'=>'Tahun Akademik - Semester: '.$thnakademikpar.'/'.$semesterpar);
$this->cezpdf->ezTable($head, '', '', array( 'width'=>413,
'fontSize' => 8,
'showLines'=> 0,
'showHeadings'=>0,
'shaded'=>0,
'cols'=>array(
'kol1'=>array('justification'=>'left'))));
$col_names[] = array(
'no' =>'No',
'nmprodi' => 'Program Studi',
'jumlah' => 'Jumlah',
'aktif' => 'Aktif',
'aktif_baru' => 'Aktif Baru',
'aktif_lama' => 'Aktif Lama',
'cuti' => 'Cuti',
'do' => 'DO',
'keluar' => 'Keluar',
'lulus' => 'Lulus',
'nonaktif' => 'Non-Aktif',
//'sdd' => 'Sedang Double Degree',
);
$this->cezpdf->ezTable($col_names, '', '', array('width'=>150,
'fontSize' => 8,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'no'=>array('width'=>23,'justification'=>"center"),
'nmprodi'=>array('width'=>105,'justification'=>"center"),
'jumlah'=>array('width'=>37,'justification'=>"center"),
'aktif'=>array('width'=>30,'justification'=>"center"),
'aktif_baru'=>array('width'=>30,'justification'=>"center"),
'aktif_lama'=>array('width'=>35,'justification'=>"center"),
'cuti'=>array('width'=>30,'justification'=>"center"),
'do'=>array('width'=>25,'justification'=>"center"),
'keluar'=>array('width'=>35,'justification'=>"center"),
'lulus'=>array('width'=>30,'justification'=>"center"),
'nonaktif'=>array('width'=>33,'justification'=>"center"),
//'sdd'=>array('width'=>70,'justification'=>"center"),
)
));
$all_jumlah =0;
$all_aktif =0;
$all_aktif_baru =0;
$all_aktif_lama =0;
$all_cuti =0;
$all_do =0;
$all_keluar =0;
$all_lulus =0;
$all_nonaktif =0;
//$all_sdd =0;
// data table
$so = $this->get_vstudentbody($kdstsemester,$kdfakultas);
$i = 0;
foreach($so as $item)
{
$i = ($i+1);
$db_data[] = array(//'no' => $i.'.',
'no' => $i,
'nmprodi' => $item->lnmprodi,
'jumlah' => $item->jumlah,
'aktif' => $item->aktif,
'aktif_baru' => $item->aktif_baru,
'aktif_lama' => $item->aktif_lama,
'cuti' => $item->cuti,
'do' => $item->do,
'keluar' => $item->keluar,
'lulus' => $item->lulus,
'nonaktif' => $item->nonaktif,
//'sdd' => $item->sdd,
);
$all_jumlah += $item->jumlah;
$all_aktif += $item->aktif;
$all_aktif_baru += $item->aktif_baru;
$all_aktif_lama += $item->aktif_lama;
$all_cuti += $item->cuti;
$all_do += $item->do;
$all_keluar += $item->keluar;
$all_lulus += $item->lulus;
$all_nonaktif += $item->nonaktif;
// $all_sdd += $item->sdd;
}
$this->cezpdf->ezTable($db_data, '', '', array('width'=>150,
'fontSize' => 8,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'no'=>array('width'=>23,'justification'=>"center"),
'nmprodi'=>array('width'=>105,'justification'=>"left"),
'jumlah'=>array('width'=>37,'justification'=>"right"),
'aktif'=>array('width'=>30,'justification'=>"right"),
'aktif_baru'=>array('width'=>30,'justification'=>"center"),
'aktif_lama'=>array('width'=>35,'justification'=>"center"),
'cuti'=>array('width'=>30,'justification'=>"right"),
'do'=>array('width'=>25,'justification'=>"right"),
'keluar'=>array('width'=>35,'justification'=>"right"),
'lulus'=>array('width'=>30,'justification'=>"right"),
'nonaktif'=>array('width'=>33,'justification'=>"right"),
//'sdd'=>array('width'=>70,'justification'=>"right"),
)
));
// data footer
$col_namesfoot[] = array( 'nmjenjangstudi'=>'Total',
'jumlah' => $all_jumlah,
'aktif' => $all_aktif,
'aktif_baru' => $all_aktif_baru,
'aktif_lama' => $all_aktif_lama,
'cuti' => $all_cuti,
'do' => $all_do,
'keluar' => $all_keluar,
'lulus' => $all_lulus,
'nonaktif' => $all_nonaktif,
//'sdd' => $all_sdd
);
$this->cezpdf->ezTable($col_namesfoot, '', '', array('width'=>800,
'fontSize' => 8,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'nmjenjangstudi'=>array('width'=>128,'justification'=>"right"),
'jumlah'=>array('width'=>37,'justification'=>"right"),
'aktif'=>array('width'=>30,'justification'=>"right"),
'aktif_baru'=>array('width'=>30,'justification'=>"right"),
'aktif_lama'=>array('width'=>35,'justification'=>"right"),
'cuti'=>array('width'=>30,'justification'=>"right"),
'do'=>array('width'=>25,'justification'=>"right"),
'keluar'=>array('width'=>35,'justification'=>"right"),
'lulus'=>array('width'=>30,'justification'=>"right"),
'nonaktif'=>array('width'=>33,'justification'=>"right"),
//'sdd'=>array('width'=>70,'justification'=>"right"),
)
));
$this->cezpdf->ezNewPage();
//===================KOLOM2==========================
$head_1[]=array('kol1'=>'Tahun Akademik - Semester: '.$thnakademikpar1.'/'.$semesterpar1);
$this->cezpdf->ezTable($head_1, '', '', array( 'width'=>413,
'fontSize' => 8,
'showLines'=> 0,
'showHeadings'=>0,
'shaded'=>0,
'cols'=>array(
'kol1'=>array('justification'=>'left'))));
$col_names1[] = array(
'no' =>'No',
'nmprodi' => 'Program Studi',
'jumlah' => 'Jumlah',
'aktif' => 'Aktif',
'aktif_baru' => 'Aktif Baru',
'aktif_lama' => 'Aktif Lama',
'cuti' => 'Cuti',
'do' => 'DO',
'keluar' => 'Keluar',
'lulus' => 'Lulus',
'nonaktif' => 'Non-Aktif',
//'sdd' => 'Sedang Double Degree',
);
$this->cezpdf->ezTable($col_names, '', '', array('width'=>150,
'fontSize' => 8,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'no'=>array('width'=>23,'justification'=>"center"),
'nmprodi'=>array('width'=>105,'justification'=>"center"),
'jumlah'=>array('width'=>37,'justification'=>"center"),
'aktif'=>array('width'=>30,'justification'=>"center"),
'aktif_baru'=>array('width'=>30,'justification'=>"center"),
'aktif_lama'=>array('width'=>35,'justification'=>"center"),
'cuti'=>array('width'=>30,'justification'=>"center"),
'do'=>array('width'=>25,'justification'=>"center"),
'keluar'=>array('width'=>35,'justification'=>"center"),
'lulus'=>array('width'=>30,'justification'=>"center"),
'nonaktif'=>array('width'=>33,'justification'=>"center"),
//'sdd'=>array('width'=>70,'justification'=>"center"),
)
));
$all_jumlah1 =0;
$all_aktif1 =0;
$all_aktif_baru1 =0;
$all_aktif_lama1 =0;
$all_cuti1 =0;
$all_do1 =0;
$all_keluar1 =0;
$all_lulus1 =0;
$all_nonaktif1 =0;
//$all_sdd =0;
// data table
$so1 = $this->get_vstudentbody($kdstsemester1,$kdfakultas);
$i1 = 0;
foreach($so1 as $item1)
{
$i1 = ($i1+1);
$db_data1[] = array(//'no' => $i.'.',
'no' => $i1,
'nmprodi' => $item1->lnmprodi,
'jumlah' => $item1->jumlah,
'aktif' => $item1->aktif,
'aktif_baru' => $item1->aktif_baru,
'aktif_lama' => $item1->aktif_lama,
'cuti' => $item1->cuti,
'do' => $item1->do,
'keluar' => $item1->keluar,
'lulus' => $item1->lulus,
'nonaktif' => $item1->nonaktif,
//'sdd' => $item1->sdd,
);
$all_jumlah1 += $item1->jumlah;
$all_aktif1 += $item1->aktif;
$all_aktif_baru1 += $item1->aktif_baru;
$all_aktif_lama1 += $item1->aktif_lama;
$all_cuti1 += $item1->cuti;
$all_do1 += $item1->do;
$all_keluar1 += $item1->keluar;
$all_lulus1 += $item1->lulus;
$all_nonaktif1 += $item1->nonaktif;
// $all_sdd += $item->sdd;
}
$this->cezpdf->ezTable($db_data1, '', '', array('width'=>150,
'fontSize' => 8,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'no'=>array('width'=>23,'justification'=>"center"),
'nmprodi'=>array('width'=>105,'justification'=>"left"),
'jumlah'=>array('width'=>37,'justification'=>"right"),
'aktif'=>array('width'=>30,'justification'=>"right"),
'aktif_baru'=>array('width'=>30,'justification'=>"center"),
'aktif_lama'=>array('width'=>35,'justification'=>"center"),
'cuti'=>array('width'=>30,'justification'=>"right"),
'do'=>array('width'=>25,'justification'=>"right"),
'keluar'=>array('width'=>35,'justification'=>"right"),
'lulus'=>array('width'=>30,'justification'=>"right"),
'nonaktif'=>array('width'=>33,'justification'=>"right"),
//'sdd'=>array('width'=>70,'justification'=>"right"),
)
));
// data footer
$col_namesfoot1[] = array( 'nmjenjangstudi'=>'Total',
'jumlah' => $all_jumlah1,
'aktif' => $all_aktif1,
'aktif_baru' => $all_aktif_baru1,
'aktif_lama' => $all_aktif_lama1,
'cuti' => $all_cuti1,
'do' => $all_do1,
'keluar' => $all_keluar1,
'lulus' => $all_lulus1,
'nonaktif' => $all_nonaktif1,
//'sdd' => $all_sdd
);
$this->cezpdf->ezTable($col_namesfoot1, '', '', array('width'=>800,
'fontSize' => 8,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'nmjenjangstudi'=>array('width'=>128,'justification'=>"right"),
'jumlah'=>array('width'=>37,'justification'=>"right"),
'aktif'=>array('width'=>30,'justification'=>"right"),
'aktif_baru'=>array('width'=>30,'justification'=>"right"),
'aktif_lama'=>array('width'=>35,'justification'=>"right"),
'cuti'=>array('width'=>30,'justification'=>"right"),
'do'=>array('width'=>25,'justification'=>"right"),
'keluar'=>array('width'=>35,'justification'=>"right"),
'lulus'=>array('width'=>30,'justification'=>"right"),
'nonaktif'=>array('width'=>33,'justification'=>"right"),
//'sdd'=>array('width'=>70,'justification'=>"right"),
)
));
$this->cezpdf->ezText('',10,array('justification' => 'left'));
// $this->cezpdf->ezText(' Jumlah data: '.$i ,8,array('justification' => 'left'));
$this->cezpdf->ezStream(array('Content-Disposition'=>'StudentBody'.$kdstsemester.'-'.$kdstsemester1.'.pdf'));
}
// CETAK LAPORAN PMB
function plpmb($var)
{
$this->ceklog();
$par = explode("istra", $var);
$kdstsemester = $par[0];
$idjadwalpmb = $par[1];
$kdprodi = $par[2];
$this->cezpdf->Cezpdf('A4','landscape'); //landscape
$this->cezpdf->ezSetMargins(15,30,10,10); //kiri, atas, kanan, bawah
$this->header_hitamputih('landscape');
$this->cezpdf->ezSetDy(-50, 'makeSpace'); //separator space
$kdstsemestershow = $this->nm_field('nmthnakademik','v_tahunakademik','kdstsemester',$kdstsemester);
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->ezText("LAPORAN PENERIMAAN MAHASISWA BARU", 12, array("justification" => "center"));
$this->cezpdf->ezText("TAHUN AKADEMIK ".$kdstsemestershow." ", 12, array("justification" => "center"));
$this->cezpdf->selectFont('./fonts/Helvetica');
$jadwalpmbshow = ($idjadwalpmb=='-') ? "Semua Gelombang":$this->nm_field('nmjadwalpmb','jadwalpmb','idjadwalpmb',$idjadwalpmb);
$prodishow = (!$kdprodi) ? "-":$this->nm_field('nmprodi','v_prodi','kdprodi',$kdprodi).' '. $this->nm_field('nmjenjangstudi','v_prodi','kdprodi',$kdprodi);
$this->cezpdf->ezSetDy(-10, 'makeSpace'); //separator space
$head_2[]=array( 'kol1'=>'Jadwal PMB : '.$jadwalpmbshow,'kol2'=>'','kol3'=>'');
$head_2[]=array( 'kol1'=>'Program Studi : '.$prodishow,'kol2'=>'','kol3'=>'');
$this->cezpdf->ezTable($head_2, '', '', array( 'width'=>660,
'fontSize' => 8,
'showLines'=> 0,
'showHeadings'=>0,
'shaded'=>0,
'cols'=>array(
'kol1'=>array('justification'=>'left'),
'kol2'=>array('justification'=>'center'),
'kol3'=>array('justification'=>'center'))));
$col_names3[] = array(
'nourut' =>'No.',
'nopmb' => 'No. PMB',
'peserta' => 'Peserta',
'lp' => '(L/P)',
'prodi' => 'Program Studi',
'kelas' => 'Kelas',
's_pendaftar' => 'Status Pendaftar'
);
$this->cezpdf->ezTable($col_names3, '', '', array('width'=>800,
'fontSize' => 8,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'nourut'=>array('width'=>30,'justification'=>"center"),
'nopmb'=>array('width'=>60,'justification'=>"center"),
'peserta'=>array('width'=>175,'justification'=>"center"),
'lp'=>array('width'=>30,'justification'=>"center"),
'prodi'=>array('width'=>175,'justification'=>"center"),
'kelas'=>array('width'=>90,'justification'=>"center"),
's_pendaftar'=>array('width'=>90,'justification'=>"center"),
)
));
// // data table
$where['kdstsemester']=$kdstsemester;
$where['idjadwalpmb']=$idjadwalpmb;
$where['kdprodi']=$kdprodi;
$so = $this->getlpmb($where);
$i = 0;
foreach($so as $item)
{
$i = ($i+1);
$db_data[] = array('nourut' => $i.'.',
'nopmb' => $item->nopmb,
'peserta' => $item->nama,//'Rp. '.number_format ($item->nmjenjangstudi),
'lp' => $item->kdjk,
'prodi' => $this->nm_field('nourutprodi','v_prodi','kdprodi',$item->kdprodi1).'.'.$this->nm_field('nmprodi','v_prodi','kdprodi',$item->kdprodi1).' '. $this->nm_field('nmjenjangstudi','v_prodi','kdprodi',$item->kdprodi1),
'kelas' => $item->nmklsmhs,
's_pendaftar' => $item->nmstmskmhs,
);
}
$this->cezpdf->ezTable($db_data, '', '', array('width'=>800,
'fontSize' => 8,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'nourut'=>array('width'=>30,'justification'=>"center"),
'nopmb'=>array('width'=>60,'justification'=>"center"),
'peserta'=>array('width'=>175,'justification'=>"left"),
'lp'=>array('width'=>30,'justification'=>"center"),
'prodi'=>array('width'=>175,'justification'=>"left"),
'kelas'=>array('width'=>90,'justification'=>"left"),
's_pendaftar'=>array('width'=>90,'justification'=>"left"),
)
));
$this->cezpdf->ezText('',10,array('justification' => 'left'));
// $this->cezpdf->ezText(' Jumlah data: '.$i ,8,array('justification' => 'left'));
$this->cezpdf->ezStream(array('Content-Disposition'=>'LaporanPMB.pdf'));
}
// CETAK LAPORAN PENDAFTAR TERVERIFIKASI
function plpendaftarterverifikasi($var)
{
$this->ceklog();
$par = explode("istra", $var);
$idjadwalpmb = $par[0];
$kdprodi = $par[1];
$this->cezpdf->Cezpdf('A4','landscape'); //landscape
$this->cezpdf->ezSetMargins(15,30,10,10); //kiri, atas, kanan, bawah
$this->header_hitamputih('landscape');
$this->cezpdf->ezSetDy(-50, 'makeSpace'); //separator space
//
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->ezText("LAPORAN PENDAFTAR TERVERIFIKASI", 12, array("justification" => "center"));
$this->cezpdf->selectFont('./fonts/Helvetica');
$jadwalpmbshow = $this->nm_field('nmjadwalpmb','jadwalpmb','idjadwalpmb',$idjadwalpmb);
$prodishow = $this->nm_field('nmprodi','v_prodi','kdprodi',$kdprodi).' '. $this->nm_field('nmjenjangstudi','v_prodi','kdprodi',$kdprodi);
$this->cezpdf->ezSetDy(-20, 'makeSpace'); //separator space
$head_2[]=array( 'kol1'=>'Jadwal PMB : '.$jadwalpmbshow,'kol2'=>'','kol3'=>'');
$head_2[]=array( 'kol1'=>'Program Studi : '.$prodishow,'kol2'=>'','kol3'=>'');
$this->cezpdf->ezTable($head_2, '', '', array( 'width'=>660,
'fontSize' => 8,
'showLines'=> 0,
'showHeadings'=>0,
'shaded'=>0,
'cols'=>array(
'kol1'=>array('justification'=>'left'),
'kol2'=>array('justification'=>'center'),
'kol3'=>array('justification'=>'center'))));
$col_names3[] = array(
'nourut' =>'No.',
'nopmb' => 'No. PMB',
'nousm' => 'No. USM',
'peserta' => 'Peserta',
'lp' => '(L/P)',
'prodi' => 'Program Studi',
'kelas' => 'Kelas',
's_pendaftar' => 'Status Pendaftar'
);
$this->cezpdf->ezTable($col_names3, '', '', array('width'=>800,
'fontSize' => 8,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'nourut'=>array('width'=>40,'justification'=>"center"),
'nopmb'=>array('width'=>80,'justification'=>"center"),
'nousm'=>array('width'=>80,'justification'=>"center"),
'peserta'=>array('width'=>150,'justification'=>"center"),
'lp'=>array('width'=>30,'justification'=>"center"),
'prodi'=>array('width'=>140,'justification'=>"center"),
'kelas'=>array('width'=>70,'justification'=>"center"),
's_pendaftar'=>array('width'=>70,'justification'=>"center"),
)
));
// // data table
$where['idjadwalpmb']=$idjadwalpmb;
$where['kdprodi']=$kdprodi;
$so = $this->getllpterverifikasi($where);
$i = 0;
foreach($so as $item)
{
$i = ($i+1);
$db_data[] = array('nourut' => $i.'.',
'nopmb' => $item->nopmb,
'nousm' => $item->nousm,
'peserta' => $item->nama,//'Rp. '.number_format ($item->nmjenjangstudi),
'lp' => $item->kdjk,
'prodi' => $this->nm_field('nourutprodi','v_prodi','kdprodi',$item->kdprodi1).'.'.$this->nm_field('nmprodi','v_prodi','kdprodi',$item->kdprodi1).' '. $this->nm_field('nmjenjangstudi','v_prodi','kdprodi',$item->kdprodi1),
'kelas' => $item->nmklsmhs,
's_pendaftar' => $item->nmstmskmhs,
);
}
$this->cezpdf->ezTable($db_data, '', '', array('width'=>800,
'fontSize' => 8,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'nourut'=>array('width'=>40,'justification'=>"center"),
'nopmb'=>array('width'=>80,'justification'=>"center"),
'nousm'=>array('width'=>80,'justification'=>"center"),
'peserta'=>array('width'=>150,'justification'=>"center"),
'lp'=>array('width'=>30,'justification'=>"center"),
'prodi'=>array('width'=>140,'justification'=>"center"),
'kelas'=>array('width'=>70,'justification'=>"center"),
's_pendaftar'=>array('width'=>70,'justification'=>"center"),
)
));
$this->cezpdf->ezText('',10,array('justification' => 'left'));
// $this->cezpdf->ezText(' Jumlah data: '.$i ,8,array('justification' => 'left'));
$this->cezpdf->ezStream(array('Content-Disposition'=>'LaporanPendaftarTerverifikasi.pdf'));
}
// CETAK PRA KWITANSI PMB
function pcetakprakwitansi($var) {
$this->ceklog();
$par = explode("istra", $var);
$nokw = $par[0];
$nokuitansiy="";
$nopmby= "";
$namay="";
$nominaly="";
$pembayarany= "";
$tglkuitansiy="";
$untukbayary= "";
$nominaly= "";
$terbilangy="";
$statusmasuk= "";
$passwordy="";
$so = $this->getkwitansi($nokw);
foreach($so as $item) {
if ($item->nokuitansipmb) {
$nokuitansiy= $item->nokuitansipmb;
$nopmby= $item->nopmb;
$namay= $item->nama;
$tglkuitansiy= $this->TanggalIndo(date("Ymd",strtotime($item->tglkuitansipmb)));
$pembayarany= $item->nmjadwalpmb;
$nominaly= 'Rp. '.number_format($item->jmlbayar);
$terbilangy= trim($this->terbilang($item->jmlbayar).' Rupiah');
$statusmasuk= $item->nmstmskmhs;
$passwordy= $item->password;
}
}
//====================================================
$this->cezpdf->Cezpdf('A4','landscape'); //landscape
$this->cezpdf->ezSetMargins(15,30,10,10); //kiri, atas, kanan, bawah
//$this->cezpdf->addText(150,100,10,"the quick brown fox jumps over the lazy dog!",0);
$tambah = 0;
$kurang = 70;
$image = imagecreatefrompng('resources/img/hitamputih.png');
$this->cezpdf->addImage($image,130+$tambah-$kurang,510,70);
//head info laporan
//$this->cezpdf->addText(518+$tambah-$kurang+150,565,12,"Nomor Kuitansi : ".$nokuitansiy,0);
$this->cezpdf->addText(518+$tambah-$kurang+150,545,12,"Nomor PMB : ".$nopmby,0);
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->addText(218+$tambah-$kurang,565,14,"PANITIA PENERIMAAN MAHASISWA BARU",0);
$this->cezpdf->addText(218+$tambah-$kurang,545,16,"UNIVERSITAS LANGLANGBUANA",0);
$this->cezpdf->selectFont('./fonts/Helvetica');
$this->cezpdf->addText(218+$tambah-$kurang,525,12,"Jl. Karapitan No. 116 Bandung 40261, Telp. 022-4218084, Fax. 022-4237144",0);
$this->cezpdf->ezSetDy(-80, 'makeSpace'); //separator space
//
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->ezText("BUKTI PENDAFTARAN", 16, array("justification" => "center"));
$this->cezpdf->selectFont('./fonts/Helvetica');
$this->cezpdf->ezSetDy(-40, 'makeSpace'); //separator space
$head_2[]=array('kol1'=>'Nama','kol2'=>':'.$namay,'kol3'=>'');
$head_2[]=array('kol1'=>'Tahun Akademik','kol2'=>':'.$pembayarany,'kol3'=>'');
//$head_2[]=array('kol1'=>'Uang Sebesar','kol2'=>':'.$nominaly,'kol3'=>'');
//$head_2[]=array('kol1'=>'Terbilang','kol2'=>':'.$terbilangy,'kol3'=>'');
$this->cezpdf->ezTable($head_2, '', '', array( 'width'=>500,
'fontSize' => 12,
'showLines'=> 0,
'showHeadings'=>0,
'shaded'=>0,
'cols'=>array(
'kol1'=>array('justification'=>'left','width' => 200),
'kol2'=>array('justification'=>'left','width' => 300),
'kol3'=>array('justification'=>'left')
)));
$this->cezpdf->ezSetDy(-0, 'makeSpace'); //separator space
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'');
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'');
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'Bandung, '.$tglkuitansiy);
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'Petugas Pendaftaran');
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'');
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'');
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'');
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>$this->my_usessionpublic->userdata('username1unla'));
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'');
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'');
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'');
$head_3[]=array('kol0'=>'','kol1'=>'Lembar Ke-1 (Putih) untuk : Peserta','kol2'=>'','kol3'=>'');
$head_3[]=array('kol0'=>'','kol1'=>'Lembar Ke-2 (Merah) untuk : PPMB','kol2'=>'','kol3'=>'');
// $head_3[]=array('kol0'=>'','kol1'=>'Lembar Ke-3 (Kuning) untuk : UNLA','kol2'=>'','kol3'=>'');
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'');
$head_4[]=array('kol0'=>'','kol1'=>'Password PMB Online : '.$passwordy,'kol2'=>'','kol3'=>'');
$this->cezpdf->ezTable($head_3, '', '', array( 'width'=>660,
'fontSize' => 12,
'showLines'=> 0,
'showHeadings'=>0,
'shaded'=>0,
'cols'=>array(
'kol0'=>array('justification'=>'justify','width' => 85),
'kol1'=>array('justification'=>'justify','width' => 290),
'kol2'=>array('justification'=>'right','width' => 135),
'kol3'=>array('justification'=>'center','width' => 250))));
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->ezTable($head_4, '', '', array( 'width'=>660,
'fontSize' => 16,
'showLines'=> 0,
'showHeadings'=>0,
'shaded'=>0,
'cols'=>array(
'kol0'=>array('justification'=>'justify','width' => 85),
'kol1'=>array('justification'=>'justify','width' => 290),
'kol2'=>array('justification'=>'right','width' => 135),
'kol3'=>array('justification'=>'center','width' => 250))));
$this->cezpdf->ezText('',10,array('justification' => 'left'));
// $this->cezpdf->ezText(' Jumlah data: '.$i ,8,array('justification' => 'left'));
$this->cezpdf->ezStream(array('Content-Disposition'=>$nokuitansiy.'.pdf'));
}
// CETAK KWITANSI PMB
function pcetakskwitansi($var) {
$this->ceklog();
$par = explode("istra", $var);
$nokw = $par[0];
$nokuitansiy="";
$nopmby= "";
$namay="";
$nominaly="";
$pembayarany= "";
$tglkuitansiy="";
$untukbayary= "";
$nominaly= "";
$terbilangy="";
$statusmasuk= "";
$passwordy="";
$so = $this->getkwitansi($nokw);
foreach($so as $item)
{
if ($item->nokuitansipmb) {
$nokuitansiy= $item->nokuitansipmb;
$nopmby= $item->nopmb;
$namay= $item->nama;
$tglkuitansiy= $this->TanggalIndo(date("Ymd",strtotime($item->tglkuitansipmb)));
$pembayarany= $item->nmjadwalpmb;
$nominaly= 'Rp. '.number_format($item->jmlbayar);
$terbilangy= trim($this->terbilang($item->jmlbayar).' Rupiah');
$statusmasuk= $item->nmstmskmhs;
$passwordy= $item->password;
}
}
//====================================================
$this->cezpdf->Cezpdf('A4','landscape'); //landscape
$this->cezpdf->ezSetMargins(15,30,10,10); //kiri, atas, kanan, bawah
// $this->cezpdf->addText(150,100,10,"the quick brown fox jumps over the lazy dog!",0);
$tambah = 0;
$kurang = 70;
$image = imagecreatefrompng('resources/img/hitamputih.png');
$this->cezpdf->addImage($image,130+$tambah-$kurang,510,70);
//head info laporan
$this->cezpdf->addText(518+$tambah-$kurang+150,565,12,"Nomor Kuitansi : ".$nokuitansiy,0);
$this->cezpdf->addText(518+$tambah-$kurang+150,545,12,"Nomor PMB : ".$nopmby,0);
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->addText(218+$tambah-$kurang,565,14,"PANITIA PENERIMAAN MAHASISWA BARU",0);
$this->cezpdf->addText(218+$tambah-$kurang,545,16,"UNIVERSITAS LANGLANGBUANA",0);
$this->cezpdf->selectFont('./fonts/Helvetica');
$this->cezpdf->addText(218+$tambah-$kurang,525,12,"Jl. Karapitan No. 116 Bandung 40261, Telp. 022-4218084, Fax. 022-4237144",0);
$this->cezpdf->ezSetDy(-80, 'makeSpace'); //separator space
//
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->ezText("KUITANSI", 16, array("justification" => "center"));
$this->cezpdf->selectFont('./fonts/Helvetica');
$this->cezpdf->ezSetDy(-40, 'makeSpace'); //separator space
$head_2[]=array('kol1'=>'Sudah diterima dari','kol2'=>':'.$namay,'kol3'=>'');
$head_2[]=array('kol1'=>'Untuk Pembayaran','kol2'=>':'.$pembayarany,'kol3'=>'');
$head_2[]=array('kol1'=>'Uang Sebesar','kol2'=>':'.$nominaly,'kol3'=>'');
$head_2[]=array('kol1'=>'Terbilang','kol2'=>':'.$terbilangy,'kol3'=>'');
$this->cezpdf->ezTable($head_2, '', '', array( 'width'=>500,
'fontSize' => 12,
'showLines'=> 0,
'showHeadings'=>0,
'shaded'=>0,
'cols'=>array(
'kol1'=>array('justification'=>'left','width' => 200),
'kol2'=>array('justification'=>'left','width' => 300),
'kol3'=>array('justification'=>'left')
)));
$this->cezpdf->ezSetDy(-0, 'makeSpace'); //separator space
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'');
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'');
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'Bandung, '.$tglkuitansiy);
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'Petugas Pendaftaran');
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'');
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'');
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'');
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>$this->my_usessionpublic->userdata('username1unla'));
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'');
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'');
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'');
$head_3[]=array('kol0'=>'','kol1'=>'Lembar Ke-1 (Putih) untuk : Peserta','kol2'=>'','kol3'=>'');
$head_3[]=array('kol0'=>'','kol1'=>'Lembar Ke-2 (Merah) untuk : PPMB','kol2'=>'','kol3'=>'');
// $head_3[]=array('kol0'=>'','kol1'=>'Lembar Ke-3 (Kuning) untuk : UNLA','kol2'=>'','kol3'=>'');
$head_3[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'');
$head_4[]=array('kol0'=>'','kol1'=>'Password PMB Online : '.$passwordy,'kol2'=>'','kol3'=>'');
$this->cezpdf->ezTable($head_3, '', '', array( 'width'=>660,
'fontSize' => 12,
'showLines'=> 0,
'showHeadings'=>0,
'shaded'=>0,
'cols'=>array(
'kol0'=>array('justification'=>'justify','width' => 85),
'kol1'=>array('justification'=>'justify','width' => 290),
'kol2'=>array('justification'=>'right','width' => 135),
'kol3'=>array('justification'=>'center','width' => 250))));
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->ezTable($head_4, '', '', array( 'width'=>660,
'fontSize' => 16,
'showLines'=> 0,
'showHeadings'=>0,
'shaded'=>0,
'cols'=>array(
'kol0'=>array('justification'=>'justify','width' => 85),
'kol1'=>array('justification'=>'justify','width' => 290),
'kol2'=>array('justification'=>'right','width' => 135),
'kol3'=>array('justification'=>'center','width' => 250))));
$this->cezpdf->ezText('',10,array('justification' => 'left'));
// $this->cezpdf->ezText(' Jumlah data: '.$i ,8,array('justification' => 'left'));
$this->cezpdf->ezStream(array('Content-Disposition'=>$nokuitansiy.'.pdf'));
}
// CETAK HASIL USM
function plhasilusm($var)
{
$this->ceklog();
$par = explode("istra", $var);
$kdstsemester = $par[0];
$idjadwalpmb = $par[1];
$idstusm = $par[2];
$this->cezpdf->Cezpdf('A4','landscape'); //landscape
$this->cezpdf->ezSetMargins(15,30,10,10); //kiri, atas, kanan, bawah
$this->header_hitamputih('landscape');
$this->cezpdf->ezSetDy(-50, 'makeSpace'); //separator space
$kdstsemestershow = $this->nm_field('nmthnakademik','v_tahunakademik','kdstsemester',$kdstsemester);
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->ezText("LAPORAN HASIL USM", 12, array("justification" => "center"));
$this->cezpdf->ezText("TAHUN AKADEMIK ".$kdstsemestershow."", 12, array("justification" => "center"));
$this->cezpdf->selectFont('./fonts/Helvetica');
$jadwalpmbshow = ($idjadwalpmb=='-') ? "Semua Gelombang":$this->nm_field('nmjadwalpmb','jadwalpmb','idjadwalpmb',$idjadwalpmb);
$statususmshow = $this->nm_field('nmstusm','stusm','idstusm',$idstusm);
$this->cezpdf->ezSetDy(-20, 'makeSpace'); //separator space
$head_2[]=array( 'kol1'=>'Jadwal PMB','kol2'=>': '.$jadwalpmbshow);
$head_2[]=array( 'kol1'=>'Status USM','kol2'=>': '.$statususmshow);
$this->cezpdf->ezTable($head_2, '', '', array( 'width'=>660,
'fontSize' => 8,
'showLines'=> 0,
'showHeadings'=>0,
'shaded'=>0,
'cols'=>array(
'kol1'=>array('width'=>70,'justification'=>'left'),
'kol2'=>array('justification'=>'left'))));
$col_names3[] = array(
'nourut' =>'No.',
'nopmb' => 'No.PMB',
'nousm' => 'No.USM',
'peserta' => 'Peserta',
'lp' => '(L/P)',
'prodi' => 'Program Studi',
'kelas' => 'Kelas',
's_pendaftar' => 'Status Pendaftar',
'nmstusm' => 'Status USM'
);
$this->cezpdf->ezTable($col_names3, '', '', array('width'=>800,
'fontSize' => 8,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'nourut'=>array('width'=>40,'justification'=>"center"),
'nopmb'=>array('width'=>80,'justification'=>"center"),
'nousm'=>array('width'=>80,'justification'=>"center"),
'peserta'=>array('width'=>150,'justification'=>"left"),
'lp'=>array('width'=>30,'justification'=>"center"),
'prodi'=>array('width'=>140,'justification'=>"left"),
'kelas'=>array('width'=>70,'justification'=>"left"),
's_pendaftar'=>array('width'=>70,'justification'=>"left"),
'nmstusm'=>array('width'=>70,'justification'=>"left"),
)
));
// // data table
$where['kdstsemester']=$kdstsemester;
$where['idjadwalpmb']=$idjadwalpmb;
$where['idstusm']=$idstusm;
$so = $this->getlhasilusm($where);
$i = 0;
foreach($so as $item)
{
$i = ($i+1);
$db_data[] = array('nourut' => $i.'.',
'nopmb' => $item->nopmb,
'nousm' => $item->nousm,
'peserta' => $item->nama,//'Rp. '.number_format ($item->nmjenjangstudi),
'lp' => $item->kdjk,
'prodi' => $item->nourutprodi.'.'.$item->nmprodi.' '.$item->nmjenjangstudi,
'kelas' => $item->nmklsmhs,
's_pendaftar' => $item->nmstmskmhs,
'nmstusm'=> $item->nmstusm,
);
}
$this->cezpdf->ezTable($db_data, '', '', array('width'=>800,
'fontSize' => 8,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'nourut'=>array('width'=>40,'justification'=>"center"),
'nopmb'=>array('width'=>80,'justification'=>"center"),
'nousm'=>array('width'=>80,'justification'=>"center"),
'peserta'=>array('width'=>150,'justification'=>"left"),
'lp'=>array('width'=>30,'justification'=>"center"),
'prodi'=>array('width'=>140,'justification'=>"left"),
'kelas'=>array('width'=>70,'justification'=>"left"),
's_pendaftar'=>array('width'=>70,'justification'=>"left"),
'nmstusm'=>array('width'=>70,'justification'=>"left"),
)
));
$this->cezpdf->ezText('',10,array('justification' => 'left'));
$this->cezpdf->ezStream(array('Content-Disposition'=>'LaporanHasilUSM-'.$idjadwalpmb.'-'.$statususmshow.'.pdf'));
}
// CETAK REKAP PMB
function plrpmb($var="")
{
$this->ceklog();
$par = explode("istra", $var);
$kdstsemester = $par[0];
$idjadwalpmb = $par[1];
$this->cezpdf->Cezpdf('A4','landscape'); //landscape
$this->cezpdf->ezSetMargins(15,30,10,10); //kiri, atas, kanan, bawah
$this->header_hitamputih('landscape');
$this->cezpdf->ezSetDy(-50, 'makeSpace'); //separator space
//
$kdstsemestershow = $this->nm_field('nmthnakademik','v_tahunakademik','kdstsemester',$kdstsemester);
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->ezText("REKAPITULASI PENERIMAAN MAHASISWA BARU", 10, array("justification" => "center"));
$this->cezpdf->ezText("TAHUN AKADEMIK ".$kdstsemestershow."", 10, array("justification" => "center"));
$this->cezpdf->selectFont('./fonts/Helvetica');
$jadwalpmbshow = ($idjadwalpmb=='-') ? "Semua Gelombang":$this->nm_field('nmjadwalpmb','jadwalpmb','idjadwalpmb',$idjadwalpmb);
$this->cezpdf->ezSetDy(-20, 'makeSpace'); //separator space
$head_2[]=array('kol1'=>'Jadwal PMB : '.$jadwalpmbshow);
$this->cezpdf->ezTable($head_2, '', '', array( 'width'=>800,
'fontSize' => 8,
'showLines'=> 0,
'showHeadings'=>0,
'shaded'=>0,
'cols'=>array(
'kol1'=>array('width'=>680,'justification'=>'left'))));
$col_names3[] = array(
// 'nourut' =>'No.',
'nmprodi' => 'Fakultas / Program Studi',
'jmlpendaftar' => 'Jumlah Pendaftar',
'jmlpendaftarhariini' => 'Jumlah Pendaftar Hari Ini',
'jmlpendaftarsampaihariini' => 'Jumlah Pendaftar Sampai Hari Ini',
//'pendaftar' => 'Pendaftar Terverifikasi',
'diterima' => 'Diterima',
'registrasi' => 'Registrasi',
'regular' => 'Registrasi (Regular)',
'nonregular' => 'Registrasi (Non Regular)',
);
$this->cezpdf->ezTable($col_names3, '', '', array('width'=>800,
'fontSize' => 8,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'nmprodi'=>array('width'=>200,'justification'=>"center"),
'jmlpendaftar'=>array('width'=>80,'justification'=>"center"),
'jmlpendaftarhariini'=>array('width'=>80,'justification'=>"center"),
'jmlpendaftarsampaihariini'=>array('width'=>80,'justification'=>"center"),
//'pendaftar'=>array('width'=>80,'justification'=>"center"),
'diterima'=>array('width'=>60,'justification'=>"center"),
'registrasi'=>array('width'=>60,'justification'=>"center"),
'regular'=>array('width'=>60,'justification'=>"center"),
'nonregular'=>array('width'=>60,'justification'=>"center"),
)
));
// // data table
$where['kdstsemester']=$kdstsemester;
$where['idjadwalpmb']=$idjadwalpmb;
$kdfakultas='';
$num=1;
$sjmlpendaftar = 0; $sjmlpendaftarhariini = 0;
$sjmlpendaftarsampaihariini = 0; /* $spendaftar = 0; */
$sditerima = 0; $sregular = 0; $snonregular = 0; $sregistrasi = 0;
$so22 = $this->getlrpmb($where);
foreach($so22 as $item22)
{
if($item22->kdfakultas == $kdfakultas){
$db_data2[] = array(
'nmprodi2' => ' - '.$item22->nmprodi,
'jmlpendaftar2' => $item22->jmlpendaftar,
'jmlpendaftarhariini2' => $item22->jmlpendaftarhariini,
'jmlpendaftarsampaihariini2' => $item22->jmlpendaftarsampaihariini,
//'pendaftar2' => $item22->terverifikasi,
'diterima2' => $item22->diterima,
'registrasi2' => $item22->registrasi,
'regular2' => $item22->regular,
'nonregular2' => $item22->nonregular,
);
} else {
$kdfakultas = $item22->kdfakultas;
$db_data2[] = array(
'nmprodi2' => $num++.'. FAKULTAS '.$item22->nmfakultas,
'jmlpendaftar2' => '',
'jmlpendaftarhariini2' => '',
'jmlpendaftarsampaihariini2' => '',
//'pendaftar2' => '',
'diterima2' => '',
'registrasi2' => '',
'regular2' => '',
'nonregular2' => '',
);
$db_data2[] = array(
'nmprodi2' => ' - '.$item22->nmprodi,
'jmlpendaftar2' => $item22->jmlpendaftar,
'jmlpendaftarhariini2' => $item22->jmlpendaftarhariini,
'jmlpendaftarsampaihariini2' => $item22->jmlpendaftarsampaihariini,
//'pendaftar2' => $item22->terverifikasi,
'diterima2' => $item22->diterima,
'registrasi2' => $item22->registrasi,
'regular2' => $item22->regular,
'nonregular2' => $item22->nonregular,
);
}
$sjmlpendaftar += $item22->jmlpendaftar;
$sjmlpendaftarhariini += $item22->jmlpendaftarhariini;
$sjmlpendaftarsampaihariini += $item22->jmlpendaftarsampaihariini;
//$spendaftar += $item22->terverifikasi;
$sditerima += $item22->diterima;
$sregular += $item22->regular;
$snonregular += $item22->nonregular;
$sregistrasi += $item22->registrasi;
}
$this->cezpdf->ezTable($db_data2, '', '', array('width'=>800,
'fontSize' => 9,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'nmprodi2'=>array('width'=>200,'justification'=>"left"),
'jmlpendaftar2'=>array('width'=>80,'justification'=>"center"),
'jmlpendaftarhariini2'=>array('width'=>80,'justification'=>"center"),
'jmlpendaftarsampaihariini2'=>array('width'=>80,'justification'=>"center"),
//'pendaftar2'=>array('width'=>80,'justification'=>"center"),
'diterima2'=>array('width'=>60,'justification'=>"center"),
'registrasi2'=>array('width'=>60,'justification'=>"center"),
'regular2'=>array('width'=>60,'justification'=>"center"),
'nonregular2'=>array('width'=>60,'justification'=>"center"),
)
));
//}
$db_sum[] = array(
'stotal' => 'TOTAL:',
'sjmlpendaftar' => $sjmlpendaftar,
'sjmlpendaftarhariini' => $sjmlpendaftarhariini,
'sjmlpendaftarsampaihariini' => $sjmlpendaftarsampaihariini,
//'spendaftar' => $spendaftar,
'sditerima' => $sditerima,
'sregistrasi' => $sregistrasi,
'sregular' => $sregular,
'snonregular' => $snonregular,
);
$this->cezpdf->ezTable($db_sum, '', '', array('width'=>800,
'fontSize' => 8,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'stotal'=>array('width'=>200,'justification'=>"right"),
'sjmlpendaftar'=>array('width'=>80,'justification'=>"center"),
'sjmlpendaftarhariini'=>array('width'=>80,'justification'=>"center"),
'sjmlpendaftarsampaihariini'=>array('width'=>80,'justification'=>"center"),
//'spendaftar'=>array('width'=>80,'justification'=>"center"),
'sditerima'=>array('width'=>60,'justification'=>"center"),
'sregistrasi'=>array('width'=>60,'justification'=>"center"),
'sregular'=>array('width'=>60,'justification'=>"center"),
'snonregular'=>array('width'=>60,'justification'=>"center"),
)
));
$this->cezpdf->ezText('',10,array('justification' => 'left'));
$this->cezpdf->ezStream(array('Content-Disposition'=>'LaporanRekapPMB-'.$idjadwalpmb.'.pdf'));
}
// CETAK KARTU HASIL STUDI
function pkartuhasilstudi($var)
{
$this->ceklog();
$par = explode("istra", $var);
$nim = $par[0];
$ipkup = $par[1];
$kdstsemesterx = $par[2];
$kdthnakademik=$this->nm_field2('kdthnakademik', 'v_tahunakademik', 'kdstsemester',$kdstsemesterx);
$nmjnssemester=$this->nm_field2('nmjnssemester', 'v_tahunakademik', 'kdstsemester',$kdstsemesterx);
$this->cezpdf->Cezpdf('A4','potrait'); //landscape
$this->cezpdf->ezSetMargins(4,3,3,3); //kiri, atas, kanan, bawah
$this->header('potrait');
$this->cezpdf->ezSetDy(-30, 'makeSpace'); //separator space
//
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->ezText("KARTU HASIL STUDI", 12, array("justification" => "center"));
$this->cezpdf->selectFont('./fonts/Helvetica');
$this->cezpdf->ezSetDy(-20, 'makeSpace'); //separator space
$where=$nim;
$pimpin2='';
$so = $this->getmahasiswa($where);
foreach($so as $item):
$head_2[]=array( 'kol1'=>'NAMA','kol2'=>': '.$item->nmmhs,'kol3'=>'');
$head_2[]=array( 'kol1'=>'NPM' ,'kol2'=>': '.$item->nim,'kol3'=>'');
$head_2[]=array( 'kol1'=>'FAKULTAS','kol2'=>': '.$item->nmfakultas,'kol3'=>'');
$head_2[]=array( 'kol1'=>'PROGRAM STUDI','kol2'=>': '.$item->nmprodi,'kol3'=>'');
$head_2[]=array( 'kol1'=>'JENJANG STUDI','kol2'=>': '.$item->nmjenjangstudi,'kol3'=>'');
$head_2[]=array( 'kol1'=>'TAHUN AKADEMIK','kol2'=>': '.$kdthnakademik,'kol3'=>'');
$head_2[]=array( 'kol1'=>'SEMESTER','kol2'=>': '.$nmjnssemester,'kol3'=>'');
$head_2[]=array( 'kol1'=>'DOSEN WALI','kol2'=>': '.$this->get_wali('nmdostpgelar', 'dosen', 'nidu',$this->get_wali('nidu', 'dosenwalidet', 'nim',$item->nim)),'kol3'=>'');
$pimpin2=$this->nm_field2cond('nmpimpinan','pimpinan','jabatan', '5', 'kdfakultas', $item->kdfakultas);
endforeach;
$this->cezpdf->ezTable($head_2, '', '', array( 'width'=>500,
'fontSize' => 8,
'showLines'=> 0,
'showHeadings'=>0,
'shaded'=>0,
'cols'=>array(
'kol1'=>array('width'=>100,'justification'=>'left'),
'kol2'=>array('width'=>150,'justification'=>'left'),
'kol3'=>array('width'=>230,'justification'=>'center'))));
$this->cezpdf->ezSetDy(-30, 'makeSpace'); //separator space
$col_names3[] = array(
'nourut' =>'No.',
'kode' => 'Kode',
'matakuliah' => 'Mata Kuliah',
'hm' => 'HM',
'am' => 'AM',
'sks' => 'sks',
'm' => 'M'
);
$this->cezpdf->ezTable($col_names3, '', '', array('width'=>500,
'fontSize' => 8,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'nourut'=>array('width'=>35,'justification'=>"center"),
'kode'=>array('width'=>55,'justification'=>"center"),
'matakuliah'=>array('width'=>225,'justification'=>"center"),
'hm'=>array('width'=>40,'justification'=>"center"),
'am'=>array('width'=>40,'justification'=>"center"),
'sks'=>array('width'=>40,'justification'=>"center"),
'm'=>array('width'=>40,'justification'=>"center"),
)
));
// data table
$where2['nim']=$nim;
$where2['kdthnakademik']=$kdthnakademik;
$where2['nmjnssemester']=$nmjnssemester;
$so2 = $this->getvnilai($where2);
$i = 0;
$jmlsksxmutu=0;
$jmlsks=0;
$jmlmutu=0;
foreach($so2 as $item2)
{
$i = ($i+1);
$db_data[] = array('nourut' => $i.'.',
'kode' => $item2->kdmk,
'matakuliah' => $item2->nmmkind,
'hm' => $item2->nilaihuruf,//'Rp. '.number_format ($item->nmjenjangstudi),
'am' => $item2->bobotnilai,
'sks' => $item2->jmlsks,
'm' => $item2->mutu,
);
$jmlsksxmutu=$jmlsksxmutu+$item2->jmlsks * $item2->mutu;
$jmlsks=$jmlsks+$item2->jmlsks;
$jmlmutu=$jmlmutu+$item2->mutu;
}
$this->cezpdf->ezTable($db_data, '', '', array('width'=>500,
'fontSize' => 8,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'nourut'=>array('width'=>35,'justification'=>"center"),
'kode'=>array('width'=>55,'justification'=>"center"),
'matakuliah'=>array('width'=>225,'justification'=>"left"),
'hm'=>array('width'=>40,'justification'=>"center"),
'am'=>array('width'=>40,'justification'=>"center"),
'sks'=>array('width'=>40,'justification'=>"center"),
'm'=>array('width'=>40,'justification'=>"center"),
)
));
$this->cezpdf->ezSetDy(-5, 'makeSpace'); //separator space
$this->cezpdf->ezText(' Keterangan: HM=Huruf Mutu, AM=Angka Mutu, sks = satuan kredit semester, M=HM x AM.',8,array('justification' => 'left'));
//$this->cezpdf->line(60,310,520,310);
$this->cezpdf->ezSetDy(-10, 'makeSpace'); //separator space
$footer[] = array('nourut' =>'Jumlah SKS x Mutu ','kode' => ' : '.$jmlsksxmutu,'matakuliah' => '');
$footer[] = array('nourut' =>'Jumlah SKS ','kode' => ' : '.$jmlsks,'matakuliah' => '');
$footer[] = array('nourut' =>'Indeks Prestasi (IP)','kode' => ' : '.substr($jmlmutu/$jmlsks,0,4),'matakuliah' => '');
$footer[] = array('nourut' =>'Indeks Prestasi Akumulasi','kode' => ' : '.$ipkup,'matakuliah' => '');
$footer[] = array('nourut' =>'','kode' => '','matakuliah' => 'Bandung, '.$this->TanggalIndo(date("Ymd")));
$footer[] = array('nourut' =>'','kode' => '','matakuliah' => 'Dekan,');
$footer[] = array('nourut' =>'','kode' => '','matakuliah' => '');
$footer[] = array('nourut' =>'','kode' => '','matakuliah' => '');
$footer[] = array('nourut' =>'','kode' => '','matakuliah' => '');
$footer[] = array('nourut' =>'','kode' => '','matakuliah' => '');
$footer[] = array('nourut' =>'','kode' => '','matakuliah' => $pimpin2);
$this->cezpdf->ezTable($footer, '', '', array('width'=>500,
'fontSize' => 8,
'showLines'=> 0,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'nourut'=>array('width'=>120,'justification'=>"left"),
'kode'=>array('width'=>130,'justification'=>"left"),
'matakuliah'=>array('width'=>230,'justification'=>"center"),
)
));
$this->cezpdf->ezStream(array('Content-Disposition'=>'KHS-'.$nim.'.pdf'));
}
// CETAK KARTU USM
function pcetakkartuusm()
{
$this->ceklogpmb();
$nopmb = $this->my_usessionpmb->userdata('nopmbunla');
$nokuitansiy="";
$nopmby= "";
$namay="";
$prodiy="";
$idjadwalpmb="";
$idstmskmhs="";
$nmstmskmhs="";
$so = $this->getpmb($nopmb);
foreach($so as $item)
{
if ($item->nokuitansipmb) {
$nokuitansiy= $item->nokuitansipmb;
$nopmby= $item->nopmb;
$namay= $item->nama;
$prodiy= $item->nmprodi;
$idjadwalpmb= $item->idjadwalpmb;
$idstmskmhs=($item->idstmskmhs==2) ? 2:1;
$nmstmskmhs=$this->nm_field('nmstmskmhs','stmskmhs','idstmskmhs',$item->idstmskmhs);
}
}
//====================================================
$this->cezpdf->Cezpdf('A5','landscape'); //landscape
$this->cezpdf->ezSetMargins(15,30,10,10); //kiri, atas, kanan, bawah
// $this->cezpdf->addText(150,100,10,"the quick brown fox jumps over the lazy dog!",0);
$tambah = 0;
$kurang = 70;
$image = imagecreatefrompng('resources/img/report.png');
$this->cezpdf->addImage($image,135+$tambah-$kurang,320,65);
//head info laporan
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->addText(218+$tambah-$kurang,360,14,"PANITIA PENERIMAAN MAHASISWA BARU",0);
$this->cezpdf->addText(218+$tambah-$kurang,340,18,"UNIVERSITAS LANGLANGBUANA",0);
$this->cezpdf->selectFont('./fonts/Helvetica');
$this->cezpdf->addText(218+$tambah-$kurang,325,12,"Jl. Karapitan No. 116 Bandung 40261, Telp. 022-4218084, Fax. 022-4237144",0);
$this->cezpdf->ezSetDy(-90, 'makeSpace'); //separator space
//
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->ezText("KARTU USM", 16, array("justification" => "center"));
$this->cezpdf->selectFont('./fonts/Helvetica');
$this->cezpdf->ezSetDy(-20, 'makeSpace'); //separator space
$head_2[]=array('kol1'=>'No PMB :','kol2'=>$nopmby);
$head_2[]=array('kol1'=>'Nama :','kol2'=>$namay);
$head_2[]=array('kol1'=>'Prodi Pilihan :','kol2'=>$prodiy);
$head_2[]=array('kol1'=>'Status Masuk :','kol2'=>$nmstmskmhs);
//$usm = $this->get_jadwalusm($idjadwalpmb,$idstmskmhs);
$urutpmby = substr($nopmby,6);
if($urutpmby > "0120"){
$head_2[]=array('kol1'=>'Jenis USM :','kol2'=>'Jadwal USM akan diinfokan kembali');}else{
$usm = $this->get_jadwalusmaktif($idstmskmhs);
foreach($usm as $item2){
//$head_2[]=array('kol1'=>'Jenis USM : ','kol2'=>'One Day Admission','kol3'=>'');
$head_2[]=array('kol1'=>'Jenis USM :','kol2'=>$item2->nmjnsusm);
$head_2[]=array('kol1'=>'Tanggal USM :','kol2'=>$this->TanggalIndo(date("Ymd",strtotime($item2->tglusm))));
$head_2[]=array('kol1'=>'Jam USM :','kol2'=>date ('H:i',strtotime($item2->jamusmdari)).' s/d '.date ('H:i',strtotime($item2->jamusmsampai)));
}
}
$head_2[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'');
$head_2[]=array('kol0'=>'','kol1'=>'','kol2'=>'','kol3'=>'Photo');
$this->cezpdf->ezTable($head_2, '', '', array( 'width'=>660,
'fontSize' => 12,
'showLines'=> 0,
'showHeadings'=>0,
'shaded'=>0,
'cols'=>array(
'kol1'=>array('justification'=>'right'),
'kol2'=>array('justification'=>'left'),
'kol3'=>array('justification'=>'left')
)));
$this->cezpdf->ezSetDy(-20, 'makeSpace'); //separator space
$this->cezpdf->ezText('',10,array('justification' => 'left'));
// $this->cezpdf->ezText(' Jumlah data: '.$i ,8,array('justification' => 'left'));
$this->cezpdf->ezStream(array('Content-Disposition'=>'USM'.$nopmby.'.pdf'));
}
function pcetakhasilusm()
{
$this->ceklogpmb();
$nopmb = $this->my_usessionpmb->userdata('nopmbunla');
$nokuitansiy="";
$nopmby= "";
$namay="";
$idstmskmhs="";
$nmstmskmhs="";
$so = $this->getperiksausm($nopmb);
foreach($so as $item)
{
if ($item->nopmb) {
$nopmby= $item->nopmb;
$namay= $item->nama;
$jnskelamin= $item->jnskelamin;
$tptlahir= $item->tptlahir;
$tgllahir= $item->tgllahir;
$alamat= $item->alamat;
$kelurahan= $item->kelurahan;
$kecamatan= $item->kecamatan;
$statusmasuk= $item->statusmasuk;
$namaprodi= $item->namaprodi;
$namakls= $item->namakls;
$hasilusm= $item->hasilusm;
$sumbangansukarela= ($item->sumbangansukarela) ? '.Rp. '.$item->sumbangansukarela:null;
$catatanpmb= $item->catatanpmb;
}
}
//====================================================
$this->cezpdf->Cezpdf('A5','landscape'); //landscape
$this->cezpdf->ezSetMargins(15,30,10,10); //kiri, atas, kanan, bawah
// $this->cezpdf->addText(150,100,10,"the quick brown fox jumps over the lazy dog!",0);
$tambah = 0;
$kurang = 70;
$image = imagecreatefrompng('resources/img/report.png');
$this->cezpdf->addImage($image,172+$tambah-$kurang,350,55);
//head info laporan
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->addText(242+$tambah-$kurang,380,13,"PANITIA PENERIMAAN MAHASISWA BARU",0);
$this->cezpdf->addText(242+$tambah-$kurang,370,11,"UNIVERSITAS LANGLANGBUANA",0);
$this->cezpdf->selectFont('./fonts/Helvetica');
$this->cezpdf->addText(242+$tambah-$kurang,360,9,"Jl. Karapitan No. 116 Bandung 40261, Telp. 022-4218084, Fax. 022-4237144",0);
$this->cezpdf->ezSetDy(-60, 'makeSpace'); //separator space
//
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->ezText("BUKTI HASIL USM", 12, array("justification" => "center"));
$this->cezpdf->selectFont('./fonts/Helvetica');
$this->cezpdf->ezSetDy(-10, 'makeSpace'); //separator space
$head_2[]=array( 'kol1'=>'No.PMB ','kol2'=>': '.$nopmby);
$head_2[]=array( 'kol1'=>'Nama ','kol2'=>': '.$namay);
$head_2[]=array( 'kol1'=>'Jenis Kelamin ','kol2'=>': '.$jnskelamin);
$head_2[]=array( 'kol1'=>'Tempat Lahir ','kol2'=>': '.$tptlahir);
$head_2[]=array( 'kol1'=>'Tanggal Lahir ','kol2'=>': '.$tgllahir);
$head_2[]=array( 'kol1'=>'Alamat ','kol2'=>': '.$alamat);
$head_2[]=array( 'kol1'=>'Kelurahan ','kol2'=>': '.$kelurahan);
$head_2[]=array( 'kol1'=>'Kecamatan ','kol2'=>': '.$kecamatan);
$head_2[]=array( 'kol1'=>'Status Masuk ','kol2'=>': '.$statusmasuk);
$head_2[]=array( 'kol1'=>'Program Studi ','kol2'=>': '.$namaprodi);
$head_2[]=array( 'kol1'=>'Kelas ','kol2'=>': '.$namakls);
$head_2[]=array( 'kol1'=>'Hasil USM ','kol2'=>': '.$hasilusm);
//$head_2[]=array( 'kol1'=>'DPKS ','kol2'=>': '.$sumbangansukarela);
$head_2[]=array( 'kol1'=>'Catatan Pendaftar','kol2'=>' '.$catatanpmb);
$this->cezpdf->ezTable($head_2, '', '', array( 'width'=>360,
'fontSize' => 10,
'showLines'=> 0,
'showHeadings'=>0,
'shaded'=>0,
'cols'=>array(
'kol1'=>array('width'=>150,'justification'=>'left'),
'kol2'=>array('width'=>350,'justification'=>'left')
)));
$this->cezpdf->ezStream(array('Content-Disposition'=>'USM-'.$nopmby.'.pdf'));
}
// CETAK TRANSKRIP AKADEMIK
function ptranskripakademik($var)
{
$this->ceklog();
$par = explode("istra", $var);
$nimnya = $par[0];
$kdprodinya = $par[1];
$thnmasuknya = $par[2];
$tglijazah = $par[3];
$prodinya = $this->getprodi($kdprodinya);
foreach($prodinya as $itemprodi){
if ($itemprodi->nmstakreditasi) {
$akreditasi = 'Terakreditasi,';
$nosk = 'No. '.$itemprodi->noskakreditasi;
$tglsk = 'Tanggal '.$this->TanggalIndo(date("Ymd",strtotime($itemprodi->tglskakreditasi)));
} else {
$akreditasi = '-';
$nosk = '';
$tglsk = '';
}
}
$this->cezpdf->Cezpdf('F4','potrait'); //landscape
$this->cezpdf->ezSetMargins(35,20,20,20); //kebawah, ?, maju kanan, maju kiri
//$this->header_transkrip();
$this->cezpdf->ezSetDy(-100, 'makeSpace'); //separator space
$where=$nimnya;
$pimpin1='';
$pimpin2='';
$skripsi='';
$batas1=0;
$mulai1=0;
$batas2=0;
$mulai2=0;
$so = $this->getmahasiswa($where);
foreach($so as $item):
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->ezText("TRANSKRIP AKADEMIK", 14, array("justification" => "center"));
$this->cezpdf->selectFont('./fonts/Helvetica');
$this->cezpdf->ezText("Nomor: ".$item->notranskrip, 10, array("justification" => "center"));
$this->cezpdf->ezText("", 10, array("justification" => "center"));
$this->cezpdf->ezText("Nama: ".$item->nmmhs, 10, array("justification" => "center"));
//$this->cezpdf->selectFont('./fonts/Helvetica');
$this->cezpdf->ezSetDy(-5, 'makeSpace'); //separator space
$head_2[]=array( 'kol0'=>'Nomor Pokok Mahasiswa','kol01'=>':','kol1'=>$item->nim,'kol2'=>'Fakultas','kol02'=>':','kol3'=>$item->nmfakultas);
$head_2[]=array( 'kol0'=>'Tempat, Tanggal Lahir','kol01'=>':','kol1'=>$item->tptlahir.', '.$this->TanggalIndo(date("Ymd",strtotime($item->tgllahir))),'kol2'=>'Program Studi','kol02'=>':','kol3'=>$item->nmprodi);
$head_2[]=array( 'kol0'=>'Tahun Masuk','kol01'=>':','kol1'=>$item->thnmasuk,'kol2'=>'Status Program Studi','kol02'=>':','kol3'=>$akreditasi);
$head_2[]=array( 'kol0'=>'Status Awal Mahasiswa','kol01'=>':','kol1'=>$item->nmstawalmhs,'kol2'=>'','kol02'=>'','kol3'=>$nosk);
$head_2[]=array( 'kol0'=>'Jenjang Pendidikan','kol01'=>':','kol1'=>$item->nmjenjangpendidikan,'kol2'=>'','kol02'=>'','kol3'=>$tglsk);
$kdthnakademik=$item->kdthnakademik;
$nmjnssemester=$item->nmjnssemester;
$pimpin1=$this->nm_field2('nmpimpinan', 'pimpinan', 'idpimpinan',$item->idpimpinan1);
$pimpin2=$this->nm_field2('nmpimpinan', 'pimpinan', 'idpimpinan',$item->idpimpinan2);
$skripsi=$item->jdlskripsiind;
endforeach;
$this->cezpdf->ezTable($head_2, '', '', array( 'width'=>500,
'fontSize' => 6,
'showLines'=> 0,
'showHeadings'=>0,
'shaded'=>0,
'cols'=>array(
'kol0'=>array('width'=>127,'justification'=>'left'),
'kol01'=>array('width'=>13,'justification'=>'right'),
'kol1'=>array('width'=>145,'justification'=>'left'),
'kol2'=>array('width'=>127,'justification'=>'left'),
'kol02'=>array('width'=>13,'justification'=>'right'),
'kol3'=>array('width'=>145,'justification'=>'left'))));
$this->cezpdf->ezSetDy(-30, 'makeSpace'); //separator space
//==========================================================
$numrows = $this->cekjumlahvnilaiall($nimnya, $kdprodinya, $thnmasuknya); // jumlah record
//$sisa = $numrows - 66;
if ($numrows > 44) {
$batas1= 33;
$mulai1=0;
$batas2= 33;
$mulai2= 33;
$batas3= $numrows;
$mulai3= 66;
} else {
$batas1= 22;
$mulai1=0;
$batas2= 22;
$mulai2= 22;
}
/* if ($mod == 1){
$batas1= ($numrows -1) / 2;
$mulai1=0;
$batas2= (($numrows -1) / 2) + 1;
$mulai2= ($numrows -1) / 2;
} else {
$batas1=$numrows / 2;
$mulai1=0;
$batas2=$numrows / 2;
$mulai2=$numrows / 2;
} */
$this->cezpdf->ezColumnsStart(array("num"=>2, "gap"=>10)); // bikin dua kolom
$widthcol = 150; // lebar kolom untuk masing2 tabel
//========================================================== KOLOM 1
$col_names1[] = array(
'nourut' =>'No.',
'matakuliah' => 'Mata Kuliah',
'hm' => 'HM',
'am' => 'AM',
'sks' => 'sks',
'm' => 'M',
);
$this->cezpdf->ezTable($col_names1, '', '', array('width'=>500,
'fontSize' => 6,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"left",
'cols'=>array(
'nourut'=>array('width'=>25,'justification'=>"center"),
'matakuliah'=>array('width'=>$widthcol,'justification'=>"center"),
'hm'=>array('width'=>25,'justification'=>"center"),
'am'=>array('width'=>25,'justification'=>"center"),
'sks'=>array('width'=>25,'justification'=>"center"),
'm'=>array('width'=>25,'justification'=>"center")
)
));
// data table
$so1 = $this->getvnilaiall($nimnya,$kdprodinya,$thnmasuknya,$batas1,$mulai1);
$i = 0;
$jmlsksxmutu1=0;
$jmlsks1=0;
$jmlsksselect1=0;
$jmlmutu1=0;
foreach($so1 as $item1)
{
$i = ($i+1);
$db_data1[] = array('nourut' => $i.'.',
'matakuliah' => $item1->nmmkind,
'hm' => $item1->nilaihuruf,//'Rp. '.number_format ($item->nmjenjangstudi),
'am' => substr($item1->bobotnilai,0,1),
'sks' => $item1->jmlsks,
'm' => substr($item1->mutu,0,1),
);
$jmlsksxmutu1=$jmlsksxmutu1+$item1->jmlsks * $item1->mutu;
if ($item1->nilaihuruf != '-') {$jmlsks1=$jmlsks1+$item1->jmlsks;$jmlsksselect1=$jmlsksselect1+$item1->jmlsks;}
$jmlmutu1=$jmlmutu1+$item1->mutu;
}
$this->cezpdf->ezTable($db_data1, '', '', array('width'=>500,
'fontSize' => 6,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"left",
'cols'=>array(
'nourut'=>array('width'=>25,'justification'=>"center"),
'matakuliah'=>array('width'=>$widthcol,'justification'=>"left"),
'hm'=>array('width'=>25,'justification'=>"center"),
'am'=>array('width'=>25,'justification'=>"center"),
'sks'=>array('width'=>25,'justification'=>"center"),
'm'=>array('width'=>25,'justification'=>"center"),
)
));
$this->cezpdf->ezNewPage(); // masuk ke kolom kedua bikin tabel sisa
//========================================================== KOLOM 2
$col_names2[] = array(
'nourut2' =>'No.',
'matakuliah2' => 'Mata Kuliah',
'hm2' => 'HM',
'am2' => 'AM',
'sks2' => 'sks',
'm2' => 'M',
);
$this->cezpdf->ezTable($col_names2, '', '', array('width'=>500,
'fontSize' => 6,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"left",
'cols'=>array(
'nourut2'=>array('width'=>25,'justification'=>"center"),
'matakuliah2'=>array('width'=>150,'justification'=>"center"),
'hm2'=>array('width'=>25,'justification'=>"center"),
'am2'=>array('width'=>25,'justification'=>"center"),
'sks2'=>array('width'=>25,'justification'=>"center"),
'm2'=>array('width'=>25,'justification'=>"center")
)
));
$so2 = $this->getvnilaiall($nimnya,$kdprodinya,$thnmasuknya,$batas2,$mulai2);
$jmlsksxmutu2=0;
$jmlsks2=0;
$jmlsksselect2=0;
$jmlmutu2=0;
foreach($so2 as $item2)
{
$i = ($i+1);
$db_data2[] = array('nourut2' => $i.'.',
'matakuliah2' => $item2->nmmkind,
'hm2' => $item2->nilaihuruf,//'Rp. '.number_format ($item->nmjenjangstudi),
'am2' => substr($item2->bobotnilai,0,1),
'sks2' => $item2->jmlsks,
'm2' => substr($item2->mutu,0,1),
);
$jmlsksxmutu2=$jmlsksxmutu2+$item2->jmlsks * $item2->mutu;
if ($item2->nilaihuruf != '-') {$jmlsks2=$jmlsks2+$item2->jmlsks;$jmlsksselect2=$jmlsksselect2+$item2->jmlsks;}
$jmlmutu2=$jmlmutu2+$item2->mutu;
}
$this->cezpdf->ezTable($db_data2, '', '', array('width'=>500,
'fontSize' => 6,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"left",
'cols'=>array(
'nourut2'=>array('width'=>25,'justification'=>"center"),
'matakuliah2'=>array('width'=>150,'justification'=>"left"),
'hm2'=>array('width'=>25,'justification'=>"center"),
'am2'=>array('width'=>25,'justification'=>"center"),
'sks2'=>array('width'=>25,'justification'=>"center"),
'm2'=>array('width'=>25,'justification'=>"center"),
)
));
$this->cezpdf->ezColumnsStop(); // akhir dua kolom
if ($numrows > 44) {
$this->cezpdf->ezNewPage();
$this->cezpdf->ezColumnsStart(array("num"=>2, "gap"=>10)); // bikin dua kolom
//========================================================== SISA
//$this->cezpdf->ezNewPage();
$so3 = $this->getvnilaiall($nimnya,$kdprodinya,$thnmasuknya,$batas3,$mulai3);
if ($so3) {
$col_names3[] = array(
'nourut3' =>'No.',
'matakuliah3' => 'Mata Kuliah',
'hm3' => 'HM',
'am3' => 'AM',
'sks3' => 'sks',
'm3' => 'M',
);
$this->cezpdf->ezTable($col_names3, '', '', array('width'=>500,
'fontSize' => 6,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"left",
'cols'=>array(
'nourut3'=>array('width'=>20,'justification'=>"center"),
'matakuliah3'=>array('width'=>150,'justification'=>"center"),
'hm3'=>array('width'=>25,'justification'=>"center"),
'am3'=>array('width'=>25,'justification'=>"center"),
'sks3'=>array('width'=>25,'justification'=>"center"),
'm3'=>array('width'=>25,'justification'=>"center")
)
));
$jmlsksxmutu3=0;
$jmlsks3=0;
$jmlsksselect3=0;
$jmlmutu3=0;
foreach($so3 as $item3)
{
$i = ($i+1);
$db_data3[] = array('nourut3' => $i.'.',
'matakuliah3' => $item3->nmmkind,
'hm3' => $item3->nilaihuruf,//'Rp. '.number_format ($item->nmjenjangstudi),
'am3' => substr($item3->bobotnilai,0,1),
'sks3' => $item3->jmlsks,
'm3' => substr($item3->mutu,0,1),
);
$jmlsksxmutu3=$jmlsksxmutu3+$item3->jmlsks * $item3->mutu;
if ($item3->nilaihuruf != '-') {$jmlsks3=$jmlsks3+$item3->jmlsks;$jmlsksselect3=$jmlsksselect3+$item3->jmlsks;}
$jmlmutu3=$jmlmutu3+$item3->mutu;
}
$this->cezpdf->ezTable($db_data3, '', '', array('width'=>500,
'fontSize' => 6,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"left",
'cols'=>array(
'nourut3'=>array('width'=>20,'justification'=>"center"),
'matakuliah3'=>array('width'=>150,'justification'=>"left"),
'hm3'=>array('width'=>25,'justification'=>"center"),
'am3'=>array('width'=>25,'justification'=>"center"),
'sks3'=>array('width'=>25,'justification'=>"center"),
'm3'=>array('width'=>25,'justification'=>"center"),
)
));
$ipk3 =0;
if ($jmlmutu3 !=0 && $jmlsksselect3 !=0) {
$ipk3 = $jmlmutu3/$jmlsksselect3;
}
}
$this->cezpdf->ezColumnsStop();
}
$this->cezpdf->ezColumnsStart(array("num"=>1, "gap"=>10)); // bikin satu kolom
$this->cezpdf->ezSetDy(-5, 'makeSpace'); //separator space
$this->cezpdf->ezText('Keterangan: HM= Huruf Mutu, AM= Angka Mutu, sks= satuan kredit semester, M= HM x AM.',8,array('justification' => 'center'));
//$this->cezpdf->line(60,310,520,310);
$this->cezpdf->ezSetDy(-10, 'makeSpace'); //separator space
$ipk1 =0;
$ipk2 =0;
if ($jmlmutu1 !=0 && $jmlsksselect1 !=0) {
$ipk1 = $jmlmutu1/$jmlsksselect1;
}
if ($jmlmutu2 !=0 && $jmlsksselect2 !=0) {
$ipk2 = $jmlmutu2/$jmlsksselect2;
}
if ($numrows > 44) {
if ($so3) {
$footer[] = array('nourut' =>'Jumlah sks Yang Ditempuh : '.
($jmlsks1 + $jmlsks2 + $jmlsks3),'kode' => 'Judul Tugas Akhir :','matakuliah' => '');
$footer[] = array('nourut' =>'IPK : '.
substr($ipk1 + $ipk2 + $ipk3,0,4),'kode' => $skripsi,'matakuliah' => '');
} else {
$footer[] = array('nourut' =>'Jumlah sks Yang Ditempuh : '.
($jmlsks1 + $jmlsks2),'kode' => 'Judul Tugas Akhir :','matakuliah' => '');
$footer[] = array('nourut' =>'IPK : '.
substr($ipk1 + $ipk2,0,4),'kode' => $skripsi,'matakuliah' => '');
}
} else {
$footer[] = array('nourut' =>'Jumlah sks Yang Ditempuh : '.
($jmlsks1 + $jmlsks2),'kode' => 'Judul Tugas Akhir :','matakuliah' => '');
$footer[] = array('nourut' =>'IPK : '.
substr($ipk1 + $ipk2,0,4),'kode' => $skripsi,'matakuliah' => '');
}
$footer[] = array('nourut' =>'Yudisium : ','kode' => '','matakuliah' => '');
$footer[] = array('nourut' =>'','kode' => '','matakuliah' => '');
$footer[] = array('nourut' =>'','kode' => '','matakuliah' => 'Bandung, '.$tglijazah);
$footer[] = array('nourut' =>'Dekan','kode' => '','matakuliah' => 'Rektor,');
$footer[] = array('nourut' =>'','kode' => '','matakuliah' => '');
$footer[] = array('nourut' =>'','kode' => '','matakuliah' => '');
$footer[] = array('nourut' =>'','kode' => '','matakuliah' => '');
$footer[] = array('nourut' =>'','kode' => '','matakuliah' => '');
$footer[] = array('nourut' =>$pimpin2,'kode' => '','matakuliah' =>$pimpin1);
$this->cezpdf->ezTable($footer, '', '', array('width'=>500,
'fontSize' => 6,
'showLines'=> 0,'showHeadings'=>0,'shaded'=>0,'justification'=>"left",
'cols'=>array(
'nourut'=>array('width'=>220,'justification'=>"left"),
'kode'=>array('width'=>170,'justification'=>"left"),
'matakuliah'=>array('width'=>170,'justification'=>"left"),
)
));
$this->cezpdf->ezStream(array('Content-Disposition'=>'TRANSKRIP-'.$nimnya.'.pdf'));
}
// CETAK KAS PMB
function plkaspmb($var)
{
$this->ceklog();
$par = explode("istra", $var);
$cbakademik = $par[0];
$cbperiode = $par[1];
$cbbiaya = $par[2];
$tahunakademik = $par[3];
$tglawal = $par[4];
$tglakhir = $par[5];
$total = $par[6];
$jmlbiaya = $par[7];
// parameter tampil print tahun akademik
$tahunakademikshow = "-";
if ($cbakademik == 'true') {
if ($tahunakademik != '') {
$tahunakademikshow = $this->nm_field('nmthnakademik','v_tahunakademik','kdstsemester',$tahunakademik);
} else {
$tahunakademikshow = "-";
}
}
// parameter tampil print periode
$tglshow = "-";
if ($cbperiode == 'true') {
if ($tglawal == $tglakhir) {
$tglshow = $this->TanggalIndo(date("Ymd",strtotime($tglawal)));
} else {
$tglshow = $this->TanggalIndo(date("Ymd",strtotime($tglawal))).' - '.$this->TanggalIndo(date("Ymd",strtotime($tglakhir)));
}
}
// parameter tampil jml biaya
$jmlbiayashow = "-";
if ($cbbiaya == 'true') {
if ($jmlbiaya !='') {
$jmlbiayashow = number_format($jmlbiaya);
} else {
$jmlbiayashow = "-";
}
}
$this->cezpdf->Cezpdf('A4','landscape'); //landscape
$this->cezpdf->ezSetMargins(15,30,10,10); //kiri, atas, kanan, bawah
$this->header_hitamputih('landscape');
$this->cezpdf->ezSetDy(-50, 'makeSpace'); //separator space
//
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->ezText("LAPORAN PENERIMAAN KAS PMB", 12, array("justification" => "center"));
$this->cezpdf->selectFont('./fonts/Helvetica');
$this->cezpdf->ezSetDy(-20, 'makeSpace'); //separator space
$head_2[]=array( 'kol1'=>'Tahun Akademik - Semester : '.$tahunakademikshow,'kol2'=>'','kol3'=>'');
$head_2[]=array( 'kol1'=>'Periode : '.$tglshow,'kol2'=>'','kol3'=>'');
$head_2[]=array( 'kol1'=>'Jumlah Biaya : '.$jmlbiayashow,'kol2'=>'','kol3'=>'');
$this->cezpdf->ezTable($head_2, '', '', array( 'width'=>660,
'fontSize' => 8,
'showLines'=> 0,
'showHeadings'=>0,
'shaded'=>0,
'cols'=>array(
'kol1'=>array('justification'=>'left'),
'kol2'=>array('justification'=>'center'),
'kol3'=>array('justification'=>'center'))));
$col_names3[] = array(
'nourut' =>'No.',
//'nopmb' => 'No. PMB',
'nokuitansipmb' => 'No. Kuitansi PMB',
'tglkuitansipmb' => 'Tanggal Daftar',
'nama' => 'Nama Pendaftar',
'kdjk' => '(L/P)',
'nmstmskmhs' => 'Status Pendaftar',
'nmfakultas' => 'Fakultas',
'nmprodi' => 'Program Studi',
'nmcarabyr' => 'Cara Bayar',
'nominal' => 'Nominal',
'namapembayar' => 'Nama Pembayar'
);
$this->cezpdf->ezTable($col_names3, '', '', array('width'=>800,
'fontSize' => 8,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'nourut'=>array('width'=>30,'justification'=>"center"),
//'nopmb'=>array('width'=>70,'justification'=>"center"),
'nokuitansipmb'=>array('width'=>90,'justification'=>"center"),
'tglkuitansipmb'=>array('width'=>70,'justification'=>"center"),
'nama'=>array('width'=>90,'justification'=>"left"),
'kdjk'=>array('width'=>30,'justification'=>"center"),
'nmstmskmhs'=>array('width'=>70,'justification'=>"left"),
'nmfakultas'=>array('width'=>70,'justification'=>"left"),
'nmprodi'=>array('width'=>70,'justification'=>"left"),
'nominal'=>array('width'=>70,'justification'=>"right"),
'nmcarabyr'=>array('width'=>70,'justification'=>"center"),
'namapembayar'=>array('width'=>130,'justification'=>"left"),
)
));
// // data table
$so = $this->getkaspmb($cbakademik,$tahunakademik,$cbperiode,$tglawal,$tglakhir,$cbbiaya,$jmlbiaya);
$i = 0;
foreach($so as $item)
{
$i = ($i+1);
$db_data[] = array('nourut' => $i.'.',
'nokuitansipmb' => $item->nokuitansipmb,
'tglkuitansipmb' => $item->tglkuitansipmb,
'nama' => $item->nama,
'kdjk' => $item->kdjk,
'nmstmskmhs' => $item->nmstmskmhs,
'nmfakultas' => $item->nmfakultas,
'nmprodi' => $item->nmprodi,
'nmcarabyr' => $item->nmcarabyr,
'nominal' => number_format($item->nominal),
'namapembayar' => $item->namapembayar,
);
}
$this->cezpdf->ezTable($db_data, '', '', array('width'=>800,
'fontSize' => 8,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'nourut'=>array('width'=>30,'justification'=>"center"),
//'nopmb'=>array('width'=>70,'justification'=>"center"),
'nokuitansipmb'=>array('width'=>90,'justification'=>"center"),
'tglkuitansipmb'=>array('width'=>70,'justification'=>"center"),
'nama'=>array('width'=>90,'justification'=>"left"),
'kdjk'=>array('width'=>30,'justification'=>"center"),
'nmstmskmhs'=>array('width'=>70,'justification'=>"left"),
'nmfakultas'=>array('width'=>70,'justification'=>"left"),
'nmprodi'=>array('width'=>70,'justification'=>"left"),
'nominal'=>array('width'=>70,'justification'=>"right"),
'nmcarabyr'=>array('width'=>70,'justification'=>"center"),
'namapembayar'=>array('width'=>130,'justification'=>"left"),
)
));
$this->cezpdf->ezText('',10,array('justification' => 'left'));
$foot_3[]=array( 'kol1'=>'','kol2'=>'','kol3'=>'Total Kas PMB :','kol4'=>'Rp. '.number_format($total));
$this->cezpdf->ezTable($foot_3, '', '', array( 'width'=>645,
'fontSize' => 8,
'showLines'=> 0,
'showHeadings'=>0,
'shaded'=>0,
'cols'=>array(
'kol1'=>array('justification'=>'left'),
'kol2'=>array('width'=>70,'justification'=>'center'),
'kol3'=>array('width'=>70,'justification'=>'center'),
'kol4'=>array('width'=>90,'justification'=>'center'))));
$this->cezpdf->ezStream(array('Content-Disposition'=>'LaporanKasPMB.pdf'));
}
// CETAK STMHSSEMESTER
function pstmhssemester($var)
{
$this->ceklog();
$par = explode("&", $var);
$kdprodi = $par[0];
$nmprodi = $par[1];
$kdstsemester = $par[2];
$kdstsemester1 = $par[3];
$kdstaktivitasmhs = $par[4];
$kdstaktivitasmhs1 = $par[5];
$temp = $par[6];
$temp1 = $par[7];
$thnakademikpar = substr($temp,0,4);
$semesterpar = substr($temp,5,15);
$thnakademikpar1 = substr($temp1,0,4);
$semesterpar1 = substr($temp1,5,15);
//====================================================
$this->cezpdf->Cezpdf('A4','potrait'); //landscape
$this->cezpdf->ezSetMargins(20,30,20,10); //kiri, atas, kanan, bawah
$this->header('potrait');
$this->cezpdf->ezSetDy(-20, 'makeSpace'); //separator space
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->ezText("DAFTAR MAHASISWA", 12, array("justification" => "center"));
$this->cezpdf->ezText("PROGRAM STUDI", 12, array("justification" => "center"));
$this->cezpdf->ezText($nmprodi, 12, array("justification" => "center"));
if ($kdstaktivitasmhs != "-") {
$this->cezpdf->ezText("".str_replace('_','/',$kdstaktivitasmhs1)."", 12, array("justification" => "center"));
}
$this->cezpdf->selectFont('./fonts/Helvetica');
$this->cezpdf->ezSetDy(-20, 'makeSpace'); //separator space
//$this->cezpdf->ezColumnsStart(array("num"=>2, "gap"=>-5)); // bikin dua kolom
//===================KOLOM1==========================
$head[]=array('kol1'=>'Tahun Akademik - Semester: '.$thnakademikpar.'/'.$semesterpar);
$this->cezpdf->ezTable($head, '', '', array( 'width'=>565,
'fontSize' => 7,
'showLines'=> 0,
'showHeadings'=>0,
'shaded'=>0,
'cols'=>array(
'kol1'=>array('justification'=>'left'))));
$col_names[] = array(
'no' =>'No',
'nim' => 'NPM',
'nmmhs' => 'Nama Mahasiswa',
'jk' => 'Jenis Kelamin',
'thnmsk' => 'Tahun Masuk',
'stmsk' => 'Status Masuk',
'staktvmhs' => 'Status Aktivitas Mahasiswa',
'catatan' => 'Catatan',
);
$this->cezpdf->ezTable($col_names, '', '', array('width'=>150,
'fontSize' => 7,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'no'=>array('width'=>30,'justification'=>"center"),
'nim'=>array('width'=>65,'justification'=>"center"),
'nmmhs'=>array('width'=>150,'justification'=>"left"),
'jk'=>array('width'=>60,'justification'=>"left"),
'thnmsk'=>array('width'=>40,'justification'=>"left"),
'stmsk'=>array('width'=>60,'justification'=>"left"),
'staktvmhs'=>array('width'=>60,'justification'=>"center"),
'catatan'=>array('width'=>100,'justification'=>"center"),
)
));
// data table
$so = $this->get_stmhssemester($kdprodi,$kdstsemester,$kdstaktivitasmhs);
$i = 0;
foreach($so as $item)
{
$i = ($i+1);
$db_data[] = array(//'no' => $i.'.',
'no' => $i,
'nim' => $item->nim,
'nmmhs' => $item->nmmhs,
'jk' => ($item->kdjnskelamin=='L') ? 'Laki-Laki':'Perempuan',
'thnmsk' => $item->thnmasuk,
'stmsk' => $item->nmkodtbkod,
'staktvmhs' => $item->nmstaktivitasmhs,
'catatan' => $item->nmcutidet,
);
}
$this->cezpdf->ezTable($db_data, '', '', array('width'=>150,
'fontSize' => 7,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'no'=>array('width'=>30,'justification'=>"center"),
'nim'=>array('width'=>65,'justification'=>"center"),
'nmmhs'=>array('width'=>150,'justification'=>"left"),
'jk'=>array('width'=>60,'justification'=>"left"),
'thnmsk'=>array('width'=>40,'justification'=>"center"),
'stmsk'=>array('width'=>60,'justification'=>"left"),
'staktvmhs'=>array('width'=>60,'justification'=>"left"),
'catatan'=>array('width'=>100,'justification'=>"left"),
)
));
$this->cezpdf->ezNewPage();
//===================KOLOM2==========================
$this->header('potrait');
$this->cezpdf->ezSetDy(-20, 'makeSpace'); //separator space
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->ezText("DAFTAR MAHASISWA", 12, array("justification" => "center"));
$this->cezpdf->ezText("PROGRAM STUDI", 12, array("justification" => "center"));
$this->cezpdf->ezText($nmprodi, 12, array("justification" => "center"));
if ($kdstaktivitasmhs != "-") {
$this->cezpdf->ezText("".str_replace('_','/',$kdstaktivitasmhs1)."", 12, array("justification" => "center"));
}
$this->cezpdf->selectFont('./fonts/Helvetica');
$this->cezpdf->ezSetDy(-20, 'makeSpace'); //separator space
$head1[]=array('kol1'=>'Tahun Akademik - Semester: '.$thnakademikpar1.'/'.$semesterpar1);
$this->cezpdf->ezTable($head1, '', '', array( 'width'=>565,
'fontSize' => 7,
'showLines'=> 0,
'showHeadings'=>0,
'shaded'=>0,
'cols'=>array(
'kol1'=>array('justification'=>'left'))));
$col_names1[] = array(
'no' =>'No',
'nim' => 'NPM',
'nmmhs' => 'Nama Mahasiswa',
'jk' => 'Jenis Kelamin',
'thnmsk' => 'Tahun Masuk',
'stmsk' => 'Status Masuk',
'staktvmhs' => 'Status Aktivitas Mahasiswa',
'catatan' => 'Catatan',
);
$this->cezpdf->ezTable($col_names1, '', '', array('width'=>150,
'fontSize' => 7,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'no'=>array('width'=>30,'justification'=>"center"),
'nim'=>array('width'=>65,'justification'=>"center"),
'nmmhs'=>array('width'=>150,'justification'=>"left"),
'jk'=>array('width'=>60,'justification'=>"left"),
'thnmsk'=>array('width'=>40,'justification'=>"left"),
'stmsk'=>array('width'=>60,'justification'=>"left"),
'staktvmhs'=>array('width'=>60,'justification'=>"center"),
'catatan'=>array('width'=>100,'justification'=>"center"),
)
));
// data table
$so1 = $this->get_stmhssemester($kdprodi,$kdstsemester1,$kdstaktivitasmhs);
$i1 = 0;
foreach($so1 as $item1)
{
$i1 = ($i1+1);
$db_data1[] = array(//'no' => $i.'.',
'no' => $i1,
'nim' => $item1->nim,
'nmmhs' => $item1->nmmhs,
'jk' => ($item1->kdjnskelamin=='L') ? 'Laki-Laki':'Perempuan',
'thnmsk' => $item1->thnmasuk,
'stmsk' => $item1->nmkodtbkod,
'staktvmhs' => $item1->nmstaktivitasmhs,
'catatan' => $item1->nmcutidet,
);
}
$this->cezpdf->ezTable($db_data1, '', '', array('width'=>150,
'fontSize' => 7,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'no'=>array('width'=>30,'justification'=>"center"),
'nim'=>array('width'=>65,'justification'=>"center"),
'nmmhs'=>array('width'=>150,'justification'=>"left"),
'jk'=>array('width'=>60,'justification'=>"left"),
'thnmsk'=>array('width'=>40,'justification'=>"left"),
'stmsk'=>array('width'=>60,'justification'=>"left"),
'staktvmhs'=>array('width'=>60,'justification'=>"center"),
'catatan'=>array('width'=>100,'justification'=>"left"),
)
));
$this->cezpdf->ezText('',10,array('justification' => 'left'));
// $this->cezpdf->ezText(' Jumlah data: '.$i ,8,array('justification' => 'left'));
$this->cezpdf->ezStream(array('Content-Disposition'=>'DaftarMahasiswa'.$kdstsemester.'-'.$kdstsemester1.$kdstaktivitasmhs.'.pdf'));
}
// CETAK DAFTAR MAHASISWA TIDAK TERDAFTAR DI SEMESTER SEKARANG
function mhsnostatustemp($var)
{
$this->ceklog();
$par = explode("&", $var);
$nmprodi = $par[0];
$kdstsemester1 = $par[1];
$thnakademikpar1 = substr($kdstsemester1,0,4);
$semesterpar1 = substr($kdstsemester1,5,15);
//====================================================
$this->cezpdf->Cezpdf('A4','potrait'); //landscape
$this->cezpdf->ezSetMargins(20,30,20,10); //kiri, atas, kanan, bawah
$this->header('potrait');
$this->cezpdf->ezSetDy(-20, 'makeSpace'); //separator space
$this->cezpdf->selectFont('./fonts/Helvetica-Bold');
$this->cezpdf->ezText("DAFTAR MAHASISWA TIDAK TERDAFTAR", 14, array("justification" => "center"));
$this->cezpdf->ezText("PROGRAM STUDI ".$nmprodi."", 14, array("justification" => "center"));
$this->cezpdf->ezText("Tahun Akademik - Semester: ".$thnakademikpar1.'/'.$semesterpar1."", 14, array("justification" => "center"));
$this->cezpdf->selectFont('./fonts/Helvetica');
$this->cezpdf->ezSetDy(-20, 'makeSpace'); //separator space
$col_names[] = array(
'no' =>'No',
'nim' => 'NPM',
'nmmhs' => 'Nama Mahasiswa',
'kdjnskelamin' => 'Jenis Kelamin',
'thnmasuk' => 'Tahun Masuk',
'stmasuk' => 'Status Masuk',
'staktiv' => 'Status Aktivitas Mahasiswa',
);
$this->cezpdf->ezTable($col_names, '', '', array('width'=>150,
'fontSize' => 7,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'no'=>array('width'=>30,'justification'=>"center"),
'nim'=>array('width'=>65,'justification'=>"center"),
'nmmhs'=>array('width'=>150,'justification'=>"left"),
'kdjnskelamin'=>array('width'=>60,'justification'=>"left"),
'thnmasuk'=>array('width'=>40,'justification'=>"left"),
'stmasuk'=>array('width'=>60,'justification'=>"left"),
'staktiv'=>array('width'=>60,'justification'=>"center"),
)
));
// data table
$so = $this->get_mhsnostatustemp();
$i = 0;
foreach($so as $item)
{
$i = ($i+1);
$db_data[] = array(//'no' => $i.'.',
'no' => $i,
'nim' => $item->nim,
'nmmhs' => $item->nmmhs,
'kdjnskelamin' => ($item->kdjnskelamin=='L') ? 'Laki-Laki':'Perempuan',
'thnmasuk' => $item->thnmasuk,
'stmasuk' => $item->stmasuk,
'staktiv' => $item->staktiv,
);
}
$this->cezpdf->ezTable($db_data, '', '', array('width'=>150,
'fontSize' => 7,
'showLines'=> 1,'showHeadings'=>0,'shaded'=>0,'justification'=>"right",
'cols'=>array(
'no'=>array('width'=>30,'justification'=>"center"),
'nim'=>array('width'=>65,'justification'=>"center"),
'nmmhs'=>array('width'=>150,'justification'=>"left"),
'kdjnskelamin'=>array('width'=>60,'justification'=>"left"),
'thnmasuk'=>array('width'=>40,'justification'=>"center"),
'stmasuk'=>array('width'=>60,'justification'=>"left"),
'staktiv'=>array('width'=>60,'justification'=>"center"),
)
));
$this->cezpdf->ezText('',10,array('justification' => 'left'));
// $this->cezpdf->ezText(' Jumlah data: '.$i ,8,array('justification' => 'left'));
$this->cezpdf->ezStream(array('Content-Disposition'=>'DaftarMahasiswa'.$kdstsemester1.'-'.$kdstsemester1.'.pdf'));
}
//==========================================================================================
}