<!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 */
		margin-bottom:25px;
    }
	
	#biodata tr td {
		padding-top:5px;
		}
		
	table { page-break-inside:auto; }
   tr    {  page-break-after:auto }
   thead{
    display: table-header-group;
}
   	
	</style>
<body style="margin-left:50px; margin-right:50px; font-size:12px">
<?php 
	include "php_class/class_mysql.php";
	include "php_class/class_ujian.php";
	include "php_class/class_dosen.php";	
	$DataDosen = new dataDosen;
	$DataDosen1 = new dataDosen;
	$DataDosen2 = new dataDosen;
	$DataUjian = new dataUjian;
	$Dataujian2 = new dataUjian;
	
	$id = $_GET['id'];
	$semester = $DataUjian->get_uts_id('sm', $id);
	$tahun = $DataUjian->get_uts_id('tahun', $id);
	
	$idmatakuliah = $Dataujian2->get_uts_id('idmatakuliah', $id);
	$matakuliah = $Dataujian2->get_uts_id('matakuliah', $id);
	$dosen = $Dataujian2->get_uts_id('dosen', $id);
	$hadir = $Dataujian2->get_uts_id('hadir', $id);
	$seharusnya = $Dataujian2->get_uts_id('seharusnya', $id);
	$tidakhadir = $Dataujian2->get_uts_id('tidakhadir', $id);
	$tambahan = $Dataujian2->get_uts_id('tambahan', $id);

	
?>


<table width="100%" border="0">
  <tr>
    <td colspan="5"><div align="center">Lampiran 1 (Format A) : SK Rektor Unwar No. 4559/Unwar/KP-02/2002</div></td>
  </tr>
  <tr>
    <td colspan="5"><div align="center"><strong>UNIVERSITAS WARMADEWA</strong></div></td>
  </tr>
  <tr>
    <td colspan="5"><div align="center"><u>Sekretariat : Jalan Terompong 24 Tanjung Bungkak Denpasar Telp. 223858 Fax. 235073</u></div></td>
  </tr>
  <tr>
    <td colspan="5"><div align="center"><strong>LAPORAN KEHADIRAN UJIAN TENGAH SEMESTER PER DOSEN</strong></div></td>
  </tr>
  <tr>
    <td colspan="5"><div align="center"><strong>UNIVERSITAS WARMADEWA</strong></div></td>
  </tr>
  <tr>
    <td colspan="5"><div align="center"><strong>SEMESTER <?php echo $sm?> TAHUN <?php echo $tahun?></strong></div></td>
  </tr>
  <tr>
    <td colspan="2">&nbsp;</td>
    <td colspan="2">&nbsp;</td>
    <td colspan="2">&nbsp;</td>
  </tr>
</table> 
          <table width="100%" border="1" style="border-collapse:collapse; margin-top:10px; margin-bottom:30px;">
             <thead>
                <tr>
                    <th>No</th>
                    <th>Nama Dosen</th>
                    <th>Mata Kuliah</th>
                    <th>Kelas</th>
                    <th>Ruang</th>
                    <th>Hari</th>
                    <th>Hadir</th>
                </tr>
            </thead>
            <tbody>
            <?php
            	$JumlahData = $DataUjian->get_data_uts_nama_laporan('', $a, 'jumlah', $dosen, $semester, $tahun);
				if ($JumlahData<=0){
					echo "<tr class='odd gradeX'>";
					echo "<td>No Data</td>";
					echo "<td></td>";
					echo "<td></td>";
					echo "<td></td>";
					echo "<td></td>";
					echo "<td></td>";
					echo "<td></td>";
					echo "</tr>";	
				}else{
					for ($a=1;$a<=$JumlahData;$a++){
						$id = $DataUjian->get_data_uts_nama_laporan('id',$a,'', $dosen, $semester, $tahun);
						$dosen = $DataUjian->get_data_uts_nama_laporan('dosen', $a, '', $dosen, $semester, $tahun);
						$matakuliah = $DataUjian->get_data_uts_nama_laporan('matakuliah',$a,'', $dosen, $semester, $tahun);
						$jurusan = $DataUjian->get_data_uts_nama_laporan('jurusan',$a,'', $dosen, $semester, $tahun);
						$kelas = $DataUjian->get_data_uts_nama_laporan('kelas',$a,'', $dosen, $semester, $tahun);
						$hari = $DataUjian->get_data_uts_nama_laporan('hari',$a,'', $dosen, $semester, $tahun);
						$hadir = $DataUjian->get_data_uts_nama_laporan('hadir',$a,'', $dosen, $semester, $tahun);
						$ruang = $DataUjian->get_data_uts_nama_laporan('ruang',$a,'', $dosen, $semester, $tahun);
						
						echo "<tr id='".$id."' class='odd gradeX'>";
						echo "<td id='".$id."' class='context'>".$id."</td>";
						echo "<td id='".$id."' class='context'>".$dosen."</td>";
						echo "<td id='".$id."' class='context'>".$matakuliah."</td>";
						echo "<td id='".$id."' class='context'>".$kelas."</td>";
						echo "<td id='".$id."' class='context'>".$ruang."</td>";
						echo "<td id='".$id."' class='context'>".$hari."</td>";
						echo "<td id='".$id."' class='context'>".$hadir."</td>";
						echo "</tr>";
					}
				}
			?>
        	</tbody>
          </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>&nbsp;</td>
    <td width="52%"><div align="center">Denpasar, <?php echo $tanggal1." ".$bulans." ".$tahun1?></div></td>
  </tr>
  <tr>
    <td><div align="center"></div></td>
    <td><div align="center">Fakultas Ekonomi</div></td>
  </tr>
  <tr>
    <td><div align="center"></div></td>
    <td><div align="center">Dekan,</div></td>
  </tr>
  <tr>
    <td height="34">&nbsp;</td>
    <td></td>
  </tr>
	<?php 
			$dekan = $DataDosen1->get_pejabat_by_id('nama', '9');
			$nipdekan = $DataDosen1->get_pejabat_by_id('NIP', '9');
			$rektor = $DataDosen2->get_pejabat_by_id('nama', '11');
			$niprektor = $DataDosen2->get_pejabat_by_id('NIP', '11');

	?>
  <tr>
    <td><div align="center"></div></td>
    <td><div align="center"><u><?php echo $dekan ?></u></div></td>
  </tr>
  <tr>
    <td><div align="center"></div></td>
    <td><div align="center">NIK/NIP. 
	<?php
	 echo $nipdekan?></div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>

</body>
</html>