<!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">
    @page 
    {
        size: auto;   /* auto is the initial value */
        margin: 0mm;  /* this affects the margin in the printer settings */
    }
	#table1 tr td {
		padding:5px;
		}
	</style>
<body style="margin-left:30px; margin-right:30px; margin-top:30px;">
<?php 
			include "php_class/class_mysql.php";
			include "config/session.php";
			include "php_class/class_semesterpendek.php";
			
			$datasp = new DataSemesterPendek;
			$datasp2 = new DataSemesterPendek;
			$datasp3 = new DataSemesterPendek;

            $kelas = $_GET['kelas'];
			$idmatkul = $_GET['idmatkul'];
			$tahun = $_SESSION['smtahun'];
			$semester = $_SESSION['smsemester'];
			$program = $_SESSION['smprogram'];
			
			$dosen = $datasp->get_bagi_id('dosen', $program, $tahun, $semester, $idmatkul, $kelas);
			$matkul = $datasp2->get_matakuliah_id('matakuliah', $idmatkul);
			$kode = $datasp2->get_matakuliah_id('kode', $idmatkul); 
			$sks = $datasp2->get_matakuliah_id('sks', $idmatkul); 
			
			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;

		?>
<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 colspan="3">UNIVERSITAS WARMADEWA</td>
  </tr>
  <tr>
    <td colspan="3">FAKULTAS EKONOMI</td>
  </tr>
  <tr>
    <td colspan="3">DAFTAR PESERTA UJIAN AKHIR SEMESTER ANTARA <?php echo $semester1?> <?php echo $tahun1?></td>
  </tr>
  <tr>
    <td width="21%">&nbsp;</td>
    <td width="2%">&nbsp;</td>
    <td width="77%">&nbsp;</td>
  </tr>
  <tr>
    <td>MATA KULIAH</td>
    <td>:</td>
    <td><?php echo $matkul?></td>
  </tr>
  <tr>
    <td>SANDI</td>
    <td>:</td>
    <td><?php echo $kode?></td>
  </tr>
  <tr>
    <td>DOSEN</td>
    <td>:</td>
    <td><?php echo $dosen?></td>
  </tr>
  <tr>
    <td>SKS</td>
    <td>:</td>
    <td><?php echo $sks?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="100%" border="1" style="border-collapse:collapse" id="table1">
  <tr>
    <td rowspan="2"><div align="center">NO</div></td>
    <td rowspan="2"><div align="center">NPM</div></td>
    <td rowspan="2"><div align="center">NAMA MAHASISWA</div></td>
    <td rowspan="2"><div align="center">KELAS</div></td>
    <td colspan="2"><div align="center">NILAI</div></td>
    <td rowspan="2"><div align="center">TANDA TANGAN</div></td>
  </tr>
  <tr>
    <td><div align="center">ANGKA</div></td>
    <td><div align="center">HURUF</div></td>
  </tr>
		<?php
            $JumlahData = $datasp3->get_bagi_kelas('',$a,'jumlah', $program, $tahun, $semester, $idmatkul, $kelas);
                for ($a=1;$a<=$JumlahData;$a++){
                    $nama = $datasp3->get_bagi_kelas('Nama',$a,'', $program, $tahun, $semester, $idmatkul, $kelas);
                    $NPM = $datasp3->get_bagi_kelas('NPM',$a,'', $program, $tahun, $semester, $idmatkul, $kelas);
		?>
<tr>
    <td><?php echo $a?></td>
    <td><?php echo $NPM?></td>
    <td style="text-transform:uppercase"><?php echo $nama?></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <?php } ?>
</table>
<table width="100%" border="0">
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  <tr>
    <td>PENGAWAS</td>
    <td>DENPASAR, </td>
  </tr>
  <tr>
    <td>1. ________________________________________________(.........................)</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>2. ________________________________________________(.........................)</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><?php echo $dosen?></td>
  </tr>
</table>
<p>&nbsp;</p>
</body>
</html>