<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
	<style type="text/css" media="print">
    @page 
    {
        size: auto;   /* auto is the initial value */
        margin: 0mm;  /* this affects the margin in the printer settings */
    }
	#biodata tr td {
		padding-top:5px;
		}
	</style>
<body style="margin-left:30px; margin-right:30px; margin-top:30px;">
		<?php 
			include "php_class/class_mysql.php";
            include "php_class/class_proposal.php";
			include "php_class/class_template.php";
			include "php_class/class_dosen.php";	
			$DataDosen = new dataDosen;
			$DataDosen2 = new dataDosen;
			$DataDosen3 = new dataDosen;
			$DataDosen4 = new dataDosen;
			$DataDosen5 = new dataDosen;

			$DataTemplate = new DataTemplate;
			$DataTemplate2 = new DataTemplate;	
            $DataProposal = new DataProposal;
            $id = $_GET['id'];;
			$noUndangan = $DataProposal->get_proposal_single_by_id('noUndanganProposal', $id);
			$namaMhs = $DataProposal->get_proposal_single_by_id('namaMhs', $id);
			$NPM = $DataProposal->get_proposal_single_by_id('NPM', $id);
            $judul = $DataProposal->get_proposal_single_by_id('judul', $id);
			$namaPendamping1 = $DataProposal->get_proposal_single_by_id('namaPendamping1', $id);
			$namaPendamping2 = $DataProposal->get_proposal_single_by_id('namaPendamping2', $id);
			$namaPendamping3 = $DataProposal->get_proposal_single_by_id('namaPendamping3', $id);
			$tglProposal = $DataProposal->get_proposal_single_by_id('tanggalProposal',$id);
			$waktu = $DataProposal->get_proposal_single_by_id('waktu',$id);
			$tanggal = substr($tglProposal, 8, 2);
			$bulanU = substr($tglProposal, 5, 2);
			$tahun = substr($tglProposal, 0, 4);
			$bulan = date('m');
						
			if ($bulan == 01){
				$bulanR = 'I';	
			}else if ($bulan == 02) {
				$bulanR = 'II';	
			}else if ($bulan == 03) {
				$bulanR = 'III';	
			}else if ($bulan == 04) {
				$bulanR = 'IV';	
			}else if ($bulan == 05) {
				$bulanR = 'V';	
			}else if ($bulan == 06) {
				$bulanR = 'VI';	
			}else if ($bulan == 07) {
				$bulanR = 'VII';	
			}else if ($bulan == 08) {
				$bulanR = 'VIII'; 
			}else if ($bulan == 09) {
				$bulanR = 'IX';
			}else if ($bulan == 10) {
				$bulanR == 'X';	
			}else if ($bulan == 11) {
				$bulanR = 'XI';	
			}else if ($bulan == 12) {
				$bulanR = 'XII';	
			}	
			
			$day = date('D', strtotime($tglProposal));
			$dayList = array(
				'Sun' => 'Minggu',
				'Mon' => 'Senin',
				'Tue' => 'Selasa',
				'Wed' => 'Rabu',
				'Thu' => 'Kamis',
				'Fri' => 'Jumat',
				'Sat' => 'Sabtu'
			);
			
				if ($bulanU == '01'){
					$bulans = 'Januari';
				}elseif ($bulanU == '02'){ 
					$bulans = 'Februari';
				}elseif ($bulanU == '03'){
					$bulans = 'Maret';
				}elseif ($bulanU == '04'){
					$bulans = 'April';
				}elseif ($bulanU == '05'){
					$bulans	= 'Mei';
				}elseif ($bulanU == '06'){
					$bulans = 'Juni';	
				}elseif ($bulanU == '07'){
					$bulans = 'Juli';	
				}elseif ($bulanU == '08'){
					$bulans = 'Agustus';	
				}elseif ($bulanU == '09'){
					$bulans = 'September';	
				}elseif ($bulanU == '10'){
					$bulans = 'Oktober';
				}elseif ($bulanU == '11'){
					$bulans = 'November';
				}elseif ($bulanU == '12'){
					$bulans = 'Desember';	
				}

			
			$kdJurusan =  substr($NPM, 2, 2);
			
			if ($kdJurusan == "31"){
				$Jurusan = "IESP";
				$jurusankc = "IESP";
				$kdjr = '5';
			}elseif ($kdJurusan == "32"){
				$Jurusan = "MANAJEMEN";
				$jurusankc = "Manajemen";
				$kdjr = '6';
			} elseif ($kdJurusan == "33"){
				$Jurusan = "AKUNTANSI";
				$jurusankc = "Akuntansi";	
				$kdjr = '4';
			}
			$kdJurusan =  substr($NPM, 2, 2);
			if ($kdJurusan == "31"){
				$Jurusan = "IESP";
				$jk = 'IESP';	
				$kdjr = '5';
			}elseif ($kdJurusan == "32"){
				$Jurusan = "MANAJEMEN";
				$jk = 'Manajemen';
				$kdjr = '6';
			} elseif ($kdJurusan == "33"){
				$Jurusan = "AKUNTANSI";
				$jk = 'Akuntansi';	
				$kdjr = '4';
			}
			
			$kdKelas = substr($NPM, 4, 3);
			
				if ($kdKelas == '121'){
					$kelas = 'BiayaReguler';
				}else {
					$kelas = 'BiayaNonReguler';
				}
				
			$kejur = $DataDosen->get_pejabat_by_id('nama', $kdjr);
			$nipkejur = $DataDosen2->get_pejabat_by_id('NIP', $kdjr);
			$wadek2 = $DataDosen3->get_pejabat_by_id('nama', '2');
			$nipwadek2 = $DataDosen4->get_pejabat_by_id('NIP', '2');
			$bendahara = $DataDosen5->get_pejabat_by_id('nama', '7');
			$NIPBendahara = $DataDosen5->get_pejabat_by_id('NIP', '7');
			$honor1 = $DataTemplate->get_template_single_by_id($kelas, '37');
			$honor2 = $DataTemplate2->get_template_single_by_id2($kelas, '38');
			$totalhonor = 0;
			$totalhonor = $honor1 + $honor2;
			$kdJurusan =  substr($NPM, 2, 2);

    ?>

<table width="100%" border="0" style="border-collapse:collapse;">
  <tr>
    <td><div align="center" style="font-size:24px"><strong>HONOR BIMBINGAN SKRIPSI</strong></div></td>
  </tr>
  <tr>
    <td><div align="center" style="font-size:20px"><strong>JURUSAN <?php echo $Jurusan?></strong></div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="100%" border="0" style="border-collapse:collapse;">
  <tr>
    <td width="6%">Nama</td>
    <td width="1%">:</td>
    <td width="93%"><?php echo $namaMhs?></td>
  </tr>
  <tr>
    <td>NPM</td>
    <td>:</td>
    <td><?php echo $NPM?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="100%" border="1" style="border-collapse:collapse;">
  <tr>
    <td width="4%"><div align="center">NO.</div></td>
    <td width="47%"><div align="center">NAMA DOSEN PEMBIMBING</div></td>
    <td width="22%"><div align="center">JABATAN</div></td>
    <td width="16%"><div align="center">JUMLAH</div></td>
    <td width="11%"><div align="center">TTD</div></td>
  </tr>
  <tr>
    <td><div align="center">1</div></td>
    <td style="padding-left:5px;"><?php echo $namaPendamping1?></td>
    <td style="padding-left:5px;">Pembimbing I</td>
    <td style="padding-left:5px;">Rp. <?php echo number_format($honor1);?></td>
    <td style="padding-left:5px;">1.</td>
  </tr>
  <tr>
    <td><div align="center">2</div></td>
    <td style="padding-left:5px;"><?php echo $namaPendamping2?></td>
    <td style="padding-left:5px;">Pembimbing II</td>
    <td style="padding-left:5px;">Rp. <?php echo number_format($honor2);?></td>
    <td style="padding-left:5px;">2.</td>
  </tr>
  <tr>
    <td><div align="center"></div></td>
    <td><div align="center">JUMLAH</div></td>
    <td>&nbsp;</td>
    <td>Rp. <?php echo number_format($totalhonor);?></td>
    <td style="padding-left:5px;"></td>
  </tr>
</table>

<?php
	if ($kdKelas == '121'){	
?>
<table width="100%" border="0">
  <tr>
    <td width="54%"><div align="center"></div></td>
    <td width="1%">&nbsp;</td>
    <td width="45%"><div align="center"></div></td>
  </tr>
  <tr>
    <td><div align="center"></div></td>
    <td>&nbsp;</td>
    <td><div align="center">Denpasar, <?php echo $tanggal." ".$bulans." ".$tahun?></div></td>
  </tr>
  <tr>
    <td><div align="center"></div></td>
    <td>&nbsp;</td>
    <td><div align="center">Universitas Warmadewa</div></td>
  </tr>
  <tr>
    <td><div align="center"></div></td>
    <td>&nbsp;</td>
    <td><div align="center">Fakultas Ekonomi</div></td>
  </tr>
  <tr>
    <td><div align="center">Kejur. <?php echo $jk?></div></td>
    <td>&nbsp;</td>
    <td><div align="center">A.n.Dekan</div></td>
  </tr>
  <tr>
    <td><div align="center"></div></td>
    <td>&nbsp;</td>
    <td><div align="center">Wadek II,</div></td>
  </tr>
  <tr>
    <td><div align="center"></div></td>
    <td>&nbsp;</td>
    <td><div align="center"></div></td>
  </tr>
  <tr>
    <td><div align="center"><u><strong><?php echo $kejur?></strong></u></div></td>
    <td>&nbsp;</td>
    <td><div align="center"><strong><u><?php echo $wadek2?></u></strong></div></td>
  </tr>
  <tr>
    <td><div align="center">NIK/NIP. <?php echo $nipkejur?></div></td>
    <td>&nbsp;</td>
    <td><div align="center">NIK/NIP. <?php echo $nipwadek2?></div></td>
  </tr>
</table>
<?php }else{?>

<table width="100%" border="0">
  <tr>
    <td width="54%"><div align="center"></div></td>
    <td width="1%">&nbsp;</td>
    <td width="45%"><div align="center"></div></td>
  </tr>
  <tr>
    <td><div align="center"></div></td>
    <td>&nbsp;</td>
    <td><div align="center">Denpasar, <?php echo $tanggal." ".$bulans." ".$tahun?></div></td>
  </tr>
  <tr>
    <td><div align="center"></div></td>
    <td>&nbsp;</td>
    <td><div align="center">Universitas Warmadewa</div></td>
  </tr>
  <tr>
    <td><div align="center"></div></td>
    <td>&nbsp;</td>
    <td><div align="center">Fakultas Ekonomi</div></td>
  </tr>
  <tr>
    <td><div align="center">Kejur. <?php echo $jk?></div></td>
    <td>&nbsp;</td>
    <td><div align="center">Bendahara</div></td>
  </tr>
  <tr>
    <td><div align="center"></div></td>
    <td>&nbsp;</td>
    <td><div align="center">Kelas R. Sore - Eksekutif</div></td>
  </tr>
  <tr>
    <td><div align="center"></div></td>
    <td>&nbsp;</td>
    <td><div align="center"></div></td>
  </tr>
  <tr>
    <td><div align="center"><u><strong><?php echo $kejur?></strong></u></div></td>
    <td>&nbsp;</td>
    <td><div align="center"><strong><u><?php echo $bendahara?></u></strong></div></td>
  </tr>
  <tr>
    <td><div align="center">NIK/NIP. <?php echo $nipkejur?></div></td>
    <td>&nbsp;</td>
    <td><div align="center">NIK/NIP. <?php echo $NIPBendahara?></div></td>
  </tr>
</table>
<?php } ?>
<p>&nbsp;</p>
</body>
</html>