<?php
	include "php_class/class_mysql.php";
	include "php_class/class_pegawai.php";
	include "php_class/class_tupoksi.php";
	$DataTupoksi = new dataTupoksi;
	$DataPegawai = new DataPegawai;
	$DataPegawai1 = new DataPegawai;
	$DataPegawai2 = new DataPegawai;
	$DataPegawai3 = new DataPegawai;
	$DataPegawai4 = new DataPegawai;
	$DataPegawai5 = new DataPegawai;
	$DataPegawai6 = new DataPegawai;
	
	include "php_class/class_dosen.php";
	$DataDosen = new dataDosen;
	
		$idPegawai = $_POST['idPegawai'];
		$tglAwal = $_POST['tglAwal'];
		$tglAkhir = $_POST['tglAkhir'];
		$tanggalawal = date("d-m-Y", strtotime($tglAwal));
		$tanggalakhir = date("d-m-Y", strtotime($tglAkhir));

				$JumlahData = $DataPegawai->get_Nilai_Pegawai_tgl('',$a,'jumlah', $idPegawai, $tglAwal, $tglAkhir);
					for ($a=1;$a<=6;$a++){
						$tanggal = $DataPegawai->get_Nilai_Pegawai_tgl('tanggal', $a, '', $idPegawai, $tglAwal, $tglAkhir);
						$tanggalct = date("d-m-Y", strtotime($tanggal));
						$Nama = $DataPegawai->get_Nilai_Pegawai_tgl('Nama', $a, '', $idPegawai, $tglAwal, $tglAkhir);
						$tglgb = $tglgb.":".$tanggal;
						$tglgbct = $tglgbct.":".$tanggalct;
					}
				
				list($tgl0, $tgl1, $tgl2, $tgl3, $tgl4, $tgl5, $tgl6) = explode(':', $tglgb);
				list($tgl0ct, $tgl1ct, $tgl2ct, $tgl3ct, $tgl4ct, $tgl5ct, $tgl6ct) = explode(':', $tglgbct);
?>
					<?php
						$NamaPejabatPenilai = $DataPegawai->get_Nilai_single_by_idPegawai('NamaPenilai', $idPegawai);
						$NIPPejabatPenilai = $DataPegawai->get_Nilai_single_by_idPegawai('NIPPenilai', $idPegawai);
						$unit = $DataTupoksi->get_tupoksi_by_idPegawai('unitKerja', $idPegawai);
                    	$tupoksi1 = $DataTupoksi->get_tupoksi_by_idPegawai('tupoksi1', $idPegawai);
						$tupoksi2 = $DataTupoksi->get_tupoksi_by_idPegawai('tupoksi2', $idPegawai);
						$tupoksi3 = $DataTupoksi->get_tupoksi_by_idPegawai('tupoksi3', $idPegawai);
						$tupoksi4 = $DataTupoksi->get_tupoksi_by_idPegawai('tupoksi4', $idPegawai);
						$tupoksi5 = $DataTupoksi->get_tupoksi_by_idPegawai('tupoksi5', $idPegawai);
					?>
<!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>

<body>
<table width="100%" border="0">
  <tr>
    <td><div align="center"><strong>FAKULTAS EKONOMI UNIVERSITAS WARMADEWA</strong></div></td>
  </tr>
  <tr>
    <td><div align="center"><strong>PENILAIAN KINERJA HARIAN PEGAWAI</strong></div></td>
  </tr>
</table>
<p></p>
<table width="100%" border="0">
  <tr>
    <td><strong>Nama</strong> : <?php echo $Nama ?></td>
    <td><div align="right"><strong>Unit Kerja : </strong><?php echo $unit?></div></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3">1 (Satu) pada kotak penilaian kinerja sesuai kategori sbb. :</td>
  </tr>
  <tr>
    <td colspan="3">SK = Sangat Kurang (&lt;60%), K = Kurang (60%-69%), S = Sedang (70%-79%), B = Baik (80%-89%), SB = Sangat Baik (&gt;=90%)</td>
  </tr>
  <tr>
    <td colspan="3">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3">Tanggal <?php echo $tanggalawal ?> sampai <?php echo $tanggalakhir?></td>
  </tr>
</table>
<table width="100%" border="1" style="border-collapse:collapse;">
  <tr>
    <td rowspan="2">Tugas Pokok Dan Fungsi (Tupoksi)</td>
    <td colspan="5"><div align="center"><?php echo $tgl1ct?></div></td>
    <td colspan="5"><div align="center"><?php echo $tgl2ct?></div></td>
    <td colspan="5"><div align="center"><?php echo $tgl3ct?></div></td>
    <td colspan="5"><div align="center"><?php echo $tgl4ct?></div></td>
    <td colspan="5"><div align="center"><?php echo $tgl5ct?></div></td>
    <td colspan="5"><div align="center"><?php echo $tgl6ct?></div></td>
  </tr>
  <tr>
    <td><div align="center">SK</div></td>
    <td><div align="center">K</div></td>
    <td><div align="center">S</div></td>
    <td><div align="center">B</div></td>
    <td><div align="center">SB</div></td>
    <td><div align="center">SK</div></td>
    <td><div align="center">K</div></td>
    <td><div align="center">S</div></td>
    <td><div align="center">B</div></td>
    <td><div align="center">SB</div></td>
    <td><div align="center">SK</div></td>
    <td><div align="center">K</div></td>
    <td><div align="center">S</div></td>
    <td><div align="center">B</div></td>
    <td><div align="center">SB</div></td>
    <td><div align="center">SK</div></td>
    <td><div align="center">K</div></td>
    <td><div align="center">S</div></td>
    <td><div align="center">B</div></td>
    <td><div align="center">SB</div></td>
    <td><div align="center">SK</div></td>
    <td><div align="center">K</div></td>
    <td><div align="center">S</div></td>
    <td><div align="center">B</div></td>
    <td><div align="center">SB</div></td>
    <td><div align="center">SK</div></td>
    <td><div align="center">K</div></td>
    <td><div align="center">S</div></td>
    <td><div align="center">B</div></td>
    <td><div align="center">SB</div></td>
  </tr>
  <tr>
    <td><?php echo $tupoksi1?></td>
    <?php
				
	$nilai1a = $DataPegawai1->get_Nilai_all_by_id('nilai1', $idPegawai, $tgl1);
	$nilai2a = $DataPegawai1->get_Nilai_all_by_id('nilai2', $idPegawai, $tgl1);
	$nilai3a = $DataPegawai1->get_Nilai_all_by_id('nilai3', $idPegawai, $tgl1);
	$nilai4a = $DataPegawai1->get_Nilai_all_by_id('nilai4', $idPegawai, $tgl1);
	$nilai5a = $DataPegawai1->get_Nilai_all_by_id('nilai5', $idPegawai, $tgl1);
	
	$nilai1b = $DataPegawai2->get_Nilai_all_by_id('nilai1', $idPegawai, $tgl2);
	$nilai2b = $DataPegawai2->get_Nilai_all_by_id('nilai2', $idPegawai, $tgl2);
	$nilai3b = $DataPegawai2->get_Nilai_all_by_id('nilai3', $idPegawai, $tgl2);
	$nilai4b = $DataPegawai2->get_Nilai_all_by_id('nilai4', $idPegawai, $tgl2);
	$nilai5b = $DataPegawai2->get_Nilai_all_by_id('nilai5', $idPegawai, $tgl2);

	$nilai1c = $DataPegawai3->get_Nilai_all_by_id('nilai1', $idPegawai, $tgl3);
	$nilai2c = $DataPegawai3->get_Nilai_all_by_id('nilai2', $idPegawai, $tgl3);
	$nilai3c = $DataPegawai3->get_Nilai_all_by_id('nilai3', $idPegawai, $tgl3);
	$nilai4c = $DataPegawai3->get_Nilai_all_by_id('nilai4', $idPegawai, $tgl3);
	$nilai5c = $DataPegawai3->get_Nilai_all_by_id('nilai5', $idPegawai, $tgl3);

	$nilai1d = $DataPegawai4->get_Nilai_all_by_id('nilai1', $idPegawai, $tgl4);
	$nilai2d = $DataPegawai4->get_Nilai_all_by_id('nilai2', $idPegawai, $tgl4);
	$nilai3d = $DataPegawai4->get_Nilai_all_by_id('nilai3', $idPegawai, $tgl4);
	$nilai4d = $DataPegawai4->get_Nilai_all_by_id('nilai4', $idPegawai, $tgl4);
	$nilai5d = $DataPegawai4->get_Nilai_all_by_id('nilai5', $idPegawai, $tgl4);

	$nilai1e = $DataPegawai5->get_Nilai_all_by_id('nilai1', $idPegawai, $tgl5);
	$nilai2e = $DataPegawai5->get_Nilai_all_by_id('nilai2', $idPegawai, $tgl5);
	$nilai3e = $DataPegawai5->get_Nilai_all_by_id('nilai3', $idPegawai, $tgl5);
	$nilai4e = $DataPegawai5->get_Nilai_all_by_id('nilai4', $idPegawai, $tgl5);
	$nilai5e = $DataPegawai5->get_Nilai_all_by_id('nilai5', $idPegawai, $tgl5);

	$nilai1f = $DataPegawai6->get_Nilai_all_by_id('nilai1', $idPegawai, $tgl6);
	$nilai2f = $DataPegawai6->get_Nilai_all_by_id('nilai2', $idPegawai, $tgl6);
	$nilai3f = $DataPegawai6->get_Nilai_all_by_id('nilai3', $idPegawai, $tgl6);
	$nilai4f = $DataPegawai6->get_Nilai_all_by_id('nilai4', $idPegawai, $tgl6);
	$nilai5f = $DataPegawai6->get_Nilai_all_by_id('nilai5', $idPegawai, $tgl6);
	
	$BarisA = 0;
	$BarisA = $nilai1a + $nilai2a + $nilai3a + $nilai4a + $nilai5a;

	$BarisB = 0;
	$BarisB = $nilai1b + $nilai2b + $nilai3b + $nilai4b + $nilai5b;

	$BarisC = 0;
	$BarisC = $nilai1c + $nilai2c + $nilai3c + $nilai4c + $nilai5c;

	$BarisD = 0;
	$BarisD = $nilai1d + $nilai2d + $nilai3d + $nilai4d + $nilai5d;

	$BarisE = 0;
	$BarisE = $nilai1e + $nilai2e + $nilai3e + $nilai4e + $nilai5e;

	$BarisF = 0;
	$BarisF = $nilai1f + $nilai2f + $nilai3f + $nilai4f + $nilai5f;

	?>

    <td><div align="center">
      <?php if ($nilai1a == "SK") { echo "1"; $SK1 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1a == "K") { echo "1"; $K1 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1a == "S") { echo "1"; $S1 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1a == "B") { echo "1"; $B1 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1a == "SB") { echo "1"; $SB1 = 1;}?>
    </div></td>
    
    <td><div align="center">
      <?php if ($nilai1b == "SK") { echo "1"; $SK6 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1b == "K") { echo "1"; $K6 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1b == "S") { echo "1"; $S6 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1b == "B") { echo "1"; $B6 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1b == "SB") { echo "1"; $SB6 = 1;}?>
    </div></td>
    
    <td><div align="center">
      <?php if ($nilai1c == "SK") { echo "1"; $SK11 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1c == "K") { echo "1"; $K11 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1c == "S") { echo "1"; $S11 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1c == "B") { echo "1"; $B11 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1c == "SB") { echo "1"; $SB11 = 1;}?>
    </div></td>
    
    <td><div align="center">
      <?php if ($nilai1d == "SK") { echo "1"; $SK16 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1d == "K") { echo "1"; $K16 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1d == "S") { echo "1"; $S16 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1d == "B") { echo "1"; $B16 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1d == "SB") { echo "1"; $SB16 = 1;}?>
    </div></td>
    
    <td><div align="center">
      <?php if ($nilai1e == "SK") { echo "1"; $SK21 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1e == "K") { echo "1"; $K21 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1e == "S") { echo "1"; $S21 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1e == "B") { echo "1"; $B21 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1e == "SB") { echo "1"; $SB21 = 1;}?>
    </div></td>
    
    <td><div align="center">
      <?php if ($nilai1f == "SK") { echo "1"; $SK26 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1f == "K") { echo "1"; $K26 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1f == "S") { echo "1"; $S26 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1f == "B") { echo "1"; $B26 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai1f == "SB") { echo "1"; $SB26 = 1;}?>
    </div></td>
  </tr>
  <tr>
    <td><?php echo $tupoksi2?></td>

    <td><div align="center">
      <?php if ($nilai2a == "SK") { echo "1"; $SK2 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2a == "K") { echo "1"; $K2 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2a == "S") { echo "1"; $S2 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2a == "B") { echo "1"; $B2 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2a == "SB") { echo "1"; $SB2 = 1;}?>
    </div></td>
    
    <td><div align="center">
      <?php if ($nilai2b == "SK") { echo "1"; $SK7 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2b == "K") { echo "1"; $K7 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2b == "S") { echo "1"; $S7 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2b == "B") { echo "1"; $B7 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2b == "SB") { echo "1"; $SB7 = 1;}?>
    </div></td>
    
    <td><div align="center">
      <?php if ($nilai2c == "SK") { echo "1"; $SK12 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2c == "K") { echo "1"; $K12 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2c == "S") { echo "1"; $S12 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2c == "B") { echo "1"; $B12 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2c == "SB") { echo "1"; $SB12 = 1;}?>
    </div></td>
    
    <td><div align="center">
      <?php if ($nilai2d == "SK") { echo "1"; $SK17 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2d == "K") { echo "1"; $K17 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2d == "S") { echo "1"; $S17 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2d == "B") { echo "1"; $B17 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2d == "SB") { echo "1"; $SB17 = 1;}?>
    </div></td>
    
    <td><div align="center">
      <?php if ($nilai2e == "SK") { echo "1"; $SK22 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2e == "K") { echo "1"; $K22 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2e == "S") { echo "1"; $S22 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2e == "B") { echo "1"; $B22 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2e == "SB") { echo "1"; $SB22 = 1;}?>
    </div></td>
    
    <td><div align="center">
      <?php if ($nilai2f == "SK") { echo "1"; $SK27 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2f == "K") { echo "1"; $K27 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2f == "S") { echo "1"; $S27 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2f == "B") { echo "1"; $B27 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai2f == "SB") { echo "1"; $SB27 = 1;}?>
    </div></td>
  </tr>
  <tr>
    <td><?php echo $tupoksi3?></td>

    <td><div align="center">
      <?php if ($nilai3a == "SK") { echo "1"; $SK3 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3a == "K") { echo "1"; $K3 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3a == "S") { echo "1"; $S3 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3a == "B") { echo "1"; $B3 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3a == "SB") { echo "1"; $SB3 = 1;}?>
    </div></td>
    
    <td><div align="center">
      <?php if ($nilai3b == "SK") { echo "1"; $SK8 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3b == "K") { echo "1"; $K8 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3b == "S") { echo "1"; $S8 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3b == "B") { echo "1"; $B8 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3b == "SB") { echo "1"; $SB8 = 1;}?>
    </div></td>
    
    <td><div align="center">
      <?php if ($nilai3c == "SK") { echo "1"; $SK13 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3c == "K") { echo "1"; $K13 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3c == "S") { echo "1"; $S13 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3c == "B") { echo "1"; $B13 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3c == "SB") { echo "1"; $SB13 = 1;}?>
    </div></td>
       
    <td><div align="center">
      <?php if ($nilai3d == "SK") { echo "1"; $SK18 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3d == "K") { echo "1"; $K18 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3d == "S") { echo "1"; $S18 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3d == "B") { echo "1"; $B18 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3d == "SB") { echo "1"; $SB18 = 1;}?>
    </div></td>
    
    <td><div align="center">
      <?php if ($nilai3e == "SK") { echo "1"; $SK23 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3e == "K") { echo "1"; $K23 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3e == "S") { echo "1"; $S23 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3e == "B") { echo "1"; $B23 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3e == "SB") { echo "1"; $SB23 = 1;}?>
    </div></td>
    
    <td><div align="center">
      <?php if ($nilai3f == "SK") { echo "1"; $SK28 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3f == "K") { echo "1"; $K28 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3f == "S") { echo "1"; $S28 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3f == "B") { echo "1"; $B28 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai3f == "SB") { echo "1"; $SB28 = 1;}?>
    </div></td>
  </tr>
  <tr>
    <td><?php echo $tupoksi4?></td>

    <td><div align="center">
      <?php if ($nilai4a == "SK") { echo "1"; $SK4 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4a == "K") { echo "1"; $K4 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4a == "S") { echo "1"; $S4 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4a == "B") { echo "1"; $B4 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4a == "SB") { echo "1"; $SB4 = 1;}?>
    </div></td>
    
    <td><div align="center">
      <?php if ($nilai4b == "SK") { echo "1"; $SK9 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4b == "K") { echo "1"; $K9 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4b == "S") { echo "1"; $S9 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4b == "B") { echo "1"; $B9 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4b == "SB") { echo "1"; $SB9 = 1;}?>
    </div></td>
   
    <td><div align="center">
      <?php if ($nilai4c == "SK") { echo "1"; $SK14 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4c == "K") { echo "1"; $K14 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4c == "S") { echo "1"; $S14 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4c == "B") { echo "1"; $B14 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4c == "SB") { echo "1"; $SB14 = 1;}?>
    </div></td>
       
    <td><div align="center">
      <?php if ($nilai4d == "SK") { echo "1"; $SK19 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4d == "K") { echo "1"; $K19 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4d == "S") { echo "1"; $S19 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4d == "B") { echo "1"; $B19 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4d == "SB") { echo "1"; $SB19 = 1;}?>
    </div></td>
    
    <td><div align="center">
      <?php if ($nilai4e == "SK") { echo "1"; $SK24 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4e == "K") { echo "1"; $K24 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4e == "S") { echo "1"; $S24 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4e == "B") { echo "1"; $B24 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4e == "SB") { echo "1"; $SB24 = 1;}?>
    </div></td>
    
    <td><div align="center">
      <?php if ($nilai4f == "SK") { echo "1"; $SK29 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4f == "K") { echo "1"; $K29 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4f == "S") { echo "1"; $S29 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4f == "B") { echo "1"; $B29 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai4f == "SB") { echo "1"; $SB29 = 1;}?>
    </div></td>
  </tr>
  <tr>
    <td><?php echo $tupoksi5?></td>

    <td><div align="center">
      <?php if ($nilai5a == "SK") { echo "1"; $SK5 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5a == "K") { echo "1"; $K5 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5a == "S") { echo "1"; $S5 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5a == "B") { echo "1"; $B5 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5a == "SB") { echo "1"; $SB5 = 1;}?>
    </div></td>
    
    <td><div align="center">
      <?php if ($nilai5b == "SK") { echo "1"; $SK10 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5b == "K") { echo "1"; $K10 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5b == "S") { echo "1"; $S10 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5b == "B") { echo "1"; $B10 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5b == "SB") { echo "1"; $SB10 = 1;}?>
    </div></td>
    
    <td><div align="center">
      <?php if ($nilai5c == "SK") { echo "1"; $SK15 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5c == "K") { echo "1"; $K15 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5c == "S") { echo "1"; $S15 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5c == "B") { echo "1"; $B15 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5c == "SB") { echo "1"; $SB15 = 1;}?>
    </div></td>
       
    <td><div align="center">
      <?php if ($nilai5d == "SK") { echo "1"; $SK20 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5d == "K") { echo "1"; $K20 = 1; }?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5d == "S") { echo "1"; $S20 = 1; }?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5d == "B") { echo "1"; $B20 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5d == "SB") { echo "1"; $SB20 = 1;}?>
    </div></td>
    
    <td><div align="center">
      <?php if ($nilai5e == "SK") { echo "1"; $SK25 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5e == "K") { echo "1"; $K25 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5e == "S") { echo "1"; $S25 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5e == "B") { echo "1"; $B25 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5e == "SB") { echo "1"; $SB25 = 1;}?>
    </div></td>
    
    <td><div align="center">
      <?php if ($nilai5f == "SK") { echo "1"; $SK30 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5f == "K") { echo "1"; $K30 =1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5f == "S") { echo "1"; $S30 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5f == "B") { echo "1"; $B30 = 1;}?>
    </div></td>
    <td><div align="center">
      <?php if ($nilai5f == "SB") { echo "1"; $SB30 = 1;}?>
    </div></td>
  </tr>
  <tr>
    <td>Angka 1 (satu) pada setiap kolom</td>
    <td><div align="center">
      <?php $BarisA = $SK1 + $SK2 + $SK3 + $SK4 + $SK5; echo $BarisA?>
    </div></td>
    <td><div align="center">
      <?php $BarisB = $K1 + $K2 + $K3 + $K4 + $K5; echo $BarisB?>
    </div></td>
    <td><div align="center">
      <?php $BarisC = $S1 + $S2 + $S3 + $S4 + $S5; echo $BarisC?>
    </div></td>
    <td><div align="center">
      <?php $BarisD = $B1 + $B2 + $B3 + $B4 + $B5; echo $BarisD?>
    </div></td>
    <td><div align="center">
      <?php $BarisE = $SB1 + $SB2 + $SB3 + $SB4 + $SB5; echo $BarisE?>
    </div></td>
    <td><div align="center">
      <?php $BarisF = $SK6 + $SK7 + $SK8 + $SK9 + $SK10; echo $BarisF?>
    </div></td>
    <td><div align="center">
      <?php $BarisG = $K6 + $K7 + $K8 + $K9 + $K10; echo $BarisG?>
    </div></td>
    <td><div align="center">
      <?php $BarisH = $S6 + $S7 + $S8 + $S9 + $S10; echo $BarisH?>
    </div></td>
    <td><div align="center">
      <?php $BarisI = $B6 + $B7 + $B8 + $B9 + $B10; echo $BarisI?>
    </div></td>
    <td><div align="center">
      <?php $BarisJ = $SB6 + $SB7 + $SB8 + $SB9 + $SB10; echo $BarisJ?>
    </div></td>
    <td><div align="center">
      <?php $BarisK = $SK11 + $SK12 + $SK13 + $SK14 + $SK15; echo $BarisK?>
    </div></td>
    <td><div align="center">
      <?php $BarisL = $K11 + $K12 + $K13 + $K14 + $K15; echo $BarisL?>
    </div></td>
    <td><div align="center">
      <?php $BarisM = $S11 + $S12 + $S13 + $S14 + $S15; echo $BarisM?>
    </div></td>
    <td><div align="center">
      <?php $BarisN = $B11 + $B12 + $B13 + $B14 + $B15; echo $BarisN?>
    </div></td>
    <td><div align="center">
      <?php $BarisO = $SB11 + $SB12 + $SB13 + $SB14 + $SB15; echo $BarisO?>
    </div></td>
    <td><div align="center">
      <?php $BarisP = $SK16 + $SK17 + $SK18 + $SK19 + $SK20; echo $BarisP?>
    </div></td>
    <td><div align="center">
      <?php $BarisQ = $K16 + $K17 + $K18 + $K19 + $K20; echo $BarisQ?>
    </div></td>
    <td><div align="center">
      <?php $BarisR = $S16 + $S17 + $S18 + $S19 + $S20; echo $BarisR?>
    </div></td>
    <td><div align="center">
      <?php $BarisS = $B16 + $B17 + $B18 + $B19 + $B20; echo $BarisS?>
    </div></td>
    <td><div align="center">
      <?php $BarisT = $SB16 + $SB17 + $SB18 + $SB19 + $SB20; echo $BarisT?>
    </div></td>
    <td><div align="center">
      <?php $BarisU = $SK21 + $SK22 + $SK23 + $SK24 + $SK25; echo $BarisU?>
    </div></td>
    <td><div align="center">
      <?php $BarisV = $K21 + $K22 + $K23 + $K24 + $K25; echo $BarisV?>
    </div></td>
    <td><div align="center">
      <?php $BarisW = $S21 + $S22 + $S23 + $S24 + $S25; echo $BarisW?>
    </div></td>
    <td><div align="center">
      <?php $BarisX = $B21 + $B22 + $B23 + $B24 + $B25; echo $BarisX?>
    </div></td>
    <td><div align="center">
      <?php $BarisY = $SB21 + $SB22 + $SB23 + $SB24 + $SB25; echo $BarisY?>
    </div></td>
    <td><div align="center">
      <?php $BarisZ = $SK26 + $SK27 + $SK28 + $SK29 + $SK30; echo $BarisZ?>
    </div></td>
    <td><div align="center">
      <?php $BarisAA = $K26 + $K27 + $K28 + $K29 + $K30; echo $BarisAA?>
    </div></td>
    <td><div align="center">
      <?php $BarisAB = $S26 + $S27 + $S28 + $S29 + $S30; echo $BarisAB?>
    </div></td>
    <td><div align="center">
      <?php $BarisAC = $B26 + $B27 + $B28 + $B29 + $B30; echo $BarisAC?>
    </div></td>
    <td><div align="center">
      <?php $BarisAD = $SB26 + $SB27 + $SB28 + $SB29 + $SB30; echo $BarisAD?>
    </div></td>
  </tr>
  <tr>
    <td>mengali setiap kategori</td>
    <td><div align="center">1</div></td>
    <td><div align="center">2</div></td>
    <td><div align="center">3</div></td>
    <td><div align="center">4</div></td>
    <td><div align="center">5</div></td>
    <td><div align="center">1</div></td>
    <td><div align="center">2</div></td>
    <td><div align="center">3</div></td>
    <td><div align="center">4</div></td>
    <td><div align="center">5</div></td>
    <td><div align="center">1</div></td>
    <td><div align="center">2</div></td>
    <td><div align="center">3</div></td>
    <td><div align="center">4</div></td>
    <td><div align="center">5</div></td>
    <td><div align="center">1</div></td>
    <td><div align="center">2</div></td>
    <td><div align="center">3</div></td>
    <td><div align="center">4</div></td>
    <td><div align="center">5</div></td>
    <td><div align="center">1</div></td>
    <td><div align="center">2</div></td>
    <td><div align="center">3</div></td>
    <td><div align="center">4</div></td>
    <td><div align="center">5</div></td>
    <td><div align="center">1</div></td>
    <td><div align="center">2</div></td>
    <td><div align="center">3</div></td>
    <td><div align="center">4</div></td>
    <td><div align="center">5</div></td>
  </tr>
  <tr>
    <td>skor setiap kategori</td>
    <td><div align="center">
      <?php $Skor1 = $BarisA * 1; echo $Skor1;?>
    </div></td>
    <td><div align="center">
      <?php $Skor2 = $BarisB * 2; echo $Skor2;?>
    </div></td>
    <td><div align="center">
      <?php $Skor3 = $BarisC * 3; echo $Skor3;?>
    </div></td>
    <td><div align="center">
      <?php $Skor4 = $BarisD * 4; echo $Skor4;?>
    </div></td>
    <td><div align="center">
      <?php $Skor5 = $BarisE * 5; echo $Skor5;?>
    </div></td>
    <td><div align="center">
      <?php $Skor6 = $BarisF * 1; echo $Skor6;?>
    </div></td>
    <td><div align="center">
      <?php $Skor7 = $BarisG * 2; echo $Skor7;?>
    </div></td>
    <td><div align="center">
      <?php $Skor8 = $BarisH * 3; echo $Skor8;?>
    </div></td>
    <td><div align="center">
      <?php $Skor9 = $BarisI * 4; echo $Skor9;?>
    </div></td>
    <td><div align="center">
      <?php $Skor10 = $BarisJ * 5; echo $Skor10;?>
    </div></td>
    <td><div align="center">
      <?php $Skor11 = $BarisK * 1; echo $Skor11;?>
    </div></td>
    <td><div align="center">
      <?php $Skor12 = $BarisL * 2; echo $Skor12;?>
    </div></td>
    <td><div align="center">
      <?php $Skor13 = $BarisM * 3; echo $Skor13;?>
    </div></td>
    <td><div align="center">
      <?php $Skor14 = $BarisN * 4; echo $Skor14;?>
    </div></td>
    <td><div align="center">
      <?php $Skor15 = $BarisO * 5; echo $Skor15;?>
    </div></td>
    <td><div align="center">
      <?php $Skor16 = $BarisP * 1; echo $Skor16;?>
    </div></td>
    <td><div align="center">
      <?php $Skor17 = $BarisQ * 2; echo $Skor17;?>
    </div></td>
    <td><div align="center">
      <?php $Skor18 = $BarisR * 3; echo $Skor18;?>
    </div></td>
    <td><div align="center">
      <?php $Skor19 = $BarisS * 4; echo $Skor19;?>
    </div></td>
    <td><div align="center">
      <?php $Skor20 = $BarisT * 5; echo $Skor20;?>
    </div></td>
    <td><div align="center">
      <?php $Skor21 = $BarisU * 1; echo $Skor21;?>
    </div></td>
    <td><div align="center">
      <?php $Skor22 = $BarisV * 2; echo $Skor22;?>
    </div></td>
    <td><div align="center">
      <?php $Skor23 = $BarisW * 3; echo $Skor23;?>
    </div></td>
    <td><div align="center">
      <?php $Skor24 = $BarisX * 4; echo $Skor24;?>
    </div></td>
    <td><div align="center">
      <?php $Skor25 = $BarisY * 5; echo $Skor25;?>
    </div></td>
    <td><div align="center">
      <?php $Skor26 = $BarisZ * 1; echo $Skor26;?>
    </div></td>
    <td><div align="center">
      <?php $Skor27 = $BarisAA * 2; echo $Skor27;?>
    </div></td>
    <td><div align="center">
      <?php $Skor28 = $BarisAB * 3; echo $Skor28;?>
    </div></td>
    <td><div align="center">
      <?php $Skor29 = $BarisAC * 4; echo $Skor29;?>
    </div></td>
    <td><div align="center">
      <?php $Skor30 = $BarisAD * 5; echo $Skor30;?>
    </div></td>
  </tr>
  <tr>
    <td>total penilaian kinerja perhari</td>
    <td colspan="5"><div align="center">
      <?php $total1 = $Skor1 + $Skor2 + $Skor3 + $Skor4 + $Skor5; echo $total1;?>
    </div></td>
    <td colspan="5"><div align="center">
      <?php $total2 = $Skor6 + $Skor7 + $Skor8 + $Skor9 + $Skor10; echo $total2;?>
    </div></td>
    <td colspan="5"><div align="center">
      <?php $total3 = $Skor11 + $Skor12 + $Skor13 + $Skor14 + $Skor15; echo $total3;?>
    </div></td>
    <td colspan="5"><div align="center">
      <?php $total4 = $Skor16 + $Skor17 + $Skor18 + $Skor19 + $Skor20; echo $total4;?>
    </div></td>
    <td colspan="5"><div align="center">
      <?php $total5 = $Skor21 + $Skor22 + $Skor23 + $Skor24 + $Skor25; echo $total5;?>
    </div></td>
    <td colspan="5"><div align="center">
      <?php $total6 = $Skor26 + $Skor27 + $Skor28 + $Skor29 + $Skor30; echo $total6;?>
    </div></td>
  </tr>
  <tr>
    <td>skor perminggu (maks. 150)</td>
    <td colspan="5"><div align="center">
      <?php $totalNilai = $total1 + $total2 + $total3 + $total4 + $total5 + $total6; echo $totalNilai?>
    </div></td>
    <td colspan="15"><div align="center">Kinerja Perminggu (%)</div></td>
    <td colspan="10"><div align="center">
      <?php $persentase = $totalNilai/150 * 100; echo $persentase;?>
    </div></td>
  </tr>
<?php 
	if ($persentase < 60) {
		$terbilang = "Sangat Kurang";	
	}else if ($persentase >= 60 and $persentase <= 69){
		$terbilang = "Kurang";	
	}else if ($persentase >= 70 and $persentase <= 79){
		$terbilang = "Sedang";	
	}else if ($persentase > 80 and $persentase <= 89){
		$terbilang = "Baik";	
	}else if ($persentase >= 90){
		$terbilang = "Sangat Baik";	
	}
?>
</table><table width="100%" border="0" style="margin-top:20px;">
  <tr>
    <td width="54%"><div align="left">Nilai akhir : <?php echo $persentase?> ( <?php echo $terbilang?> )</div></td>
    <td width="1%">&nbsp;</td>
    <td width="45%"><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">Pejabat Penilai</div></td>
  </tr>
  <tr>
    <td height="25"><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 $NamaPejabatPenilai?></u></strong></div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td><div align="center">NIK/NIP. <?php echo $NIPPejabatPenilai?></div></td>
  </tr>
</table>

<p></p>
<p></p>
</body>
</html>