<!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;
		margin-top:30px;  /* this affects the margin in the printer settings */
    }
	
	#biodata tr td {
		padding-top:5px;
		}
		
	table { page-break-inside:auto; }
   tr    {  page-break-after:auto }
   thead{
    display: table-header-group;
}
   	
	</style>
         <style type="text/css">
		@media print {
			 body {
			  	table { page-break-inside:auto; }
			   tr    {  page-break-after:auto }
			   thead{
				display: table-header-group;
				}
			
			}
			@page {
			  	table { page-break-inside:auto; }
			   tr    {  page-break-after:auto }
			   thead{
				display: table-header-group;
				}
			
			  }
		}
</style>
<body style="margin-left:30px; margin-right:30px;">
<?php 
			error_reporting(0);
			include "config/session.php";
			include "php_class/class_mysql.php";
			include "php_class/class_dosen.php";
			include "php_class/class_absen.php";
			include "php_class/class_semesterpendek.php";
			$datasp = new DataSemesterPendek;
			$datasp2 = new DataSemesterPendek;
			$dataabsen = new dataabsen;
			$DataDosen = new dataDosen;
			
			$kelas = $_POST['kelas'];
			$idmatkul = $_POST['idmatkul'];
			$nosurat = $_POST['nosurat'];
			$tanggalawal = $_POST['tanggalawal'];
			$tanggalakhir = $_POST['tanggalakhir'];
			$tanggalkumpul = $_POST['tanggalkumpul'];
			$tahun = $_SESSION['smtahun'];
			$semester = $_SESSION['smsemester'];
			$program = $_SESSION['smprogram'];

			if ($program == '122') {
				$program1 = 'R. Malam - Eksekutif';	
			} else{
				$program1 = 'Reguler';
				$program = '121';	
			}
			
			if ($semester == '1') {
				$semester1 = 'Ganjil';	
			} else {
				$semester1 = 'Genap';
			}

			$tahundp = substr($tahun, 0, 2);
			$tahunbk = substr($tahun, 2, 2);
			
			$tahun1 = '20'.$tahundp."/20".$tahunbk;

			$dataabsen->update_setting($tanggalawal, $tanggalakhir, $tanggalkumpul);
			$dosen = $datasp->get_bagi_id('dosen', $program, $tahun, $semester, $idmatkul, $kelas);
			$matkul = $datasp2->get_matakuliah_id('matakuliah', $idmatkul);
			
			
?>
<table width="87%" border="0" style="margin-top:-20px;">
  <tr>
    <td><img src="pict/3.jpg" width="692" height="136"></td>
  </tr>
</table>

<table width="100%" border="0">
  <tr>
    <td>Nomor </td>
    <td>:</td>
    <td><?php echo $nosurat?></td>
  </tr>
  <tr>
    <td>Lamp</td>
    <td>:</td>
    <td>-</td>
  </tr>
  <tr>
    <td>Hal</td>
    <td>: </td>
    <td>Pengantar Mengajar Semester Antara</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="100%" border="0">
  <tr>
    <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Kepada</td>
  </tr>
  <tr>
    <td>Yth. Bapak/Ibu <?php echo $dosen?></td>
  </tr>
  <tr>
    <td>Pengajar Mata Kuliah <?php echo $matkul?></td>
  </tr>
  <tr>
    <td>di-</td>
  </tr>
  <tr>
    <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tempat</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dengan hormat,</td>
  </tr>
  <tr>
    <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sehubungan dengan diselenggarakannya Semester Antara Fakultas Ekonomi Universitas Warmadewa Periode <?php echo $semester1?> <?php echo $tahun1?>, maka kami mohon kesediaan Bapak/Ibu untuk mengajar mata kuliah tersebut dan memperhatikan hal-hal sebagai berikut :</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>1. Perkuliahan dimulai tanggal <?php echo $tanggalawal?> s/d <?php echo $tanggalakhir?></td>
  </tr>
  <tr>
    <td>2. Ujian Tengah dan Ujian Akhir dikelola oleh dosen yang bersangkutan.</td>
  </tr>
  <tr>
    <td>3. Nilai disetor tanggal <?php echo $tanggalkumpul?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>Demikian surat ini , atas perkenan Bapak/Ibu kami ucapkan terima kasih.</td>
  </tr>
</table>
</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 colspan="2">&nbsp;</td>
    <td width="52%"><div align="center">Denpasar, <?php echo $tanggal1." ".$bulans." ".$tahun1?></div></td>
  </tr>
  <tr>
    <td colspan="2">&nbsp;</td>
    <td><div align="center">Universitas Warmadewa</div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td><div align="center">Fakultas Ekonomi</div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td><div align="center">an Dekan</div></td>
  </tr>
  <tr>
    <td width="40%"><div align="center"></div></td>
    <td width="8%">&nbsp;</td>
    <td><div align="center">Wakil Dekan I</div></td>
  </tr>
  <tr>
    <td colspan="2">&nbsp;</td>
    <td><div align="center"></div></td>
  </tr>
	<?php 
			$DataDosen1 = new dataDosen;
			$DataDosen2 = new dataDosen;
			$wadek = $DataDosen1->get_pejabat_by_id('nama', '1');
			$nipwadek = $DataDosen2->get_pejabat_by_id('NIP', '1');
	?>
  <tr>
    <td><div align="center"></div></td>
    <td>&nbsp;</td>
    <td><div align="center"><u><?php echo $wadek?></u></div></td>
  </tr>
  <tr>
    <td><div align="center"></div></td>
    <td>&nbsp;</td>
    <td><div align="center">NIK/NIP. <?php echo $nipwadek?></div></td>
  </tr>
</table>
<blockquote>
  <p>&nbsp;</p>
</blockquote>
</body>
</html>