<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="93" style="text-align: center;border:0px;border-top:0;font-size:14px;border-right:0px;">REKAPITULASI PANITERA PENGGANTI <?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;">NAMA PANITERA</th>
		<th colspan="3" style="border-left:1px solid #000000;">Januari</th>
		<th colspan="3">Februari</th>
		<th colspan="3">Maret</th>
		<th colspan="3">April</th>
		<th colspan="3">Mei</th>
		<th colspan="3">Juni</th>
		<th colspan="3">Juli</th>
		<th colspan="3">Agustus</th>
		<th colspan="3">September</th>
		<th colspan="3">Oktober</th>
		<th colspan="3">November</th>
		<th colspan="3">Desember</th>
		<th colspan="4">Total</th>
	</tr>
	<tr>
		<?php
		for ($i=1; $i <=12 ; $i++) { 
			echo "<th>Sisa Belum Minutasi</th>";
			echo "<th>Putus</th>";
			echo "<th>Sudah Minutasi</th>";
		}
		?>
		<th>Sisa Awal</th>
		<th>Putus</th>
		<th>Sudah Minutasi</th>
		<th>Sisa Akhir</th>
	</tr>
	<tr>
	<?php
		for ($i=1; $i<=42 ; $i++) { 
			echo "<th style='width:20px;'>".$i."</th>";
		}
		?>
	</tr>
	<tr>
		<?php
		for ($i=1; $i<=42 ; $i++) { 
			echo "<td style='padding:10px;'></td>";
		}
		?>
	</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->panitera_nama."</td>";
					echo "<td style='text-align:center;'>".$row->BelumMinutasi01."</td>";
					echo "<td style='text-align:center;'>".$row->Putus01."</td>";
					echo "<td style='text-align:center;'>".$row->Minutasi01."</td>";

					echo "<td style='text-align:center;'>".$row->BelumMinutasi02."</td>";
					echo "<td style='text-align:center;'>".$row->Putus02."</td>";
					echo "<td style='text-align:center;'>".$row->Minutasi02."</td>";

					echo "<td style='text-align:center;'>".$row->BelumMinutasi03."</td>";
					echo "<td style='text-align:center;'>".$row->Putus03."</td>";
					echo "<td style='text-align:center;'>".$row->Minutasi03."</td>";

					echo "<td style='text-align:center;'>".$row->BelumMinutasi04."</td>";
					echo "<td style='text-align:center;'>".$row->Putus04."</td>";
					echo "<td style='text-align:center;'>".$row->Minutasi04."</td>";

					echo "<td style='text-align:center;'>".$row->BelumMinutasi05."</td>";
					echo "<td style='text-align:center;'>".$row->Putus05."</td>";
					echo "<td style='text-align:center;'>".$row->Minutasi05."</td>";

					echo "<td style='text-align:center;'>".$row->BelumMinutasi06."</td>";
					echo "<td style='text-align:center;'>".$row->Putus06."</td>";
					echo "<td style='text-align:center;'>".$row->Minutasi06."</td>";

					echo "<td style='text-align:center;'>".$row->BelumMinutasi07."</td>";
					echo "<td style='text-align:center;'>".$row->Putus07."</td>";
					echo "<td style='text-align:center;'>".$row->Minutasi07."</td>";

					echo "<td style='text-align:center;'>".$row->BelumMinutasi08."</td>";
					echo "<td style='text-align:center;'>".$row->Putus08."</td>";
					echo "<td style='text-align:center;'>".$row->Minutasi08."</td>";

					echo "<td style='text-align:center;'>".$row->BelumMinutasi09."</td>";
					echo "<td style='text-align:center;'>".$row->Putus09."</td>";
					echo "<td style='text-align:center;'>".$row->Minutasi09."</td>";

					echo "<td style='text-align:center;'>".$row->BelumMinutasi10."</td>";
					echo "<td style='text-align:center;'>".$row->Putus10."</td>";
					echo "<td style='text-align:center;'>".$row->Minutasi10."</td>";

					echo "<td style='text-align:center;'>".$row->BelumMinutasi11."</td>";
					echo "<td style='text-align:center;'>".$row->Putus11."</td>";
					echo "<td style='text-align:center;'>".$row->Minutasi11."</td>";

					echo "<td style='text-align:center;'>".$row->BelumMinutasi12."</td>";
					echo "<td style='text-align:center;'>".$row->Putus12."</td>";
					echo "<td style='text-align:center;'>".$row->Minutasi12."</td>";

					echo "<td style='text-align:center;'>".$row->BelumMinutasiTahunLalu."</td>";
					echo "<td style='text-align:center;'>".$row->PutusTahunIni."</td>";
					echo "<td style='text-align:center;'>".$row->MinutasiTahunIni."</td>";
					echo "<td style='text-align:center;'>".$SisaAkhir."</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>