<!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;

			$DataTemplate = new DataTemplate;
			$DataTemplate2 = new DataTemplate;	
			$DataTemplate3 = 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');
			//echo $bulan;
						
			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';
			}
			
		$Kelas =  substr($NPM, 4, 3);
		
		if ($Kelas == '121') {
			$ket = 'Jurusan '.$jurusankc;
			$jabatan = 'Ketua';
			$kelas1 = 'BiayaReguler';
	
		}else {
			$ket = 'Kelas R. Sore - Eksekutif';
			$jabatan = 'Bendahara';
			$kelas1 = 'BiayaNonReguler';
			$kdjr = '7';

		}
			$uang1 = $DataTemplate->get_template_single_by_id($kelas1, '34');
			$uang2 = $DataTemplate2->get_template_single_by_id($kelas1, '35');
			$uang3 = $DataTemplate3->get_template_single_by_id($kelas1, '36');
			$ttdPenguji = $DataDosen->get_pejabat_by_id('nama', $kdjr);
			$nipPenguji = $DataDosen->get_pejabat_by_id('NIP', $kdjr);
			$totalUang = 0;
			$totalUang = $uang1 + $uang2 + $uang3;

        ?>

<table width="100%" border="0" style="border-collapse:collapse;">
  <tr>
    <td><div align="center" style="font-size:20px"><strong>UANG LELAH PENGUJI UJIAN PROPOSAL</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>Jurusan</td>
    <td>:</td>
    <td><?php echo $Jurusan?></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="13%"><div align="center">JUMLAH</div></td>
    <td width="14%"><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($uang1)?></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($uang2)?></td>
    <td style="padding-left:5px;">2.</td>
  </tr>
  <tr>
    <td><div align="center">3</div></td>
    <td style="padding-left:5px;"><?php echo $namaPendamping3?></td>
    <td style="padding-left:5px;">Kejur / Sekjur</td>
    <td style="padding-left:5px;">Rp. <?php echo number_format($uang3)?></td>
    <td style="padding-left:5px;">3.</td>
  </tr>
  <tr>
    <td><div align="center"></div></td>
    <td><div align="center">JUMLAH</div></td>
    <td>&nbsp;</td>
    <td style="padding-left:5px;">Rp. <?php echo number_format($totalUang)?></td>
    <td style="padding-left:5px;">&nbsp;</td>
  </tr>
</table>

<table width="100%" border="0">
  <tr>
    <td width="49%"><div align="center"></div></td>
    <td width="1%">&nbsp;</td>
    <td width="50%"><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"></div></td>
    <td>&nbsp;</td>
    <td><div align="center"><?php echo $ket?></div></td>
  </tr>
  
  
  <tr>
    <td><div align="center"></div></td>
    <td>&nbsp;</td>
    <td><div align="center"><?php echo $jabatan?></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"></div></td>
    <td>&nbsp;</td>
    <td><div align="center"><strong><u><?php echo $ttdPenguji?></u></strong></div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td><div align="center">NIK/NIP. <?php echo $nipPenguji?></div></td>
  </tr>
</table>
<p>&nbsp;</p>
</body>
</html>