<div style="padding:5px;min-width:1550px;">
<div style="padding:20px;"></div>
<button class="btn btnExcel" style="width:150px;text-align:center;">Export Excel</button></div>
<table id="view_laporan" class="cetakExcel" border="0" cellpadding="2" cellspacing="0" style="margin:10px;min-width:1500px;">
	<tbody>
		<tr>
			<td align="center" colspan="17" style="text-align: center;border:0px;border-top:0;font-size:14px;border-right:0px;">REKAPITULASI KLASIFIKASI PERKARA <?php echo $perkara_nama;?></td>
		</tr>
		<tr>
			<td align="center" colspan="17" style="text-align: center;border:0px;font-size:14px;border-right:0px;"><?php echo $nama_pn;?></td>
		</tr>
		<tr>
			<td align="center" colspan="17" 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>
		<th rowspan="3" colspan="1" >KODE</th>
		<th rowspan="3" colspan="1" >KLASIFIKASI</th>
		<th colspan="3" >SISA BULAN LALU</th>
		<th rowspan="3" colspan="1" >MASUK</th>
		<th rowspan="3" colspan="1" >JUMLAH BULAN INI</th>
		<th rowspan="3" colspan="1" >PUTUS BULAN INI</th>
		<th rowspan="3" colspan="1" >BELUM PEMBAGIAN MAJELIS</th>
		<th rowspan="3" colspan="1" >MEDIASI BERHASIL</th>
		<th rowspan="3" colspan="1" >MEDIASI GAGAL</th>
		<th rowspan="3" colspan="1" >GUGUR</th>
		<th rowspan="3" colspan="1" >CABUT</th>
		<th rowspan="3" colspan="1" >MINUTASI BULAN INI</th>
		<th rowspan="3" colspan="1" >JUMLAH PERKARA PER KLASIFIKASI</th>
	</tr>
	<tr>
		<th  rowspan="2" style="border-left:0px;">BELUM PUTUS</th>
		<th  colspan="2">BELUM MINUTASI</th>
	</tr>
	<tr>
		<th style="border-left:0px;">SUDAH PUTUS</th>
		<th >MEDIASI BERHASIL</th>
	</tr>
	<tr>
		<?php
		for ($i=1; $i<=15 ; $i++) { 
			echo "<td style='text-align:center;'>".$i."</td>";
		}
		?>
	</tr>
	<tr>
		<?php
		for ($i=1; $i<=15 ; $i++) { 
			echo "<td style='text-align:center;padding:10px;'></td>";
		}
		?>
	</tr>
	<?php
	if($laporan!=''){
		if($laporan->num_rows>0){
			$i=0;
			foreach ($laporan->result() as $row) {
				$i++;
				echo "<tr>";
					echo "<td style='width:20px;'>".$i."</td>";
					echo "<td>".$row->jenis_perkara_nama."</td>";
					echo "<td>".$row->sisa."</td>";
					echo "<td>".$row->putus_blm_minut."</td>";
					echo "<td>".$row->putus_blm_minut."</td>";
					echo "<td>".$row->masuk."</td>";
					echo "<td>".($row->masuk+$row->putus_blm_minut+$row->putus_blm_minut+$row->sisa)."</td>";
					echo "<td>".$row->putus."</td>";
					echo "<td>".$row->blm_majelis."</td>";
					echo "<td>".$row->mediasi_berhasil."</td>";
					echo "<td>".$row->mediasi_gagal."</td>";
					echo "<td>".$row->gugur."</td>";
					echo "<td>".$row->cabut."</td>";
					echo "<td>".$row->minut."</td>";
					echo "<td>".($row->masuk+$row->putus_blm_minut+$row->putus_blm_minut+$row->sisa)."</td>";
				echo "</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>