<!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_dosen.php";	
            $DataProposal = new DataProposal;
			$DataDosen = new dataDosen;
            $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);
			$tempat = $DataProposal->get_proposal_single_by_id('tempat',$id);
			$kdJurusan =  substr($NPM, 2, 2);
				
				if ($kdJurusan == "31"){
					$Jurusan = "IESP";	
					$JR = 'IESP';
					$kdjr = '5';
				}elseif ($kdJurusan == "32"){
					$Jurusan = "Manajemen";
					$JR = 'MAN';
					$kdjr = '6';
				} elseif ($kdJurusan == "33"){
					$Jurusan = "Akuntansi";
					$JR = 'AKUN';
					$kdjr = '4';	
				}
			$ttd = $DataDosen->get_pejabat_by_id('nama', $kdjr);
			$nipttd = $DataDosen->get_pejabat_by_id('NIP', $kdjr);

			$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';	
				}

        ?>

<table width="87%" border="0" >
  <tr>
    <td><img src="pict/3.jpg" width="692" height="155"></td>
  </tr>
</table>

<table width="100%" border="0" style="border-collapse:collapse; margin-top:20px;">
  <tr>
    <td width="16%">Nomor</td>
    <td width="1%">:</td>
    <td width="83%"><?php echo $noUndangan ?>/UW-FE/<?php echo $JR?>-PP/ <?php echo $bulanR?>/<?php echo date('Y')?></td>
  </tr>
  <tr>
    <td>Lamp</td>
    <td>:</td>
    <td>1 (satu) gabung</td>
  </tr>
  <tr>
    <td>Hal</td>
    <td>:</td>
    <td>Pendamping Seminar / Ujian Proposal Penelitian</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>Kepada.</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>Yth. Bapak/Ibu </td>
    <td>&nbsp;</td>
    <td>1. <?php echo $namaPendamping1?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>2. <?php echo $namaPendamping2?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>3. <?php echo $namaPendamping3?></td>
  </tr>
  <tr>
    <td><div align="right">di Denpasar</div></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><div align="left">Dengan hormat,</div></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3">Bersama ini kami mohon berkenan Bapak / Ibu untuk menguji Proposal Penelitian Mahasiswa :</td>
  </tr>
</table>
<table width="100%" border="0" style="border-collapse:collapse; margin-top:10px;">
  <tr>
    <td width="9%">&nbsp;</td>
    <td width="11%">Nama</td>
    <td width="2%">:</td>
    <td width="78%"><?php echo $namaMhs ?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>NPM</td>
    <td>:</td>
    <td><?php echo $NPM ?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>Jurusan</td>
    <td>:</td>
    <td><?php echo $Jurusan?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td valign="top">Judul</td>
    <td valign="top">:</td>
    <td valign="top"><?php echo $judul?></td>
  </tr>
  <tr>
    <td colspan="4">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="4">Yang akan dilaksanakan pada</td>
  </tr>
</table>
<table width="100%" border="0" style="border-collapse:collapse; margin-top:10px;">
  <tr>
    <td width="9%">&nbsp;</td>
    <td width="11%">Hari/Tanggal</td>
    <td width="2%">:</td>
    <td width="78%"><?php echo $dayList[$day]?>/ <?php echo $tanggal." ".$bulans." ".$tahun?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>Waktu</td>
    <td>:</td>
    <td><?php echo $waktu?> Wita</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>Tempat</td>
    <td>:</td>
    <td><?php echo $tempat?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="4">Demikian surat ini disampaikan atas perhatian dan kehadiran tepat pada waktunya kami ucapkan terima kasih.</td>
  </tr>
</table>
<?php 
	$tanggal1 = date('d');
	$bulan = date('m'); 
	$tahun1 = date('Y');
	
	if ($bulan == '01'){
		$bulans = 'Januari';
	}elseif ($bulan == '02'){ 
		$bulans = 'Februari';
	}elseif ($bulan == '03'){
		$bulans = 'Maret';
	}elseif ($bulan == '04'){
		$bulans = 'April';
	}elseif ($bulan == '05'){
		$bulans	= 'Mei';
	}elseif ($bulan == '06'){
		$bulans = 'Juni';	
	}elseif ($bulan == '07'){
		$bulans = 'Juli';	
	}elseif ($bulan == '08'){
		$bulans = 'Agustus';	
	}elseif ($bulan == '09'){
		$bulans = 'September';	
	}elseif ($bulan == '10'){
		$bulans = 'Oktober';
	}elseif ($bulan == '11'){
		$bulans ==	'November';
	}elseif ($bulan == '12'){
		$bulans = 'Desember';	
	}
	
?>

<table width="100%" border="0" style="border-collapse:collapse;">
  <tr>
    <td width="51%">&nbsp;</td>
    <td width="49%"><div align="center">Denpasar, <?php echo $tanggal1." ".$bulans." ".$tahun1?></div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><div align="center">Universitas Warmadewa</div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><div align="center">Fakultas Ekonomi</div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><div align="center">Jurusan <?php echo $Jurusan  ?></div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><div align="center">Ketua</div></td>
  </tr>
  <tr>
    <td height="41">&nbsp;</td>
    <td><div align="center"></div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><div align="center"><strong><u><?php echo $ttd?></u></strong></div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><div align="center">NIK/NIP. <?php echo $nipttd?></div></td>
  </tr>
</table>
<p>&nbsp;</p>
</body>
</html>