<div style="padding:5px;min-width:1900px">
<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;">
	<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>
	  <col width="42">
	  <col width="152">
	  <col width="133">
	  <col width="99" span="2">
	  <col width="119">
	  <col width="99" span="2">
	  <col width="121">
	  <col width="109">
	  <col width="106">
		<th width="42" rowspan="2" align="center">NO</th>
	    <th width="285" colspan="2" align="center">Nomor Perkara </th>
	    <th width="745" colspan="7" align="center">Tanggal</th>
	    <th width="106" rowspan="2" align="center">Keterangan</th>
	  </tr>
		<tr>
	    <th align="center">Tingkat Pertama</th>
	    <th align="center">Tingkat Banding</th>
	    <th align="center">Permohonan Kasasi</th>
	    <th width="99" align="center">Penerimaan Memori Kasasi</th>
	    <th width="119" align="center">Penetapan Tidak Memenuhi Syarat    Formal</th>
	    <th width="99" align="center">Pengiriman Berkas    ke MA</th>
	    <th width="99" align="center">Putus kasasi</th>
	    <th width="121" align="center">Penerimaan kembali berkas kasasi    di PA</th>
	    <th width="109" align="center">Pemberitahuan ke    para pihak</th>
	  </tr>
	  <?php for ($a=1; $a<=11;$a++){
        echo "<th style='width:20px;'>".$a."</th>";
          }
    ?>

    <?php
	if($laporan!=''){
		if($laporan->num_rows>0){
			$i=0;
			foreach ($laporan->result() as $row) {	
				$i++;
				echo "<tr>";
					echo "<td style='text-align:center;width:20px;'>".$i."</td>";
					echo "<td style ='text-align:left'>".$row->nomor_perkara_pa."</td>";
					echo "<td style ='text-align:left'>".$row->nomor_perkara_banding."</td>";
					echo "<td style ='text-align:left'>".parse_date($row->permohonan_kasasi)."</td>";
					echo "<td style ='text-align:left'>".parse_date($row->penerimaan_memori_kasasi)."</td>";
					echo "<td style ='text-align:left'>&nbsp</td>";
					echo "<td style ='text-align:left'>".parse_date($row->pengiriman_berkas_ma)."</td>";
					echo "<td style ='text-align:left'>".parse_date($row->putusan_kasasi)."</td>";					
					echo "<td style ='text-align:left'>".parse_date($row->penerimaan_berkas_kasasi_pa)."</td>";
					echo "<td style ='text-align:left'>".parse_date($row->pemberitahuan_putusan_kasasi_pihak)."</td>";					
					echo "<td>&nbsp</td>";
				echo "</tr>";
			
			}
		}
          else {

                   echo "<tr>";
					echo "<td style='text-align:center;width:20px;'>1</td>";
					echo "<td style ='text-align:left'>Tidak ada data kasasi bulan ini</td>";
					echo "<td style ='text-align:center'>-</td>";
					echo "<td style ='text-align:center'>-</td>";
					echo "<td style ='text-align:center'>-</td>";
					echo "<td style ='text-align:center'>-</td>";
					echo "<td style ='text-align:center'>-</td>";
					echo "<td style ='text-align:center'>-</td>";					
					echo "<td style ='text-align:center'>-</td>";
					echo "<td style ='text-align:center'>-</td>";
					echo "<td style ='text-align:center'>&nbsp;</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>