<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!--		
		<title><?php echo SITE_NAME;?></title>
		<link rel="shortcut icon" href="<?php echo base_url('assets/uploads/'.FAVICON);?>">
		
		<!-- Tell the browser to be responsive to screen width -->
		<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
		<!-- Bootstrap 3.3.5 -->
		<link rel="stylesheet" href="<?php echo ASSETS_URL;?>bootstrap/css/bootstrap.min.css">
		<link rel="stylesheet" href="<?php echo ASSETS_URL;?>font-awesome/font-awesome.min.css">
		<link rel="stylesheet" href="<?php echo ASSETS_URL;?>AdminLTE/css/AdminLTE.min.css">
		<!-- Font Awesome -->
	</head>
	<style type="text/css">
		body { margin: 0px; }
		@media print {
		    @page {
				size:8.5in 11in; margin: 1cm
		    }
		    .wrapper {padding: 0 10px;font-size :12px;}
		    a { color:#0096FF !important;}
		    a:after{content: none !important;font-size:0.8em;font-weight:normal;}
			.table th, .table td {
			    border-top: 1px solid #dddddd;
			    line-height: 15px;
			    padding: 2px;
			    vertical-align: top;
			}
			.table th {  font-weight: bold;}
			.table-condensed th, .table-condensed td {  padding: 2px 3px; }
			.table-bordered th, .table-bordered td {   border-left: 1px solid #dddddd;	}
		}
		.table th, .table td {
		    border-top: 1px solid #dddddd;
		    line-height: 15px;
		    padding: 2px;
		    vertical-align: top;
		}
		.table th {  font-weight: bold;}
		.table-condensed th, .table-condensed td {  padding: 2px 3px; }
		.table-bordered th, .table-bordered td {   border-left: 1px solid #dddddd;	}
		body, address { font-size :12px;}
		.center { text-align:center;}
		.right { text-align:right;}
	</style>
<body>
<?php
//print_r($sql['detail']);
?>
<div class="wrapper">
<?php if($view == 'print') { ?>	
<div class="row no-print" style="margin:0px 10px;">
	<div class="col-sm-12" align="center"><button class="btn btn-sm btn-info" onClick="window.print();"><i class="fa fa-print"></i> Print</button></div>
</div>	
<?php } ?>

	<section class="content">
		<div class="row" align="center">
			<div id="logo" class="col-md-12" align="center">
				<img width="100%" height="100" data-retina="true" alt="Logo" src="<?php echo ASSETS_URL;?>images/header_mpp.png">
			</div>
			<br/>
		</div> <!-- end row -->
		
		<div class="clearfix"></div>
<?php
if($sql['f_gender'] == 'M' || $sql['f_gender'] == 'L' ) $gender = "Bapak";
else $gender = "Ibu";
// proses data untuk Tingkat Pensiun
$total_max = 40;
$data = unserialize($sql['f_survey']);
//echo "<pre>";echo print_r($data['subkategori'])."</pre><br/>";
$h=0;$j=0; $modus = array(); $tipep = array();
foreach($subkategori[1] as $b => $c)
{
	$d = $data['subkategori'][$b];
	foreach($data['subkategori'][$b] as $e => $f)
	{
		if($e == 6 && $f['urut'] == $d[1]['urut'] || $e == 7 && $f['urut'] == $d[2]['urut'] || $e == 8 && $f['urut'] == $d[3]['urut'] || $e == 9 && $f['urut'] == $d[4]['urut'] || $e == 10 && $f['urut'] == $d[5]['urut'])
		{
			$hasil_akhir = 0;
		}
		else
		{
			$hasil_akhir = $f['jawab'];
		}
		
		$tipep[$hasil_akhir][$c['desc']];
		$modus[$h] = $hasil_akhir;
		$j += $hasil_akhir;
		$h++;
	}
}
$values = array_count_values($modus);
//asort($values);
//echo "<pre>";echo print_r($values)."</pre><br/>";
$hmodus = array_search(max($values), $values); 

$explode1 = explode(',',$tipep[$hmodus]);
echo "<td>".count($explode).$tipep[$hmodus]."</td>";

echo "<pre>";echo print_r($tipep)."</pre><br/>";

$hasil_pensiun ='';
for($i=0;$i< (count($explode1)-2);$i++) {
	$hasil_pensiun .=  $explode1[$i].',';
}

echo trim($hasil_pensiun,',')." dan ".$explode1[count($explode1)-2];
$tipe_pensiun = array(
	1 => 'Kurang Baik',
	2 => 'Cukup Baik',
	3 => 'Baik',
	4 => 'Baik Sekali',
);

$tes = "Hilang Keuangan,Hilang Rekan,Hilang Rekan,Hilang Rekan";
//echo substr_replace($tes,
$persen1 = ($j*100)/$total_max;
?>		
		<div class="clearfix"></div>
		<div class="row">
			<div style="margin-left:33%;width:90%;float:left;font-size:14px;font-weight:25;line-height:0.55;margin-top:10px !important;margin-bottom:10px !important;display:table;">
				<div class="form-group">
					<label style="width:25%;float:left;">NAMA LENGKAP</label>
					<div style="width:8%;float:left;">:</div>
					<div style="width:45%;float:left;"><?php echo $sql['f_name'];?></div>
				</div>
				<br/>
				<div class="form-group">
					<label style="width:25%;float:left;">USIA</label>
					<div style="width:8%;float:left;">:</div>
					<div style="width:45%;float:left;"><?php echo umur($sql['f_age']);?> Tahun</div>
				</div>
				<br/>
				<div class="form-group">
					<label style="width:25%;float:left;">PERUSAHAAN</label>
					<div style="width:8%;float:left;">:</div>
					<div style="width:45%;float:left;"><?php echo $sql['f_customer_name'];?> Tahun</div>
				</div>
				<br/>
				<div class="form-group">
					<label style="width:25%;float:left;">JABATAN</label>
					<div style="width:8%;float:left;">:</div>
					<div style="width:45%;float:left;"><?php echo $sql['f_jabatan'];?></div>
				</div>
				<br/>
				<div class="form-group">
					<label style="width:25%;float:left;">Pengambilan TEST</label>
					<div style="width:8%;float:left;">:</div>
					<div style="width:45%;float:left;"><?php echo tgl_indo2($sql['f_date']);?></div>
				</div>
			</div>
		</div> <!-- end row -->

		<div class="clearfix"></div>
		<div class="row">
			<table class="table table-bordered"  border="1" style="margin-left:2%;width:96%;">
				<tr style="background-color:#001f5f !important;color:#fff !important;font-size: 12pt;">
					<th colspan="2" style="background-color:#001f5f !important;color:#fff !important;">Kemampuan Subyek dalam Melakukan Perencanaan seputar Masa Pensiun</th>
					<th style="text-align:center;background-color:#001f5f !important;color:#fff !important;">4</th>
					<th style="text-align:center;background-color:#001f5f !important;color:#fff !important;">3</th>
					<th style="text-align:center;background-color:#001f5f !important;color:#fff !important;">2</th>
					<th style="text-align:center;background-color:#001f5f !important;color:#fff !important;">1</th>
				</tr>
				<!-- No 1 dan 6-->
				<tr>
					<td rowspan="2" style="text-align:center;vertical-align: middle;font-size: 12pt;background-color:#ddebf7 !important;">KA</td>
					<td>Kemampuan Perencanaan Aktivitas Positif setelah Pensiun</td>
					<td style="background-color:#ddebf7 !important;text-align:center;">
						<?php
						$no1 = $data['subkategori'][1][1]['jawab'];
						if($no1 == 4) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>
					</td>
					<td style="background-color:#e1eeda !important;text-align:center;">
						<?php
						if($no1 == 3) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fff1cc !important;text-align:center;">
						<?php
						if($no1 == 2) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fbe3d5 !important;text-align:center;">
						<?php
						if($no1 == 1) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
				</tr>
				<tr>
					<td>Kemampuan menghindari Aktivitas Negatif mengenai Pensiun</td>
					<td style="background-color:#ddebf7 !important;text-align:center;">
						<?php
						if($data['subkategori'][1][1]['urut'] == $data['subkategori'][1][6]['urut'])
						{
							$no6 = 0;
						}
						else
						{
							$no6 = $data['subkategori'][1][6]['jawab'];
						}
						
						if($no6 == 4) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>
					</td>
					<td style="background-color:#e1eeda !important;text-align:center;">
						<?php
						if($no6 == 3) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fff1cc !important;text-align:center;">
						<?php
						if($no6 == 2) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fbe3d5 !important;text-align:center;">
						<?php
						if($no6 == 1) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
				</tr>
				<!-- No 2 dan 7-->
				<tr>
					<td rowspan="2" style="text-align:center;vertical-align: middle;font-size: 12pt;background-color:#ddebf7 !important;">KU</td>
					<td>Kemampuan melakukan Perencanaan Wirausaha setelah Pensiun</td>
					<td style="background-color:#ddebf7 !important;text-align:center;">
						<?php
						$no2 = $data['subkategori'][2][2]['jawab'];
						if($no2 == 4) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>
					</td>
					<td style="background-color:#e1eeda !important;text-align:center;">
						<?php
						if($no2 == 3) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fff1cc !important;text-align:center;">
						<?php
						if($no2 == 2) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fbe3d5 !important;text-align:center;">
						<?php
						if($no2 == 1) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
				</tr>
				<tr>
					<td>Kemampuan Menghindari Aktivitas Wirausaha Negatif mengenai Pensiun</td>
					<td style="background-color:#ddebf7 !important;text-align:center;">
						<?php
						if($data['subkategori'][2][2]['urut'] == $data['subkategori'][2][7]['urut'])
						{
							$no7 = 0;
						}
						else
						{
							$no7 = $data['subkategori'][2][7]['jawab'];
						}
						if($no7 == 4) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>
					</td>
					<td style="background-color:#e1eeda !important;text-align:center;">
						<?php
						if($no7 == 3) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fff1cc !important;text-align:center;">
						<?php
						if($no7 == 2) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fbe3d5 !important;text-align:center;">
						<?php
						if($no7 == 1) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
				</tr>
				<!-- No 3 dan 8-->
				<tr>
					<td rowspan="2" style="text-align:center;vertical-align: middle;font-size: 12pt;background-color:#ddebf7 !important;">KR</td>
					<td>Kemampuan melakukan Perencanaan Pengelolaan Relasi Sosial setelah Pensiun</td>
					<td style="background-color:#ddebf7 !important;text-align:center;">
						<?php
						$no3 = $data['subkategori'][3][3]['jawab'];
						if($no3 == 4) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>
					</td>
					<td style="background-color:#e1eeda !important;text-align:center;">
						<?php
						if($no3 == 3) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fff1cc !important;text-align:center;">
						<?php
						if($no3 == 2) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fbe3d5 !important;text-align:center;">
						<?php
						if($no3 == 1) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
				</tr>
				<tr>
					<td>Kemampuan menghindari Pengelolaan Relasi Sosial Negatif setelah Pensiun</td>
					<td style="background-color:#ddebf7 !important;text-align:center;">
						<?php
						if($data['subkategori'][3][3]['urut'] == $data['subkategori'][3][8]['urut'])
						{
							$no8 = 0;
						}
						else
						{
							$no8 = $data['subkategori'][3][8]['jawab'];
						}
						if($no8 == 4) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>
					</td>
					<td style="background-color:#e1eeda !important;text-align:center;">
						<?php
						if($no8 == 3) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fff1cc !important;text-align:center;">
						<?php
						if($no8 == 2) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fbe3d5 !important;text-align:center;">
						<?php
						if($no8 == 1) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
				</tr>
				<!-- No 4 dan 9-->
				<tr>
					<td rowspan="2" style="text-align:center;vertical-align: middle;font-size: 12pt;background-color:#ddebf7 !important;">KS</td>
					<td>Kemampuan  melakukan Perencanaan Manajemen Kesehatan setelah Pensiun</td>
					<td style="background-color:#ddebf7 !important;text-align:center;">
						<?php
						$no4 = $data['subkategori'][4][4]['jawab'];
						if($no4 == 4) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>
					</td>
					<td style="background-color:#e1eeda !important;text-align:center;">
						<?php
						if($no4 == 3) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fff1cc !important;text-align:center;">
						<?php
						if($no4 == 2) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fbe3d5 !important;text-align:center;">
						<?php
						if($no4 == 1) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
				</tr>
				<tr>
					<td>Kemampuan menghindari Pengelolaan Manajemen Kesehatan negatif setelah Pensiun</td>
					<td style="background-color:#ddebf7 !important;text-align:center;">
						<?php
						if($data['subkategori'][4][4]['urut'] == $data['subkategori'][4][9]['urut'])
						{
							$no9 = 0;
						}
						else
						{
							$no9 = $data['subkategori'][4][9]['jawab'];
						}
						if($no9 == 4) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>
					</td>
					<td style="background-color:#e1eeda !important;text-align:center;">
						<?php
						if($no9 == 3) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fff1cc !important;text-align:center;">
						<?php
						if($no9 == 2) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fbe3d5 !important;text-align:center;">
						<?php
						if($no9 == 1) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
				</tr>
				<!-- No 5 dan 10-->
				<tr>
					<td rowspan="2" style="text-align:center;vertical-align: middle;font-size: 12pt;background-color:#ddebf7 !important;">KP</td>
					<td>Kemampuan melakukan Perencanaan Kesejahteraan Psikologis Diri setelah Pensiun</td>
					<td style="background-color:#ddebf7 !important;text-align:center;">
						<?php
						$no5 = $data['subkategori'][5][5]['jawab'];
						if($no5 == 4) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>
					</td>
					<td style="background-color:#e1eeda !important;text-align:center;">
						<?php
						if($no5 == 3) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fff1cc !important;text-align:center;">
						<?php
						if($no5 == 2) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fbe3d5 !important;text-align:center;">
						<?php
						if($no5 == 1) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
				</tr>
				<tr>
					<td>Kemampuan menghindari Kesejahteraan Psikologis Diri negatif setelah Pensiun</td>
					<td style="background-color:#ddebf7 !important;text-align:center;">
						<?php
						if($data['subkategori'][5][5]['urut'] == $data['subkategori'][5][10]['urut'])
						{
							$no10 = 0;
						}
						else
						{
							$no10 = $data['subkategori'][5][10]['jawab'];
						}
						if($no10 == 4) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>
					</td>
					<td style="background-color:#e1eeda !important;text-align:center;">
						<?php
						if($no10 == 3) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fff1cc !important;text-align:center;">
						<?php
						if($no10 == 2) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fbe3d5 !important;text-align:center;">
						<?php
						if($no10 == 1) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
				</tr>
			</table>
		</div><!-- end row -->
		<div class="clearfix"></div>
		
		<div class="row">
			<table class="table table-bordered" style="margin-left:10%;width:80%;" border="1">
				<tr style="background-color:#001f5f !important;color:#fff !important;font-size: 12pt;">
					<th colspan="2" style="background-color:#001f5f !important;color:#fff !important;">Kriteria Penilaian</th>
					<th style="text-align:center;background-color:#001f5f !important;color:#fff !important;">Penjelasan</th>
				</tr>
				<tr>
					<td style="text-align:center;vertical-align: middle;font-size: 12pt;background-color:#ddebf7 !important;">4</td>
					<td style="vertical-align: middle;width:30%;font-size: 11pt">Baik Sekali</td>
					<td>Subyek sudah cukup mampu melakukan perencanaan masa pensiun dengan baik</td>
				</tr>
				<tr>
					<td style="text-align:center;vertical-align: middle;font-size: 12pt;background-color:#ddebf7 !important;">3</td>
					<td style="vertical-align: middle;width:30%;font-size: 11pt">Baik</td>
					<td>Subyek mampu melakukan perencanaan masa pensiun dengan baik, tapi masih membutuhkan bimbingan</td>
				</tr>
				<tr>
					<td style="text-align:center;vertical-align: middle;font-size: 12pt;background-color:#ddebf7 !important;">2</td>
					<td style="vertical-align: middle;width:30%;font-size: 11pt">Cukup Baik</td>
					<td>Subyek cukup mampu melakukan perencanaan masa pensiun, tapi masih membutuhkan bimbingan</td>
				</tr>
				<tr>
					<td style="text-align:center;vertical-align: middle;font-size: 12pt;background-color:#ddebf7 !important;">1</td>
					<td style="vertical-align: middle;width:30%;font-size: 11pt">Kurang Baik</td>
					<td>Subyek belum mampu melakukan perencanaan masa pensiun dan masih membutuhkan bimbingan</td>
				</tr>
			</table>				
		</div><!-- end row -->
		
		<div class="clearfix"></div>
		
		<div class="row">
			<div style="margin-left:10%;width:80%;text-align: justify;">
				<center style="font-size:15px;"><b>Kesimpulan :</b></center>
				<p style="font-size:15px;font-weight:150;line-height:1.1;margin-bottom:15px !important;">
					<?php echo $gender." ".$sql['f_name'];?> secara umum sudah mampu melakukan berbagai hal seputar Perencanaan Masa Pensiunnya dengan <b><?php echo $tipe_pensiun[$hmodus];?></b>.
				</p>	
			</div>
		</div> <!-- end row -->


<?php
// proses data untuk Tingkat Kecemasan
$h=0;$j=0; $modus = array();
foreach($subkategori[2] as $b => $c)
{
	$d = $data['subkategori'][$b];
	foreach($data['subkategori'][$b] as $e => $f)
	{
		if($e == 16 && $f['urut'] == $d[11]['urut'] || $e == 17 && $f['urut'] == $d[12]['urut'] || $e == 18 && $f['urut'] == $d[13]['urut'] || $e == 19 && $f['urut'] == $d[14]['urut'] || $e == 20 && $f['urut'] == $d[15]['urut'])
		{
			$hasil_akhir = 0;
		}
		else
		{
			$hasil_akhir = $f['jawab'];
		}
		
		$cemas[$hasil_akhir] .= $c['desc'].',';
		$modus[$h] = $hasil_akhir;
		$j += $hasil_akhir;
		$h++;
	}
}
$values = array_count_values($modus);
ksort($values);
$hmodus = array_search(min($values), $values); 
$explode2 = explode(',',$cemas[$hmodus]);
//echo "<td>".count($explode).$cemas[$hmodus]."</td>";

$hasil_cemas ='';
for($i=0;$i< (count($explode2)-2);$i++) {
	$hasil_cemas .=  $explode2[$i].',';
}

//echo trim($hasil_cemas,',')." dan ".$explode[count($explode)-2];
//echo "<pre>";echo print_r($cemas)."</pre><br/>";
?>
		<div class="clearfix"></div>
		<div class="row" align="center">
			<div id="logo" class="col-md-12" align="center">
				<img width="100%" height="100" data-retina="true" alt="Logo" src="<?php echo ASSETS_URL;?>images/header_mpp.png">
			</div>
			<br/>
		</div> <!-- end row -->
		
		<div class="clearfix"></div>
		<div class="row">
			<div style="margin-left:33%;width:90%;float:left;font-size:14px;font-weight:25;line-height:0.55;margin-top:10px !important;margin-bottom:10px !important;display:table;">
				<div class="form-group">
					<label style="width:25%;float:left;">NAMA LENGKAP</label>
					<div style="width:8%;float:left;">:</div>
					<div style="width:45%;float:left;"><?php echo $sql['f_name'];?></div>
				</div>
				<br/>
				<div class="form-group">
					<label style="width:25%;float:left;">USIA</label>
					<div style="width:8%;float:left;">:</div>
					<div style="width:45%;float:left;"><?php echo umur($sql['f_age']);?> Tahun</div>
				</div>
				<br/>
				<div class="form-group">
					<label style="width:25%;float:left;">PERUSAHAAN</label>
					<div style="width:8%;float:left;">:</div>
					<div style="width:45%;float:left;"><?php echo $sql['f_customer_name'];?> Tahun</div>
				</div>
				<br/>
				<div class="form-group">
					<label style="width:25%;float:left;">JABATAN</label>
					<div style="width:8%;float:left;">:</div>
					<div style="width:45%;float:left;"><?php echo $sql['f_jabatan'];?></div>
				</div>
				<br/>
				<div class="form-group">
					<label style="width:25%;float:left;">Pengambilan TEST</label>
					<div style="width:8%;float:left;">:</div>
					<div style="width:45%;float:left;"><?php echo tgl_indo2($sql['f_date']);?></div>
				</div>
			</div>
		</div> <!-- end row -->
		
		<!-- Mengelola Kecemasan -->
		<div class="clearfix"></div>
		<div class="row">
			<table class="table table-bordered"  border="1" style="margin-left:2%;width:96%;">
				<tr style="background-color:#001f5f !important;color:#fff !important;font-size: 12pt;">
					<th colspan="2" style="background-color:#001f5f !important;color:#fff !important;">Kemampuan Subyek dalam Mengelola Kecemasan dalam menghadapi Masa Pensiun</th>
					<th style="text-align:center;background-color:#001f5f !important;color:#fff !important;">4</th>
					<th style="text-align:center;background-color:#001f5f !important;color:#fff !important;">3</th>
					<th style="text-align:center;background-color:#001f5f !important;color:#fff !important;">2</th>
					<th style="text-align:center;background-color:#001f5f !important;color:#fff !important;">1</th>
				</tr>
				<!-- No 11 dan 16 -->
				<tr>
					<td rowspan="2" style="text-align:center;vertical-align: middle;font-size: 12pt;background-color:#ddebf7 !important;">CA</td>
					<td>Kemampuan Mengelola Kecemasan seputar berkurangnya Aktivitas setelah Pensiun</td>
					<td style="background-color:#ddebf7 !important;text-align:center;">
						<?php
						$no11 = $data['subkategori'][6][11]['jawab'];
						if($no11 == 4) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>
					</td>
					<td style="background-color:#e1eeda !important;text-align:center;">
						<?php
						if($no11 == 3) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fff1cc !important;text-align:center;">
						<?php
						if($no11 == 2) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fbe3d5 !important;text-align:center;">
						<?php
						if($no11 == 1) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
				</tr>
				<tr>
					<td>Kemampuan menghindari aktivitas yang mendatangkan kecemasan setelah pensiun</td>
					<td style="background-color:#ddebf7 !important;text-align:center;">
						<?php
						if($data['subkategori'][6][11]['urut'] == $data['subkategori'][6][16]['urut'])
						{
							$no16 = 0;
						}
						else
						{
							$no16 = $data['subkategori'][6][16]['jawab'];
						}
						
						if($no16 == 4) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>
					</td>
					<td style="background-color:#e1eeda !important;text-align:center;">
						<?php
						if($no16 == 3) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fff1cc !important;text-align:center;">
						<?php
						if($no16 == 2) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fbe3d5 !important;text-align:center;">
						<?php
						if($no16 == 1) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
				</tr>
				<!-- No 12 dan 17-->
				<tr>
					<td rowspan="2" style="text-align:center;vertical-align: middle;font-size: 12pt;background-color:#ddebf7 !important;">CU</td>
					<td>Kemampuan Mengelola Kecemasan seputar berkurangnya Keuangan setelah Pensiun</td>
					<td style="background-color:#ddebf7 !important;text-align:center;">
						<?php
						$no12 = $data['subkategori'][7][12]['jawab'];
						if($no12 == 4) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>
					</td>
					<td style="background-color:#e1eeda !important;text-align:center;">
						<?php
						if($no12 == 3) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fff1cc !important;text-align:center;">
						<?php
						if($no12 == 2) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fbe3d5 !important;text-align:center;">
						<?php
						if($no12 == 1) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
				</tr>
				<tr>
					<td>Kemampuan menghindari keuangan negatif yang mendatangkan kecemasan pensiun</td>
					<td style="background-color:#ddebf7 !important;text-align:center;">
						<?php
						if($data['subkategori'][7][12]['urut'] == $data['subkategori'][7][17]['urut'])
						{
							$no17 = 0;
						}
						else
						{
							$no17 = $data['subkategori'][7][17]['jawab'];
						}
						if($no17 == 4) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>
					</td>
					<td style="background-color:#e1eeda !important;text-align:center;">
						<?php
						if($no17 == 3) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fff1cc !important;text-align:center;">
						<?php
						if($no17 == 2) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fbe3d5 !important;text-align:center;">
						<?php
						if($no17 == 1) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
				</tr>
				<!-- No 13 dan 18-->
				<tr>
					<td rowspan="2" style="text-align:center;vertical-align: middle;font-size: 12pt;background-color:#ddebf7 !important;">CR</td>
					<td>Kemampuan Mengelola Kecemasan seputar Relasi Sosial setelah Pensiun</td>
					<td style="background-color:#ddebf7 !important;text-align:center;">
						<?php
						$no13 = $data['subkategori'][8][13]['jawab'];
						if($no13 == 4) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>
					</td>
					<td style="background-color:#e1eeda !important;text-align:center;">
						<?php
						if($no13 == 3) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fff1cc !important;text-align:center;">
						<?php
						if($no13 == 2) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fbe3d5 !important;text-align:center;">
						<?php
						if($no13 == 1) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
				</tr>
				<tr>
					<td>Kemampuan menghindari Relasi Sosial negatif yang mendatangkan kecemasan</td>
					<td style="background-color:#ddebf7 !important;text-align:center;">
						<?php
						if($data['subkategori'][8][13]['urut'] == $data['subkategori'][8][18]['urut'])
						{
							$no18 = 0;
						}
						else
						{
							$no18 = $data['subkategori'][8][18]['jawab'];
						}
						if($no18 == 4) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>
					</td>
					<td style="background-color:#e1eeda !important;text-align:center;">
						<?php
						if($no18 == 3) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fff1cc !important;text-align:center;">
						<?php
						if($no18 == 2) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fbe3d5 !important;text-align:center;">
						<?php
						if($no18 == 1) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
				</tr>
				<!-- No 14 dan 19-->
				<tr>
					<td rowspan="2" style="text-align:center;vertical-align: middle;font-size: 12pt;background-color:#ddebf7 !important;">CS</td>
					<td>Kemampuan Mengelola Kecemasan seputar Kesehatan setelah Pensiun</td>
					<td style="background-color:#ddebf7 !important;text-align:center;">
						<?php
						$no14 = $data['subkategori'][9][14]['jawab'];
						if($no14 == 4) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>
					</td>
					<td style="background-color:#e1eeda !important;text-align:center;">
						<?php
						if($no14 == 3) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fff1cc !important;text-align:center;">
						<?php
						if($no14 == 2) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fbe3d5 !important;text-align:center;">
						<?php
						if($no14 == 1) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
				</tr>
				<tr>
					<td>Kemampuan menghindari kebiasaan Tidak Sehat yang mendatangkan kecemasan</td>
					<td style="background-color:#ddebf7 !important;text-align:center;">
						<?php
						if($data['subkategori'][9][14]['urut'] == $data['subkategori'][9][19]['urut'])
						{
							$no19 = 0;
						}
						else
						{
							$no19 = $data['subkategori'][9][19]['jawab'];
						}
						if($no19 == 4) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>
					</td>
					<td style="background-color:#e1eeda !important;text-align:center;">
						<?php
						if($no19 == 3) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fff1cc !important;text-align:center;">
						<?php
						if($no19 == 2) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fbe3d5 !important;text-align:center;">
						<?php
						if($no19 == 1) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
				</tr>
				<!-- No 15 dan 20-->
				<tr>
					<td rowspan="2" style="text-align:center;vertical-align: middle;font-size: 12pt;background-color:#ddebf7 !important;">CP</td>
					<td>Kemampuan Mengelola Kecemasan seputar Kesejahteraan Psikologis Diri setelah Pensiun</td>
					<td style="background-color:#ddebf7 !important;text-align:center;">
						<?php
						$no15 = $data['subkategori'][10][15]['jawab'];
						if($no15 == 4) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>
					</td>
					<td style="background-color:#e1eeda !important;text-align:center;">
						<?php
						if($no15 == 3) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fff1cc !important;text-align:center;">
						<?php
						if($no15 == 2) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fbe3d5 !important;text-align:center;">
						<?php
						if($no15 == 1) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
				</tr>
				<tr>
					<td>Kemampuan menghindari kebiasaaan Psikologis negatif yang mendatangkan kecemasan</td>
					<td style="background-color:#ddebf7 !important;text-align:center;">
						<?php
						if($data['subkategori'][10][15]['urut'] == $data['subkategori'][10][20]['urut'])
						{
							$no20 = 0;
						}
						else
						{
							$no20 = $data['subkategori'][10][20]['jawab'];
						}
						if($no20 == 4) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>
					</td>
					<td style="background-color:#e1eeda !important;text-align:center;">
						<?php
						if($no20 == 3) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fff1cc !important;text-align:center;">
						<?php
						if($no20 == 2) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
					<td style="background-color:#fbe3d5 !important;text-align:center;">
						<?php
						if($no20 == 1) echo "<img src=\"".ASSETS_URL."/images/tick.png\" width=\"12px\">";
						?>						
					</td>
				</tr>
			</table>
		</div><!-- end row -->
		<div class="clearfix"></div>

		<!-- Kriteria Penilaian Kecemasan -->
		<div class="row">
			<table class="table table-bordered" style="margin-left:10%;width:80%;" border="1">
				<tr style="background-color:#001f5f !important;color:#fff !important;font-size: 12pt;">
					<th colspan="2" style="background-color:#001f5f !important;color:#fff !important;">Kriteria Penilaian</th>
					<th style="text-align:center;background-color:#001f5f !important;color:#fff !important;">Penjelasan</th>
				</tr>
				<tr>
					<td style="text-align:center;vertical-align: middle;font-size: 12pt;background-color:#ddebf7 !important;">4</td>
					<td style="vertical-align: middle;width:30%;font-size: 11pt">Cemas Ringan</td>
					<td>Subyek sudah memiliki Kecerdasan Spiritual dan Emosional karena hanya Cemas Ringan menjelang Pensiun</td>
				</tr>
				<tr>
					<td style="text-align:center;vertical-align: middle;font-size: 12pt;background-color:#ddebf7 !important;">3</td>
					<td style="vertical-align: middle;width:30%;font-size: 11pt">Cemas Sedang</td>
					<td>Subyek memerlukan kecerdasan spiritual dan emosional karena mengalami Cemas Sedang Menjelang Pensiun</td>
				</tr>
				<tr>
					<td style="text-align:center;vertical-align: middle;font-size: 12pt;background-color:#ddebf7 !important;">2</td>
					<td style="vertical-align: middle;width:30%;font-size: 11pt">Cemas Berat</td>
					<td>Subyek memerlukan kecerdasan spiritual dan emosional karena mengalami Cemas Berat Menjelang Pensiun</td>
				</tr>
				<tr>
					<td style="text-align:center;vertical-align: middle;font-size: 12pt;background-color:#ddebf7 !important;">1</td>
					<td style="vertical-align: middle;width:30%;font-size: 11pt">Panik</td>
					<td>Subyek memerlukan bimbingan spiritual dan emosional karena mengalami Panik Sedang Menjelang Pensiun</td>
				</tr>
			</table>				
		</div><!-- end row -->
		
		<div class="clearfix"></div>

		<div class="row">
			<div style="margin-left:10%;width:80%;text-align: justify;">
				<center style="font-size:15px;"><b>Kesimpulan :</b></center>
				<p style="font-size:15px;font-weight:150;line-height:1.1;margin-bottom:15px !important;">
					<?php echo $gender." ".$sql['f_name'];?> sudah memiliki kemampuan dalam hal mengelola kecemasan seputar <b><?php echo trim($hasil_cemas,',')." dan ".$explode2[count($explode2)-2];?></b>.
				</p>	
			</div>
		</div> <!-- end row -->

	</section>


</div> <!-- /.wrapper -->
<script src="<?php echo ASSETS_URL;?>plugins/jQuery/jQuery-2.1.4.min.js"></script>
<script src="<?php echo ASSETS_URL;?>bootstrap/js/bootstrap.min.js"></script>
</body>
</html>	
