<?php

/*
 *      PrintCetakKtmPdf.pdf.class.php
 *      Copyright 	:2009 
 *      Author 		:Lathifah R. Indrayanti <Lr.indrayanti@gmail.com>
 *      Project      : UNPAB  
 */
//define IN_CB true, dibutuhkan untuk mengakses barcode technology
define('IN_CB',true);

//including the barcode technology
require_once GTFWConfiguration::GetValue('application', 'gtfw_base').'main/lib/barcode/class/index.php';
require_once GTFWConfiguration::GetValue('application', 'gtfw_base').'main/lib/barcode/class/FColor.php';
require_once GTFWConfiguration::GetValue('application', 'gtfw_base').'main/lib/barcode/class/BarCode.php';
require_once GTFWConfiguration::GetValue('application', 'gtfw_base').'main/lib/barcode/class/FDrawing.php';
require_once GTFWConfiguration::GetValue('application', 'gtfw_base').'main/lib/barcode/class/code39.barcode.php'; 
 
require_once GTFWConfiguration::GetValue( 'application', 'docroot') . 'module/cetak_ktm/business/AppCetakKtm.class.php';
require_once GTFWConfiguration::GetValue( 'application', 'docroot') . 'module/cetak_ktm/business/AppMahasiswaSia.class.php';
require_once GTFWConfiguration::GetValue( 'application', 'docroot') .'main/function/date.php';

class PrintCetakKtmPdf extends PdfResponse {
	
   function GetFileName() {
      // name it whatever you want
      return 'just_for_.pdf';
   }
   
   function CreateBarcode() {
      #Creating some Color (arguments are R, G, B)
      $color_black = new FColor(0,0,0);
      $color_white = new FColor(255,255,255);
      
      $dokObjBarcode=new AppCetakKtm();
      $idMhsBarcode = Dispatcher::Instance()->Decrypt($_GET['idMhs']);
      $dataCetakBarcode = $dokObjBarcode->GetDataCetak($idMhsBarcode);
      
      /* Here is the list of the arguments:
      1 - Thickness
      2 - Color of bars
      3 - Color of spaces
      4 - Resolution
      5 - Text
      6 - Text Font (0-5) */

      /* Here is the list of the arguments
      1 - Width
      2 - Height
      3 - Filename (empty : display on screen)
      4 - Background color */
      
      
      #replace character
       $char = array('\\', '/', ':', '*', '?', '"', '<', '>', '|');
       $this->array_file[0] = str_replace($char, '', $dataCetakBarcode[0]['NIM']);
       
       $code_generated =& new code39(70,$color_black,$color_white,1,$dataCetakBarcode[0]['NIM'],2);
       $drawing =& new FDrawing(1024,1024,'',$color_white);
       $drawing->init(); // You must call this method to initialize the image
       $drawing->add_barcode($code_generated);
       $drawing->draw_all(); 
       $im =& $drawing->get_im();
       
       #Next line create the little picture, the barcode is being copied inside
       $im2 = imagecreate($code_generated->lastX,$code_generated->lastY);
       imagecopyresized($im2, $im, 0, 0, 0, 0, $code_generated->lastX, $code_generated->lastY, $code_generated->lastX, $code_generated->lastY);
       $drawing->set_im($im2); 
       
       imagejpeg($im2, GTFWConfiguration::GetValue('application', 'barcode_path') . $dataCetakBarcode[0]['NIM'] . '.jpeg');
       
       unset($im);
       unset($im2);
       unset($drawing);
       unset($code_generated);
   }
   
   function ProcessRequest() {
	  $this->CreateBarcode();
      // do what you wanna do, but don't call Output method
      $idMhs = Dispatcher::Instance()->Decrypt($_GET['idMhs']);
      $idF = Dispatcher::Instance()->Decrypt($_GET['idF']);
      
	  //print_r($_GET);exit();
      return $this->PrintKtmVersi2($idMhs, $idF);     
   }
   
   function PrintKtmVersi2($idMhs, $idF){
      $dokObj=new AppCetakKtm();
      $dokObjSia = new AppMahasiswaSia();

      $dataCetak = $dokObj->GetDataCetak($idMhs);
      //print_r($dataCetak);exit;
      $dataPejabat = $dokObj->GetDataPejabat();
      $dataFoto = $dokObjSia->GetFoto($idF);
      
      $leftMargin = 10;
      $topMargin = 5;
      $this->SetMargins($leftMargin,$topMargin);
      $this->AddPage();
      $this->SetFont('Arial', 'B', 10);
      $cellHeight = 3;
      $cellLength = 95;
      $cellLengthItem = 25;
      
      $univ=GTFWConfiguration::GetValue('organization', 'company_name');
      $univ_singkat=GTFWConfiguration::GetValue('organization', 'company_short_name');
      $address=GTFWConfiguration::GetValue('organization', 'company_address');
      #Kotak Sebelah Kiri
            
      #Header
      $this->image("images/logo.jpg",$leftMargin,$topMargin,10,9);
      $Y=$this->GetY();
      $X=$this->GetX();
      $this->SetXY($X,$Y);
      $this->SetFont('Times', 'B', 12);
      $this->Cell($cellLength, $cellHeight, 'KARTU  TANDA  MAHASISWA',0,2,'C');
      $this->SetFont('Times', 'B', 9);
      $this->Cell($cellLength, $cellHeight, $univ,0,2,'C');
      $this->SetFont('Times', 'B', 7);
      $this->Cell($cellLength, $cellHeight, $address,0,1,'C');
          
      #Foto Mahasiswa
      $lokasi_foto=GTFWConfiguration::GetValue('application', 'photo_move_path');
         if (empty($dataFoto[0]['mhs_foto_lama'])) {
         //nampilin kotak kosong ada tulisan foto - bila foto belum di upload
            $this->SetXY($X,$Y+15);
            $this->Cell(22, 1,'','LTR',2);
            $this->Cell(22, 25,'Foto','LR',2,'C');
            $this->Cell(22, 1,'','LRB',0,1);
         }else{
            $foto = $lokasi_foto.$dataFoto[0]['mhs_foto_lama'];
            $this->image($foto,$X,$Y+15,22,25);
         }
            
      #Baris Nama   
      $this->SetXY($X+23,$Y+15);
      $X=$this->GetX();
      $Y=$this->GetY();
      $this->Cell(23,2,'Nama',0,0);
      $this->SetFont('Arial', 'B', 6);
      $this->Cell(23,2," : ".$dataCetak[0]['NAMA'],0,2);
      $this->SetFont('Arial', 'B', 6);
      
      #Baris NIM   
      $this->SetXY($X,$Y+3);
      $Y=$this->GetY();
      $this->Cell(23,2,'NIM',0,0);
      $this->SetFont('Arial', 'B', 6);
      $this->Cell(23,2," : ".$dataCetak[0]['NIM'],0,2);
      $this->SetFont('Arial', 'B', 6);
      
      #Baris Golongan Darah   
      $this->SetXY($X,$Y+3);
      $Y=$this->GetY();
      $this->Cell(23,2,'Gol. Darah',0,0);
      $this->SetFont('Arial', 'B', 6);
      $this->Cell(23,2," : ".$dataCetak[0]['GOL_DARAH'],0,2);
      $this->SetFont('Arial', 'B', 6);
      
      #Baris Tempat Tanggal Lahir  
      $this->SetXY($X,$Y+3);
      $Y=$this->GetY();
      $dataCetak[0]['tgl_lahir']=ConvertDate($dataCetak[0]['tgl_lahir'],"YYYY-MM-DD","DD-MM-YYYY");
      $ttl=$dataCetak[0]['tpt_lahir'].'/'.$dataCetak[0]['tgl_lahir'];
      $this->Cell(23,2,'Tempat / Tanggal Lahir',0,0);
      $this->SetFont('Arial', 'B', 6);
      $this->Cell(23,2," : ".$ttl,0,2);
      $this->SetFont('Arial', 'B', 6);
      
      #Baris Fakultas  
      $this->SetXY($X,$Y+3);
      $Y=$this->GetY();
      $this->Cell(23,2,'Fakultas',0,0);
      $this->SetFont('Arial', 'B', 6);
      $this->Cell(23,2," : ".$dataCetak[0]['FAKULTASTANPASINGKAT'],0,2);
      $this->SetFont('Arial', 'B', 6);
      
      #Baris Program Studi  
      $this->SetXY($X,$Y+3);
      $Y=$this->GetY();
      $this->Cell(23,2,'Prog.Studi',0,0);
      $this->SetFont('Arial', 'B', 6);
      $this->Cell(23,2," : ".$dataCetak[0]['JURUSAN'],0,2);
      $this->SetFont('Arial', 'B', 6);
      
      #Baris Alamat 
      $this->SetXY($X,$Y+3);
      $Y=$this->GetY();
      $this->Cell(23,2,'Alamat',0,0);
      $this->SetFont('Arial', 'B', 6);
      $this->Cell(23,2," : ".$dataCetak[0]['ALAMAT_ASAL'],0,2);
      $this->SetFont('Arial', 'B', 6);
	  
	  #Blok Barcode
	  $this->SetXY($X,$Y+3);
      $this->Cell(23,2,'Personal ID Barcode',0,2,'C');
      $this->Cell(23,2,'',0,2,'C');
      $lokasi_barcode=GTFWConfiguration::GetValue('application', 'barcode_path');
      if (empty($dataCetak[0]['NIM'])) {
            $this->Cell($cellLengthItem,5,'',0,1);
         }else{
            $barcode=$lokasi_barcode.$dataCetak[0]['NIM'].'.jpeg';
            $this->image($barcode,$X+24,$Y+3,'20','10');
         }
      
      #Border Kiri
      $this->SetXY(7,3);
      $this->Cell(95,60,'',1,0);
      #Border Kanan
      $xkotak=$this->GetX();
      $this->SetXY($xkotak+7,3);
      $this->Cell(95,60,'',1,0);
      
      #Kotak Sebelah Kanan
      
      $this->SetXY($xkotak+9,5);
      $X = $this->GetX();
      $Y = $this->GetY();
      $this->SetFont('Times', 'B', 10);
      $this->Cell($cellLength, $cellHeight, 'KETENTUAN',0,2,'C');
      
      #Ketentuan 1  
      $this->SetXY($X,$Y+5);
      $X=$this->GetX();
      $Y=$this->GetY(); 
      $this->SetFont('Times', '', 7);
      $this->Cell(4,3,'1.',0,0);
      $this->SetFont('Times','', 7);
      $this->Cell(23,3,'Kartu ini milik '.ucwords(strtolower($univ)).' berlaku selama 5 tahun atau',0,2);
      $this->SetFont('Times','', 7);
      $this->Cell(23,3,'Mahasiswa yang namanya tersebut pada kartu ini masih terdaftar aktif di '.$univ_singkat,0,2);
     
      #Ketentuan 2  
      $this->SetXY($X,$Y+6);
      $X=$this->GetX();
      $Y=$this->GetY(); 
      $this->SetFont('Times', '', 7);
      $this->Cell(4,3,'2.',0,0);
      $this->SetFont('Times','', 7);
      $this->Cell(23,3,'Kartu ini hanya berlaku di '.ucwords(strtolower($univ)).' dan bukan',0,2);
      $this->SetFont('Times','', 7);
      $this->Cell(23,3,'pengenal identitas di luar kampus '.$univ_singkat,0,2);
      
      #Ketentuan 3  
      $this->SetXY($X,$Y+6);
      $X=$this->GetX();
      $Y=$this->GetY(); 
      $this->SetFont('Times', '', 7);
      $this->Cell(4,3,'3.',0,0);
      $this->SetFont('Times','', 7);
      $this->Cell(23,3,ucwords(strtolower($univ)).' tidak bertanggung jawab apabila Kartu',0,2);
      $this->SetFont('Times','', 7);
      $this->Cell(23,3,'ini disalah gunakan di luar kampus '.$univ_singkat,0,2);
      
      #Ketentuan 4  
      $this->SetXY($X,$Y+6);
      $X=$this->GetX();
      $Y=$this->GetY(); 
      $this->SetFont('Times', '', 7);
      $this->Cell(4,3,'4.',0,0);
      $this->SetFont('Times','', 7);
      $this->Cell(23,3,'Bila kartu ini diketemukan mohon dikembalikan kepada pemiliknya',0,2);
      
      #Pengesahan
      $this->SetXY($X+2,$Y+4);
      $X=$this->GetX();
      $Y=$this->GetY();
      $this->SetFont('Times','', 7);
      $this->Cell(39,3,'PENGESAHAN',0,2,'C');
      
      #Kotak Pengesahan
      $this->SetXY($X,$Y+3);
      $X=$this->GetX();
      $YPengesahan=$this->GetY();
      $this->SetFont('Arial', 'B', 8);
	  $tahun = $dataCetak[0]['TA_MASUK'];
      $this->Cell(14,7,$tahun,1,0,'C');
      $this->Cell(14,7,$tahun+1,1,0,'C');
      $this->Cell(14,7,$tahun+2,1,2,'C');
      $this->SetXY($X,$YPengesahan+7);
      $X=$this->GetX();
      $YPengesahan=$this->GetY();
      $this->Cell(21,7,$tahun+3,1,0,'C');
      $this->Cell(21,7,$tahun+4,1,0,'C');
      
      #Tanda Tangan Pejabat
      $this->SetXY($X+50,$Y+3);
      $X=$this->GetX();
      $Y=$this->GetY();
      $this->SetFont('Times','', 5);
      $this->Cell(20,2,GTFWConfiguration::GetValue('organization', 'company_city').', '.IndonesianDate(date('d-m-Y'),'DD-MM-YYYY'),0,2);
      $this->SetFont('Times','', 5);
      $this->Cell(20,2,$dataPejabat[0]['jabatan'],0,2);
      $this->SetXY($X+2,$Y);
      $Xttd=$this->GetX();
      $lokasi_ttd=GTFWConfiguration::GetValue('application', 'ttd_path');
      if (empty($dataPejabat[0]['judul'])) {
            $this->Cell(20,15,'ttd.',0,1);
         }else{
            $ttd=$lokasi_ttd.$dataPejabat[0]['judul'];
            $this->image($ttd,$Xttd,$Y+4,15,6);
         }
      $this->SetXY($X,$Y+11);
      $X=$this->GetX();
      $Y=$this->GetY();
      $this->SetFont('Times', 'U', 5);
      $this->Cell(20, 1,$dataPejabat[0]['nama'],0,2);
      $this->SetXY($X,$Y+2);
      $Y=$this->GetY();
      $this->SetFont('Times', '', 5);
      $this->Cell(20, 1,'NIP. '.$dataPejabat[0]['nip'],0,1);
      
      $return['dataCetak']=$dataCetak;
      $return['dataFoto'] = $dataFoto;
      return $return;
   }
   
   function PrintKtmVersi1($idMhs, $idF){
      // do what you wanna do, but don't call Output method
      $this->CreateBarcode();
      $dokObj=new AppCetakKtm();
      $dokObjSia = new AppMahasiswaSia();
      $idMhs = Dispatcher::Instance()->Decrypt($_GET['idMhs']);
      $idF = Dispatcher::Instance()->Decrypt($_GET['idF']);
      
      $dataCetak = $dokObj->GetDataCetak($idMhs);
      //print_r($dataCetak);exit;
      $dataPejabat = $dokObj->GetDataPejabat();
      $dataFoto = $dokObjSia->GetFoto($idF);
      
      $leftMargin = 10;
      $topMargin = 5;
      $this->SetMargins($leftMargin,$topMargin);
      $this->AddPage();
      $this->SetFont('Arial', 'B', 10);
      $cellHeight = 3;
      $cellLength = 95;
      $cellLengthItem = 25;
      
      $univ=GTFWConfiguration::GetValue('organization', 'company_name');
      $univ_singkat=GTFWConfiguration::GetValue('organization', 'company_short_name');
      $address=GTFWConfiguration::GetValue('organization', 'company_address');
      
      #Header
      $this->image("images/logo.jpg",$leftMargin,$topMargin,10,9);
      $Y=$this->GetY();
      $X=$this->GetX();
      $this->SetXY($X,$Y);
      //$univ=GTFWConfiguration::GetValue('application', 'company_name');
      $this->SetFont('Times', '', 8);
      $this->Cell($cellLength, $cellHeight, 'DEPARTEMEN PENDIDIKAN NASIONAL',0,2,'C');
      $this->SetFont('Times', 'B', 10);
      //$this->Cell($cellLength, $cellHeight, $univ,0,2,'C');
      $this->Cell($cellLength, $cellHeight, $univ, 0,2,'C');
      $this->SetFont('Times', '', 7);
      $this->Cell($cellLength, $cellHeight, $address,0,1,'C');
      $Y=$this->GetY();
      $X=$this->GetX();
      $this->SetXY($X,$Y+$cellHeight);
      $this->SetFont('Times', 'B', 10);
      $this->Cell($cellLength, 1, 'K A R T U  M A H A S I S W A',0,1,'C');
      
      
      
      # Baris Nama
      $this->SetXY($leftMargin,$Y+8);
      $Y=$this->GetY();
      $this->SetFont('Times', '', 7);
      $this->Cell($cellLengthItem, 1,'Nama',0,0);;
      $this->Cell(1, 1, ':',0,0);
      $this->Cell($cellLengthItem+5, 1, $dataCetak[0]['NAMA'],0,0);
      $this->Cell($cellLengthItem-5, 1,'Strata',0,0);;
      $this->Cell(1, 1, ':',0,0);
      $this->Cell(1, 1, $dataCetak[0]['JENJANGKODE'],0,1);
      
      #Baris NIM
      $this->SetXY($leftMargin,$Y+3);
      $Y=$this->GetY();
      $this->Cell($cellLengthItem, 1,'NIM',0,0);
      $this->Cell(1, 1, ':',0,0);
      $this->Cell($cellLengthItem+5, 1, $dataCetak[0]['NIM'],0,0);
      $this->Cell($cellLengthItem-5, 1,'Gol. Darah',0,0);;
      $this->Cell(1, 1, ':',0,0);
      $this->Cell(1, 1, '',0,1);
      
      
      #Baris Fakultas
      $this->SetXY($leftMargin,$Y+3);
      $Y=$this->GetY();
      $this->Cell($cellLengthItem, 1,'Fakultas',0,0);
      $this->Cell(1, 1, ':',0,0);
      $this->Cell(1, 1, $dataCetak[0]['FAKULTASTANPASINGKAT'],0,1);
      
      #Baris Jurusan
      $this->SetXY($leftMargin,$Y+3);
      $Y=$this->GetY();
      $this->Cell($cellLengthItem, 1,'Jurusan',0,0);
      $this->Cell(1, 1, ':',0,0);
      $this->Cell(1, 1, $dataCetak[0]['JURUSAN'],0,1);
      
      #Baris Tempat Lahir
      $this->SetXY($leftMargin,$Y+3);
      $Y=$this->GetY();
      $this->Cell($cellLengthItem, 1,'Tempat/Tgl Lahir',0,0);
      $this->Cell(1, 1, ':',0,0);
      $dataCetak[0]['tgl_lahir']=ConvertDate($dataCetak[0]['tgl_lahir'],"YYYY-MM-DD","DD-MM-YYYY");
      $ttl=$dataCetak[0]['tpt_lahir'].'/'.$dataCetak[0]['tgl_lahir'];
      $this->Cell(1, 1, $ttl,0,1);
      
      #Baris Jenis Kelamin
      $dataCetak[0]['jenis_kelamin']=empty($dataCetak[0]['jenis_kelamin'])?'Tidak diketahui':$dataCetak[0]['jenis_kelamin'];
      $this->SetXY($leftMargin,$Y+3);
      $Y=$this->GetY();
      $this->Cell($cellLengthItem, 1,'Jenis Kelamin',0,0);
      $this->Cell(1, 1, ':',0,0);
      $this->Cell(1, 1, $dataCetak[0]['jenis_kelamin'],0,1);
      
      
      #Baris Alamat
      $this->SetXY($leftMargin,$Y+3);
      $Y=$this->GetY();
      $this->Cell($cellLengthItem, 1,'Alamat Orang Tua',0,0);
      $this->Cell(1, 1, ':',0,0);
      $this->Cell(1, 1, $dataCetak[0]['ALAMAT_ASAL'],0,1);
      //$this->MultiCell(35, 2, $dataCetak[0]['ALAMAT_LOKAL'],0,1);
      $Y2=$this->GetY();//untuk mementukan Y dari baris 'Berlaku Sampai'
            
      #Baris Pejabat,Nama dan Nip
      $this->SetXY($leftMargin+5,$Y2+3);
      $this->Cell($cellLengthItem, 1,$dataPejabat[0]['jabatan'],0,1);
      $Y=$this->GetY();
      $lokasi_ttd=$lokasi_ttd=GTFWConfiguration::GetValue('application', 'ttd_move_path');
      if (empty($dataPejabat[0]['judul'])) {
            $this->Cell($cellLengthItem,5,'',0,1);
         }else{
            $ttd=$lokasi_ttd.$dataPejabat[0]['judul'];
            $this->image($ttd,$leftMargin+8,$Y2+5,25,10);
         }
      $this->SetFont('Times', 'U', 7);
      $this->SetXY($leftMargin+5,$Y+12);
      $Y=$this->GetY();
      $this->Cell($cellLengthItem, 1,$dataPejabat[0]['nama'],0,1);
      $this->SetFont('Times', '', 7);
      $this->SetXY($leftMargin+5,$Y+3);
      $Y=$this->GetY();
      $this->Cell($cellLengthItem, 1,'NIP. '.$dataPejabat[0]['nip'],0,1);
      
      #Border Kiri
      $this->SetXY(7,3);
      $this->Cell(95,60,'',1,0);
      #Border Kanan
      $xkotak=$this->GetX();
      $this->SetXY($xkotak+7,3);
      $this->Cell(95,60,'',1,0);
      
      
      #Mulai Isi Kotak Kanan
      
      #Foto Mahasiswa
      $this->SetXY($xkotak+9,5);
      $Yfoto=$this->GetY();
      $Xfoto=$this->GetX();
      $lokasi_foto=GTFWConfiguration::GetValue('application', 'photo_move_path');
         if (empty($dataFoto[0]['mhs_foto_lama'])) {
         //nampilin kotak kosong ada tulisan foto - bila foto belum di upload
            $this->SetXY($Xfoto,$Yfoto);
            $this->Cell(17, 1,'','LTR',2);
            $this->Cell(17, 15,'Foto','LR',2,'C');
            $this->Cell(17, 1,'','LRB',0,1);
         }else{
            $foto = $lokasi_foto.$dataFoto[0]['mhs_foto_lama'];
            $this->image($foto,$Xfoto,$Yfoto,19,22);
         }  
      
      //echo $foto; exit;
      
      #Blok Barcode. 4 rows. Judul, Barcode, Nama, Tanda Tangan Mahasiswa
      $this->SetXY($Xfoto+19,$Yfoto);
      $this->Cell(30,3,'Personal ID Barcode',0,2,'C');
      $this->Cell(30,3,'',0,2,'C');
      $lokasi_barcode=GTFWConfiguration::GetValue('application', 'barcode_path');
      if (empty($dataCetak[0]['NIM'])) {
            $this->Cell($cellLengthItem,5,'',0,1);
         }else{
            $barcode=$lokasi_barcode.$dataCetak[0]['NIM'].'.jpeg';
            $this->image($barcode,$Xfoto+24,$Yfoto+3,20,7);
         }
            
      $this->SetFont('Arial', 'B', 6);
      $this->Cell(30,5,'',0,2,'C');
      $this->Cell(30,3,$dataCetak[0]['NAMA'],0,2,'C');
      $this->SetFont('Times', '', 7);
      $this->Ln(5);
      $this->SetX($Xfoto+21);
      $this->Cell(70,3,'Tanda Tangan Mahasiswa',0,2,'R');
      $this->Ln(1);
      $Ygaris=$this->GetY();
      
      #Garis
      $this->SetXY(7,3);
      $this->Cell(95,1,'',0,0);
      $xkotak=$this->GetX();
      $this->SetXY($xkotak+7,$Ygaris);
      $this->Cell(95,1,'','T',0);
      
      #Tulisan dibawah Garis
      $this->SetXY(7,3);
      $this->Cell(95,1,'',0,0);
      $xkotak=$this->GetX();
      $this->SetXY($xkotak+7,$Ygaris+2);
      $this->SetFont('Times', '', 7);
      $this->Cell(95,2.8,'Kartu Mahasiswa ini berlaku untuk 14 semester sejak menjadi mahasiswa ',0,2,'C');
      $this->Cell(95,2.8, ucwords(strtolower($univ)).' atau selama menjadi mahasiswa '. ucwords(strtolower($univ)),0,2,'C');
      $this->Cell(95,2.8,'dengan tanda pengesahan (stiker) per semester di halaman ini',0,2,'C');
      $this->Cell(95,2.8,'',0,2,'C');
      $this->SetFont('Times', 'B',9);
      $this->Cell(95,3.2,'S E M E S T E R',0,2,'C');
      
      #Kotak semester
      $this->SetFont('Arial', 'B', 9);
      $this->Cell(13.571428,9,'I',1,0,'C');
      $this->Cell(13.571428,9,'II',1,0,'C');
      $this->Cell(13.571428,9,'III',1,0,'C');
      $this->Cell(13.571428,9,'IV',1,0,'C');
      $this->Cell(13.571428,9,'V',1,0,'C');
      $this->Cell(13.571428,9,'VI',1,0,'C');
      $this->Cell(13.571428,9,'VII',1,1,'C');
      $Ysemester=$this->GetY();
      $this->SetXY(7,3);
      $this->Cell(95,1,'',0,0);
      $xkotak=$this->GetX();
      $this->SetXY($xkotak+7,$Ysemester);
      $this->Cell(13.571428,9.5,'VIII',1,0,'C');
      $this->Cell(13.571428,9.5,'IX',1,0,'C');
      $this->Cell(13.571428,9.5,'X',1,0,'C');
      $this->Cell(13.571428,9.5,'XI',1,0,'C');
      $this->Cell(13.571428,9.5,'XII',1,0,'C');
      $this->Cell(13.571428,9.5,'XIII',1,0,'C');
      $this->Cell(13.571428,9.5,'XIV',1,2,'C');
      
      $return['dataCetak']=$dataCetak;
      $return['dataFoto'] = $dataFoto;
      return $return;
   }
}
?>
