<div style="padding:5px;min-width:800px;">
<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:800px;">
	<tbody>
		<tr>
			<td align="center" colspan="93" style="text-align: center;border:0px;border-top:0;font-size:14px;border-right:0px;">REKAPITULASI UPAYA HUKUM <?php echo $upaya_hukum;?> PERKARA <?php echo $perkara_nama;?> </td>
		</tr>
		<tr>
			<td align="center" colspan="93" style="text-align: center;border:0px;font-size:14px;border-right:0px;"><?php echo $nama_pn;?></td>
		</tr>
		<tr>
			<td align="center" colspan="93" style="text-align: center;border:0px;font-size:14px;border-bottom:1px solid #000000;border-right:0px;">Januari - Desember <?php echo $tahun;?></td>
		</tr>
	</tbody>
	<tr>
		<th rowspan="2">NO</th>
		<th rowspan="2" style="border-right:0px;">URAIAN</th>
		<th colspan="12" style="border-left:1px solid #000000;">BULAN</th>
		<th rowspan="2" style="border-left:1px solid #000000;">TOTAL</th>
	</tr>
	<tr>
		<th>Januari</th>
		<th>Februari</th>
		<th>Maret</th>
		<th>April</th>
		<th>Mei</th>
		<th>Juni</th>
		<th>Juli</th>
		<th>Agustus</th>
		<th>September</th>
		<th>Oktober</th>
		<th>Nopember</th>
		<th>Desember</th>
	</tr>
	<?php 
	if($rekap!=''){
		if($rekap->num_rows>0){
			$i = 1;
			foreach ($rekap->result() as $row) {
				echo "<tr>";
					echo "<td style='text-align:center;'>".$i."</td>";
					echo "<td>".$row->nama."</td>";
					echo "<td style='text-align:center;'>".$row->bl01."</td>";
					echo "<td style='text-align:center;'>".$row->bl02."</td>";
					echo "<td style='text-align:center;'>".$row->bl03."</td>";
					echo "<td style='text-align:center;'>".$row->bl04."</td>";
					echo "<td style='text-align:center;'>".$row->bl05."</td>";
					echo "<td style='text-align:center;'>".$row->bl06."</td>";
					echo "<td style='text-align:center;'>".$row->bl07."</td>";
					echo "<td style='text-align:center;'>".$row->bl08."</td>";
					echo "<td style='text-align:center;'>".$row->bl09."</td>";
					echo "<td style='text-align:center;'>".$row->bl10."</td>";
					echo "<td style='text-align:center;'>".$row->bl11."</td>";
					echo "<td style='text-align:center;'>".$row->bl12."</td>";
					echo "<td style='text-align:center;'>".$row->total."</td>";
				echo "</tr>";
				$i++;
			}
		}
	}
	?>
</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>