</style>
<div style="padding:5px;min-width:1700px">
<div style="padding:20px;"></div>
<button class="btn btnExcel" style="width:150px;text-align:center;">Export Excel</button></div>
<table id="view_laporan" border="0" class="cetakExcel" cellpadding="2" cellspacing="0" style="margin:10px;">
	<tbody>
		<tr>
			<td align="center" colspan="11" style="text-align: center;border:0px;border-top:0;font-size:14px;border-right:0px;"><?php echo $perkara_nama;?></td>
		</tr>
		<tr>
			<td align="center" colspan="11" style="text-align: center;border:0px;font-size:14px;border-right:0px;"><?php echo $nama_pn;?></td>
		</tr>
		<tr>
			<td align="center" colspan="11" style="text-align: center;border:0px;font-size:14px;border-bottom:1px solid #000000;border-right:0px;">Bulan <?php echo fetch_montd($bulan);?> <?php echo $tahun;?></td>
		</tr>
	</tbody>
  <tr height="20">
    <th rowspan="3" >No</th>
    <th rowspan="3" >Sisa Mediasi Bulan Lalu</th>
    <th rowspan="3" >Perkara Mediasi</th>
    <th rowspan="3" >Jumlah Perkara yang Dimediasi<br>(2 + 3)</th>
    <th colspan="6" >Penyelesaian Mediasi</th>
    <th rowspan="3" >Mediasi Berjalan<br>(4-(8+9+10))</th>

  </tr>
  <tr height="20">
    <th colspan="4" >Berhasil</th>
    <th rowspan="2" >Tidak Berhasil</th>
    <th rowspan="2" >Tidak Dapat Dilaksanakan</th>
  </tr>
  <tr height="20">
    <th >Akta Perdamaian / Putusan</th>
    <th >Berhasil Sebagian</th>
    <th >Penetapan Pencabutan</th>
    <th >Jumlah <br>(5 + 6 + 7)</th>
  </tr>
    <tr>
    <?php for ($a=1; $a<=11;$a++){
        echo "<th style='width:20px;'>".$a."</th>";
          }
    ?>
    </tr>

	<?php
	if($laporan!=''){
		if($laporan->num_rows>0){
			$i=0;
			$jml_mediasi=0;
			$jml_berhasil_akta=0;
			$jml_berhasil_sebagian=0;
			$jml_berhasil_cabut=0;
			$jml_tdk_berhasil=0;
			$jml_tdk_laksana=0;
			for ($i=1; $i <= $laporan->num_rows(); $i++) { 
  				echo '<tr>';
  				echo '<td style="text-align:center">'.$i.'</td>';
  				for ($j=0; $j <= 9; $j++) {
  					echo '<td style="text-align:center">'.$this->templatehelper->isnull(array_values($laporan->row_array($i-1))[$j]).'</td>';
  				}  				
  				echo '</tr>';
  			}
		}
	}
	?>
	<tr height="20">
		<td colspan="11" style="border:none;"> </td>
	</tr>
	<tr height="20">
		<td colspan="5" style="border:none;text-align:center;"><br>Mengetahui<br>Ketua <?php echo ucwords(strtolower($nama_pn));?></td>
		<td colspan="2" style="border:none;"></td>
		<td colspan="4" style="border:none;text-align:center;"><?php echo str_replace('Pengadilan Negeri ', '', str_replace('Pengadilan Agama ', '', str_replace("Mahkamah Syar'iyah ", '', ucwords(strtolower($nama_pn))))).', '.$this->templatehelper->convertKeTglIndo(date("Y/m/d"));?><br><br>Panitera</td>
	</tr>
	<tr height="60">
		<td colspan="11" style="border:none;"> </td>
	</tr>
	<tr height="20">
		<td colspan="5" style="border:none;text-align:center;"><?php echo '<u>'.$nama_ketua.'</u><br>NIP.'.$nip_ketua;?></td>
		<td colspan="2" style="border:none;"></td>
		<td colspan="4" style="border:none;text-align:center;"><?php echo '<u>'.$nama_pan.'</u><br>NIP.'.$nip_pan;?></td>
	</tr>
</table>
</div>
<div style="padding:15px;"></div>
<script src="resources/js/jquery.table2excel.js"></script>
<script>
$(function() {
	$(".btnExcel").click(function(){
		$(".cetakExcel").table2excel({
			exclude: ".noExl",
			name: "Excel Document Name",
			filename: "Cetak Excel"
		});
	});
});
</script>