<style type="text/css">
#view_laporan .dodon tr td,  tr th {
	border: none;
}
</style>
<div style="padding:5px;min-width:1000px;">
<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:1000px;">
	<tbody>
		<tr><td align="center" colspan="17" style="text-align: center;border:0px;border-top:0;font-size:14px;border-right:0px;">LAPORAN PERKARA PUTUSAN KASASI</td></tr>
		<tr><td align="center" colspan="17" style="text-align: center;border:0px;border-top:0;font-size:14px;border-right:0px;">DITOLAK, DIKABULKAN, TIDAK DITERIMA (N.O) TAHUN <?php echo $tahun;?></td></tr>
		<tr><td align="center" colspan="17" style="text-align: center;border:0px;font-size:14px;border-right:0px;">PADA <?php echo $nama_pn;?></td></tr>
	</tbody>
	<tr>
		<th rowspan="2">NO</th>
		<th rowspan="2">NOMOR PERKARA</th>
		<th colspan="3">PUTUSAN</th>
		<th rowspan="2">KETERANGAN</th>
	</tr>
	<tr>
		<th>DITOLAK</th>
		<th>DIKABUL</th>
		<th>TIDAK DITERIMA (NO)</th>
	</tr>
	<tr>
		<?php
		for ($i=1; $i<=6 ; $i++) { 
			echo "<td><div align='center'>".$i."</div></td>";
		}
		?>
	</tr>
	<?php
	if($rekapPutusanKasasiTUN!=''){
		if($rekapPutusanKasasiTUN->num_rows>0){
			$jumlahbaris=$rekapPutusanKasasiTUN->num_rows;
			$i=0;
			foreach ($rekapPutusanKasasiTUN->result() as $row) { $i++;
			?>
				<tr>
					<td style="width:20px;"><?php echo $i; ?></td>
					<td style="width:100px;"><?php echo $row->nomor_perkara_pn; ?></td>
					<td style="width:80px;"><?php echo parse_date($row->putusanDitolak); ?></td>
					<td style="width:80px;"><?php echo parse_date($row->putusanDikabulkan); ?></td>
					<td style="width:80px;"><?php echo parse_date($row->putusanNO); ?></td>
					<?php if($i==1){ ?>
						<td rowspan="<?php echo $jumlahbaris; ?>" style='width:100px; vertical-align:top;'>
							<table class="dodon" width="100%">
								<tr>
									<td>Putusan:</td>
									<td><?php echo $row->jumlahPutusan; ?></td>
								<tr>
								<tr>
									<td>Ditolak:</td>
									<td><?php echo $row->jumlahDitolak; ?></td>
								<tr>
								<tr>
									<td>Dikabulkan:</td>
									<td><?php echo $row->jumlahDikabulkan; ?></td>
								<tr>
								<tr>
									<td>Tidak Diterima (NO):</td>
									<td><?php echo $row->jumlahNO; ?></td>
								<tr>
							</table>
						</td>
					<?php } ?>
			<?php
			}
		}
	}
	?>
	</tr>
	</tbody>
</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>